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
Could not initialize class org.firebirdsql.encodings.EncodingFactory$DefaultEncodingFactory [JDBC449] #489
Comments
Commented by: @mrotteveel I seem to be missing the cause of the java.lang.NoClassDefFoundError: Could not initialize class org.firebirdsql.encodings.EncodingFactory$DefaultEncodingFactory Is there by any chance an earlier exception in the log? |
Commented by: @mrotteveel Could you post your module.xml for the Firebird/Jaybird driver? |
Modified by: @mrotteveelFix Version: Jaybird 3.0 [ 10440 ] |
Commented by: @mrotteveel The problem is that Jaybird 3 needs the javax.xml.bind.api module. The errors in your gists are not the initial error, but subsequent errors. The root cause is this exception that occurs because the javax.xml.bind.JAXBException cannot be found when the DefaultEncodingFactory class is loaded. On subsequent attempts to create a connection the exception from your gist is logged, as the classloading failed. The solution is to update your module.xml to: \(specifically the addition of \) The initial exception is: 2016\-08\-27 10:39:02,175 WARN \[org\.jboss\.jca\.core\.connectionmanager\.pool\.strategy\.OnePool\] \(External Management Request Threads \-\- 10\) IJ000604: Throwable while attempting to get a new connection: null: javax\.resource\.ResourceException: IJ031084: Unable to create connection at org\.jboss\.jca\.adapters\.jdbc\.local\.LocalManagedConnectionFactory\.createLocalManagedConnection\(LocalManagedConnectionFactory\.java:345\) at org\.jboss\.jca\.adapters\.jdbc\.local\.LocalManagedConnectionFactory\.getLocalManagedConnection\(LocalManagedConnectionFactory\.java:352\) at org\.jboss\.jca\.adapters\.jdbc\.local\.LocalManagedConnectionFactory\.createManagedConnection\(LocalManagedConnectionFactory\.java:287\) at org\.jboss\.jca\.core\.connectionmanager\.pool\.mcp\.SemaphoreConcurrentLinkedDequeManagedConnectionPool\.createConnectionEventListener\(SemaphoreConcurrentLinkedDequeManagedConnectionPool\.java:1320\) at org\.jboss\.jca\.core\.connectionmanager\.pool\.mcp\.SemaphoreConcurrentLinkedDequeManagedConnectionPool\.getConnection\(SemaphoreConcurrentLinkedDequeManagedConnectionPool\.java:496\) at org\.jboss\.jca\.core\.connectionmanager\.pool\.AbstractPool\.internalTestConnection\(AbstractPool\.java:1052\) at org\.jboss\.jca\.core\.connectionmanager\.pool\.strategy\.OnePool\.testConnection\(OnePool\.java:93\) at org\.jboss\.as\.connector\.subsystems\.common\.pool\.PoolOperations$TestConnectionInPool\.invokeCommandOn\(PoolOperations\.java:234\) at org\.jboss\.as\.connector\.subsystems\.common\.pool\.PoolOperations$1\.execute\(PoolOperations\.java:90\) at org\.jboss\.as\.controller\.AbstractOperationContext\.executeStep\(AbstractOperationContext\.java:890\) at org\.jboss\.as\.controller\.AbstractOperationContext\.processStages\(AbstractOperationContext\.java:659\) at org\.jboss\.as\.controller\.AbstractOperationContext\.executeOperation\(AbstractOperationContext\.java:370\) at org\.jboss\.as\.controller\.OperationContextImpl\.executeOperation\(OperationContextImpl\.java:1329\) at org\.jboss\.as\.controller\.ModelControllerImpl\.internalExecute\(ModelControllerImpl\.java:400\) at org\.jboss\.as\.controller\.ModelControllerImpl\.execute\(ModelControllerImpl\.java:222\) at org\.jboss\.as\.domain\.http\.server\.DomainApiHandler\.handleRequest\(DomainApiHandler\.java:219\) at io\.undertow\.server\.handlers\.encoding\.EncodingHandler\.handleRequest\(EncodingHandler\.java:72\) at org\.jboss\.as\.domain\.http\.server\.security\.SubjectDoAsHandler$1\.run\(SubjectDoAsHandler\.java:72\) at org\.jboss\.as\.domain\.http\.server\.security\.SubjectDoAsHandler$1\.run\(SubjectDoAsHandler\.java:68\) at java\.security\.AccessController\.doPrivileged\(Native Method\) at javax\.security\.auth\.Subject\.doAs\(Subject\.java:422\) at org\.jboss\.as\.controller\.AccessAuditContext\.doAs\(AccessAuditContext\.java:149\) at org\.jboss\.as\.domain\.http\.server\.security\.SubjectDoAsHandler\.handleRequest\(SubjectDoAsHandler\.java:68\) at org\.jboss\.as\.domain\.http\.server\.security\.SubjectDoAsHandler\.handleRequest\(SubjectDoAsHandler\.java:63\) at io\.undertow\.server\.handlers\.BlockingHandler\.handleRequest\(BlockingHandler\.java:56\) at org\.jboss\.as\.domain\.http\.server\.DomainApiCheckHandler\.handleRequest\(DomainApiCheckHandler\.java:95\) at io\.undertow\.server\.Connectors\.executeRootHandler\(Connectors\.java:202\) at io\.undertow\.server\.HttpServerExchange$1\.run\(HttpServerExchange\.java:805\) at java\.util\.concurrent\.ThreadPoolExecutor\.runWorker\(ThreadPoolExecutor\.java:1142\) at java\.util\.concurrent\.ThreadPoolExecutor$Worker\.run\(ThreadPoolExecutor\.java:617\) at java\.lang\.Thread\.run\(Thread\.java:745\) at org\.jboss\.threads\.JBossThread\.run\(JBossThread\.java:320\) Caused by: java\.util\.ServiceConfigurationError: org\.firebirdsql\.encodings\.EncodingSet: Provider org\.firebirdsql\.encodings\.DefaultEncodingSet could not be instantiated at java\.util\.ServiceLoader\.fail\(ServiceLoader\.java:232\) at java\.util\.ServiceLoader\.access$100\(ServiceLoader\.java:185\) at java\.util\.ServiceLoader$LazyIterator\.nextService\(ServiceLoader\.java:384\) at java\.util\.ServiceLoader$LazyIterator\.next\(ServiceLoader\.java:404\) at java\.util\.ServiceLoader$1\.next\(ServiceLoader\.java:480\) at org\.firebirdsql\.encodings\.EncodingFactory\.loadEncodingSets\(EncodingFactory\.java:318\) at org\.firebirdsql\.encodings\.EncodingFactory\.createInstance\(EncodingFactory\.java:474\) at org\.firebirdsql\.encodings\.EncodingFactory\.access$000\(EncodingFactory\.java:36\) at org\.firebirdsql\.encodings\.EncodingFactory$DefaultEncodingFactory\.\(EncodingFactory\.java:59\) at org\.firebirdsql\.encodings\.EncodingFactory\.getPlatformDefault\(EncodingFactory\.java:428\) at org\.firebirdsql\.jdbc\.FBDriverPropertyManager\.handleEncodings\(FBDriverPropertyManager\.java:241\) at org\.firebirdsql\.jdbc\.FBDriverPropertyManager\.normalize\(FBDriverPropertyManager\.java:208\) at org\.firebirdsql\.jdbc\.FBDriver\.connect\(FBDriver\.java:116\) at org\.jboss\.jca\.adapters\.jdbc\.local\.LocalManagedConnectionFactory\.createLocalManagedConnection\(LocalManagedConnectionFactory\.java:321\) \.\.\. 31 more Caused by: java\.lang\.NoClassDefFoundError: javax/xml/bind/JAXBException at java\.lang\.Class\.getDeclaredConstructors0\(Native Method\) at java\.lang\.Class\.privateGetDeclaredConstructors\(Class\.java:2671\) at java\.lang\.Class\.getConstructor0\(Class\.java:3075\) at java\.lang\.Class\.newInstance\(Class\.java:412\) at java\.util\.ServiceLoader$LazyIterator\.nextService\(ServiceLoader\.java:380\) \.\.\. 42 more Caused by: java\.lang\.ClassNotFoundException: javax\.xml\.bind\.JAXBException from \[Module "org\.firebirdsql:main" from local module loader @1c2c22f3 \(finder: local module finder @18e8568 \(roots: D:\\DevSoft\\wildfly\-10\.1\.0\.Final\\modules,D:\\DevSoft\\wildfly\-10\.1\.0\.Final\\modules\\system\\layers\\base\)\)\] at org\.jboss\.modules\.ModuleClassLoader\.findClass\(ModuleClassLoader\.java:198\) at org\.jboss\.modules\.ConcurrentClassLoader\.performLoadClassUnchecked\(ConcurrentClassLoader\.java:363\) at org\.jboss\.modules\.ConcurrentClassLoader\.performLoadClass\(ConcurrentClassLoader\.java:351\) at org\.jboss\.modules\.ConcurrentClassLoader\.loadClass\(ConcurrentClassLoader\.java:93\) \.\.\. 47 more |
Commented by: @mrotteveel I will add some notes to the Jaybird wiki and the release notes I have also posted a question/answer on stackoverflow so it becomes easier to find if other people are confronted with the same problem: http://stackoverflow.com/questions/39179398/creating-a-connection-with-wildfly-10-and-jaybird-3-0-fails |
Commented by: @mrotteveel Added note to release notes and faq |
Modified by: @mrotteveelstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: erick de oliveira leal (erickdeoliveiraleal)
I only switched from jaybird 2.2.11 to 3.0 alpha1 and got some errors
My connections is " <datasource jta="true" jndi-name="java:jboss/Firebird" pool-name="FirebirdPool" enabled="true" use-ccm="true" statistics-enabled="false">
<connection-url>jdbc:firebirdsql:localhost/3050:C:\banco\SEGAD100716.FDB?encoding=WIN1252</connection-url>
<driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
<driver>firebird</driver>
<security>
<user-name>SYSDBA</user-name>
<password>masterkey</password>
</security>
</datasource>"
and the errors is
https://gist.github.com/erickdeoliveiraleal/b6a0f31f995d3bcd28cf739a930a7bb7
https://gist.github.com/erickdeoliveiraleal/19b6849d19768e5b3bcd450eef18dfee
Commits: 9eb1eef
The text was updated successfully, but these errors were encountered: