Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/obje(javax.persistence.PersistenceException after switching from eclipselink 2.5.1 to 2.6.0)
icon8.gif  java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/obje [message #1654005] Fri, 06 March 2015 13:44 Go to next message
Jose Dominguez is currently offline Jose DominguezFriend
Messages: 3
Registered: March 2015
Junior Member
Hi to all the readers of this forum,

I´m working for several months with eclipselink 2.5.1 without any problems in an OSGi environment. After switching to eclipselink 2.6.0 (instead of using the 2.5.1 packages org.eclipse.persistence.core, org.eclipse.persistence.jpa, org.eclipse.persistence.jpa.jpql and the 2.4.1 packages org.eclipse.persistence.jpa.equinox and org.eclipse.persistence.equinox.weaving the only org.eclipse.persistence-packages I use now are the 2.6.0 packages org.eclipse.persistence.core and org.eclipse.persistence.jpa) and to avoid any weaving problems I included the property 'eclipse.weaving' = false into the persistence.xml on every try to make a JPA based connection from my application to the db I received the same error:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2015-03-06 14:07:55.452
!MESSAGE Unable to create class 'de.foodmart.tables.TaskInfoTable' from bundle '824'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.osgi.internal.loader.EquinoxClassLoader@72508ee3[FoodMartEntityDSLPlugin:1.0.0.qualifier(id=1206)]
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [foodmart] failed.
Internal Exception: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory$ClassMetadataVisitor
at org.eclipse.e4.core.internal.di.ConstructorRequestor.execute(ConstructorRequestor.java:50)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:335)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
at org.semanticsoft.vaaclipse.presentation.renderers.PartRenderer.createWidget(PartRenderer.java:93)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:284)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.renderers.PlaceholderRenderer.createWidget(PlaceholderRenderer.java:63)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:284)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:297)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:297)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:297)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:297)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.renderers.PerspectiveStackRenderer.switchPerspective(PerspectiveStackRenderer.java:455)
at org.semanticsoft.vaaclipse.presentation.renderers.PerspectiveStackRenderer.processContents(PerspectiveStackRenderer.java:446)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:301)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:297)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.createGui(GenericPresentationEngine.java:351)
at org.semanticsoft.vaaclipse.presentation.engine.GenericPresentationEngine.run(GenericPresentationEngine.java:521)
at org.semanticsoft.vaaclipse.presentation.engine.VaadinPresentationEngine.run(VaadinPresentationEngine.java:44)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.lunifera.vaaclipse.app.webapp.VaadinUI.init(VaadinUI.java:159)
at com.vaadin.ui.UI.doInit(UI.java:641)
at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:217)
at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:74)
at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1406)
at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:305)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.lunifera.ecview.jetty.manager.impl.JettyManager$InternalHttpServiceServlet.service(JettyManager.java:239)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:366)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.osgi.internal.loader.EquinoxClassLoader@72508ee3[FoodMartEntityDSLPlugin:1.0.0.qualifier(id=1206)]
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [foodmart] failed.
Internal Exception: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory$ClassMetadataVisitor
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:127)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:107)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:179)
at de.compex.datasources.impl.DataSourceUtil.registerEntityManagerFactory(DataSourceUtil.java:226)
at de.compex.datasources.impl.DataSourceUtil.getEntityManager(DataSourceUtil.java:161)
at de.compex.datasources.impl.DataSourceUtil.getEntityManager(DataSourceUtil.java:124)
at de.compex.foodmart.datamarts.TaskInfoDatamart.connect(TaskInfoDatamart.java:126)
at de.compex.foodmart.datamarts.TaskInfoDatamart.getResults(TaskInfoDatamart.java:243)
at de.foodmart.tables.TaskInfoTable.createComponents(TaskInfoTable.java:436)
at de.foodmart.tables.TaskInfoTable.createView(TaskInfoTable.java:429)
at de.compex.osgi.hybrid.api.AbstractHybridVaaclipseView.<init>(AbstractHybridVaaclipseView.java:107)
at de.foodmart.tables.TaskInfoTable.<init>(TaskInfoTable.java:170)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.eclipse.e4.core.internal.di.ConstructorRequestor.execute(ConstructorRequestor.java:41)
... 64 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [foodmart] failed.
Internal Exception: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory$ClassMetadataVisitor
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1973)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1964)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:96)
... 79 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.6.0.v20140809-296a69f): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [foodmart] failed.
Internal Exception: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory$ClassMetadataVisitor
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:231)
... 83 more
Caused by: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory$ClassMetadataVisitor
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.buildClassMetadata(MetadataAsmFactory.java:76)
at org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAsmFactory.getMetadataClass(MetadataAsmFactory.java:140)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.initPersistenceUnitClasses(MetadataProcessor.java:353)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processEntityMappings(MetadataProcessor.java:548)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:600)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1886)
... 81 more

