报错java.lang.NoClassDefFoundError: org/bouncyc

是运行在ubuntu16.4.04 上的eclipse,具体报错信息如下:
Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
at com.arxanfintech.sdk.wallet.Wallet.(Wallet.java:48)
at clclcl.upload.App.main(App.java:23)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more

看到有的答案说是下载bcprov-jdk14-127.jar,但我在Maven Dependencies里已经有了bcprov-jdk15on-155.jar。并且对于后面的那个ClassNotFoundException,我在Maven Dependencies里也可以找到Wallet类。第一次用Maven,希望各位大佬赐教

11个回答

是找不到资源,我也经常遇到这种问题,去localRepository文件夹里找到报错的资源,删了重下

有没有加载bcprov-jdk14-127.jar这个包

一种是找不到包,还有一个就是检查一下你的build的**classpath**

这是因为加入了jdk的第三方安全库,需要额外配置

1.查看/etc/profile下JAVA_HOME配置路径,

如果不存在,使用whereis java命令你会看到java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java

打开java.conf,找到JAVA_HOME路径

2.将bcprov-jdk14-127.jar放入JAVA_HOME/jre/lib/ext下

3.打开JAVA_HOME/jre/lib/security下的java.security文件,在下面加上

security.provider.x=org.bouncycastle.jce.provider.BouncyCastleProvider


自己去下载一个maven,不要用默认的,eclipse上安装一次就行了

建议你先手动class from 看看该类是否vm已经加载了

我按照上面那位说的下载了bcprov-jdk15on-1.60.jar并且更改了 java.security 报错变成了
Exception in thread "main" java.lang.NoClassDefFoundError: org/spongycastle/jce/provider/BouncyCastleProvider
at com.arxanfintech.common.crypto.core.jce.SpongyCastleProvider.getInstance(SpongyCastleProvider.java:30)
at com.arxanfintech.common.crypto.Crypto.(Crypto.java:59)
at com.arxanfintech.sdk.wallet.Wallet.(Wallet.java:48)
at clclcl.upload.App.main(App.java:23)
Caused by: java.lang.ClassNotFoundException: org.spongycastle.jce.provider.BouncyCastleProvider
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more

请问一下检查build的**classpath** 怎么样算是异常啊

去看下jar包里边是不是有这个包 如果没有手动下载一个放进去 或者用maven自动加载

重新把jar包 add 一下

