项目从老电脑导入新电脑的问题
我将项目从旧电脑中复制到新电脑中,但是项目不能正常运行,我的环境是tomcat6和jdk6,用maven管理的jar,报错信息如下
2015-10-27 17:16:08 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Program FilesJavajdk1.6.0_43bin;C:WindowsSunJavabin;C:Windowssystem32;C:Windows;C:Program FilesJavajdk1.6.0_43jrebin;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/lib/amd64;C:Program FilesJavajdk1.7.0_72bin;C:Program FilesJavajdk1.7.0_72jrebin;D:Program FilesTortoiseSVNbin;c:windowssystem32;D:worksts-bundlests-3.5.1.RELEASE;;. 2015-10-27 17:16:08 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:HSBC' did not find a matching property. 2015-10-27 17:16:08 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2015-10-27 17:16:08 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 321 ms 2015-10-27 17:16:08 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2015-10-27 17:16:08 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.44 2015-10-27 17:16:09 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 2015-10-27 17:18:01 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class com.siebre.webapp.listener.BafApplicationListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [applicationContext-Baf.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-Hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:734) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:457) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at com.siebre.webapp.listener.BafApplicationListener.contextInitialized(BafApplicationListener.java:73) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardHost.start(StandardHost.java:822) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:759) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-Hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:420) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:277) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79) at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70) at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:103) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1475) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ... 26 more Caused by: org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:185) at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:135) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:383) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1788) at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:251) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:372) at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:357) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 41 more Caused by: org.hibernate.InstantiationException: could not instantiate test objectcom.siebre.payment.CommissionPaymentImpl at org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:49) at org.hibernate.engine.internal.UnsavedValueFactory.getUnsavedIdentifierValue(UnsavedValueFactory.java:68) at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:75) at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:145) at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:507) at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:146) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163) ... 50 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.hibernate.engine.internal.UnsavedValueFactory.instantiate(UnsavedValueFactory.java:46) ... 60 more Caused by: java.lang.OutOfMemoryError: PermGen space 2015-10-27 17:18:02 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class com.siebre.webapp.listener.BafTilesListener java.lang.OutOfMemoryError: PermGen space 2015-10-27 17:18:02 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2015-10-27 17:18:02 org.apache.catalina.core.StandardContext start 严重: Context [/A2iProduct] startup failed due to previous errors java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused by: java.lang.OutOfMemoryError: PermGen space
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
你这个是eclipse的JVM设置不是TOMCAT的JVM设置. 需要调整TOMCAT JVM配置.
回复
哈哈 我已经弄出来啦 ,不过谢谢你哦,就是你说的原因 ,给你点赞
引用来自“alexgaoyh”的评论
Caused by: java.lang.OutOfMemoryError: PermGen space
设置jvm试试·
Caused by: java.lang.OutOfMemoryError: PermGen space
设置jvm试试·
这个应该没关系的把。我在老电脑里面也是这么配置的,一个是1.6另外一个是1.7的,
同时配置2个你这是给自己找麻烦,都不知道用的是那个,你还不如用个JAVA_HOME来控制版本,用的时候改下JAVA_HOME就行了。你这种设置,除了带来莫名其妙的问题没什么好处。不建议再排查了,先只用一个jdk,然后再逐步排查问题。
检查下你的工程配置吧
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:Program FilesJavajdk1.6.0_43bin;C:WindowsSunJavabin;C:Windowssystem32;C:Windows;C:Program FilesJavajdk1.6.0_43jrebin;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/bin/server;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/bin;C:/Program Files/Java/jdk1.7.0_72/bin/../jre/lib/amd64;C:Program FilesJavajdk1.7.0_72bin;C:Program FilesJavajdk1.7.0_72jrebin;D:Program FilesTortoiseSVNbin;c:windowssystem32;D:worksts-bundlests-3.5.1.RELEASE;;.
你的path里面配置两个jdk