Jump to content
JasperReports Library 7.0 is now available ×

mohamedanis.mekki

Members
  • Posts

    1
  • Joined

  • Last visited

mohamedanis.mekki's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I am trying EJBQL Connection Adapter within Jaspersoft Studio 6.2.2. I use EclipseLink 2.5.2 as JPA implementation and JRE 8. So here's how I proceeded: I created a MyProject.jar archive out of an Eclipse Java project containing 2 entity classes and a persistence.xml file under META-INF folder (listed below)I created a new Project in Jaspersoft Studio and updated the build-path adding the external jars:MyProject.jareclipselink-2.5.2.jar javax.persistence_2.1.1.v201509150925.jar ojdbc14-10.2.0.4.0.jar (since a use Oracle Database) org.eclipse.persistence.jpa.jpql-2.5.2.jar I created a new Connection Adapter (using the wizard) and choosing EJBQL Connection Adapter and tested the connector. The result is the following stacktrace: net.sf.jasperreports.engine.JRException: java.lang.reflect.InvocationTargetException at net.sf.jasperreports.data.ejbql.EjbqlDataAdapterService.contributeParameters(EjbqlDataAdapterService.java:86) at net.sf.jasperreports.data.AbstractDataAdapterService.test(AbstractDataAdapterService.java:105) at com.jaspersoft.studio.data.DataAdapterEditorPart$1.widgetSelected(DataAdapterEditorPart.java:175) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.jaspersoft.studio.rcp.intro.Application.start(Application.java:99) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) 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.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) at org.eclipse.equinox.launcher.Main.main(Main.java:1488)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 net.sf.jasperreports.data.ejbql.EjbqlDataAdapterService.contributeParameters(EjbqlDataAdapterService.java:70) ... 30 moreCaused by: java.lang.IncompatibleClassChangeError: org/eclipse/persistence/internal/jpa/EntityManagerFactoryImpl at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:135) at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34) ... 35 more[/code]Persistence.xml <?xml version="1.0" encoding="UTF-8"?><persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"> <persistence-unit name="SpringJPAXML" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <class>tn.nat.cnss.model.Utilisateur</class> <class>tn.nat.cnss.model.Role</class> <properties> <property name="eclipselink.logging.level" value="OFF"/> <property name="eclipselink.logging.thread" value="false"/> <property name="eclipselink.logging.session" value="false"/> <property name="eclipselink.logging.timestamp" value="false"/> <property name="eclipselink.logging.exceptions" value="false"/> <property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:xe"/> <property name="javax.persistence.jdbc.user" value="test"/> <property name="javax.persistence.jdbc.password" value="test"/> <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver"/> <property name="eclipselink.target-database" value="Oracle"/> </properties> </persistence-unit></persistence>[/code]I googled the exception appearing in the stacktrace, it seems to be a version conflict problem, probably in JPA implementation ... but i could not find one in Jaspersoft Studio libraries. Does somebody has a working example with EclipseLink ?
×
×
  • Create New...