Subject Re: [Firebird-Java] Jaybird 3.0.0-beta-3 EncodingFactory$DefaultEncodingFactory error
Author Mark Rotteveel
On 2017-03-13 05:23, 'William L. Thomson Jr.' wlt-ml@...
[Firebird-Java] wrote:
> Seems to be jaxb issue with the default-firebird-encodings.xml

Thank you for providing the stacktrace.

Classloading issues are my favorite. Why does Netbeans have its own copy
of JAXB, when it is included in Java?!

On the other hand, looking at the javadoc of JAXBContext, I might have
been a little naive with the implementation.


Mark

> SEVERE [org.firebirdsql.encodings.DefaultEncodingSet]: Error loading
> encoding definition from default-firebird-encodings.xml
> javax.xml.bind.JAXBException: ClassCastException: attempting to cast
> jar:file:/usr/share/netbeans-nb-8.2/ide/modules/ext/jaxb/api/jaxb-api.jar!/javax/xml/bind/JAXBContontext.class
> to
> jar:file:/opt/oracle-jdk-bin-1.8.0.121/jre/lib/rt.jar!/javax/xml/bind/JAXBContext.class.
> Please make sure that you are specifying the proper ClassLoader
> at
> javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:114)
> at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:250)
> at
> javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:441)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
> at
> org.firebirdsql.encodings.DefaultEncodingSet.loadEncodingsFromXml(DefaultEncodingSet.java:100)
> at
> org.firebirdsql.encodings.DefaultEncodingSet.createEncodingDefinitions(DefaultEncodingSet.java:129)
> at
> org.firebirdsql.encodings.DefaultEncodingSet.getEncodings(DefaultEncodingSet.java:66)
> at
> org.firebirdsql.encodings.EncodingFactory.processEncodingSet(EncodingFactory.java:333)
> at
> org.firebirdsql.encodings.EncodingFactory.<init>(EncodingFactory.java:81)
> at
> org.firebirdsql.encodings.EncodingFactory.createInstance(EncodingFactory.java:480)
> at
> org.firebirdsql.encodings.EncodingFactory.access$000(EncodingFactory.java:36)
> at
> org.firebirdsql.encodings.EncodingFactory$DefaultEncodingFactory.<clinit>(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.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:131)
> at
> org.netbeans.modules.db.explorer.DatabaseConnection.doConnect(DatabaseConnection.java:923)
> at
> org.netbeans.modules.db.explorer.DatabaseConnection.access$200(DatabaseConnection.java:103)
> at
> org.netbeans.modules.db.explorer.DatabaseConnection$3.run(DatabaseConnection.java:988)
> at
> org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
> at
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
> at
> org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
> at
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)