ClassNotFoundException:

问题描述:
昨天下午开始复习javaweb时候 准备重温一遍LoginServlet 遇到了一个之前没遇到的问题
点击登陆按钮后 提示错误500

Myeclipse 错误信息如下:

严重: Allocate exception for servlet Login
java.lang.ClassNotFoundException: com.servlet.Login
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1050)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:779)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

 问题已经解决 根源是class没有立刻生成 XML文件配置正确 但是class在servlet创建后没有生成
 解决方法 在Myeclipse 界面的 projecet 选项里面的 Build Automatically 打上对勾即可

13个回答

有这个com.servlet.Login类吗,要么配置文件的问题..要么就是这个类没有被编译成字节码文件,JVM加载不到的时候就会抛出这个异常

qq_41295136
qq_41295136 没有被编译成字节码文件 应该就是class文件 今天看到最正确的答案 楼上面都是说XML文件没有配置好 我也在那方面检查了几遍 谢谢各位大佬指点 问题解决方案在问题下方已经给出
一年多之前 回复

这是因为少了相应的jar包,没有发现相应jar包中的类

qq_41295136
qq_41295136 解决方法 在Myeclipse 界面的 projecet 选项里面的 Build Automatically 打上对勾即可
一年多之前 回复
qq_41295136
qq_41295136 问题已经解决 根源是class没有立刻生成 XML文件配置正确 但是class在servlet创建后没有生成
一年多之前 回复
qq_41295136
qq_41295136 具体我也不知道有没有解决这个问题 我把jdk classpath重新配置了一遍重启了下电脑这个问题好像解决了
一年多之前 回复
qq_41295136
qq_41295136 大神能否具体一些
一年多之前 回复

没加载到类,缺少jar包

qq_41295136
qq_41295136 你是指缺少了 我写的com.servlet.Login 还是缺少了什么
一年多之前 回复
qq_41295136
qq_41295136 我去找找
一年多之前 回复

没有加载到类,是不是你的项目引用的jar包没有加载到容器里面去。解决办法,把你的项目删掉重新编辑一次(注意别永久删除了)

qq_41295136
qq_41295136 回复qq_41295136: 没有效果 HTTP Status 500 - Error instantiating servlet class com.servlet.Login
一年多之前 回复
qq_41295136
qq_41295136 我去试一下
一年多之前 回复

首先看一下你那个Login类在web.xml中配置了没有(或者使用注解的方式配置),其次看一下继承HttpServlet了没有。

qq_35480463
煜羡 配置文件的问题吧
一年多之前 回复
qq_37866581
IdealSpring 没有找到相应的类,配置文件问题
一年多之前 回复
qq_41295136
qq_41295136 回复qq_39625079: 有的 xml也部署了
一年多之前 回复
qq_39625079
TheGuardianWithDan 你应该查看一下com.servlet.Login
一年多之前 回复
qq_41295136
qq_41295136 我这个新用户注册 不能发图片 我也不知道怎么解决
一年多之前 回复
qq_41295136
qq_41295136 这个我有看到配置了
一年多之前 回复

没有找到对应的类,看web.xml配置文件能不能直接点击进去

web.xml没有配置servelet,servelet名称,路径要在里面配置的,百度一下就知道了

500的话,应该是服务端的问题,首先你要看一下服务器是否可以正常启动,如果可以的话,就是jar包的问题,如果不可以正常启动,就是servlet的配置问题,也就是web.xml的配置

qq_41295136
qq_41295136 我是重启了tomcat的 我需要检查tomcat服务器吗
一年多之前 回复

Servlet好像有版本问题,不同的版本可能会导致出错的

qq_41295136
qq_41295136 我是需要升级servlet吗
一年多之前 回复

很明显,服务器端问题(500),提示 com.servlet.Login这个类没有找到,看看自己的Servlet是怎么配置的是不是包路径有问题