共11条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java.lang.NoClassDefFoundError: org/jdom/Content
先说环境:rnmyeclipse6.5+tomcat5+jdk1.5rn现在有一个接口A,接口A的实现类为Brn类中有几个方法,主要是用jdom封装XML,方法的返回值是Stringrn现在在web项目中rn在其他的类中用到了这个方法,所以我就要new一个对象了rnA xml=new B();rnB xml=new B();rn用上面的两种方式new一个对象的时都报错rnrn在该new对象的地方设置断点,就报下面的错误:rn报错信息:rnjava.lang.NoClassDefFoundError: org/jdom/Contentrn
java.lang.NoClassDefFoundError: org/dom4j/DocumentException
org.apache.jasper.JasperException: An exception occurred processing JSP page /catalog/Category.jsp at line 8rnrn5: <%rn6: String catID=request.getParameter("catid");rn7: CategoryDAO dao=new CategoryDAO();rn8: Category category=(Category)dao.getCategory(catID);rn9: ProductDAO proDAO=new ProductDAO();rn10: List proList=proDAO.getProductListByCategory(catID);rn11: %>rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjavax.servlet.ServletException: java.lang.NoClassDefFoundError: org/dom4j/DocumentExceptionrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)rn org.apache.jsp.catalog.Category_jsp._jspService(Category_jsp.java:144)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrn可是我在Eclipse中已经把dom4j包导入了呀,求救~~~~
java.lang.NoClassDefFoundError: org/hibernate/Hiberna
我用Hibernate3+Struts1.1+tomcat5.0(JDK1.5+MyEclipse3.1)作一个简单的登陆项目,结果一点登陆就报错,如下:rnjava.lang.NoClassDefFoundError: org/hibernate/HibernateExceptionrncom.yourcompany.struts.action.LoginAction.execute(LoginAction.java:20)rnorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)rnorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rnorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rnorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:709)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn
java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
我在看《Spring实战》,里头有源代码,我试着跑Test,不过出了问题,来求教下,测试代码如下:rnrnpackage com.springinaction.springidol;rnrnimport static org.junit.Assert.*;rnrnimport org.junit.Test;rnimport org.junit.runner.RunWith;rnimport org.springframework.beans.factory.annotation.Autowired;rnimport org.springframework.beans.factory.annotation.Qualifier;rnimport org.springframework.test.context.ContextConfiguration;rnimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;rnrn@RunWith(SpringJUnit4ClassRunner.class)rn@ContextConfiguration("spring-idol.xml")rnpublic class AnnotationConfigTest rn @Autowiredrn @Qualifier("eddie")rn private Instrumentalist eddie;rnrn @Autowiredrn @Qualifier("guitar")rn private Instrument guitar;rnrn @Testrn public void shouldWireWithAutowire() rn assertNotNull(eddie.getInstrument());rn assertEquals(guitar, eddie.getInstrument());rn rnrn抛出的异常是rnjava.lang.NoClassDefFoundError: org/hamcrest/SelfDescribingrn我上网查了下,网上都是说JUnit4现在的版本将这个类移除了,要加新包,所以我就加了maven的依赖:rn rn org.hamcrestrn hamcrest-corern 1.3rn rnrnrn rn junitrn junitrn 4.11rn testrn rn但是还是一直报同一个错误rn另外,我在下下来的maven-repository里头是能够找到SelfDescribing.class文件。我也尝试使用了各种版本的JUnit4。rn请大家教教我吧,谢谢!
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
rnslf4j-api-1.5.2,slf4j-log4j12-1.5.2,log4j-1.2.8包已经有了.rn,rnCaused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/slf4j/LoggerFactoryrn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)rn at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)rn ... 40 morernCaused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactoryrn at org.hibernate.cfg.Configuration.(Configuration.java:151)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.(LocalSessionFactoryBean.java:174)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)rn ... 42 more
java.lang.NoClassDefFoundError: org/hibernate/HibernateException
我用Hibernate3+Struts1.1+tomcat5.0(JDK1.5+MyEclipse3.1)作一个简单的登陆项目,结果一点登陆就报错,如下:rnjava.lang.NoClassDefFoundError: org/hibernate/HibernateExceptionrn com.yourcompany.struts.action.LoginAction.execute(LoginAction.java:20)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn在网上找了下,他们说是Hibernate 3的默认方式是把所有类通过代理方式来进行延迟加载。如果代码中的类有一个私有无参的构造器的话,Hibernate将无法在运行时将项目代码中的类作为子类装载。为了避免这个错误,类中的构造器函数至少应该在包内可见。 rn??不懂这句话是什么意思,我都快郁闷死了,SOS!!!rn
java.lang.NoClassDefFoundError: org/hibernate/MappingNotFoundException
就是这么个问题,我用spring和hibernate jpa ,Google了百度了都没找到答案.谢谢帮我解决这个问题.rn说明,配置的xml都是myEclipse自动生成的.jar包我用的是自己的
java.lang.NoClassDefFoundError: org/jboss/logging/
NULL 博文链接:https://lym6520.iteye.com/blog/310725
java.lang.NoClassDefFoundError: org/jsoup/Jsoup
做了一个RCP项目,想要去抓取网页页面的内容,用了jsoup的jar包。n关键是在抓取类中写了main测试方法可以抓取信息。n为啥到了RCP项目的时候,点击按钮调用抓取类的抓取方法就出现了njava.lang.NoClassDefFoundError: org/jsoup/Jsoupn郁闷啊
java.lang.NoClassDefFoundError: org/jaxen/JaxenException
dom4j解析XML时,导入了jaxen-1.1-beta-6.jar包和dom4j包。在调用rnList data = server.selectNodes("Stat/Stat")时报如下错误,rn其中server是一个Element;rnjava.lang.reflect.InvocationTargetExceptionrn 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.sinodata.bsm.cicp.message.SyncMessageListener.onMessage(SyncMessageListener.java:110)rn at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1229)rn at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)rn at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)rn at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)rn at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.NoClassDefFoundError: org/jaxen/JaxenExceptionrn at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)rn at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)rn at org.dom4j.tree.AbstractNode.selectNodes(AbstractNode.java:164)rn at com.sinodata.bsm.cicp.finder.was6.WebAppFinder.find(WebAppFinder.java:81)rn at com.sinodata.bsm.cicp.service.ResFindService.find(ResFindService.java:52)rn ... 13 morernCaused by: java.lang.ClassNotFoundException: org.jaxen.JaxenExceptionrn 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 ... 18 more
java.lang.NoClassDefFoundError: org/hibernate/Session
import org.hibernate.*;rnimport org.hibernate.cfg.*; rnrnpublic class Test rnrnpublic static void main(String[] args) rntry rnSessionFactory sf = new Configuration().configure().buildSessionFactory(); rnSession session = sf.openSession(); rnTransaction tx = session.beginTransaction(); rnrnfor (int i = 0; i <200; i++) rnCustomer customer = new Customer(); rncustomer.setUsername("customer" + i); rncustomer.setPassword("customer"); rnsession.save(customer); rn rnrntx.commit(); rnsession.close(); rncatch(Exception e)rnrn我用的是3.0,请问各位,这是什么错误??
java.lang.NoClassDefFoundError: org/bouncycastle/cms/CMSException
在使用eclipse编译jmeter源码时,出现了问题rn [javac] F:\Workspaces\test\JMETER2.7\src\components\org\apache\jmeter\assertions\SMIMEAssertion.java:49: 错误: 程序包org.bouncycastle.cms不存在rn [javac] import org.bouncycastle.cms.CMSException;rnrn发现bouncycastle包中确实没有CMSException,但是我找过了很多版本bcprov-jdk16-145.jar,bcprov-jdk16-141.jar,bcprov-ext-jdk16-146.jarrn都没有org.bouncycastle.cms.CMSException;这个类rnrnrn
java.lang.NoClassDefFoundError: org/w3c/dom/Node??
java.lang.NoClassDefFoundError: org/w3c/dom/Node?如何解决这个错误?rn
java.lang.NoClassDefFoundError: org/apache/log4j/Layout
小弟刚接触hibernate,遇见个问题,望高手解答一下,谢谢rnpackage cn.suqiang.hibernate;rn//测试类rnpublic class Test rnrnpublic static void main(String[] args) rnrn People people = new People();rn people.setId("4030417");rn people.setName("suqiang");rn people.setPassword("fengbin");rn people.setAge(18);rn people.setEmail("suqiang@sina.com"); rn PeopleOperater po = new PeopleOperater();rn po.insert(people);rnrnrnrnpackage cn.suqiang.hibernate;rnrnimport org.hibernate.Session;rnimport org.hibernate.SessionFactory;rnimport org.hibernate.cfg.Configuration;rnrnpublic class PeopleOperater rnrn private Session session = null ;rn rn // 在构造方法之中实例化session对象rn public PeopleOperater()rn rn // 找到Hibernate配置rn Configuration config = new Configuration().configure() ;rn // 从配置中取出SessionFactoryrn SessionFactory factory = config.buildSessionFactory() ;rn // 从SessionFactory中取出一个Sessionrn this.session = factory.openSession() ;rn rnrn public void insert(People people)rn rn session.save(people);rn rn rnrnrnConfiguration config = new Configuration().configure() ;句rn出现异常:rnrnjava.lang.NoClassDefFoundError: org/apache/log4j/Layoutrn at org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:140)rn at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:257)rn at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)rn at org.hibernate.cfg.Configuration.(Configuration.java:110)rn at cn.suqiang.hibernate.PeopleOperater.(PeopleOperater.java:22)rn at cn.suqiang.hibernate.Test.main(Test.java:16)rnException in thread "main" rn什么原因啊?小第初学,不太懂org/apache/log4j/Layout是干什么的?在哪?为什么出现这个情况,谢谢
急!java.lang.NoClassDefFoundError: org/hibernate/HibernateException
org.apache.jasper.JasperException: An exception occurred processing JSP page /notice/show.jsp at line 11rnrn8: + path + "/";rn9: String UserName = request.getParameter("UserName");rn10: List list;rn11: NoticeService notice = new NoticeServiceImpl();rn12: if (UserName == null)rn13: rn14: list = notice.list();rnroot causernrnjavax.servlet.ServletException: java.lang.NoClassDefFoundError: org/hibernate/HibernateExceptionrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)rn org.apache.jsp.notice.show_jsp._jspService(show_jsp.java:137)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)rn org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)rn org.apache.jsp.index_jsp._jspService(index_jsp.java:83)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnroot causernrnjava.lang.NoClassDefFoundError: org/hibernate/HibernateExceptionrn com.laboratory.hibernate.service.NoticeServiceImpl.(NoticeServiceImpl.java:15)rn org.apache.jsp.notice.show_jsp._jspService(show_jsp.java:65)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)rn org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)rn org.apache.jsp.index_jsp._jspService(index_jsp.java:83)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnroot causernrnjava.lang.ClassNotFoundException: org.hibernate.HibernateExceptionrn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)rn org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)rn java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn com.laboratory.hibernate.service.NoticeServiceImpl.(NoticeServiceImpl.java:15)rn org.apache.jsp.notice.show_jsp._jspService(show_jsp.java:65)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)rn org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)rn org.apache.jsp.index_jsp._jspService(index_jsp.java:83)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrn源码如下:rnrn<%@ page language="java"rn import="java.util.*,com.laboratory.hibernate.service.*,com.laboratory.hibernate.beans.*"rn pageEncoding="ISO-8859-1"%>rn<%rn String path = request.getContextPath();rn String basePath = request.getScheme() + "://"rn + request.getServerName() + ":" + request.getServerPort()rn + path + "/";rn String UserName = request.getParameter("UserName");rn List list;rn NoticeService notice = new NoticeServiceImpl();rn if (UserName == null)rn rn list = notice.list();rn rn elsern rn list = notice.list(UserName);rn rn%>rnrnrnrnrn rn rnrn My JSP 'show.jsp' starting pagernrn rn rn rn rn rn rnrn rnrn rn rn <%rn for (int i = 0; i < list.size(); i++)rn rn Notice temp = (Notice) list.get(i);rn %>rn rn rn rn <%=temp.getUsername_no()%> rn rn rn <%=temp.getContent_no()%>rn rn rn rn <%rn rn %>rn rn rn rnrn
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
关于struts2.3和hibernate3.2整合出现以下异常rnjava.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitorrn at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:379)rn at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:337)rn at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:241)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)rn at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)rn at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)rn at java.util.concurrent.FutureTask.run(FutureTask.java:138)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitorrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)rn at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)rn ... 27 morernrn可以确定的是asm-3.3.jar已经添加,但是错误仍然存在请高手指教rnrn
关于javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/hibernate
我写了一个类ExportDB,作用是根据映射文件在数据库中删表或建表。rn[code=java]package com.fhe.db;rnrnimport java.io.File;rnrnimport org.hibernate.*;rnimport org.hibernate.Transaction;rnimport org.hibernate.cfg.Configuration;rnimport org.hibernate.tool.hbm2ddl.SchemaExport;rnimport org.junit.Test;rnrnimport com.fhe.util.HibernateUtil;rnpublic class ExportDB rnrn Session s = HibernateUtil.getSession();rn Configuration cfg = null;rn Transaction t = s.beginTransaction();rn/*rn * 根据实体类与映射文件建表rn */rn @Testrn public void createTable() rn // 默认读取hibernate.cfg.xml文件rn cfg = new Configuration().configure(new File("src/hibernate.cfg.xml"));rn // 生成并输出sql到文件(当前目录)和数据库rn SchemaExport export = new SchemaExport(cfg);rn try rn t.begin();// 事务开始rn // 第一个为True就是把DDL语句输出到控制台,第二个为True就是根据持久类和映射文件先执行删除再执行创建操作rn export.setFormat(true).setOutputFile("D:\\sql.sql")rn .create(false, false);rn catch (Exception e) rn System.out.print("出错啦1");rn e.printStackTrace();rn rn try rn t.commit();// 提交事务rn s.close();// 关闭连接rn catch (Exception e2) rn e2.printStackTrace();rn rn rn /*rn * 删表rn */rn public void dropTable()rn // 默认读取hibernate.cfg.xml文件rn cfg = new Configuration().configure(new File("src/hibernate.cfg.xml"));rn // 生成并输出sql到文件(当前目录)和数据库rn SchemaExport export = new SchemaExport(cfg);rn try rn t.begin();// 事务开始rn // 第一个为True就是把DDL语句输出到控制台,第二个为True就是根据持久类和映射文件执行删除数据库架构操作rn export.drop(false, true);rn catch (Exception e3) rn e3.printStackTrace();rn rn try rn t.commit();// 提交事务rn s.close();// 关闭连接rn catch (Exception e4) rn e4.printStackTrace();rn rn rn rnrn[/code]rn接下来写一个main方法调用这个类rn[code=java]public static void main(String[] args) rn // TODO Auto-generated method stubrn ExportDB ed = new ExportDB();rn ed.dropTable();rn [/code]rn是调用成功的了。rn但是我在一个jsp页面中调用之:rn[code=java]rnrn<%ed2.createTable(); %>[/code]rn则一直报错:[code=java]rnorg.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/hibernate/Sessionrn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rnroot causernrnjavax.servlet.ServletException: java.lang.NoClassDefFoundError: org/hibernate/Sessionrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)rn org.apache.jsp.dropTable_jsp._jspService(dropTable_jsp.java:127)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:725)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn[/code]rnhibernate3.jar都是加进lib的了。关键是在应用程序就能调用而在jsp中就不行,请问哪位大侠能给点参考意见。
关于java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
[color=#FF0000][/color]Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactoryrn at org.hibernate.cfg.Configuration.(Configuration.java:152)rn at hibernate.ExportDB.main(ExportDB.java:9)rnrn我的项目里面有LoggerFactor这个类,为什么就没有导进去呢?网上说的那些包也不差啊,我从官方网站下的slf4j完整的包,还是解决不了问题,rn[img=http://hi.csdn.net/space-150265-do-album-picid-479854.html][/img]
java.lang.NoClassDefFoundError: org/apache/log4j/Level
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Levelrn at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)rn at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)rn at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)rn at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)rn at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)rn at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)rn at org.hibernate.cfg.Configuration.(Configuration.java:152)rn at com.lee.hibernate.impl.Base.main(Base.java:14)
java.lang.NoClassDefFoundError: org/apache/el/ExpressionFactoryImpl
tomcat能够正常启动,但是就一直报这个错误,怎么解决啊,高手指教rn致命的: サーブレット jsp のServlet.service()が例外を投げましたrnjava.lang.NoClassDefFoundError: org/apache/el/ExpressionFactoryImplrn at org.apache.jasper.JspCompilationContext.getServletClassName(JspCompilationContext.java:371)rn at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:619)rn at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)rn at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:480)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)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:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:595)
java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
大家给我看看,这个是什么问题,我已经把asm-2.2.3.jar包删了,rnCaused by: rnjava.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitorrn at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)rn at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)rn at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)rn at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)rn at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)rn at net.sf.cglib.proxy.Enhancer.(Enhancer.java:69)rn at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)rn at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)rn at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)rn at org.hibernate.tuple.entity.AbstractEntityTuplizer.(AbstractEntityTuplizer.java:135)rn at org.hibernate.tuple.entity.PojoEntityTuplizer.(PojoEntityTuplizer.java:55)rn at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:56)rn at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:295)rn at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:434)rn at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:109)rn at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)rn at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:226)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)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:1202)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4343)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)rn at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)rn at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)rn at org.apache.catalina.core.StandardService.start(StandardService.java:480)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:556)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:287)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)rn2009-5-5 11:37:43 org.apache.catalina.core.StandardContext startrn严重: Error listenerStart
java.lang.NoClassDefFoundError: org/ibex/classgen/CGConst
一下是源代码,在MyEclipse下运行rn[code=Java]rnimport java.io.*;rnimport java.security.*;rn rnpublic class MD5rn private String inStr;rn private MessageDigest mad5;rn public MD5(String inStr)rn this.inStr=inStr;rn try rn this.mad5=MessageDigest.getInstance("MD5");rn catch (NoSuchAlgorithmException e) rn e.printStackTrace();rn rn rn public String compute()rn char[] charArray=this.inStr.toCharArray();rn byte[] byteArray=new byte[charArray.length];rn for(int i=0;i
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
一个小应用,在MyEclipse+tomcat环境使用没有问题,但是部署到weblogic后报:rnjava.lang.NoClassDefFoundError: org/apache/log4j/Loggerrnrn使用commands-log和log4j是可以启动起来使用的,但是如果用commands-log和log4j的话,weblogic后台会输出很多一大推的信息,所以不想用这两个包,rn所以weblogic启动起来报那个错误,有没有高手指教下如何解决,谢谢!
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationListener
信息: Marking servlet CXFServlet as unavailablern八月 21, 2014 12:35:14 下午 org.apache.catalina.core.StandardContext loadOnStartuprn严重: Servlet /SunUST threw load() exceptionrnjava.lang.NoClassDefFoundError: org/springframework/context/ApplicationListenerrn at java.lang.ClassLoader.findBootstrapClass(Native Method)rn at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1062)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:413)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:411)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:357)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1617)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)rn at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)rn at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)rn at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:142)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1120)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1678)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:724)rn八月 21, 2014 12:35:14 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-apr-8011"]rn八月 21, 2014 12:35:14 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-apr-8009"]rn八月 21, 2014 12:35:14 下午 org.apache.catalina.startup.Catalina startrn信息: Server startup in 22761 msrn
java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration
大家好,我刚接触hibernate。一开始没有在web环境下,一切正常。但是当在web环境下使用时,总遇到java.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfiguration。rnrn我在web.xml中添加了:rnrn com.mypackage.configuration.HibernateListenerrn rn其中,com.mypackage.configuration.HibernateListener为:rnpackage com.mypackage.configuration;rnrnimport org.hibernate.Session;rnimport org.hibernate.SessionFactory;rnimport org.hibernate.cfg.AnnotationConfiguration;rnrn/**rn * @author This class garanties that only one single SessionFactoryrn * is instanciated and that the configuration is done thread safe asrn * singleton. Actually it only wraps the Hibernate SessionFactory.rn * You are free to use any kind of JTA or Thread transactionFactories.rn */rnpublic class HibernateSessionFactoryUtil rnrn /** The single instance of hibernate SessionFactory */rn private static org.hibernate.SessionFactory sessionFactory;rnrn /**rn * disable contructor to guaranty a single instancern */rn private HibernateSessionFactoryUtil() rn rnrn staticrn // Annotation and XMLrn sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();rn // XML onlyrn // sessionFactory = new Configuration().configure().buildSessionFactory();rn rnrn public static SessionFactory getInstance() rn return sessionFactory;rn rnrn /**rn * Opens a session and will not bind it to a session contextrn * @return the sessionrn */rn public Session openSession() rn return sessionFactory.openSession();rn rnrn /**rn * Returns a session from the session context. If there is no session in the context it opens a session,rn * stores it in the context and returns it.rn * This factory is intended to be used with a hibernate.cfg.xmlrn * including the following property thread This would returnrn * the current open session or if this does not exist, will create a newrn * sessionrn * rn * @return the sessionrn */rn public Session getCurrentSession() rn return sessionFactory.getCurrentSession();rn rnrn /**rn * closes the session factoryrn */rn public static void close()rn if (sessionFactory != null)rn sessionFactory.close();rn sessionFactory = null;rnrn rnrnrn在tomcat下运行后,始终报错:rnjava.lang.NoClassDefFoundError: org/hibernate/cfg/AnnotationConfigurationrn at com.mypacakge.configuration.HibernateSessionFactoryUtil.(HibernateSessionFactoryUtil.java:26)rn at com.mypacakge.configuration.HibernateListener.contextInitialized(HibernateListener.java:8)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)rn at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: java.lang.ClassNotFoundException: org.hibernate.cfg.AnnotationConfigurationrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)rn ... 12 morernrnhibernate所有的jar我都load了 (下载的是:http://sourceforge.net/projects/hibernate/files/hibernate4/4.1.9.Final/)。请问是怎么回事呢?
java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException.但我导入的包里已经包含有XmlPullParserException,请问这究竟是什么回事?
java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException
java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessExceptionrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)rn at java.lang.Class.getDeclaredConstructors(Class.java:1853)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:227)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:930)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:903)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at com.sysmaster.service.impl.test.StudentServiceImplTest.testAddStudent(StudentServiceImplTest.java:16)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:601)rn at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)rn at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)rn at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)rn at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)rn at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:236)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)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:467)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)rnCaused by: java.lang.ClassNotFoundException: org.springframework.dao.DataAccessExceptionrn 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:423)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:356)rn ... 41 morernrnSpring整合hibernate时的错误rn
java.lang.NoClassDefFoundError: org/w3c/dom/Element
编译jsp页面的时候每个页面都有这个错误,请问如何解决?
java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
我加了aopalliance-1.0.jar为什么还是报这个错,spring 是3.0.2,IDE是NB6.9.1.
tomcat7.0下运行jsp报错java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFact
我用的是tomcat7.0,运行jsp后报错,说不能找到主方法,然后报标题上的异常。到网上查添加tomcat-juli.jar到Preferentces->MyEclipse->Servers->Tomcat->Tomcat 6.x下,可是我的tomcatperferentces就没有myeclipse这一项啊,不知道怎么改,昨晚纠结了一晚上,求大神帮忙。。。
连接webservice报错java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserExcept
代码如下rnpackage com.smart_home;rnrnimport java.io.IOException;rnimport javax.microedition.lcdui.Command;rnimport javax.microedition.lcdui.CommandListener;rnimport javax.microedition.lcdui.Display;rnimport javax.microedition.lcdui.Displayable;rnimport javax.microedition.lcdui.Form;rnimport javax.microedition.lcdui.TextField;rnimport javax.microedition.midlet.MIDlet;rnimport javax.microedition.midlet.MIDletStateChangeException;rnimport org.ksoap2.SoapEnvelope;rnimport org.ksoap2.serialization.SoapObject;rnimport org.ksoap2.serialization.SoapSerializationEnvelope;rnimport org.ksoap2.transport.HttpTransportSE;rnimport org.xmlpull.v1.XmlPullParserException;rnrnrnpublic class SHMIDlet extends MIDlet rn rn private Display display;rn private TextField tfURL, tfUN, tfPW;rn private Command cmdLogin, cmdExit;rn private Form loginForm;rnrn private String URL;rn private String NAMESPACE;rn private String SOAP_ACTION;rn private String METHOD_NAME;rn private SoapSerializationEnvelope envelope;rn private SoapObject rpc;rn private HttpTransportSE ht;rnrn protected void destroyApp(boolean arg0) throws MIDletStateChangeException rn rnrn protected void pauseApp() rn rnrn protected void startApp() throws MIDletStateChangeException rn display = Display.getDisplay(this);rn loginFace();rn display.setCurrent(loginForm);rn rn rnrn private class LoginListener implements CommandListenerrn public void commandAction(Command c, Displayable d) rn if (c == cmdLogin) rn Thread thread = new Thread()rn public void run() rn URL = "http://cjf780426.xicp.net:803/Demo/DEMO1/GBSvr.dll/soap/IGBSvr/";rn NAMESPACE = "http://tempuri.org/";rn METHOD_NAME = "GBlogin";rn SOAP_ACTION = "urn:GBSvrIntf-IGBSvr#GBlogin";rn String response = null;rn envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);rn rpc = new SoapObject(NAMESPACE, METHOD_NAME);rn ht = new HttpTransportSE(URL);rn rpc.addProperty("UserName", "9990520777");rn rpc.addProperty("UserPWD", "123");rn envelope.dotNet = true;rn envelope.bodyOut = rpc;rn envelope.setOutputSoapObject(rpc);rn try rn ht.debug = true;rn ht.call(SOAP_ACTION, envelope);rn response = (String) envelope.getResponse();rn catch (IOException e) rn e.printStackTrace();rn catch (XmlPullParserException e) rn e.printStackTrace();rn rn System.out.println(response);rn rn ;rn thread.start();rn rn rn rn rn public void loginFace() rn loginForm = new Form("登陆");rn tfURL = new TextField("地址:", "", 150, TextField.ANY);rn tfUN = new TextField("用户名:", "", 20, TextField.ANY);rn tfPW = new TextField("密码:", "", 20, TextField.ANY);rn cmdLogin = new Command("登陆", Command.OK, 1);rn cmdExit = new Command("退出", Command.EXIT, 1);rn loginForm.append(tfURL);rn loginForm.append(tfUN);rn loginForm.append(tfPW);rn loginForm.addCommand(cmdLogin);rn loginForm.addCommand(cmdExit);rn loginForm.setCommandListener(new LoginListener());rn rn rnrn
服务器报错java.lang.NoClassDefFoundError: org/apache/struts/actions/DispatchAction
以前可以重新运行的项目现在报这个错,不知道怎么解决,麻烦高手看1下指点。rnrn[code=Java]严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name '/department' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Class that bean class [com.shili2.action.DeptAction] depends on not found; nested exception is java.lang.NoClassDefFoundError: org/apache/struts/actions/DispatchActionrnjava.lang.NoClassDefFoundError: org/apache/struts/actions/DispatchActionrn at java.lang.ClassLoader.defineClass1(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:620)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)rn at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2733)rn at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)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.util.ClassUtils.forName(ClassUtils.java:127)rn at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:466)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBeanDefinitionParser.java:432)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions(DefaultXmlBeanDefinitionParser.java:347)rn at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:197)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:295)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:129)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:145)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:126)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:270)rn at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)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:546)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)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:785)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)rn at org.apache.catalina.core.StandardService.start(StandardService.java:519)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:581)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:585)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rn2011-1-15 9:35:30 org.apache.catalina.core.StandardContext startrn严重: Error listenerStartrn2011-1-15 9:35:30 org.apache.catalina.core.StandardContext startrn严重: Context [/Shilikaifa2] startup failed due to previous errorsrn2011-1-15 9:35:30 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).rnlog4j:WARN Please initialize the log4j system properly.[/code]
Configuration config = new Configuration();报错java.lang.NoClassDefFoundError: org/dom4j/DocumentException
import org.hibernate.cfg.Configuration;rnrn程序运行到rnConfiguration config = new Configuration();rn报错!错误如下:rnrnException in thread "main" java.lang.NoClassDefFoundError: org/dom4j/DocumentExceptionrn at hibernatetest.HibernateFactory.createConfiguration(HibernateFactory.java:10)rn at hibernatetest.Test.main(Test.java:10)rn什么原因造成的?
SSH框架,报错 [java.lang.NoClassDefFoundError: org/apache/struts2/json/JSONException]
各位前辈、大神,本人在使用ssh开发项目时,遇到一个json的报错,jsp页面报错如下,控制台无报错打印。rn想请教各位前辈,这是什么原因?rnrn[b][size=14px]Struts Problem Report[/size]rn[/b]rnStruts has detected an unhandled exception:rnMessages: rnrn org.apache.struts2.json.JSONExceptionrn org/apache/struts2/json/JSONExceptionrn Method "execute" failed for object com.h.merchant.portal.web.actions.merchant.report.card.sales.ListAction@4446a2c4rnrnFile: org/apache/catalina/loader/WebappClassLoaderBase.javarnLine number: 1,305rnrnStacktracesrnognl.MethodFailedException: Method "execute" failed for object com.h.merchant.portal.web.actions.merchant.report.card.sales.ListAction@4446a2c4 [java.lang.NoClassDefFoundError: org/apache/struts2/json/JSONException]rnrn ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1534)rn ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)rn com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:96)rn com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:88)rn ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1598)rn ognl.ASTMethod.getValueBody(ASTMethod.java:91)rn ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)rn ognl.SimpleNode.getValue(SimpleNode.java:258)rn ognl.Ognl.getValue(Ognl.java:494)rn ognl.Ognl.getValue(Ognl.java:458)rnrn
IDEA Maven调用webservice,报错java.lang.NoClassDefFoundError: org/apache/axis/client
在IDEA开发环境下,调用WebService,在写到Service service = new Service();时报出java.lang.NoClassDefFoundError: org/apache/axis/client/Service,起先是以为缺少jar包,于是就导,结果不是这个原因,网上有方案说是把axis包在File-Project Structure-ArtiFacts的WEB-INF下的Lib中手工导入,照着做了,也不行,实在是没辙了。求助大神帮忙想个办法
websphere8.5.0.0 ear deploy后 启动console一直报错 java.lang.NoClassDefFoundError: org
C:\oiobama workspace\oiobama_web\WebContent\WEB-INF\lib\struts.jar包有啊,rnstuts1.2rn org.apache.commons.digester.Digester startElement Begin event threw errorrn java.lang.NoClassDefFoundError: org.apache.struts.action.ActionMappingrn at java.lang.ClassLoader.defineClassImpl(Native Method)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:262)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)rn at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:852)rn at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:762)rn at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:627)rn at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:583)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:627)rn at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)rn at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)rn at org.apache.struts.config.ActionMappingFactory.createObject(ConfigRuleSet.java:375)rn at org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:389)rn at org.apache.commons.digester.Digester.startElement(Digester.java:1286)rn at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)rn at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)rn at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)rnrn
spring2.0+JPA(Hibernate3.2.06)整合,报错:java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
只整合了struts2,spring2.0,JPA,用myeclipse6,部署到tomcat5.5,启动时log4j打印如下错误rnCaused by: rnjava.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistencern看起来是没有找到类,org.hibernate.ejb.HibernatePersistencern这个类在哪个包中?rnrn我是参照struts2的官方tutorial做的:rnhttp://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.htmlrnrn请大家指点,另外,谁有 struts2 + spring 2 + hibernate3 的整合例子,可以运行的,给小弟参考一下,不胜感激
compass+ssh报错,Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld!
2009-3-17 1:14:58 org.apache.catalina.core.AprLifecycleListener initrn信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\MyEclipse 6.5\bin;C:\Tomcat6.0\binrn2009-3-17 1:14:58 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2009-3-17 1:14:58 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 718 msrn2009-3-17 1:14:58 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2009-3-17 1:14:58 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.10rn2009-3-17 1:15:00 org.apache.catalina.core.ApplicationContext logrn信息: Initializing Spring root WebApplicationContextrnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).rnlog4j:WARN Please initialize the log4j system properly.rn2009-3-17 1:15:06 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExceptionrnCaused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExceptionrn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Unknown Source)rn at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(ConfigBeanDefinitionParser.java:227)rn at org.springframework.aop.config.ConfigBeanDefinitionParser.createPointcutDefinition(ConfigBeanDefinitionParser.java:522)rn at org.springframework.aop.config.ConfigBeanDefinitionParser.parsePointcut(ConfigBeanDefinitionParser.java:461)rn at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:143)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1114)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1104)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:133)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:90)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1023)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1015)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:448)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:552)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:288)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)rn2009-3-17 1:15:06 org.apache.catalina.core.StandardContext startrn严重: Error listenerStartrn2009-3-17 1:15:06 org.apache.catalina.core.StandardContext startrn严重: Context [/compass1] startup failed due to previous errorsrn2009-3-17 1:15:06 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn2009-3-17 1:15:07 org.apache.catalina.core.ApplicationContext logrn信息: ContextListener: contextInitialized()rn2009-3-17 1:15:07 org.apache.catalina.core.ApplicationContext logrn信息: SessionListener: contextInitialized()rn2009-3-17 1:15:08 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2009-3-17 1:15:08 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009rn2009-3-17 1:15:08 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/110 config=nullrn2009-3-17 1:15:08 org.apache.catalina.startup.Catalina startrn信息: Server startup in 9689 msrnrnrn[b]但是,我检查applicationContext.xml文件如下:没有问题啊![/b]rnrn
部署报错:java.lang.NoClassDefFoundError: org/apache/struts2/dispatcher/RequestMap
项目在本地开发测试通过,部署到linux服务器上之后会间歇性的出现如下报错:rn[color=#FF0000]org.apache.catalina.core.StandardWrapperValve invokernSEVERE: Servlet.service() for servlet default threw exceptionrnjava.lang.NoClassDefFoundError: org/apache/struts2/dispatcher/RequestMaprn at org.apache.struts2.dispatcher.Dispatcher.createContextMap(Dispatcher.java:525)rn at org.apache.struts2.dispatcher.ng.PrepareOperations.createActionContext(PrepareOperations.jarnva:78)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPreparrneAndExecuteFilter.java:78)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.javrna:235)[/color]rn......rnrn导致服务不可用。rn请问这是什么原因?rnrn
jpa注解时java.lang.NoClassDefFoundError: org/hibernate/MappingNotFoundException
如题,在网上查了下说是少了包,但我查了好像没少包啊[img=E:\aaa.jpg][/img]
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件

相似问题

2
Java创建文件出现 java.lang.NoClassDefFoundError:save/DI()wrong name: DI
2
NoClassDefFoundError:net/jsqlparser/expression/Expression这个是什么问题?怎么解决?
1
安装hawq pxf时报错java.lang.NoClassDefFoundError: com/ctc/wstx/io/InputBootstrapper
4
log4j2 导包错误 java.lang.NoClassDefFoundError: org/apache/logging/log4j/spi/LoggerContext
3
Exception in thread "main" java.lang.NoClassDefFoundError,有导入对应jar包,但显示无法找到对应类?
1
Exception in thread "main" java.lang.NoClassDefFoundError如何解决
1
有关jasperreports的问题 java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRException
4
有关jasperreports报错的问题java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRException
1
java.lang.NoClassDefFoundError: org/springframework/boot/bind/PropertiesConfigurationFactory
2
Spring boot 2.1.3启动报错 java.lang.NoClassDefFoundError: org/springframework/util/unit/DataSize
2
springboot报错java.lang.NoClassDefFoundError
1
阿里云OSS对象创建时报错“java.lang.ClassNotFoundException: com.aliyun.oss.OSSClient”
1
Exception in thread "main" java.lang.NoClassDefFoundError:
1
weblogic启动报错java.lang.NoClassDefFoundError: weblogic/security/SecurityLogger
5
java.lang.NoClassDefFoundError怎么处理?
2
出现了java.lang.NoClassDefFoundError错误但是我用的是idea软件编写的
4
新人求解:JAVA导入外部包后提示java.lang.NoClassDefFoundError
1
hadoop hive 初始化报错
1
Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error,同时无法put文件到hdfs
3
springboot gradle项目build成功,但是bootrun的时候失败了,折腾半天了,没有解决问题,跪求大神解答