我们将 WebSphere 版本从WAS8.5升级到WAS9,应用程序具有spring 2.5、hibernate 3、struts 1.x 和 hibernate 作为 WebSphere 服务器中的 ORM 和 JPA 提供程序设置为com.ibm.websphere.persistence.PersistenceProviderImpl
版本是2.0。
当我们部署应用程序时,服务器抛出 Openjpa 错误,我们没有在应用程序的任何地方使用任何特定于 openjpa 的东西,也没有在 WebSphere 服务器中使用任何特定的设置。
以下是由于应用程序无法成功导致这些错误而出现 openJpa 错误的错误日志。请让我知道如何解决此问题,或者是否必须在服务器配置或任何其他级别检查某些内容。
Caused by: <openjpa-2.2.3-SNAPSHOT-ra68a0f1 fatal user error> org.apache.openjpa.util.MetaDataException: The id class specified by type "class com.mazdausa.persistence.model.ContactUsRule" does not match the primary key fields of the class. Make sure your identity class has the same primary keys as your persistent type, including pk field types. Mismatched property: "field"
at org.apache.openjpa.meta.ClassMetaData.validateAppIdClassPKs(ClassMetaData.java:2227)
at org.apache.openjpa.meta.ClassMetaData.validateAppIdClass(ClassMetaData.java:2071)
at org.apache.openjpa.meta.ClassMetaData.validateIdentity(ClassMetaData.java:2037)
at org.apache.openjpa.meta.ClassMetaData.validateMeta(ClassMetaData.java:1949)
at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1810)
at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:829)
at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:726)
at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:650)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:418)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:285)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:151)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:128)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:292)
at com.ibm.ws.jpa.management.JPAPUnitInfo.transformClass(JPAPUnitInfo.java:1516)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:876)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:759)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:609)
at java.lang.ClassLoader.loadClass(ClassLoader.java:872)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:337)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:136)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:478)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851)
... 89 more
Caused by: <openjpa-2.2.3-SNAPSHOT-ra68a0f1 fatal user error> org.apache.openjpa.util.MetaDataException: The id class specified by type "class com.mazdausa.persistence.model.ContactUsRule" does not match the primary key fields of the class. Make sure your identity class has the same primary keys as your persistent type, including pk field types. Mismatched property: "field"
at org.apache.openjpa.meta.ClassMetaData.validateAppIdClassPKs(ClassMetaData.java:2227)
at org.apache.openjpa.meta.ClassMetaData.validateAppIdClass(ClassMetaData.java:2071)
at org.apache.openjpa.meta.ClassMetaData.validateIdentity(ClassMetaData.java:2037)
at org.apache.openjpa.meta.ClassMetaData.validateMeta(ClassMetaData.java:1949)
at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1810)
at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:829)
at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:726)
at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:650)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:418)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:285)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:151)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:128)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:292)
at com.ibm.ws.jpa.management.JPAPUnitInfo.transformClass(JPAPUnitInfo.java:1516)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:876)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:759)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:609)
at java.lang.ClassLoader.loadClass(ClassLoader.java:872)
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:337)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192)
at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:136)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:478)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851)
... 89 more
<openjpa-2.2.3-SNAPSHOT-ra68a0f1 fatal user error> org.apache.openjpa.util.MetaDataException: "com.mazdausa.persistence.model.Email.mailId" declares generator name "EmailSeq", but uses the AUTO generation type. The only valid generator names under AUTO are "uuid-hex" and "uuid-string".
[5/14/21 16:16:18:656 PDT] 00000122 FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on D:\WebSphere90\AppServer\profiles\ConsSrv01\logs\ffdc\ConsSrv01_595f9b5f_21.05.14_16.16.18.6532263116515879413762.txt com.ibm.ws.webcontainer.servlet.ServletInstance.init 181
[5/14/21 16:16:18:657 PDT] 00000122 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0271E: Uncaught init() exception created by servlet [ScheduledJobServlet] in application [MusaWebEAR]: <openjpa-2.2.3-SNAPSHOT-ra68a0f1 fatal user error> org.apache.openjpa.util.MetaDataException: "com.mazdausa.persistence.model.Email.mailId" declares generator name "EmailSeq", but uses the AUTO generation type. The only valid generator names under AUTO are "uuid-hex" and "uuid-string".
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getGeneratedValueStrategy(AnnotationPersistenceMetaDataParser.java:1413)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseGeneratedValue(AnnotationPersistenceMetaDataParser.java:1368)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseGeneratedValue(AnnotationPersistenceMetaDataParser.java:1360)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseMemberAnnotations(AnnotationPersistenceMetaDataParser.java:1220)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:690)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:415)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:260)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:587)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:397)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:285)
at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:256)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform0(PCClassFileTransformer.java:151)
at org.apache.openjpa.enhance.PCClassFileTransformer.transform(PCClassFileTransformer.java:128)
at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(PersistenceProviderImpl.java:292)
at com.ibm.ws.jpa.management.JPAPUnitInfo.transformClass(JPAPUnitInfo.java:1516)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:876)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:759)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:609)
at java.lang.ClassLoader.loadClass(ClassLoader.java:872)
at com.mazdausa.util.ScheduledJobHelper.processFailedJob(ScheduledJobHelper.java:56)
at com.mazdausa.util.ScheduledJobHelper.processFailedJob(ScheduledJobHelper.java:34)
at com.mazdausa.consumer.marketing.web.application.ScheduledJobServlet.init(ScheduledJobServlet.java:107)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1376)
at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:673)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:639)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:454)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1249)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1590)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:707)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1161)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:801)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1451)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2319)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:654)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5536)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5662)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:668)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:612)
Caused by: <openjpa-2.2.3-SNAPSHOT-ra68a0f1 fatal user error> org.apache.openjpa.util.MetaDataException: "com.mazdausa.persistence.model.Dealer.dealerId" declares generator name "DealerSeq", but uses the AUTO generation type. The only valid generator names under AUTO are "uuid-hex" and "uuid-string".
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getGeneratedValueStrategy(AnnotationPersistenceMetaDataParser.java:1413)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseGeneratedValue(AnnotationPersistenceMetaDataParser.java:1368)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseGeneratedValue(AnnotationPersistenceMetaDataParser.java:1360)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseMemberAnnotations(AnnotationPersistenceMetaDataParser.java:1220)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:690)
at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:415)
at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:260)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:587)
at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:397)
at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:389)
at org.apache.openjpa.meta.ValueMetaDataImpl.resolveDeclaredType(ValueMetaDataImpl.java:491)
at org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:470)
at org.apache.openjpa.jdbc.meta.ValueMappingImpl.resolve(ValueMappingImpl.java:508)
at org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1881)
at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:460)
at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1874)
at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1808)
at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:829)
at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:726)
at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:650)