qq_41295136
qq_41295136 配置的包路径肯定没问题 有问题会提示类不存在 直接xml就会告诉我 我创建完serv
一年多之前 回复
共13条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ClassNotFoundException
java.lang.ClassNotFoundException: org.springframework.web.struts.ContextLoaderPlugIn 这是什么原因?谢谢n  
classnotfoundException
之前一直 用的是MyEclipse,现在公司要求用Eclipse,本以为会很容易,结果还折腾了下。算了,还是直接看问题吧[img=https://img-bbs.csdn.net/upload/201406/12/1402543600_615845.png][/img]rn明明引入了相应的JAR包的呀,怎么就一直提示找不着呢?是ECLIPSE的问题吗?有人知道原因吗?
classNotFoundException
不知道怎么回事:rn[img=https://img-bbs.csdn.net/upload/201610/10/1476080630_140266.png][/img]
ClassNotFoundException 求助
先上代码:rnrnimport java.sql.*;rnrnrnpublic class DB rnrn /**rn * @param argsrn */rn public static void main(String[] args) rn // TODO Auto-generated method stubrn rn tryrn Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");rn catch(ClassNotFoundException e)rn e.printStackTrace(System.out); rn rnrn tryrn String url="jdbc:sqlserver://localhost:1433;databaseName=message";rn String name="sa";rn String pass="";rn String sql="select * from details";rn rn Connection conn=DriverManager.getConnection(url, name, pass);rn Statement stmt=conn.createStatement();rn ResultSet rs=stmt.executeQuery(sql);rn rn while(rs.next())rn for(int i=0;i<=5;i++)rn System.out.println(rs.getString(i));rn rn rn rn rn catch(SQLException e)rn e.getMessage();rn rn rnrnrn用上述语句执行的时候会出现ClassNotFoundException 而我用myeclipse中的DB browser连接数据库就可以看到数据库的具体细节 这是为什么呀?rnrn我用的是SQL sever 2005 rnrnrn
ClassNotFoundException: org.hibernate.hql.ast.HqlToken
我写的程序在自己机子上运行没有任何问题,可是移植到同事的机器上,却发生如下的问题,请问是怎么回事呀?rnorg.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.exam.bean.Teachers as model where model.name= ?]rn org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)rn antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)rn org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)rn antlr.CharScanner.(CharScanner.java:51)rn antlr.CharScanner.(CharScanner.java:60)rn org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56)rn org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53)rn org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50)rn org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26)rn org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)rn org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232)rn org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155)rn org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109)rn org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75)rn org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54)rn org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)rn org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)rn org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)rn org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)rn com.exam.bean.TeachersDAO.findByProperty(TeachersDAO.java:121)rn com.exam.bean.TeachersDAO.findByName(TeachersDAO.java:135)rn com.exam.servlet.login.doGet(login.java:34)rn com.exam.servlet.login.doPost(login.java:121)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn com.exam.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:32)rn
ClassNotFoundException异常
我有2个工程,一个web工程,一个ejb工程,web工程调用ejb工程rn在web工程里已经添加了对ejb工程的引用,编译也是成功的rnrn但是在运行时,运行到调用ejb工程中的类时,就会产生ClassNotFoundException异常,rn并报错java.lang.NoClassDefFoundError: com/xxx/xxx/common/delegate/Delegaternrnrn请问这是什么原因,谢谢。
ClassNotFoundException:com.mysql.jdbc.Driver
连接不上mysql数据库,我的驱动包是从官网下的最新版本的,java文件是在jcreator中写的,只是一个测试数据库连接的文件,我的做法是这样的:rn把下载的驱动放在C:\Java\jre6\lib目录下,这是jcreator使用的jdk,然后再classpath中加入了数据库驱动的路径,但是执行时依然提示找不到驱动!从网上找了半天,一直都没找到答案,不知道是怎么回事?rn测试数据库连接的代码如下:rnimport java.sql.*;rnpublic class Test rnpublic static Connection getConnection() throws SQLException ,rnjava.lang.ClassNotFoundExceptionrnString url = "jdbc:mysql://localhost:3306/studentinfo";rnClass.forName("com.mysql.jdbc.Driver");rnString userName = "root";rnString password = "123";rnConnection con = DriverManager.getConnection(url,userName,password);rnreturn con;rnrnpublic static void main(String[] args) rntryrnConnection con = getConnection();rnStatement sql = con.createStatement();rnsql.execute("drop table if exists student");rnsql.execute("create table student(id int not null auto_increment,name varchar(20) not null default 'name',math int not null default 60,primary key(id));");rnsql.execute("insert student values(1,'AAA','99')");rnsql.execute("insert student values(2,'BBB','77')");rnsql.execute("insert student values(3,'CCC','65')");rnString query = "select * from student";rnResultSet result = sql.executeQuery(query);rnSystem.out.println("Student 表数据如下:");rnSystem.out.println("---------------------------------");rnSystem.out.println(" 学号"+" "+"姓名"+" "+"数学成绩");rnSystem.out.println("---------------------------------");rnint number;rnString name;rnString math;rnwhile(result.next())rnnumber = result.getInt("id");rnname = result.getString("name");rnmath = result.getString("math");rnSystem.out.println(number + " " + name + " " + math);rnrnsql.close();rncon.close();rncatch(java.lang.ClassNotFoundException e)rnSystem.err.println("ClassNotFoundException:" + e.getMessage());rncatch(SQLException ex)rnSystem.err.println("SQLException:" + ex.getMessage());rnrnrn
ClassNotFoundException: org.apache.struts2.dispatcher.ActionContextCleanUP
我的架包里有struts2-core-2.0.14.jar啊..怎么会出这个错误..
WebSphere was ClassNotFoundException
环境为:rn************ Start Display Current Environment ************rnWebSphere Platform 6.0 [ND 6.0.2.15 cf150636.04] running with process name ibm630-05aCell01\ibm630-05aNode01\server1 and process id 1011782rnHost Operating System is AIX, version 5.2rnJava version = J2RE 1.4.2 IBM AIX build ca142-20050609 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VMrnwas.install.root = /usr/IBM/WebSphere/AppServerrnuser.install.root = /usr/IBM/WebSphere/AppServer/profiles/AppSrv01rnJava Home = /usr/IBM/WebSphere/AppServer/java/bin/../jrernws.ext.dirs = /usr/IBM/WebSphere/AppServer/java/lib:/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/classes:/usr/IBM/WebSphere/AppServer/classes:/usr/IBM/WebSphere/AppServer/lib:/usr/IBM/WebSphere/AppServer/installedChannels:/usr/IBM/WebSphere/AppServer/lib/ext:/usr/IBM/WebSphere/AppServer/web/help:/usr/IBM/WebSphere/AppServer/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtimernClasspath = /usr/IBM/WebSphere/AppServer/profiles/AppSrv01/properties:/usr/IBM/WebSphere/AppServer/properties:/usr/IBM/WebSphere/AppServer/lib/bootstrap.jar:/usr/IBM/WebSphere/AppServer/lib/j2ee.jar:/usr/IBM/WebSphere/AppServer/lib/lmproxy.jar:/usr/IBM/WebSphere/AppServer/lib/urlprotocols.jarrnJava Library path = /usr/IBM/WebSphere/AppServer/java/bin/../jre/bin:/usr/IBM/WebSphere/AppServer/java/jre/bin/classic:/usr/IBM/WebSphere/AppServer/java/jre/bin:/usr/IBM/WebSphere/AppServer/bin:/usr/mqm/java/lib:/usr/opt/wemps/lib:/usr/librnrnrn错误为:rn[8/28/09 16:41:19:682 GMT+08:00] 0000001b ServletWrappe E SRVE0026E: [Servlet Error]-[org.apache.struts.action.ActionServlet]: java.lang.ClassNotFoundException: org.apache.struts.action.ActionServletrnrn[8/28/09 16:41:19:784 GMT+08:00] 0000001b WebExtensionP W Servlet action is currently unavailable: SRVE0200E: Servlet [org.apache.struts.action.ActionServlet]: Could not find required servlet class - org.apache.struts.action.ActionServletrn[8/28/09 16:41:19:885 GMT+08:00] 0000001b WebExtensionP E SRVE0026E: [Servlet Error]-[javax.servlet.UnavailableException: SRVE0200E: Servlet [org.apache.struts.action.ActionServlet]: Could not find required servlet class - org.apache.struts.action.ActionServletrnrn[8/28/09 16:41:20:289 GMT+08:00] 0000001b WebExtensionP W Servlet InitSystem is currently unavailable: SRVE0203E: Servlet [InitSystem]: SystemServlet was found, but is missing another required class.rnSRVE0206E: This error typically implies that the servlet was originally compiled with classes which cannot be located by the server.rnSRVE0187E: Check your classpath to ensure that all classes required by the servlet are present.SRVE0210I: This problem can be debugged by recompiling the servlet using only the classes in the application's runtime classpathrnrn[8/28/09 16:44:35:449 GMT+08:00] 00000030 WebApp E SRVE0026E: [Servlet Error]-[Filter [operatorLoginFilter]: AdminLoginFilter was found, but is missing another required class.rn]: java.lang.NoClassDefFoundError: org/apache/log4j/Loggerrnrnrn好像WebSphere找不到应用中的jar包rnrn谁能告诉我怎么解决啊
classNotFoundException JSP
[code=Java]严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at bean.querySpecialBean.setConnection(querySpecialBean.java:36)rn at org.apache.jsp.updateSpecial_jsp._jspService(updateSpecial_jsp.java:115)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)[/code]rn代码出错如下:rn1.rnpublic void setConnection(String driverName,String jdbcURL,String username,String passwd) throws Exception rn rn rn rn Connection conn1; rn Class.forName(driverName); rn conn1=DriverManager.getConnection(jdbcURL,username,passwd); rn conn1.setAutoCommit(false); rn this.conn = conn1; rnrn 2.rnrn specialUpdate.setConnection("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:music","sa",""); rn
ClassNotFoundException: his.Client
Web Server端定义了一个类Client,想在server和客户端共享该类:rnpackage his;rnimport java.io.Serializable;rnpublic class Client implements Serializablern private static final long serialVersionUID = 1L;rn public String uName = null;rn public String uPwd = null;rn public Client() rnrnServer端没有问题,客户端按如下步骤引入该类:rn1. 根据Eclipse提示(Clien报错提示,quick fix),把 web project 添加到 客户端 projectrn2. 此时错误已经没有,编译成功,执行客户端,报错:ClassNotFoundException: his.Clientrn3. 试着修改客户端Java Build Path属性(新手,瞎改一通),问题依旧。
Class.forName ClassNotFoundException
这是程序:rn[code=Java]rnpublic class Test rn public static void main(String args[])rn try rn System.out.println([color=#FF0000]Huntress.class[/color].getName());rn System.out.println(([color=#FF0000]Class.forName[/color]("[color=#FF0000]Huntress[/color]").getName()));rn catch (ClassNotFoundException e) rn e.printStackTrace();rn rn rnrn[/code]rn这是运行结果:rn"C:\Program Files\Java\jdk1.6.0_10\bin\java" -Didea.launcher.port=7555 "-Didea.launcher.bin.path=E:\Program Files\JetBrains\IntelliJ IDEA 9.0\bin" -Dfile.encoding=GBK -classpath "D:\myproject\p\target\class;C:\Program Files\Java\jdk1.6.0_10\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\jai_codec.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\jai_core.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\mlibwrapper_jai.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\sunpkcs11.jar;E:\Program Files\JetBrains\IntelliJ IDEA 9.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain pattern.flyweight.Testrnjava.lang.[color=#FF0000]ClassNotFoundException[/color]: [color=#FF0000]Huntress[/color]rn at java.net.URLClassLoader$1.run(URLClassLoader.java:200)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:307)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:252)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn[color=#FF0000]pattern.flyweight.Huntress[/color]rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:169)rn at pattern.flyweight.Test.main(Test.java:12)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)rnrnProcess finished with exit code 0rnrnide为IntelliJ IDEA 9.0rn帮忙看看。。。
ClassNotFoundException的疑惑
小弟初学webservice,碰到一个错误:rnrnE:\test\apache-tomcat-6.0.14\webapps\stove\WEB-INF\classes>java cn.com.pansky.wernbservice.xfire.study.SayHiClientrnException in thread "main" java.lang.NoClassDefFoundError: org/codehaus/xfire/sernrvice/binding/ObjectServiceFactoryrn at cn.com.pansky.webservice.xfire.study.SayHiClient.main(SayHiClient.javrna:14)rnCaused by: java.lang.ClassNotFoundException: org.codehaus.xfire.service.binding.rnObjectServiceFactoryrn at java.net.URLClassLoader$1.run(URLClassLoader.java:202)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:190)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:247)rn ... 1 morernrnrn我完全是手写开发,没用到eclipse,直接在tomcat的webapp目录下建的项目,出现上面错误后,我找到了ObjectServiceFactory这个类,是在xfire-core-1.2.6.jar这个包中,而我已经把这个包放到了lib目录下,为什么会出现上面的错误呢?为什么会找不到类?rnrn还有就是在手写程序的时候,如果有些类是在jar包中的,而类SayHiClient.java中用到了jar包中的几个类,rnimport org.codehaus.xfire.client.Client; rnimport org.codehaus.xfire.client.XFireProxyFactory; rnimport org.codehaus.xfire.service.Service; rnimport org.codehaus.xfire.service.binding.ObjectServiceFactory; rnimport org.codehaus.xfire.transport.http.CommonsHttpMessageSender; rn我该如何让其通过编译呢? (我编译老是出错,所以编译放到了eclipse中做的)rnrn恳请各位高手指教
ClassNotFoundException的问题
部署时碰到了这个异常,求大神给看看该怎么弄!!rnjava.lang.ClassNotFoundException: com.wondersgroup.tyyymh.workspace.listener.InitCodeListApplicationListenerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rn2016-7-14 9:29:45 org.apache.catalina.core.StandardContext listenerStartrn严重: Error configuring application listener of class com.wondersgroup.tyyymh.workspace.listener.ApplicationContextListenerrnjava.lang.ClassNotFoundException: com.wondersgroup.tyyymh.workspace.listener.ApplicationContextListenerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4149)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
贴上代码:rn  rn rn rn com.mysql.jdbc.Driverrn rn rn jdbc:mysql://localhost:3306/bbsrn rn rn rootrn rn rn 123456rn rn rn  rn 我用到的包:rn rn rn rn 启动tomacat报异常:rn  rn  rn 严重: Context initialization failedrn org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourcern at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)rn at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)rn at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:583)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourcern at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)rn at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)rn at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)rn ... 33 morern 2010-7-25 15:27:02 org.apache.catalina.core.StandardContext listenerStartrn 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrn org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.commons.dbcp.BasicDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourcern at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)rn at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)rn at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:516)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:583)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourcern at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)rn at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)rn at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)rn at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)rn ... 33 morern 2010-7-25 15:27:02 org.apache.catalina.core.StandardContext startrn 严重: Error listenerStartrn 2010-7-25 15:27:02 org.apache.catalina.core.StandardContext startrn 严重: Context [] startup failed due to previous errorsrn
重现:classNotFoundException
(在Eclipse中)rnpackage ch2;rnrnimport java.sql.*;rn//import com.mysql.jdbc.Driver;rnpublic class TestConn rnrn rn rn public static void main(String[] args)rn String username = "root";rn String password = "kevoo";rn Connection conn = null;rn Statement stat = null;rn ResultSet rs = null;rn rn tryrn Class.forName("com.mysql.jdbc.Driver");rn conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/login",username,password);rn stat = conn.createStatement();rn rs = stat.executeQuery("select * from user_info");rn int id = rs.getInt(1);rn System.out.print(id);rn catch(Exception e)rn e.printStackTrace();rn finallyrn tryrn rs.close();rn stat.close();rn conn.close();rn catch(Exception e)rn rn rn rn rn rnrnrnrn运行时提示java.lang.ClassNotFoundException: com.mysql.jdbc.Driverrn 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 ch2.TestConn.main(TestConn.java:17)rnrnrn但我已经在项目的lib目录下加进了mysql-connector-java-5[1].0.0-beta-bin.jar包,并且也在项目属性-->构建路径-->库中添加了这个jar包。(mysql-connector-java-3.1.7-bin.jar也没有用!)rnrnrn请高手帮忙了。。。rn
ClassNotFoundException终极解决办法
ClassNotFoundException终极解决办法 完美解决ClassNotFoundException,jar包在线查找库,在线下载库
hadoop+hbase:ClassNotFoundException:org.apache.hadoop.hbase.HBaseConfiguration
我手里有一份自动生成的模拟登录数据,里面的格式为id#password#email,大概300W条,我想利用hadoop的集群处理优势将这些数据存入到HBase中,以user+i为row key,然后columnFamily包含id,password,email的信息。rn下面是代码:(写的经验不足,请多指点)rn[code=java]public class SaveToHBase rn public static int userNumber = 0;rn public static String tableName = "UserData";rn public static String columnFamily = "userinfo";rn public static Configuration cfg = HBaseConfiguration.create();rn rn public static class Map extends Mapperrn public void map(LongWritable key,Text value,Context context) throws IOException, InterruptedExceptionrn context.write(new Text("user"+userNumber), value);rn userNumber++;rn rn rn rn public static class Reduce extends Reducerrn public void reduce(Text key,Text value,Context context) throws IOException, InterruptedExceptionrn String[] data = value.toString().trim().split("#");rn SaveToHBase.put(tableName, key.toString(), columnFamily, "id", data[0]);rn SaveToHBase.put(tableName, key.toString(), columnFamily, "password", data[1]);rn SaveToHBase.put(tableName, key.toString(), columnFamily, "email", data[2]);rn context.write(key,value);rn rn rn rn public static void put(String tableName,String row,String columnFamily,String column,String data) throws IOExceptionrn HTable table = new HTable(cfg, tableName);rn Put put = new Put(Bytes.toBytes(row));rn put.add(Bytes.toBytes(columnFamily),Bytes.toBytes(column),Bytes.toBytes(data));rn table.put(put);rn rn rn public static void create(String tableName, String columnFamily) throws Exceptionrn HBaseAdmin admin = new HBaseAdmin(cfg);rnrn HTableDescriptor tableDescriptor = new HTableDescriptor(tableName);rn tableDescriptor.addFamily(new HColumnDescriptor(columnFamily));rn admin.createTable(tableDescriptor);rn rn rn public static boolean delete(String tableName) throws Exceptionrn HBaseAdmin admin = new HBaseAdmin(cfg);rn if(admin.tableExists(tableName))rn try rn admin.disableTable(tableName);rn admin.deleteTable(tableName);rn catch (Exception e) rn // TODO: handle exceptionrn e.printStackTrace();rn return false;rn rn rn return true;rn rn rn public static void main(String[] args) throws Exception rn Configuration conf = new Configuration();rn// SaveToHBase.delete(tableName);rn SaveToHBase.create(tableName, columnFamily);rn Job job = new Job(conf, "Save ");rn job.setJarByClass(SaveToHBase.class);rn job.setMapperClass(Map.class);rn job.setReducerClass(Reduce.class);rn job.setOutputKeyClass(Text.class);rn job.setOutputValueClass(Text.class);rn job.setInputFormatClass(TextInputFormat.class);rn job.setOutputFormatClass(TextOutputFormat.class);rn FileInputFormat.addInputPath(job, new Path(args[0]));rn FileOutputFormat.setOutputPath(job, new Path(args[1]));rn System.exit(job.waitForCompletion(true) ? 0 : 1);rn rnrn[/code]rn从这个工程中导出jar包,然后指定输入输出目录,然后就遇到ClassNotFoundException:org.apache.hadoop.hbase.HBaseConfiguration这个错误了,我已经做了一些调整:rn1,导入了hbase-site.xml文件rn2,导入了hbase-0.94.13.jarrn根据http://blog.csdn.net/zwx19921215/article/details/21531015这里的提示,放到hadoop/lib下也没有起作用,请问各位大神,这个问题是出在哪里呢?虽然是简单的classnotfound,但是需要的我导入了啊。。。自己琢磨好几天了,不过还没想通,先谢谢大家了
ClassNotFoundException: javax.persistence.Entity 出错
我写了个用hibernate的测试项目,代码不长:rnUser类 三个属性rnid name passwordrn[code=Java]rn@Entityrnpublic class User rnrn private int id;rn private String name;rn private String password;rnrn @Idrn public int getId() rn return id;rn rnrn public void setId(int id) rn this.id = id;rn rnrn public String getName() rn return name;rn rnrn public void setName(String name) rn this.name = name;rn rnrn public String getPassword() rn return password;rn rnrn public void setPassword(String password) rn this.password = password;rn rn[/code]rn测试用的jsp主要代码:rn[code=Java]rnUser user = new User();rnuser.setId(111111);rnuser.setName("wdf");rnuser.setPassword("asd");rnrnConfiguration c = new AnnotationConfiguration();rnSessionFactory s = c.configure().buildSessionFactory();rnSession ss = s.openSession();rnss.beginTransaction();rnss.save(user);rnss.getTransaction().commit();rnss.close();rns.close();rn[/code]rnrn配置文件:rn主要一行:rnrnrnrn现在问题是 我如果不用annotation 写个User.cfg.xml的话,是运行正常,现在改成annotation,反而出错:rnClassNotFoundException: javax.persistence.Entityrn到谷歌查了一下,还是没找到法子,我用的是Hibernate最新版,包含了annotation,感觉就是@Entity识别不出,怎么可能?这是java ee中的内容 与hiernate无关呀!望大家帮帮忙,不甚感激!
JSF问题,ClassNotFoundException
启动TomCat的时候就异常了,之前在别的机器上Eclipse6.0 + Tomcat 6.0么问题rn然后回家换成Tomcat5.5.23 就有问题了,之后又重新建了一个jsf的简单工程调试,还是ClassNotFoundExceptionrn找不到的类是:javax.faces.webapp.FacesServletrn我在Eclipse里面是可以智能感知菜单点出这个类的,估计是我哪里Eclipse配置错误了,请告知,baidu也没百到问题的解决,只好求助于CSDN了
weblogic8.13+JDK1.4.2_13 报ClassNotFoundException
javax.servlet.ServletException: [HTTP:101249][ServletContext(id=15288634,name=admin,context-path=/admin)]: Servlet classrn com.aspire.oasyn.config.Init for servlet oasyninit could not be loaded because the requested class was not found in thern classpath D:\bea\user_projects\domains\mydomain\applications\admin\WEB-INF\classes;D:\bea\user_projects\domains\mydomairnn\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\activation591.jar;D:\bea\user_projects\domainsrn\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\ant592.jar;D:\bea\user_projects\domainrns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\classes12593.jar;D:\bea\user_projectsrn\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\cog-jglobus594.jar;D:\bea\userrn_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-beanutils595.rnjar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commonrns-collections596.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WrnEB-INF\lib\commons-dbcp597.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\rnjarfiles\WEB-INF\lib\commons-digester598.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myservernr_admin_admin\jarfiles\WEB-INF\lib\commons-fileupload599.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdeletern\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-httpclient-3.0.1600.jar;D:\bea\user_projects\domains\mydomainrn\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-lang601.jar;D:\bea\user_projects\domainrns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-logging602.jar;D:\bea\user_prrnojects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-pool603.jar;D:\brnea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-resourrnces604.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\librn\commons-validator605.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfirnles\WEB-INF\lib\CR196963_81sp3.2606.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admrnin_admin\jarfiles\WEB-INF\lib\ftp607.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_adrnmin_admin\jarfiles\WEB-INF\lib\ibatis-db608.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\mysernrver_admin_admin\jarfiles\WEB-INF\lib\jakarta-oro609.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extrnract\myserver_admin_admin\jarfiles\WEB-INF\lib\jar4admin610.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelrnete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-1.1-beta-2611.jar;D:\bea\user_projects\domains\mydomain\mysernrver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-core612.jar;D:\bea\user_projects\domains\mydomrnain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-full613.jar;D:\bea\user_projects\domairnns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-jdom614.jar;D:\bea\user_projecrnts\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jcommon-0.9.5615.jar;D:\bea\rnuser_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jdom616.jar;D:\berna\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jfreechart-0.9.rn20617.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\rnjspsmartupload618.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\rnWEB-INF\lib\jstl619.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfilerns\WEB-INF\lib\junit620.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfrniles\WEB-INF\lib\jxl621.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarrnfiles\WEB-INF\lib\log4j622.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\rnjarfiles\WEB-INF\lib\mail623.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admirnn\jarfiles\WEB-INF\lib\miscJar624.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_adminrn_admin\jarfiles\WEB-INF\lib\ojdbc14625.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_rnadmin_admin\jarfiles\WEB-INF\lib\patbin626.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserrnver_admin_admin\jarfiles\WEB-INF\lib\quartz627.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\mrnyserver_admin_admin\jarfiles\WEB-INF\lib\saxpath628.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extrrnact\myserver_admin_admin\jarfiles\WEB-INF\lib\servlet-api629.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdernlete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\sims630.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotrndelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\simsportal631.jar;D:\bea\user_projects\domains\mydomain\myservernr\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\standard632.jar;D:\bea\user_projects\domains\mydomain\mrnyserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\struts633.jar;D:\bea\user_projects\domains\mydomarnin\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xalan634.jar;D:\bea\user_projects\domains\mydrnomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xbean635.jar;D:\bea\user_projects\domains\rnmydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xbean_xpath636.jar;D:\bea\user_projectsrn\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xerces637.jar;D:\bea\user_projrnects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xercesImpl638.jar;D:\bea\urnser_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xml-apis639.jar;D:rn\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xmlParserAPIrns640.jar.rnjava.lang.ClassNotFoundException: com.aspire.oasyn.config.Init.rn at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:824)rn at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)rn at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3238)rn at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3224)rn at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)rn at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)rn at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)rn at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)rn at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)rn at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)rn at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)rn at weblogic.Server.main(Server.java:32)rn> rnrn明明在D:\bea\user_projects\domains\mydomain\applications\admin\WEB-INF\classes;里面有这个类rn并且如果使用weblogic8.14确可以正常使用,没有问题rnrn请教!!!
大家好!Class.forName()的ClassNotFoundException异常。。。
各位早上好!昨完我写了个小程序练练Spring,我DEBUG的时候发现,执行这个代码的时候出现错误 rn 代码为:Class.forName("com.mysql.jdbc.Driver");rn 我把mysql的驱动放在,我项目的lib里面,驱动名字为mysqldriver.jarrn运行时候出现的错误如下: rnException in thread "main" java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 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 zhao.Test.connStart(SpringHello.java:36)rn at zhao.SpringHello.main(SpringHello.java:28)rnrn现在所用的JDK是1.5的!rn
java 连接 oracle 之ClassNotFoundEXception
String url = "jdbc:oracle:thin:@localhost:1521:oradb";rn String username = "system";rn String password = "system";rnrn Connection conn = null;rn try rn Class.forName("oracle.jdbc.driver.OracleDriver");rn conn = DriverManager.getConnection(url, username, password);rn rn catch (Exception e) rn e.printStackTrace();rn return;rn rn//上面是其中的代码rnrn 编译时 出现 java.lang.ClassNotFoundEXception:oracle.jdbc.driver.OracleDriverrnrn不知问题出现在哪里?请那位前辈指教!
java Web 出现ClassNotFoundException
public static Connection getMyConnection()//获取连接rn rn rn tryrn Class.forName("com.mysql.jdbc.Driver").newInstance();//加载rn conn=DriverManager.getConnection(url, "root","123456");rn System.out.print("连接成功");rn rn catch(Exception e)rn e.printStackTrace();rn return conn;rn rnrn我调试时,调试到 Class.forName("com.mysql.jdbc.Driver").newInstance();时,出现ClassNotFoundException的问题呢??为什么呢,我真不知道了
Eclipse 调试问题(ClassNotFoundException)
Eclipse 调试问题(ClassNotFoundException)rn我以前用Eclipse 调试(debug)功能 rn以前一向好用 rnrn可是今天 不知道为什么调试功能不行了! rn提醒: rn线程 [main](已暂挂(异常 java.lang.ClassNotFoundException)) rn java.lang.ClassLoader.findBootstrapClass(java.lang.String) 行: 不成用 [本机法子] [没有局部变量可用] rn sun.misc.Launcher$ExtClassLoader(java.lang.ClassLoader).findBootstrapClass0(java.lang.String) rn 行: 709 不可用rn sun.misc.Launcher$ExtClassLoader(java.lang.ClassLoader).loadClass(java.lang.String, boolean) 行: 284 不可用rn sun.misc.Launcher$AppClassLoader(java.lang.ClassLoader).loadClass(java.lang.String, boolean) 行: 282 不可用rn sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String, boolean) 行: 274 不可用rn sun.misc.Launcher$AppClassLoader(java.lang.ClassLoader).loadClass(java.lang.String) 行: 235 不可用rn sun.misc.Launcher$AppClassLoader(java.lang.ClassLoader).loadClassInternal(java.lang.String) 行: 302 不可用rnrn[color=#000000]所有的程序调试都报这个错误![/color] rn[color=#FF0000]程序是都可以运行的,都有功效。可是就是调试(debug)欠好用,真的很郁闷[/color]。 rn感谢列位大侠了呀! rnrnEclipse ,jdk都从头装过了, 仍是不行 rn
java selenium 报错 ClassNotFoundException
![图片说明](https://img-ask.csdn.net/upload/201603/08/1457412795_733378.jpg)
java连接mysql数据库,ClassNotFoundException????
初学Java数据库编程,下面的程序目的大概是测试一下能否连接到本机上的MySQL数据库,在把驱动路径加到CLASSPATH里后,在控制台里直接编译并java MakingTheConnection 能够运行成功;但是当我在Eclipse里新建一个项目,并加入该类时,却抛出异常: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driverrnrn请问如果要在Eclipse里允许该程序,还需做什么操作?rnrn//The code:rnimport java.sql.*;rnrnpublic class MakingTheConnection rnrn public static void main(String[] args) rn rn tryrn Class.forName("org.gjt.mm.mysql.Driver");//Load the driver classrn rn //Define the data source for the driverrn String sourceURL= "jdbc:mysql://127.0.0.1:3306/teacher?user=root&password=";rn //Create a connection through the DriverManagerrn Connection databaseConnection=DriverManager.getConnection(sourceURL);rn rn System.out.println("Connection established successfully!");rn rn databaseConnection.close();//close connectionrn catch(ClassNotFoundException cnfe)rn System.err.println(cnfe);rn rn catch(SQLException sqle)rn System.err.println(sqle);rn rn rn
急!!! weblogic8.13+JDK1.4.2_13 报ClassNotFoundException
javax.servlet.ServletException: [HTTP:101249][ServletContext(id=15288634,name=admin,context-path=/admin)]: Servlet classrncom.aspire.oasyn.config.Init for servlet oasyninit could not be loaded because the requested class was not found in thernclasspath D:\bea\user_projects\domains\mydomain\applications\admin\WEB-INF\classes;D:\bea\user_projects\domains\mydomairnn\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\activation591.jar;D:\bea\user_projects\domainsrn\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\ant592.jar;D:\bea\user_projects\domainrns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\classes12593.jar;D:\bea\user_projectsrn\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\cog-jglobus594.jar;D:\bea\userrn_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-beanutils595.rnjar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commonrns-collections596.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WrnEB-INF\lib\commons-dbcp597.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\rnjarfiles\WEB-INF\lib\commons-digester598.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myservernr_admin_admin\jarfiles\WEB-INF\lib\commons-fileupload599.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdeletern\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-httpclient-3.0.1600.jar;D:\bea\user_projects\domains\mydomainrn\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-lang601.jar;D:\bea\user_projects\domainrns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-logging602.jar;D:\bea\user_prrnojects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-pool603.jar;D:\brnea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\commons-resourrnces604.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\librn\commons-validator605.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfirnles\WEB-INF\lib\CR196963_81sp3.2606.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admrnin_admin\jarfiles\WEB-INF\lib\ftp607.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_adrnmin_admin\jarfiles\WEB-INF\lib\ibatis-db608.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\mysernrver_admin_admin\jarfiles\WEB-INF\lib\jakarta-oro609.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extrnract\myserver_admin_admin\jarfiles\WEB-INF\lib\jar4admin610.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelrnete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-1.1-beta-2611.jar;D:\bea\user_projects\domains\mydomain\mysernrver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-core612.jar;D:\bea\user_projects\domains\mydomrnain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-full613.jar;D:\bea\user_projects\domairnns\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jaxen-jdom614.jar;D:\bea\user_projecrnts\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jcommon-0.9.5615.jar;D:\bea\rnuser_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jdom616.jar;D:\berna\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\jfreechart-0.9.rn20617.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\rnjspsmartupload618.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\rnWEB-INF\lib\jstl619.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfilerns\WEB-INF\lib\junit620.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfrniles\WEB-INF\lib\jxl621.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarrnfiles\WEB-INF\lib\log4j622.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\rnjarfiles\WEB-INF\lib\mail623.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admirnn\jarfiles\WEB-INF\lib\miscJar624.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_adminrn_admin\jarfiles\WEB-INF\lib\ojdbc14625.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_rnadmin_admin\jarfiles\WEB-INF\lib\patbin626.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserrnver_admin_admin\jarfiles\WEB-INF\lib\quartz627.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\mrnyserver_admin_admin\jarfiles\WEB-INF\lib\saxpath628.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extrrnact\myserver_admin_admin\jarfiles\WEB-INF\lib\servlet-api629.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotdernlete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\sims630.jar;D:\bea\user_projects\domains\mydomain\myserver\.wlnotrndelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\simsportal631.jar;D:\bea\user_projects\domains\mydomain\myservernr\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\standard632.jar;D:\bea\user_projects\domains\mydomain\mrnyserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\struts633.jar;D:\bea\user_projects\domains\mydomarnin\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xalan634.jar;D:\bea\user_projects\domains\mydrnomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xbean635.jar;D:\bea\user_projects\domains\rnmydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xbean_xpath636.jar;D:\bea\user_projectsrn\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xerces637.jar;D:\bea\user_projrnects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xercesImpl638.jar;D:\bea\urnser_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xml-apis639.jar;D:rn\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_admin_admin\jarfiles\WEB-INF\lib\xmlParserAPIrns640.jar.rnjava.lang.ClassNotFoundException: com.aspire.oasyn.config.Init.rnat weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:824)rnat weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)rnat weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3238)rnat weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3224)rnat weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)rnat weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)rnat weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)rnat weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)rnat weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)rnat weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)rnat weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)rnat weblogic.Server.main(Server.java:32)rn>rnrn明明在D:\bea\user_projects\domains\mydomain\applications\admin\WEB-INF\classes;里面有这个类rn并且如果使用weblogic8.14却可以正常使用,没有问题rnrn请教!!!
ClassNotFoundException com.sybase.jdbc2.jdbc.SybDriver 是什么问题
我用的WEB SERVER是TOMCAT,系统是 UNIX,用JCONNECT连接SYBASE,CLASSEPATH已经配置好,在UNIX下测试可以连上SYBASE,可是在TOMCAT中连接就出现ClassNotFoundException com.sybase.jdbc2.jdbc.SybDriverrn到底这么样来配置TOMCAT,请给位高手指点!rn
ibatis报ClassNotFoundException: String?
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. rnCause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMap/select'. rnCause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not set parameter class. rnCause: java.lang.ClassNotFoundException: Stringrnrn以前这个程序是能正常运行的,现在程序没改,就是jdk升级了,不知什么原因就报错了。rn怎么连系统类也找不到了呢?rnrnjava.lang.ClassNotFoundException: Stringrn请问这种问题如何解决?
hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
各位大侠。我的项目环境是WebLogic10 + Hibernate3 ,rnrn 在做查询的时候,报出 org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken这 个错误(是通过数据源连接的),rnrn 通过在网上找的解决办法,我把 antlr-2.7.6rc1.jar 放到WebLogic的service/lib目录下,然后在daomainS/base_domain/bin/startWeblogic.cmd中的set classpath 的上下分别增加了两句话,如下:rn set PRE_CLASSPATH=%WL_HOME%\server\lib\antlr-2.7.6rc1.jarrnrn set CLASSPATH=%SAVE_CLASSPATH%rnrn set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%rnrnrn然后启动WebLogic,系统正常运行(只能通过数据源方式,如果直连的还是报上面的错误)rn 。。但是。。但是。。。。 可怕的事情来了。rnrn 我把WebLogic做成了本地服务形式,也就是不通过黑窗口启动,而是写了两个脚本,生成一个服务。rn 脚本如下:rn------------------------------------------------------------------------rnrun.bat:rn rnecho offrnSETLOCALrnset DOMAIN_NAME=base_domainrnset USERDOMAIN_HOME=E:\bea\user_projects\domains\base_domainrnset SERVER_NAME=AdminServerrnset PRODUCTION_MODE=truernset JAVA_OPTIONS=-Dweblogic.Stdout="E:\bea\user_projects\domains\base_domain\stdout.txt" -Dweblogic.Stderr="E:\bea\user_projects\domains\teller_domain\stderr.txt"rnset MEM_ARGS=-Xms512m -Xmx1024mrnset WLS_USER=weblogicrnset WLS_PW=weblogicrncall "E:\bea\wlserver_10.3\server\bin\installSvc.cmd"rncall "net start beasvc teller_domain_AdminServer"rnENDLOCALrnrn------------------------------------------------------------------------rnrn------------------------------------------------------------------------rnrnstop.batrnecho offrnSETLOCALrnset DOMAIN_NAME=base_domainrnset SERVER_NAME=AdminServerrncall "E:\bea\wlserver_10.3\server\bin\uninstallSvc.cmd"rnENDLOCALrn-----------------------------------------------------------------------rnrnrn启动服务,通过查看后台日志,仍然报 org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken 这个异常。rnrnrn rnrn 问题描述如上,问题如下,为什么通过前台黑窗口启动WebLogic可以正常运行,反而通过服务就不行了呢? 同样是启动WebLogic,差别就那么大么???
SparkPi 报错 ClassNotFoundException
安装了Spark之后运行 rn[code=java]bin/run-example SparkPi local[/code]rn报错rn[code=java]java.lang.ClassNotFoundException: org.apache.spark.examples.SparkPirn at java.net.URLClassLoader$1.run(URLClassLoader.java:366)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:355)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:354)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:425)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:358)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:270)rn at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:538)rn at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:166)rn at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:189)rn at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:110)rn at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)[/code]rnrnrnspark-env.sh配置如下:rnexport SCALA_HOME=/usr/lib/scala/scala-2.10.5 rnexport JAVA_HOME=/usr/java/default rnexport HADOOP_HOME=/usr/hadoop-2.6.0 rnexport SPARK_MASTER_IP=10.91.230.74 --主机IP地址rnexport HADOOP_CONF_DIR=/usr/ hadoop-2.6.0/etc/hadooprnexport SPARK_MASTER_PORT= 7077 rnrnrn谁能告诉我这究竟是为什么!!![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]rn跪求![img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/3.gif][/img]
android.os.BadParcelableException: ClassNotFoundException when unmarshalling
这是什么原因导致啊? 为什么我的项目就不能使用Parcelable,只要使用Parcelable就报错。现在报错的截图是,高德导航提示的错误信息。rnrnW/System.err: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.amap.api.maps.model.Poirn at android.os.Parcel.readParcelableCreator(Parcel.java:2536)rn at android.os.Parcel.readParcelable(Parcel.java:2462)rn at android.os.Parcel.readValue(Parcel.java:2365)rn at android.os.Parcel.readArrayMapInternal(Parcel.java:2732)rn at android.os.BaseBundle.unparcel(BaseBundle.java:269)rn at android.os.BaseBundle.putInt(BaseBundle.java:454)rn at com.amap.api.navi.AmapRouteActivity.onCreate(AmapRouteActivity.java:112)rn at android.app.Activity.performCreate(Activity.java:6679)rn[img=https://img-bbs.csdn.net/upload/201805/14/1526265199_98717.jpg][/img]
关于ClassNotFoundException 的问题
DataPacket loginDP = null;rntry rnloginDP = (DataPacket) ois.readObject();rn catch (IOException e) return;rncatch (ClassNotFoundException e) rnreturn;rn在接受登录时,出现这类异常rn“ClassNotFoundException ” 不能加载请求类?rn[u]出现此类异常应该往哪些地方查找原因[/u]rnrn
ClassNotFoundException编译错误,SOS!!!!!
以下是MySwing.java的内容:rnrnimport java.awt.*;rnimport java.awt.event.*;rnimport javax.swing.*;rnrnpublic class MySwing extends JFramernrn public MySwing()rn rn super("My First GUI!");rn setSize(400,200);rn Container c = getContentPane();rn c.setLayout(new BorderLayout());rn c.add(new JLabel("label"));rn UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");rn setVisible(true);rn rnrn public static void main(String args[])rn rn new MySwing();rn rnrnrn编译:rnC:\>javac MySwing.javarnMySwing.java:15: unreported exception java.lang.ClassNotFoundException; must becaught or declared to be thrownrn UIManager.setLookAndFeel"com.sun.java.swing.plaf.motif.MotifLookAndFeelrn");rn ^rn1 errorrnrn但不加 UIManager。。。这一行则一切正常,请问是为什么?谢谢!!!!
Tomcat5.0 连接池 ClassNotFoundException:com.mysql.jdbc.Driver
目前正在初学连接池 发生了个奇怪的问题 使用正常连接jdbc没有问题 但是用连接池就出现ClassNotFoundException:com.mysql.jdbc.Driver 错误rn我jar包已经放入工程的lib目录内 请朋友们帮忙rnrn我的部分原文:rnjava代码中:rntry rn rn[color=#99CC00]// Class.forName("com.mysql.jdbc.Driver"); rn// con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");[/color] rn rn InitialContext ic=new InitialContext();rn DataSource ds=(DataSource)ic.lookup("java:comp/env/jdbc/dateTest");rn rn [color=#FF6600]con=ds.getConnection();[/color]rn st=con.createStatement();rn rs=st.executeQuery("SELECT * FROM menu");rn while(rs.next())rn Item i=new Item(rs.getInt(1),rs.getString(2));rn al.add(i);rn rn catch (Exception e) rn e.printStackTrace();rn rn结果[color=#FF0000]st=con.createStatement();[/color]出错rnrn我的工程名是:dateSourcernC:\Program Files\Apache Software Foundation\Tomcat 5.0\conf\Catalina\localhost\dateSource.xml:rnrnrnrn rnrn rn rn maxWaitrn 5000rn rn rn maxActivern 10rn rn rn passwordrn rootrn rn rn urlrn jdbc:mysql://localhost:3306/testrn rn rn driverClassNamern com.mysql.jdbc.Driverrn rn rn maxIdlern 2rn rn rn usernamern rootrn rn rnrnrn工程的web.xml中:rn rn jdbc/dateTestrn javax.sql.DataSourcern Containerrn rnrn错误信息为:rnrg.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'rn at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)rn at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)rn at com.wish.dao.ItemDAO.getAll(ItemDAO.java:35)rn at com.wish.contorlly.ItemServlet.doGet(ItemServlet.java:30)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driverrn at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:854)rn at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:721)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:169)rn at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:760)rn ... 29 morernrn我在强调一下:工程的lib目录下有[color=#FF6600]mysql-connector-java-5.0.3-bin.jar[/color]rn而且在rnC:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\dateSource\WEB-INF\lib也有rnmysql-connector-java-5.0.3-bin.jar rnrn为什么还是ClassNotFoundException错误呢??rnrn因为是新人暂无分数 所以请各位现帮忙 谢谢了
spring : ClassNotFoundException 求救
报错如下:rnorg.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'login' defined in resource [/WEB-INF/Config.xml] of ServletContext: Bean class [action.LoginAction] not found; nested exception is java.lang.ClassNotFoundException: action.LoginActionrnjava.lang.ClassNotFoundException: action.LoginActionrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:242)rn at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:50)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinition(DefaultXmlBeanDefinitionParser.java:303)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinition(DefaultXmlBeanDefinitionParser.java:263)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinition(DefaultXmlBeanDefinitionParser.java:229)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:180)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:164)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:128)rn at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:124)rn at org.springframework.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:64)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:239)rn at org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:282)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:230)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:200)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:102)rn at javax.servlet.GenericServlet.init(GenericServlet.java:211)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)rn at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:595)rnrn====================================================================================================================================rnConfig.xml如下:rnrnrnrn rn rn rn action.LoginInforn rn rn rn fail_viewrn rn rn rn success_viewrn rn rn rn rn rn rn org.springframework.web.servlet.view.JstlViewrn rn rn /WEB-INF/view/ rn rn rn .jsprn rn rn rn rn rn rn rn loginrn rn rn rnrnrn=====================================================================================================================================rnrnaction.LoginAction明明有,为什么找不到?是什么地方配置错了?rn
myeclipse中Class.forName() ClassNotFoundException
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriverrn ……rn at sql.AccessDatabase.(AccessDatabase.java:18)rn ……rnsqljdbc路径已配置rn另外(空指针):rnpublic TeacherTable popTeacherTable() rn //对TeacherTable表查询并返回一条记录,同时指向下一条记录,直到表末尾,返回nullrn try rn TeacherTable tt = new TeacherTable();rn String SQL = "SELECT * FROM TeacherTable;";rn rs = stmt.executeQuery(SQL);//空指针rn if (rs.next()) rn tt.number = rs.getString("number");rn tt.name = rs.getString("name");rn tt.password = rs.getString("password");rn tt.title = rs.getInt("title");rn return tt;rn rn catch (SQLException e) rn e.printStackTrace();rn rn return null; rn
ClassNotFoundException错误怎么解决
我希望通过反射获得其原类。可是提示我找不到类型。但是这个类型明明已经在前面已经用了。并且可以实例化,但就是在反射的时候找不到。我找了相关的网上资料,说可能是ClassPath没设置好,请问各位怎么做?本人是做C#开发的,第一次做java开发,如果问的问题比较白,不要笑话我啊。rnSystem.out.println("to get the class type is "+type.toString());//此处打印的结果是正确的。rnClass cla = Class.forName(type.toString());//在这行报错,ClassNotFoundExceptionrn//解析属性信息rnField[] f=cla.getDeclaredFields();
ClassNotFoundException: org.springframework.web.context.ContextLoaderListener异常!
web.xml使用如下监听方式加载spring时。报错。rn[code=XML]rn rn org.springframework.web.context.ContextLoaderListener rn rnrn rn contextConfigLocationrn classpath:example.xmlrn rn[/code]rnrn目前使用的spring-framework-3.1.2.RELEASE-with-docs下的jar.如下。rncommons-logging-1.1.1.jarrnorg.springframework.asm-3.1.2.RELEASE.jarrnorg.springframework.beans-3.1.2.RELEASE.jarrnorg.springframework.context-3.1.2.RELEASE.jarrnorg.springframework.core-3.1.2.RELEASE.jarrnorg.springframework.expression-3.1.2.RELEASE.jarrnorg.springframework.web-3.1.2.RELEASE.jarrnorg.springframework.web.servlet-3.1.2.RELEASE.jarrn当然我也试过把spring-framework-3.1.2.RELEASE\dist目录下的所有包。也报上面那个错。rntomcat启动就报错说:说找不到org.springframework.web.context.ContextLoaderListener这个类。rn之前我是使用User Library加包方式。网上查一下,直接把包放到lib下。但还是一样的报错。rnrn大侠们,怎么解决呢。我是使用spring3.1.2和tomcat6.0rnrn但我使用下面这个方式加载.却可以正常访问。rn[code=XML]rn rn springMVCrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath*:/example.xmlrn rn 1rn rn rn springMVCrn /rn rn[/code]rnrn请大侠们给给意见。这两种加载方式有什么区别。那种方式比较好。还有为什么我使用listener方式加载,出错?????
相关热词 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天 c#字典序排序 c# 截屏取色 c#中的哪些属于托管机制