如何解决此异常?
有人可以让我知道我收到此异常的原因:
配置:
jdk1.6
Jboss4.2
JPA provider: OpenJpa
EclipseIDE
完整的堆栈跟踪:
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
at org.apache.openjpa.lib.conf.ProductDerivations.reportErrors(ProductDerivations.java:380)
at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:283)
at org.apache.openjpa.lib.conf.Configurations.populateConfiguration(Configurations.java:357)
at org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhancerAgent.java:165)
at org.apache.openjpa.enhance.PCEnhancerAgent.premain(PCEnhancerAgent.java:145)
... 6 more
Caused by: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
FATAL ERROR in native method: processing of -javaagent failed
at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:477)
at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:359)
at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:541)
at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:360)
at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:274)
... 9 more
Exception in thread "main"