java.lang.RuntimeException: <0.9.7-incubating fatal user error> 异常的处理

在配置roller4.0.1时,报openJPA的异常,文件用jar包时,不会出错,当用源代码时就包这个异常,这是什么原因??

严重: Exception sending context initialized event to listener instance of class org.apache.roller.weblogger.ui.core.RollerContext
java.lang.RuntimeException: org.apache.openjpa.persistence.ArgumentException: The type "class org.apache.roller.weblogger.pojos.TaskLock" has not been enhanced.
at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.initialize(JPAPropertiesManagerImpl.java:96)
at org.apache.roller.weblogger.business.WebloggerImpl.initialize(WebloggerImpl.java:303)
at org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(RollerContext.java:159)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.openjpa.persistence.ArgumentException: The type "class org.apache.roller.weblogger.pojos.TaskLock" has not been enhanced.
at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1606)
at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1580)
at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:659)
at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:559)
at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:484)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:288)
at org.apache.openjpa.meta.MetaDataRepository.resolveAll(MetaDataRepository.java:1523)
at org.apache.openjpa.meta.MetaDataRepository.getQueryMetaData(MetaDataRepository.java:1498)
at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:782)
at org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:65)
at org.apache.roller.weblogger.business.jpa.JPAPersistenceStrategy.getNamedQuery(JPAPersistenceStrategy.java:274)
at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.getProperties(JPAPropertiesManagerImpl.java:121)
at org.apache.roller.weblogger.business.jpa.JPAPropertiesManagerImpl.initialize(JPAPropertiesManagerImpl.java:77)
... 17 more

4个回答

The type "class org.apache.roller.weblogger.pojos.TaskLock" has not been enhanced.

记得JPA里面有个叫enhance的操作,好像主要是提高速度的。但是不enhance不应该报错,应该报警告的。。。
enhance具体操作没有细究,以前用netbeans做的,部署的时候netbeans会自动enhance~~~

你找找jpa文档,看看怎么enhance.做一下enhance操作试试 :。。

包版本问题?~

个人推测:
1、jar包使用的jdk版本与你本地使用的jdk可能版本不同,某些类或方法不支持导致
2、有可能在源代码包与jar包不一致,下载版本错了或者人家在发布jar我后改动了原代码

建议
1、看官方说明,支持jdk版本是多少?
2、重新下载一个新一点或者旧一点的版本替代,看是否会出现同样的情况

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问