Eclipselink error 3002



我正在按照此处的说明(尤其是任务3和4)进行简单的从TopLink 10G到本机eClipselink v2.6.4的迁移。一切都可以编译,但是当我尝试运行我的应用程序时,我会在下面获得错误。

我尝试使用旧的映射文件(仍然兼容)以及通过导入我的旧TopLink Workbench项目从Eclipselink Workbench生成的新映射文件。

请注意,我只是从TopLink到本机eclispelink进行迁移。不涉及JPA。

关于问题出什么的想法?似乎它试图不正确地使用字符串而不是我的实际班级,但不确定。

另外,我的应用程序从未有过持续。xml文件。我现在需要一个吗?

2017-02-20 14:55:52 ERROR - Presentation - Local Exception Stack: 
Exception [EclipseLink-3002] (Eclipse Persistence Services - 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.ConversionException
Exception Description: The object [ca.ncams.wisor.refdata.AccessTandem], of class [class java.lang.String], from mapping [org.eclipse.persistence.oxm.mappings.XMLDirectMapping[javaClass-->class/text()]] with descriptor [XMLDescriptor(org.eclipse.persistence.descriptors.ClassDescriptor --> [DatabaseTable(class-mapping-descriptor)])], could not be converted to [class java.lang.Class].
Internal Exception: java.lang.ClassNotFoundException: ca.ncams.wisor.refdata.AccessTandem
                at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConvertedToClass(ConversionException.java:98)
                at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:451)
                at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:146)
                at org.eclipse.persistence.internal.oxm.XMLConversionManager.convertObject(XMLConversionManager.java:197)
                at org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.convertObject(DatasourcePlatform.java:179)
                at org.eclipse.persistence.oxm.mappings.XMLDirectMapping.getAttributeValue(XMLDirectMapping.java:301)
                at org.eclipse.persistence.oxm.mappings.XMLDirectMapping.valueFromRow(XMLDirectMapping.java:364)
                at org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1539)
                at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:462)
                at org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.java:378)
                at org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:291)
                at org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping.buildCompositeObject(XMLCompositeCollectionMapping.java:380)
                at org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping.buildObjectFromNestedRow(XMLCompositeCollectionMapping.java:587)
                at org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping.valueFromRow(XMLCompositeCollectionMapping.java:511)
                at org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1539)
                at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:462)
                at org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.java:378)
                at org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:291)
                at org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:469)
                at org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:267)
                at org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:246)
                at org.eclipse.persistence.internal.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:530)
                at org.eclipse.persistence.sessions.factories.XMLProjectReader.readObjectPersistenceRuntimeFormat(XMLProjectReader.java:293)
                at org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:186)
                at org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:242)
                at org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:100)
                at ca.ncams.wisor.persistence.toplink.PersistenceManager.initializeTopLink(PersistenceManager.java:491)
                at ca.ncams.wisor.persistence.toplink.PersistenceManager.<init>(PersistenceManager.java:83)
                at ca.ncams.wisor.persistence.toplink.PersistenceManager.getInstance(PersistenceManager.java:96)
                at ca.ncams.wisor.persistence.toplink.AutoRollbackFilter.doFilter(AutoRollbackFilter.java:57)
                at ca.ncams.wisor.filter.FilterChainImpl.doFilter(FilterChainImpl.java:124)
                at ca.ncams.wisor.presentation.filters.CatchAllFilter.doFilter(CatchAllFilter.java:60)
                at ca.ncams.wisor.filter.FilterChainImpl.doFilter(FilterChainImpl.java:124)
                at ca.ncams.wisor.presentation.filters.NoCacheFilter.doFilter(NoCacheFilter.java:47)
                at ca.ncams.wisor.filter.FilterChainImpl.doFilter(FilterChainImpl.java:124)
                at ca.ncams.wisor.filter.FilterJspBase.service(FilterJspBase.java:111)
                at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
                at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
                at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
                at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
                at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:489)
                at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:376)
                at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:247)
                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3679)
                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.__run(WebAppServletContext.java:3649)
                at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java)
                at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
                at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
                at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
                at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
                at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2433)
                at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2281)
                at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2259)
                at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1691)
                at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1651)
                at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:270)
                at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
                at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
                at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
                at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
                at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
                at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
                at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
Caused by: java.lang.ClassNotFoundException: ca.ncams.wisor.refdata.AccessTandem
                at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
                at java.lang.Class.forName0(Native Method)
                at java.lang.Class.forName(Class.java:348)
                at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToClass(ConversionManager.java:448)
                ... 61 more

这是我最终做的:

  1. 将eclipselink 2.6.4依赖性依赖(编译而不是提供)
  2. 添加到weblogic.xml:
<wls:container-descriptor>
    <wls:prefer-application-packages>
         <wls:package-name>org.eclipse.persistence</wls:package-name>
    </wls:prefer-application-packages>
</wls:container-descriptor>

现在Eclipselink找到了我的课程并启动。

请注意,我的代码仅在映射文件中传递,而不是classloader到XMLProjectReader.read();,所以我想是使用默认的classloader。

如果有人知道如何通过classloader,我仍然很好奇(我从哪里得到它?)。

相关内容

  • 没有找到相关文章

最新更新