Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » ClassCastException in PersistenceUnitProcessor using a PoJo data source/data set with eclipselink
ClassCastException in PersistenceUnitProcessor using a PoJo data source/data set with eclipselink [message #1746105] Fri, 21 October 2016 22:04
Thomas Weiler is currently offline Thomas WeilerFriend
Messages: 1
Registered: October 2016
Junior Member
When trying to open/preview a (very simple) POJO dataset which uses EclipseLink/JPA I get the following exception:

org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot execute the statement.
org.eclipse.datatools.connectivity.oda.OdaException ;
java.lang.reflect.InvocationTargetException
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:52)
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(ExceptionHandler.java:108)
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(ExceptionHandler.java:84)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.execute(PreparedStatement.java:586)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(DataSourceQuery.java:980)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:607)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1251)
at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)
at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)
at org.eclipse.birt.report.engine.api.impl.ExtractionResults.nextResultIterator(ExtractionResults.java:157)
at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(DataSetPreviewer.java:69)
at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(ResultSetPreviewPage.java:372)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.datatools.connectivity.oda.OdaException ;
java.lang.reflect.InvocationTargetException
at org.eclipse.birt.data.oda.pojo.impl.internal.PojoDataSetFromCustomClass.open(PojoDataSetFromCustomClass.java:194)
at org.eclipse.birt.data.oda.pojo.impl.Query.executeQuery(Query.java:131)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doExecuteQuery(OdaQuery.java:480)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.executeQuery(OdaQuery.java:444)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.execute(PreparedStatement.java:575)
... 9 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.birt.data.oda.pojo.impl.internal.PojoDataSetFromCustomClass.open(PojoDataSetFromCustomClass.java:180)
... 13 more
Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.eclipse.osgi.internal.framework.ContextFinder@17ea0b56
Internal Exception: java.lang.ClassCastException: Cannot cast org.eclipse.birt.core.framework.URLClassLoader$JarLoader$JarEntryHandler$1 to java.net.JarURLConnection
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:127)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:327)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:276)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.findPersistenceUnitInfoInArchives(JPAInitializer.java:150)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.findPersistenceUnitInfo(JPAInitializer.java:135)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at model.BirtDataset.getBirttable(BirtDataset.java:18)
at model.BirtDataset.open(BirtDataset.java:32)
... 18 more
Caused by: java.lang.ClassCastException: Cannot cast org.eclipse.birt.core.framework.URLClassLoader$JarLoader$JarEntryHandler$1 to java.net.JarURLConnection
at java.lang.Class.cast(Class.java:3369)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.computePURootURL(PersistenceUnitProcessor.java:168)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:301)
... 26 more

Has anybody a working example of a POJO-Dataset using EclipseLink or any idea how to fix this problem?

Thanks in advance

Thomas
Previous Topic:WEBSPHERE 8.5.5.10
Next Topic:Configure colors for the series markers in the chart
Goto Forum:
  


Current Time: Sat Aug 24 02:30:45 GMT 2019

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

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

Back to the top