下面是整个异常信息:
Initializing Spring root WebApplicationContext
[04:32:35.703] java.lang.NoSuchMethodError: javax.persistence.PersistenceContext.properties()[Ljavax/persistence/PersistenceProperty;
[04:32:35.703] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.<init>(PersistenceAnnotationBeanPostProcessor.java:543)
[04:32:35.703] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$1.doWith(PersistenceAnnotationBeanPostProcessor.java:359)
[04:32:35.703] at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:492)
[04:32:35.703] at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:469)
[04:32:35.703] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:351)
[04:32:35.703] at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:745)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:448)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
[04:32:35.703] at java.security.AccessController.doPrivileged(Native Method)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
[04:32:35.703] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
[04:32:35.703] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
[04:32:35.703] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
[04:32:35.703] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
[04:32:35.703] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
[04:32:35.703] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
[04:32:35.703] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
[04:32:35.703] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
[04:32:35.703] at com.caucho.server.webapp.Application.start(Application.java:1647)
[04:32:35.703] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[04:32:35.703] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[04:32:35.703] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
[04:32:35.703] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
[04:32:35.703] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:670)
[04:32:35.703] at com.caucho.server.host.Host.start(Host.java:420)
[04:32:35.703] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[04:32:35.703] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[04:32:35.703] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:509)
[04:32:35.703] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:153)
[04:32:35.703] at com.caucho.server.host.HostContainer.start(HostContainer.java:504)
[04:32:35.703] at com.caucho.server.resin.ServletServer.start(ServletServer.java:971)
[04:32:35.703] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:621)
[04:32:35.703] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start(AbstractDeployControllerStrategy.java:56)
[04:32:35.703] at com.caucho.server.deploy.DeployController.start(DeployController.java:517)
[04:32:35.703] at com.caucho.server.resin.ResinServer.start(ResinServer.java:551)
[04:32:35.703] at com.caucho.server.resin.Resin.init(Resin.java)
[04:32:35.703] at com.caucho.server.resin.Resin.main(Resin.java:625)
[04:32:35.734] Resin started in 3734ms
java
ssh
jpa
web
struts
--------------------编程问答--------------------
应该就是你jar包版本的问题
--------------------编程问答--------------------
hibernate本身自带的这个persistence包并不完整,所以你去下了个完整的,把这个替换下来就可以了。。。下载地址:下载
--------------------编程问答--------------------
你好,能详细点吗?,我用的是hibernate3.3.2在这里面没有找到说有persistence这样个jar包啊.
下了这个javax.persistence.jar放进lib目录下还要如何配置吗?我放进去后.启动还是报之前一样的问题.
--------------------编程问答--------------------
就是那个ejb-persistence.jar,把这个换成你下的那个试试
--------------------编程问答--------------------