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
Error wildfly datasource [JDBC501] #537
Comments
Commented by: erick de oliveira leal (erickdeoliveiraleal) complete log https://gist.github.com/erickdeoliveiraleal/1a5aaf2f449d17452bea27091b6a8fd0 |
Commented by: @mrotteveel This exception will be logged if you have two copies of Jaybird on the classpath of two different classloader hierarchies, for example one as a module in Wildlfy, and one in the deployed WAR. See also JDBC490 and the release notes under changes for Jaybird 3.0.0. Jaybird attempts to load components of itself as a plugin, and it tries a number of accessible classloaders, but if those are separate hierarchies, then plugins loaded from one hierarchy cannot be used in the other. Since 3.0.0 this should have no effect on the application itself: Jaybird will log the exception and continue with the next plugin, so it will continue to work. To fix this polluting your log: remove one of the copies (probably the one in the WAR). |
Modified by: @mrotteveel |
Commented by: erick de oliveira leal (erickdeoliveiraleal) Hello Mark Rotteveel, thanks for explaining. But I need the lib both to create the datasource in the server, also inside my war, cause in my application I use in some places the manual connection, outside the container and other places I use from container. Do you know how can I avoid this error in this cenario? |
Commented by: @mrotteveel I don't use usually use Wildfly, but IIRC you should declare a dependency on the Jaybird module in your deployment descriptor, or add it as a global module. See https://docs.jboss.org/author/display/WFLY10/Developer+Guide#DeveloperGuide-ClassloadinginWildFly (eg under Global Modules and under JBoss Deployment Structure File) But again: these errors are not failures: the application will just work. It just logs that it found a plugin but wasn't able to load it. I will see if I can log them as warning instead of error for a future release, or maybe I'll just move the loading of the default plugins purely into code instead of as a discovery mechanism. |
Commented by: erick de oliveira leal (erickdeoliveiraleal) Thank you. I created a global module inside ee umbrella in standalone.xml and it is loading correctly. <global-modules> But I'm having a different bug now, I have an ApplicationScoped bean that load some entities from database in application startup and while it is loading the below warning appears: (if downgrade to 2.2.13 no warnings) 2017-06-10 19:27:22,892 WARNING [org.firebirdsql.gds.ng.wire.version10.V10Transaction] (Finalizer) Commit not completed, state was COMMITTING: java.lang.RuntimeException: Commit not completed 2017-06-10 19:27:22,892 WARNING [org.firebirdsql.gds.ng.wire.version10.V10Transaction] (Finalizer) Rollback not completed, state was ROLLING_BACK: java.lang.RuntimeException: Rollback not completed |
Commented by: @mrotteveel This is becoming more of a support inquiry than a bug report, could you post this on Firebird-Java? The short version is that your code did not close a connection, then when it was garbage collected the finalizer closed it for you. When this happened it committed the active auto-commit transaction which failed, then it tried to roll it back which also failed. Note that these log statements are warnings. However the actual commit failure isn't logged by this code, but is thrown up to the caller of the close() method (the finalizer in this case), unfortunately Java doesn't log exceptions during finalization. If you want to know the actual failure, you need to ensure connections are closed in your code, not in the finalizer. Note that this would also have happened with Jaybird 2.2, it just didn't log these warnings. |
Commented by: @mrotteveel For Jaybird 4, this will only log a short message on log level warning, and log the exception stacktrace for debugging purpose on log level debug. |
Submitted by: erick de oliveira leal (erickdeoliveiraleal)
Is related to JDBC490
I'm using wildfly with firebird datasource and i got this in initialization
19:11:27,524 SEVERE [org.firebirdsql.gds.impl.GDSFactory] (ServerService Thread Pool -- 62) Can't register plugin (skipping): org.firebirdsql.gds.impl.GDSFactoryPlugin: Provider org.firebirdsql.gds.impl.oo.OOGDSFactoryPlugin not a subtype: java.util.ServiceConfigurationError: org.firebirdsql.gds.impl.GDSFactoryPlugin: Provider org.firebirdsql.gds.impl.oo.OOGDSFactoryPlugin not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at org.firebirdsql.gds.impl.GDSFactory.loadPluginsFromClassLoader(GDSFactory.java:123)
at org.firebirdsql.gds.impl.GDSFactory.<clinit>(GDSFactory.java:75)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:110)
The text was updated successfully, but these errors were encountered: