eureka配置文件无法解析配置属性Cannot resolve configuration property

图片说明

黄色的那三条。永远提示Cannot resolve configuration property

一下是springcloud和eureka的配置

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.M9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<spring-cloud.version>Finchley.M9</spring-cloud.version

eureka


<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
</dependencies>

1个回答

你给导入的依赖(eureka)加个版本号(最好是最新的)即可,去mvn资料库查找

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
13、resolve属性配置
resolve配置 该配置有好几个属性,每个属性都有自己的功能 resolve的常用属性 modules 只查找当前配置目录,不往上查找 alias 别名 mainFields 查找到包后读取的顺序 比如读取boostrap,在node_modules中查找到boostrap文件夹,里面的package.json知名了main为该目录下的dist/js/boostrap,指明...
随笔之---Eureka配置文件的配置
服务名称 spring.application.name=eureka 服务端口 server.port= 设定access log 的目录. server.undertow.accesslog.dir=false #=作为服务端的配置=== #关闭自我保护,防止因保护模式而不将挂掉的服务踢出掉 eureka.server.enable-self-preservation=false #eurek...
could not resolve property
[b]rn用Criteria进行链表模糊查询时,报拉could not resolve property错,该怎么解决?rnrnrnrn/b]
HibernateQueryException: could not resolve property
org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: createSN.department.id of: cn.jbit.demo.entity.ClaimVoucher; nested exception is org.hibernate.QueryException: could not resolve property: createSN.department.id of: cn.jbit.demo.entity.ClaimVoucherrn at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:656)rn at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)rn at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)rn at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)rn at cn.jbit.demo.dao.impl.VoucherDaoImpl.getPage(VoucherDaoImpl.java:33)rn at cn.jbit.demo.service.impl.VoucherServiceImpl.getPage(VoucherServiceImpl.java:32)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)rn at com.sun.proxy.$Proxy24.getPage(Unknown Source)rn at cn.jbit.demo.service.web.action.VoucherAction.searchClaimVoucher(VoucherAction.java:58)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)rn at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)rn at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2381)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2370)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:745)rn使用Criteria查询时出现的问题,Hibernate用的是注解映射,能在JSP页面使用获取到值,求帮助
could not resolve property:
遇到了一个问题请教一下大家!先谢谢了哈!rn*.hbm.xml文件中有一个字段workfId的映射关系:rnrn rn rnrn我在查询中运用的是:rn public List getCombinationWorkfId(String workfId)rn rn Criteria criteria = getHibernateTemplate().getSessionFactory().openSession().createCriteria(Combination.class); rn criteria.add(Expression.eq("workfId","015"));rn List list = criteria.list(); rn System.out.print(list.size());rn getHibernateTemplate().getSessionFactory().close();rn return list; rn rn用debuge试也也能得到workId的值,但就是在 List list = criteria.list();取不到值,请各位指点!
cannot resolve symbole
下面是系统启动进rc脚本里面的时候出来的错误rntimeout time is 60 srnWatchdog card enabled.rnWATCHDOG: Device closed unexpectedly - timer will not stoprnWatchdog Ticking Away!rnwatchdog establishrnrnhostname: symbol '': can't resolve symbolrnhostname ixp435rnrnmount: symbol '': can't resolve symbolrnrnmount: symbol '': can't resolve symbolrnrnmount: symbol '': can't resolve symbolrnJFFS2 notice: (23) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.rnrnifconfig: symbol '': can't resolve symbolrnrngrep: symbol '': can't resolve symbolrnload linux-2.6.x network modules......rnrnmknod: symbol '': can't resolve symbolrnmknod: /dev/ixNpe: File existsrnrninsmod: symbol '': can't resolve symbolrnUsing /lib/modules/ixp400.kornixp400: module license 'unspecified' taints kernel.rnrn大家有谁遇到过吗
cannot resolve symbol
public class Gardernpublic static void main(String[] args) rnint testscore = DialogBox.requestInt("Please input a int number: ");rnchar grade;rnif (testscore >= 90) rngrade = 'A';rn else if (testscore >= 80) rngrade = 'B';rn else if (testscore >= 70) rngrade = 'C';rn else if (testscore >= 60) rngrade = 'D';rn else rngrade = 'F';rnrnTranscript.println("Grade = " + grade); rnrnrnrn编译时出现2个错误:1. cannot resolve symbolrn symbol:variable DialogBoxrn location:class Garde int testscore = DialogBox.requestInt("Please input a int number: ");rn 2. cannot resolve symbolrn symbol:variable Transcriptrn location:class Garde Transcript.println("Grade = " + grade); rnrn这2个错误是什么错误哦?为什么会产生这个错误?rn是不是因为没有写 import 引入类包的原因?
cannot resolve symbol 错误
我编写了两个类,写在两个文件中,第一个编译正确rn第二个类之中test1 test = new test1();编译报错rncannot resolve symbol rn请问如何解决
Cannot resolve symbol spark
Windows 7下Intellij IDEA 搭建的Spark开发环境,rnimport org.apache.spark._rn提示Cannot resolve symbol spark,是不是缺少什么文件?
cannot resolve symbol 'DividerItemDecoration'
一个别人的APP给我维护,需要添加一个RecyclerView来显示条目,要求每个条目之间有分割线,于是我设置rn[code=java]deviceNameRecyclerView.addItemDecoration(new DividerItemDecoration(this,DividerItemDecoration.VERTICAL));[/code]rnrn然后android studio显示DividerItemDecoration红字,鼠标一上去显示cannot resolve symbol 'DividerItemDecoration',我第一反应是没有import,于是我用alt+enter,但弹出菜单只有若干Create class xxxxx...这是什么情况?
cannot resolve symbol(graphics.drawRegion)
请问 graphics.drawRegion 方法,为什么在JBuilder中运行正常,在WTK中就编译不过去了。rnrn如下是WTK中的报错:rnC:\WTK22\apps\Mainlet\src\Mainlet.java:206: cannot resolve symbolrnsymbol : method drawRegion (javax.microedition.lcdui.Image,int,int,int,int,int,int,int,int)rnlocation: class javax.microedition.lcdui.Graphicsrn graphics.drawRegion(imgMarks,21 * 0,0,21,21,0,11,markGroups.marksStepY[i][0],Graphics.LEFT|Graphics.TOP);rnrnrn
cannot resolve symbol,求救
我用的是IIS+RESINrnrn环境变量设置 C:\j2sdk1.4.2\lib\tools.jar;C:\j2sdk1.4.2\lib\dt.jar;C:\resin-3.0.6\doc\test;rnrnPATH设置 D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2\bin\;rnrn在C:\resin-3.0.6\doc\test下DBconn.java文件,编译出来的CLASS文件也在他下面:rn(后来放在C:\resin-3.0.6\doc\WEB-INF\classes下也不行)rnimport java.sql.*; rnpublic class DBconn rnString DBDriver = "sun.jdbc.odbc.JdbcOdbcDriver"; rnString ConnStr = "jdbc:odbc:test"; rnConnection conn = null; rnResultSet rs = null; rnpublic DBconn() rntry rnClass.forName(DBDriver); rn rncatch(java.lang.ClassNotFoundException e) rnSystem.err.println("DBconn (): " + e.getMessage()); rn rn rnpublic ResultSet executeQuery(String sql) rnrs = null; rntry rnconn = DriverManager.getConnection(ConnStr,"admin","admin"); Statement stmt = conn.createStatement(); rnrs = stmt.executeQuery(sql); rn rncatch(SQLException ex) rnSystem.err.println("aq.executeQuery:" + ex.getMessage()); rn rnreturn rs; rn rn rn这个JAVA文件编译没有问题,可是我在原来的目录下写了一个JSP文件访问的时候就出错了rn rn rn rn 客户信息调查 rn rn rn 客户信息调查 rn<%@ page language="java" import="java.sql.*" %> rn rn<% rnResultSet RS = DBconn1.executeQuery("SELECT * FROM FEE"); rnwhile (RS.next()) rnout.print(" " + RS.getString("name") + ""); rnout.print(" " + RS.getString("address") + ""); rnout.print(" " + RS.getString("info") + ""); rn rnRS.close(); rn%> rn rnrnrn错误信息:rn500 Servlet Exceptionrn/test/mydata.jsp:9: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn DBconn1;rn ^rn/test/mydata.jsp:10: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn1 = (DBconn) pageContext.getAttribute("DBconn1");rn ^rn/test/mydata.jsp:12: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn1 = new DBconn();rn ^rn3 errorsrnrn如果写一个单独的JSP文件是可以访问的,加入类的时候就找不到了rnrn在resin3里面怎么样配置才可以让JSP找到我的CLASS呢?我在官方网站上看了半天没太明白,有知道的大哥请告诉我rnrn小弟初学者,上面这些代码基本都是抄来的,有人能告诉我怎么回事么?多谢了rn
Help: cannot resolve symbol?
HelloWorldApplet.javarn=======================rn import java.awr.*; rn import java.applet.*; rn public class HelloWorldApplet extends Applet //an applet rn public void paint(Graphics g) rn g.drawString ("Hello World!",20,20); rn rn rn=======================rnrnwhile in DOSrnrn========================rn>javac HelloWorldApplet.javarnHelloWorldApplet.java:1: package java.awr does not existrn import java.awr.*;rn ^rnHelloWorldApplet.java:4: cannot resolve symbolrnsymbol : class Graphicsrnlocation: class HelloWorldAppletrn public void paint(Graphics g)rn ^rn2 errorsrnrn========================rnrnMay anyone tell me the reason and method to resolve this problem? Sorry I'm new here...rnrnEnvironment: J2SDK1.4.0+win2000
cannot resolve symbol 错误!!
我编写了两个类,写在两个文件中,第一个编译正确rn第二个类之中test1 test = new test1();编译报错rncannot resolve symbol rn请问如何解决
"cannot resolve symbol" error.why
class AdvantureMainrnrn /*rn * Start the game by calling play function.rn */rn public static void main(String args[])rn AdvantureGame game = new AdvantureGame();rn game.play();rn rnrn
cannot resolve symbol的问题
小弟初学java,运行一下别人写好的代码。是一个打字的applet。代码如下:rnpublic class TypeTrainApplet extends JApplet rn  …rn  private class GenerateDropThread extends Thread rn  Random random = new Random(); //随机数rn   public void run() rn    try rn     while (statusCode != 0) //产生下落线程rn      synchronized (canvas) rn       while (statusCode == 2) rn        canvas.wait();rn       rn      rn      DropCharThread dropCharThread = new DropCharThread(rn       getRandomChar(),rn       random.nextInt(columnCount) + 1);rn       dropCharThread.start();rn       Thread.sleep(generateInterval);rn      rn      catch (InterruptedException ex) rn     rn    rn可是总提示Random random = new Random(); 这一行是“cannot resolve symbol”。这是为什么啊?
cannot resolve symbol什么意思?
我在jcreator终于运行正常的程序,在editplus 2中编译为什么会出现下列错误:rncannot resolve symbol(这句什么意思?)rnrnsymbol:class ThreadTestrnlocation:class Thread3rn Runnable r1=new ThreadTest();rn ^rnrn望高手指点,解决立刻给分!
idea cannot resolve symbol
maven依赖导入的Jar是能在libs下看到的,但是java文件里依赖飘红,invalidate and restart idea和reimport maven依赖都试过了,重新从git上down了一遍项目依然如此,求大神帮忙怎么解决
cannot resolve symbol :class
俺是JAVA新手 请大侠赐教:rn我的程序 运行报错rncannot resolve symbol :class Mainframernlocation: class .....rn好像是CLASSPATH有问题。rn我在LINUX下已经设定了 CLASSPATH ,其中有路径和rt.jat 和tools.jarrnrn我用:rnjavac -source Main.java rn出现以上错误rn
Cannot resolve reference to bean 'sessionFactory' while setting bean property 's
struts1.X,hibernate3.2,Spring 2.xrn一直包上面的错误,也按照网上说的,删除hibernate的asm,用spring下的asm开头的3个jarrn可以程序还是报错,如下:rn[code=Java]rnrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userinfoDaoImpl' defined in file [E:\workspace\jail_Locate\WebRoot\WEB-INF\classes\applicationContext-beans.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [E:\workspace\jail_Locate\WebRoot\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class filernCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [E:\workspace\jail_Locate\WebRoot\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class filernCaused by: java.lang.UnsupportedClassVersionError: Bad version number in .class filern at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(Unknown Source)rn at java.security.SecureClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.defineClass(Unknown Source)rn at java.net.URLClassLoader.access$100(Unknown Source)rn at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClassInternal(Unknown Source)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:57)rn at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)rn at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)rn at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410)rn at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)rn at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:267)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1100)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:862)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:122)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:66)rn at com.telezone.jail.servicesImplTestCase.UserinfoImplTestCase.testSaveUserinfo(UserinfoImplTestCase.java:16)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at junit.framework.TestCase.runTest(TestCase.java:168)rn at junit.framework.TestCase.runBare(TestCase.java:134)rn at junit.framework.TestResult$1.protect(TestResult.java:110)rn at junit.framework.TestResult.runProtected(TestResult.java:128)rn at junit.framework.TestResult.run(TestResult.java:113)rn at junit.framework.TestCase.run(TestCase.java:124)rn at junit.framework.TestSuite.runTest(TestSuite.java:232)rn at junit.framework.TestSuite.run(TestSuite.java:227)rn at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)rn[/code]rnrnJar如下:rnant-1.6.5.jarrnant-antlr-1.6.5.jarrnant-junit-1.6.5.jarrnant-launcher-1.6.5.jarrnantlr-2.7.6.jarrnant-swing-1.6.5.jarrnasm-2.2.3.jarrnasm-commons-2.2.3.jarrnasm-util-2.2.3.jarrnaspectjrt.jarrnaspectjweaver.jarrnc3p0-0.9.1.jarrncheckstyle-all.jarrncleanimports.jarrncommons-collections-2.1.1.jarrncommons-logging-1.0.4.jarrnconcurrent-1.3.2.jarrnconnector.jarrndom4j-1.6.1.jarrnehcache-1.2.3.jarrnhibernate3.jarrnjaas.jarrnjacc-1_0-fr.jarrnjavassist.jarrnjaxen-1.1-beta-7.jarrnjboss-cache.jarrnjboss-common.jarrnjboss-jmx.jarrnjboss-system.jarrnjdbc2_0-stdext.jarrnjgroups-2.2.8.jarrnjta.jarrnjunit-4.5.jarrnlog4j-1.2.11.jarrnoscache-2.1.jarrnproxool-0.8.3.jarrnspring.jarrnswarmcache-1.0rc2.jarrnsyndiag2.jarrnversioncheck.jarrnxerces-2.6.2.jarrnxml-apis.jarrn
hibernate 无法解析Configuration
一. 配置:Tomcat 5.0 +Eclipse 3.0.1 + MySql + hibernate2.1.7c rnrn二. 问题: rnrn 1 .我在Eclipse 3.0.1下用MiddleGen 工具构建实体映射文件和实体类成功; rnrn 2. 可就在我测试hibernate是否能成功的使用在Jsp页面的时候,页面报错500错误;结果我设断点rn 跟进去一看,Eclipse告诉我说 Configuration 对象无法解析,我起初怀疑是无法找到rn hibernate.cfg.xml文件或hibernate.cfg.xml书写错误,结果我Copy该文件,而且用Filern 类写实际路径给Congiuration对象,还是无法解析,这个问题困扰我几天了!还请各位高手指点rn 迷津rnrnrnrn三. 使用的代码为:rnrnpackage test.hushichen;rnrnrnimport net.sf.hibernate.HibernateException;rnimport net.sf.hibernate.Session;rnimport net.sf.hibernate.SessionFactory;rnimport net.sf.hibernate.cfg.Configuration;rnrnrnpublic class hibernateTestrn rn public hibernateTest()rn rn try rn rn // Create the SessionFactoryrn SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();rn rn catch (Throwable ex) rn rn throw new ExceptionInInitializerError(ex);rn rn rnrnrnrnrnrn四. 报错提示如下:rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletExceptionrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)rn org.apache.jsp.test2_jsp._jspService(test2_jsp.java:63)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrnrnroot cause rnrnjava.lang.ExceptionInInitializerErrorrn test.hushichen.hibernateTest.(hibernateTest.java:23)rn org.apache.jsp.test2_jsp._jspService(test2_jsp.java:50)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.rn
hibernate3报错: could not resolve property
求高手修改我的HQL语句。(SSH2/hibernate3)rnrn我的HQL语句如下:rnString hql = "From Question AS q WHERE q.qid IN(SELECT a.qid FROM Answer AS a WHERE a.userid=?)";rnrn报错信息:org.hibernate.QueryException: could not resolve property: qid of: org.lxh.myzngt.vo.Answer [From org.lxh.myzngt.vo.Question AS q WHERE q.qid IN(SELECT a.qid FROM org.lxh.myzngt.vo.Answer AS a WHERE a.userid=?)]rnrnrn表结构:表Answer 中有外键:qid 对应到表Question 中的q.id.rnrnQuestion.hbm.xml:rnrn rn rn rn rn rn rn rn rn rn rn rn rnrnAnswer.hbm.xml:rnrn rn rn rn rn rn rn rn rnrnrnrnQuestion.java:rnrnpublic class Question rn private int qid;rn private Set answers;rn public int getQid() rn return qid;rn rn public void setQid(int qid) rn this.qid = qid;rn rn public Set getAnswers() rn return answers;rn rn public void setAnswers(Set answers) rn this.answers = answers;rn rnrnrnAnswer.java:rnrnpublic class Answer rn private int aid;rn private int qid;rn private Question question;rn rn public Question getQuestion() rn return question;rn rn public void setQuestion(Question question) rn this.question = question;rn rn public int getAid() rn return aid;rn rn public void setAid(int aid) rn this.aid = aid;rn rn public int getQid() rn return qid;rn rn public void setQid(int qid) rn this.qid = qid;rn rn rn rnrn
hibernate中 could not resolve property
hibernate could not resolve propertyrn配置是正确的,偶尔才会出现这个错误,求解。。。。。。
org.hibernate.QueryException: could not resolve property: DownloadFile
帮我找一下原因rnrnrn public DownloadFile get(String trueUrl, String baseUrl) rn DownloadFile downloadFile = (DownloadFile) sessionFactoryrn .getCurrentSession()rn .createQuery(rn "select d from SpiderUrls s inner join fetch s.DownloadFile as d where d.trueUrl =:trueUrl and s.pageUrl =: pageUrl")rn .setString("trueUrl", trueUrl).setString("pageUrl", baseUrl).uniqueResult();rn return downloadFile;rn rnrnrnrnrnorg.hibernate.QueryException: could not resolve property: DownloadFile of: com.spider.service.SpiderUrls [select d from com.spider.service.SpiderUrls s inner join fetch s.DownloadFile as d where d.trueUrl = :trueUrl and s.pageUrl =: pageUrl]rn at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)rn at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:75)rn at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1451)rn at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:312)rn at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:487)rn at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:611)rn at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:263)rn at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:210)rn at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117)rn at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:366)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3583)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3364)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3237)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:724)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:575)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:292)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235)rn at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:254)rn at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)rn at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)rn at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:101)rn at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:80)rn at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:98)rn at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)rn at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)rn at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1760)rn at com.spider.service.DownloadFileService.get(DownloadFileService.java:33)rn at com.spider.service.DownloadFileService$$FastClassByCGLIB$$f3dc331c.invoke()rn at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)rn at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)rn at com.spider.service.DownloadFileService$$EnhancerByCGLIB$$818c190c.get()rn at com.spider.extractor.ExtractorImage.download(ExtractorImage.java:102)rn at com.spider.extractor.ExtractorImage.extract(ExtractorImage.java:73)rn at org.archive.crawler.extractor.Extractor.innerProcess(Extractor.java:67)rn at org.archive.crawler.framework.Processor.process(Processor.java:109)rn at org.archive.crawler.framework.ToeThread.processCrawlUri(ToeThread.java:306)rn at org.archive.crawler.framework.ToeThread.run(ToeThread.java:154)rn
could not resolve property: patientid of: com.dentist.domain.Case
之前的几个模块都没有报这个字段不匹配异常啊rnrn[code=java]rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rn[code=java]rnrnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn 照片rn rn rn rn rn rn rn rn rn rnrn[/code]rn[code=java]public Page findCase(Case c,Integer pageNum) rn rn DetachedCriteria dc = DetachedCriteria.forClass(Case.class);rn //患者idrn if(c.getPatient().getId()!=null)rn dc.add(Restrictions.eq("patientid", c.getPatient().getId()));rn rn //病历创建日期rn if(c.getDate() != null)rn dc.add(Restrictions.eq("date", c.getDate()));rn rn rn return findByPropertyWithCriteria(dc, pageNum);rn [/code]rn[code=java]rn /**rn * 分页rn */rn private Page findByPropertyWithCriteria(DetachedCriteria dc, int currPage) rn Session session = this.getSession();rn // 查总条数rn dc.setProjection(Projections.rowCount());rn Criteria c = dc.getExecutableCriteria(session);rn int countNum = (Integer) c.uniqueResult();//此行在运行时控制台报错rn // 总页数rn int totalPage = 1;rn if (countNum % Constants.PAGE_NUMBER == 0) rn totalPage = countNum / Constants.PAGE_NUMBER;rn else rn totalPage = countNum / Constants.PAGE_NUMBER + 1;rn rn Page page = new Page();rn page.setTotalPage(totalPage);rnrn // 去掉刚刚添加rowCount投影rn dc.setProjection(null);rn Criteria c1 = dc.getExecutableCriteria(session);rn int num = (currPage - 1) * Constants.PAGE_NUMBER;rn c1.setFirstResult(num);rn c1.setMaxResults(Constants.PAGE_NUMBER);rn List result = c1.list();rn page.setResult(result);rn page.setCurrPage(currPage);rn return page;rn [/code]
Cannot load or save configuration
把phpMyAdmin解压后放在放在apache的hdocs目录下后访问http://localhost/phpmyadmin/setup/index.php结果显示rnCannot load or save configuration [img=http://C:\Documents and Settings\Administrator\桌面][/img]rn查看了好多资料都没有解决,就高手指点rn
cannot resolve symbol :variable change
代码如下:<%rnString submit1_=change.convert(request.getParameter("Submit")); rn String submit2_=change.convert(request.getParameter("Submit2")); rn String submit3_=change.convert(request.getParameter("Submit3"));rn rn if(submit1_.equals("查询")) rn rn out.println("你"); rn rn if(submit2_.equals("提交")) rn rn out.println("好"); rn rn if(submit3_.equals("删除")) rn rn out.println("啊"); rn rn%>rn用TOMCAT运行就出现问题了 一般什么原因 谢谢大虾
cannot resolve symbol错误!急!
用JCreator编译java代码时,出现cannot resolve symbol错误,代码如下:rnrnpackage pj.cwt.database;rnrnimport java.sql.*;rnrnpublic class DBConnectrnrnrn private Connection conn;rn private Statement stmt;rn private PreparedStatement prepstmt;rn private DBConnectionManager dcm;rn...rn...rn...rn错误信息:rnD:\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\WEB-INF\classes\pj\cwt\database\DBConnect.java:15: cannot resolve symbolrnsymbol : class DBConnectionManager rnlocation: class pj.cwt.database.DBConnectrn private DBConnectionManager dcm;rn ^rn是不是CLASSPATH设置错误?rn我的CLASSPATH=d:\j2sdk1.4.0\lib\tools.jar;d:\tomcat\jakarta-tomcat-3.3.1\classes;d:\tomcat\jakarta-tomcat-3.3.1\lib;D:\tomcat\jakarta-tomcat-3.3.1\webapps\ROOT\WEB-INF\classes\pj\cwt\databasernrn请问该如何解决?rnrn
cannot resolve symbol,怎么回事呀
我是一个java新手,现在遇到了一个问题,请大家帮我看一下:rn我做了两个java文件:DBConnection.java(作用是连接数据库);DBSQLMangae.java(作用是对数据库进行操作).rnDBConnection.java是用package bookshop;打成bookshop的包。。rn这个文件已编译成功,并生成了DBConnection.classrnDBSQLMangae.java是import bookshop.*调用包bookshop中的方法和属性,但是老是有错误:cannot resolve symbol。我估计意思应该是不能解释所引用的谅和属性吧rn我第一java文件不是已经编译成功了吗?到底怎么回事?rn另外说明一下我用JSP连接数据库没有做么问题!运行JSP文件都没有问题!rnrn我装的是JBuilder9, 装在D:\JBuilder9下 rn Tomacat5, 装在D:\Tomcat5.0下rnrn我的目录结构是rn文件的根目录D:/Tomcat5.0/jsp-examples/bookshop/rnrnindex.jsprnWEB-INF/classes/bookshop/ DBConnection.classrnWEB-INF/classes/bookshop/ DBConnection.javarnWEB-INF/classes/bookshop/ DBSQLMangae.java
报错:cannot resolve symbol createTempFile
运行下面的代码结果报错。rnrncannot resolve symbol createTempFilernrn代码:rnrn import java.io.File;rn import android.graphics.Bitmap;rn import android.graphics.BitmapFactory;rn import android.view.View;rn rn public final class Utilrn rn static Bitmap image;rn rn public static File getOutputMediaFile(byte[] data)rn rn rn image= BitmapFactory.decodeByteArray(data, 0, data.length);rn rn rn File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "FrontFlash");rn rn rn rn // Create the storage directory if it does not existrn if (!mediaStorageDir.exists())rn rn if (!mediaStorageDir.mkdirs()) return null;rn rn rn // Create a media file namern String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());rn File mediaFile=null;rn rn //mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_" + timeStamp + ".jpg");rn rn mediaFile = new File.createTempFile("dsadsa", ".jpg");rn rn return mediaFile;rn rnrn
一个错误:cannot resolve symbol?
public class temp extends UnicastRemoteObject implements temp2rntemp2.class在当前的目录里,为什么不能解析该符号。
紧急求助,cannot resolve symbol
我编写了一个程序,不知道为什么会出现5个错误??rnrnD:\>javac Mingqu.javarnMingqu.java:37: cannot resolve symbolrnsymbol : class Actioneventrnlocation: class Mingqurn public void actionPerformed(Actionevent e)rn ^rnMingqu.java:21: menu is already defined in init()rn JMenu menu=new JMenu("音乐");rn ^rnMingqu.java:29: cannot resolve symbolrnsymbol : variable menuItem4drnlocation: class Mingqurn menu.add(menuItem4d);rn ^rnMingqu.java:30: cannot resolve symbolrnsymbol : variable menuBarrnlocation: class Mingqurn menuBar.add(menu);rn ^rnMingqu.java:35: cannot resolve symbolrnsymbol : variable menuBarrnlocation: class Mingqurn return menuBar;rn ^rn5 errorsrnrnrn大家帮我看看到底是那里搞错了???!rn谢谢了!!rnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnimport java.applet.*;rnimport java.net.*;rnrnpublic class Mingqu implements ActionListenerrn JMenuItem menuItem1,menuItem2,menuItem3,menuItem4;rn AudioClip sound=loadSound("1.wav");rn static JFrame frame;rn public static void main(String args[])rn frame=new JFrame("名曲欣赏");rn frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);rn Mingqu ming=new Mingqu();rn frame.setJMenuBar(ming.init());rn frame.setSize(250,150);rn frame.setVisible(true);rn rn public JMenuBar init()rn JMenuBar menu=new JMenuBar();rn JMenu menu=new JMenu("音乐");rn menuItem1=new JMenuItem("播放");rn menu.add(menuItem1);rn menuItem2=new JMenuItem("循环");rn menu.add(menuItem2);rn menuItem3=new JMenuItem("停止");rn menu.add(menuItem3);rn menuItem4=new JMenuItem("退出");rn menu.add(menuItem4d);rn menuBar.add(menu);rn menuItem1.addActionListener(this);rn menuItem2.addActionListener(this);rn menuItem3.addActionListener(this);rn menuItem4.addActionListener(this);rn return menuBar;rn rn public void actionPerformed(Actionevent e)rn if(e.getSource==menuItem1) sound.play();rn if(e.getSource==menuItem2) sound.loop();rn if(e.getSource==menuItem3) sound.stop();rn if(e.getSource==menuItem4) System.exit(0);rn rn private AudioClip loadSound(String fileName) rn URL url=null;rn try url=new URL("file:"+System.getProperty("user.dir")+"/"+fileName);rn catch(MalformedURLException e)rn return Applet.newAudioClip(url);rn rn
cannot resolve symbol class ResultSet
求助各位大侠 谢谢了 代码如下rn<%@page contentType="text/html;charset=gb2312"%>rnrn<%!String sql,name;%>rn<%rnsql="select * from WordAffix";rnResultSet rs=sqlbean.executeQuery(sql);rnwhile(rs.nex())rn name=rs.getString("name");rnrn%>rnrnname:<%=name%>rnrn<%rnrs.close();rn%>
cannot resolve symbol问题,求救!
我用的是IIS+RESINrnrn环境变量设置 C:\j2sdk1.4.2\lib\tools.jar;C:\j2sdk1.4.2\lib\dt.jar;C:\resin-3.0.6\doc\test;rnrnPATH设置 D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2\bin\;rnrn在C:\resin-3.0.6\doc\test下DBconn.java文件,编译出来的CLASS文件也在他下面:rnimport java.sql.*; rnpublic class DBconn rnString DBDriver = "sun.jdbc.odbc.JdbcOdbcDriver"; rnString ConnStr = "jdbc:odbc:test"; rnConnection conn = null; rnResultSet rs = null; rnpublic DBconn() rntry rnClass.forName(DBDriver); rn rncatch(java.lang.ClassNotFoundException e) rnSystem.err.println("DBconn (): " + e.getMessage()); rn rn rnpublic ResultSet executeQuery(String sql) rnrs = null; rntry rnconn = DriverManager.getConnection(ConnStr,"admin","admin"); Statement stmt = conn.createStatement(); rnrs = stmt.executeQuery(sql); rn rncatch(SQLException ex) rnSystem.err.println("aq.executeQuery:" + ex.getMessage()); rn rnreturn rs; rn rn rn这个JAVA文件编译没有问题,可是我在原来的目录下写了一个JSP文件访问的时候就出错了rn rn rn rn 客户信息调查 rn rn rn 客户信息调查 rn<%@ page language="java" import="java.sql.*" %> rn rn<% rnResultSet RS = DBconn1.executeQuery("SELECT * FROM FEE"); rnwhile (RS.next()) rnout.print(" " + RS.getString("name") + ""); rnout.print(" " + RS.getString("address") + ""); rnout.print(" " + RS.getString("info") + ""); rn rnRS.close(); rn%> rn rnrnrn错误信息:rn500 Servlet Exceptionrn/test/mydata.jsp:9: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn DBconn1;rn ^rn/test/mydata.jsp:10: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn1 = (DBconn) pageContext.getAttribute("DBconn1");rn ^rn/test/mydata.jsp:12: cannot resolve symbolrnsymbol : class DBconn rnlocation: class _test._mydata__jsprn DBconn1 = new DBconn();rn ^rn3 errorsrnrn小弟初学者,上面这些代码基本都是抄来的,有人能告诉我怎么回事么?多谢了rn
UserTransaction cannot resolve symbol!!! why??????
我在 javabean 中使用事务,代码如下:rnrn javax.transaction.UserTransaction ut =null; <----- 报错rn InitialContext initContext = null;rn initContext = new InitialContext();rn ut = initContext.lookup("javax.transaction.UserTransaction"); <---- 报错rnrn但在编译时,总报错,说 不能解析符号 UserTransaction,不知为何?rnrn我的环境是:weblogic8.1sp2+jbuilerx
这怎么能cannot resolve symbol?
我写了两个.java文件SqlBridge.java和LoginUser.java,代码如下:rn//Sql_Bridge.javarnpackage mybeans.bookstore;rnimport java.lang.*;rnimport java.sql.*;rnimport javax.swing.*;rnimport javax.servlet.*;rnrnpublic class SqlBridgern private Connection conn;rn private ResultSet rs;rn private ResultSetMetaData rsmd;rn private Statement stmt;rn private String driverName;rn private String jdbcURL;rn private String username;rn private String password; rnrnrn//LoginUser.javarnpackage mybeans.bookstore;rnimport java.sql.*;rnrnpublic class LoginUserrnrn private boolean isMember;rn private boolean checked;rn private String id="";rn private String password="";rn private SqlBridge sqlBridge;rnrnrn并都存在d:\classes\mybeans\bookstore\下,rn我用d:\classes\mybeans\bookstore\javac SqlBridge.java顺利编译通过,但当我rn用d:\classes\mybeans\bookstroe\javac LoginUser.java时却报错:rnLoginUser.java:10:cannot resolve symbolrnsymbol:class SqlBridgernlocation: class mybeans.bookstore.LoginUserrn private SqlBridge sqlBridge;rn1 errorrn
cannot resolve symbol怎么处理???
源代码如下:rnpackage firstPackage;rnimport java.lang.system;rnimport java.io.*;rnrnpublic class Hellorn public String personName;rn public void Hello();rn public String readname() rn int ch;rnString name = "";rnboolean ok = false;rnSystem.out.println("Please enter your name:");rnwhile (!ok) rn try rn ch = System.in.read();rn if (ch<0 || (char)ch == '\n')rn ok = true;rn else if ((char)ch != '\r')rn name = name + (char)ch;rn rncatch (IOException e) rn ok = true;rn rnrnpersonName = name;rnreturn name;rnrnpublic static void main (String[] args) rn String name;rn Hello myfirst = new Hello();rn name = myfirst.readname();rn System.out.println("Welcome to the Java World." + name + ".");rn System.out.println("And may you success.");rnrnrnrn报错:rnHello.java:2:cannot resolve symbolrnsymbol:class systemrnlocation:package landrnimport java.lang.system;rn
JAVA 关于 cannot resolve method
写一个打怪兽的小程序,需要将MonsterBattle3改动一下使得它可以使用定义的接口rnrn提示 Battleable的接口只定义了receiveDamage的method,只有这个可见。rnreceiveDamage中,checkStatus 的method也被呼出,但Battleable interface中没有指定rnhitPoint是instance,没有在interface中声明。rn直接呼出将会被检查,接下来只要确定呼出的methodrnrn我直接从日语翻译过来的。。。所以很奇怪。rn我也看不懂他想表达什么rnrnhitPointフィールドもインタフェースでは宣言されていない。直接呼rn出すメソッドが可視かどうかだけがチェックされ、あとは呼び出されたメソッドが動作すればよいのです。rnrnrn```rn public class MonsterBattle3 rn rnrn public static void main(String[] args) rn Monster[] monsterArray = new Monster[3]; // 書き換えた。rnrn monsterArray[0] = new Slime();rnrn int power = 5;rn for (int n = 1; n <= 10; n++) rn System.out.println("% Start Round " + n + "!");rn for (int i = 0; i < 3; i++) rn monsterArray[i].receiveDamage(power); // (1)rn rn rn rnrnrn```rnrnrn```rn public abstract class Monster rnrn String name;rn int hitPoint; // or health pointrn String status = "active"; // hitPoint <= 0で"killed"になる。rnrnrn public boolean checkStatus() rn if (hitPoint <= 0) rn System.out.println(name + " was killed.");rn status = "killed";rn return false; // killedになったときにfalseを返す。rn else rn return true; // activeならtrueを返す。rn rn rnrnrn```rnrnrn```rn public class Slime extends Monster implements Battleablern // Constructorrn Slime() rn name="Slime";rn hitPoint=50;rn System.out.println(name + "が現れた!");rn rnrn public void receiveDamage(int p) rn if(status.equalsIgnoreCase("active") ) // activeのときだけ戦う。rn int damage= p*5;rn hitPoint = hitPoint - damage;rn checkStatus();rn rn rnrn```rnrnrn```rn public interface Battleable rn void receiveDamage(int p);rnrn```rn修改MonsterBattle3使其可以执行并不报错rn可能没人看得懂要做什么。。。rn可是我真的不知道应该怎么办rnrnrnrnrn
警告Cannot resolve com.mysq.jdbc.Connection.ping method.
[b][size=24px]我的一个新布好的平台启动后出现警告,请猿友帮忙分析,下面贴代码:[/size][/b]rnrn
在级别Configuration 上无法解析urn
大家好:rn我机子上安装的是sql 的版本如下:rnrnMicrosoft SQL Server Management Studio 9.00.1399.00rnMicrosoft Analysis Services 客户端工具 2005.090.1399.00rnMicrosoft 数据访问组件 (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)rnMicrosoft MSXML 2.6 3.0 5.0 6.0 rnMicrosoft Internet Explorer 8.0.6001.18702rnMicrosoft .NET Framework 2.0.50727.42rn操作系统 5.2.3790rnrnrn今天早上开始sql客户端连接的时候提示 “在级别Configuration 上无法解析urn“ ,在网上搜素了一下,但没有搜出来一条相关的信息,请问论坛里有哪位隐居的高人能帮下忙吗?谢谢了rn
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数