I am awake of several posts in this eclipse forum reagrding this error, but none of them in association with eclipselink or jpa. A lot due to problems with birt or other issues but nothing to do with my problem. Almost I think so.

So please if anybody had any idea I will be very glad for any information that could help me.



JCD
Re: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/ [message #1663101 is a reply to message #1654005] Tue, 10 March 2015 09:08 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 36
Registered: November 2013
Location: Prague, Czech Republic
Member
Hi Jose,

can you try with the latest version of eclipselink (either 2.7.0-snapshot or 2.6.0-rc2)? Also which JDK version is being used?

thanks,
--lukas
icon7.gif  Re: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/ [message #1665779 is a reply to message #1663101] Wed, 11 March 2015 11:41 Go to previous messageGo to next message
Jose Dominguez is currently offline Jose DominguezFriend
Messages: 3
Registered: March 2015
Junior Member
Hi Lukas,

first of all thanks of your response. It helps me to find out the reason for this error. The causer was the bundle 'org.eclipse.persistence.asm'. As I explained in my initial post I switched org.eclipse.persistence.jpa from version 2.5.1 to 2.6.0.v20140809-296a69f, but not the corresponding version of the bundle org.eclipse.persistence.asm. I was using the same version as I used before with eclipselink 2.5.1.

The basic issue that allowed this incorrect configuration is that unfortunately the defined dependencies in the MANIFEST.MF of org.eclipse.persistence.jpa to the required packages org.eclipse.persistence.internal.libraries.asm and org.eclipse.persistence.internal.libraries.asm.commons are without any version limits. Strange is also that in the MANIFEST.MF the imported packages are as well defined as the entry of org.eclipse.persistence.asm as required bundle with version limit, but as optional (org.eclipse.persistence.asm;bundle-version="5.0.1";resolution:=optional).

So I was able to run my application without any validation errors. Not till you make me to use the newest version of eclipselink I fixed the problem. In that case I updated not only org.eclipse.perisistence.jpa and org.eclipse.perisistence.core but also org.eclipse.persistence.asm and voilá it worked.

So again, thanks a lot.
Re: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/ [message #1665811 is a reply to message #1665779] Wed, 11 March 2015 12:00 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 36
Registered: November 2013
Location: Prague, Czech Republic
Member
Hi Jose,

glad to hear you resolved the issue. I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=461909 for us to try to resolve issues with missing version in import section.

thanks,
--lukas
Re: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/metadata/accessors/ [message #1671176 is a reply to message #1665811] Fri, 13 March 2015 13:46 Go to previous message
Jose Dominguez is currently offline Jose DominguezFriend
Messages: 3
Registered: March 2015
Junior Member
Hi Lukas,

thanks to you for the post in the eclipse Bug list.

Jose
Previous Topic:Resolve PersistenceUnit unitName at runtime
Next Topic:Unabled to set derived IDs
Goto Forum:
  


Current Time: Wed Feb 28 15:35:49 GMT 2024

Powered by FUDForum. Page generated in 0.01773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top