-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDBC issue with OSGi runtime #787
Comments
@hvbtup Did you restart after adding the driver? Are you sure BIRT home is to the platform directory and not the one before? |
2x yes |
Are all the properties set correctly? Please attach the stacktrace. |
Take a look at that Connection class starting from line 119. It is clear that it cannot find information in the connection properties. |
The full stack trace: org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details: The same code in the same environment works if I change the flollowing:
So yes, the properties are correct. |
@wimjongman Do you have an Oracle DB at hand? If yes, I can try to create a stand-alone test case, though this will cost me several hours of work. |
No, I don't have that. |
Sorry, it was my fault. I forgot to copy one of our JARs to the ReportEngine/lib directory. So this is issue can be closed. BTW, when I captured stderr, I found that the OSGI runtime produces lots of error messages on startup as described here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547526 In my case they are looking like this: org.eclipse.equinox.internal.p2.extensionlocation.SiteListener@666f4066: java.lang.UnsupportedOperationException: Not able to create StateObjectFactory implementation: org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl. I have no idea what these messages mean and why there are so many of them. |
That is another issue (see #835). |
Originally posted by @hvbtup in #781 (comment)
Well, I tried to use the OSGI runtime in our application, but now I am facing a different issue.
If I understand correctly, in order to switch the application code from POJO to OSGI runtime, the following steps are necessary:
Download the OSGI runtime instead of the POJO runtime (of course).
The ZIP structure is basically the same, but the OSGI ZIP contains an additional folder ReportEngine\platform.
In the startup code, add a line
where birt_home is the path to ReportEngine\platform
before calling
Without this modification the startup is not working.
Now I am facing this issue:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
...
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Missing properties in Connection.open(Properties).
at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:134)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:153)
... 27 more
Note: My setup - which always worked with the POJO runtime so far - is as follows.
The reports are using an Oracle JDBC data source.
This data source definition is defined in a library lisa_basis.rptlibrary.
The reports (and all other libraries) are referencing the data source from the library.
The data source definition of lisa_basis.rptlibrary contains fake connection data, the actual properties are then supplied by the calling code as system properties when BIRT runtime is used - or as environment variables when the All-In-One designer is used:
lisa.getProperty(...) is defined in a *.js ressource and is just a thin wrapper around System.getProperty.
It seems that is no longer sufficient to have the ojdbc8.jar (Oracle JDBC driver) in the class path.
I also tried copying that file into ReportEngine\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_4.9.0.v202201232020\drivers and specifying the path to that file in the appContext. The exception traceback stays the same.
Originally posted by @hvbtup in #781 (comment)
The text was updated successfully, but these errors were encountered: