"Additional libraries present" error on starting 22.1
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 71
- Joined: Sat Jan 07, 2017 1:23 am
"Additional libraries present" error on starting 22.1
I downloaded and installed Oxygen 22.1 today. However, after adding the file mysql-connector-java-5.1.42-bin.jar to the libraries folder (we use this for an XSLT transform that consults a MySQL database), I get this error message on startup:
We've added this .jar file to previous versions of Oxygen with no trouble. Is there a way to get rid of the error message for good?
If I click OK on the error message dialog, it goes away and the application finishes starting up and seems to work as usual. However, the next time I quit and start the app again, I get the same error message.There are additional libraries present in the application libraries folder.
Please close the application, uninstall it completely and then re-install.
We've added this .jar file to previous versions of Oxygen with no trouble. Is there a way to get rid of the error message for good?
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Additional libraries present" error on starting 22.1
Hi,
Indeed Oxygen reports this new error when there are extra libraries in its "lib" folder because those libraries may interfere with its default libraries. Also by default if you click Ok in the error dialogs, Oxygen will skips loading those extra libraries and start up.
Some options that you have:
1) One option is to avoid adding that JAR library to the "lib" folder, instead in the transformation scenario you have configured in Oxygen to run the XSLT transformation there is a "Libraries" button where you can refer to that extra JAR library and use it only when transforming.
2) In the Oxygen "lib" folder there is a "libraries.list" file. Delete that file and re-start Oxygen, it will no longer show that error on startup and will load your additional library.
3) You can create a plugin for Oxygen and have that plugin contribute the library to Oxygen's class loader. I can give you more details about this if you are most interested.
I would recommend (1), it's cleaner not to add that library in the Oxygen libraries folder.
Regards,
Radu
Indeed Oxygen reports this new error when there are extra libraries in its "lib" folder because those libraries may interfere with its default libraries. Also by default if you click Ok in the error dialogs, Oxygen will skips loading those extra libraries and start up.
Some options that you have:
1) One option is to avoid adding that JAR library to the "lib" folder, instead in the transformation scenario you have configured in Oxygen to run the XSLT transformation there is a "Libraries" button where you can refer to that extra JAR library and use it only when transforming.
2) In the Oxygen "lib" folder there is a "libraries.list" file. Delete that file and re-start Oxygen, it will no longer show that error on startup and will load your additional library.
3) You can create a plugin for Oxygen and have that plugin contribute the library to Oxygen's class loader. I can give you more details about this if you are most interested.
I would recommend (1), it's cleaner not to add that library in the Oxygen libraries folder.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 71
- Joined: Sat Jan 07, 2017 1:23 am
Re: "Additional libraries present" error on starting 22.1
Hi Radu,
Thanks for your reply. I tried to set up your option 1, moving the JAR file into the framework folder, but on running the transformation that connects to MySQL, I now get a different error message:
(I don't seem to have the Libraries button that you mentioned)
Then in Preferences > Data Sources I have also configured a data source called "MySQL" with the following values:
Thanks for your reply. I tried to set up your option 1, moving the JAR file into the framework folder, but on running the transformation that connects to MySQL, I now get a different error message:
In the framework's configuration dialog for the transformation scenario, I clicked the "Extensions" button and updated the "Libraries" dialog to show the new location of the JAR file:The script cannot be executed: Failed to load JDBC driver org.gjt.mm.mysq.Driver
Code: Select all
${framework}/lib/mysql-connector-java-5.1.42-bin.jar
Then in Preferences > Data Sources I have also configured a data source called "MySQL" with the following values:
- Type: Generic JDBC
- Driver files: file:/Applications/Oxygen%2022.1/frameworks/ucp_journalpublishing/lib/mysql-connector-java-5.1.42-bin.jar
- Driver calls: org.jgt.mm.mysql.Driver
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Additional libraries present" error on starting 22.1
Hi,
Indeed in my last email I should have referred to the "Extensions" button instead of the "Libraries".
What you did seems alright to me.
So the XSLT transformation does not work, right? Does the data source connection work?
I'm not sure about the XSLT transformation, would you be able to provide me with a minimal XSLT for which the problem can be reproduced on my side?
Regards,
Radu
Indeed in my last email I should have referred to the "Extensions" button instead of the "Libraries".
What you did seems alright to me.
So the XSLT transformation does not work, right? Does the data source connection work?
I'm not sure about the XSLT transformation, would you be able to provide me with a minimal XSLT for which the problem can be reproduced on my side?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 71
- Joined: Sat Jan 07, 2017 1:23 am
Re: "Additional libraries present" error on starting 22.1
Hi Radu,
The transformation doesn't work because the script is set up to terminate if the MySQL connection cannot be made.
Here is my minimal version of the transformation (I hope it's not too long). This works under Oxygen 21.1 with the JAR file in OxygenHome/lib, and does not work under Oxygen 22.1 with the JAR file in OxygenHome/frameworks/framework/lib.
The transformation doesn't work because the script is set up to terminate if the MySQL connection cannot be made.
Here is my minimal version of the transformation (I hope it's not too long). This works under Oxygen 21.1 with the JAR file in OxygenHome/lib, and does not work under Oxygen 22.1 with the JAR file in OxygenHome/frameworks/framework/lib.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:atict="http://www.arbortext.com/namespace/atict" xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="http://saxon.sf.net/sql" xmlns:ucpj="http://www.journals.uchicago.edu/xslt"
xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"
exclude-result-prefixes="atict ucpj xs" extension-element-prefixes="saxon sql" version="2.0">
<xsl:output method="xml" xml:space="default" extension-element-prefixes="sql"/>
<!-- OLD DRIVER: com.mysql.jdbc.Driver -->
<!-- NEW DRIVER: org.gjt.mm.mysql.Driver -->
<xsl:variable name="db-driver" select="'org.gjt.mm.mysql.Driver'"/>
<xsl:variable name="db-database" select="'jdbc:mysql://[servername]:3306/ucpj'"/>
<xsl:variable name="db-user" select="'****'"/>
<xsl:variable name="db-password" select="'****'"/>
<!-- as=java:java.sql.Connection -->
<!-- as=java:java.lang.Object -->
<xsl:variable name="db-connect" as="java:java.sql.Connection"
xmlns:java="http://saxon.sf.net/java-type">
<sql:connect driver="{$db-driver}" database="{$db-database}" user="{$db-user}"
password="{$db-password}">
<xsl:fallback>
<xsl:message terminate="yes">
<xsl:text>ERROR: Connection to MySQL database failed.</xsl:text>
</xsl:message>
</xsl:fallback>
</sql:connect>
</xsl:variable>
<xsl:variable name="ucpj-test" as="xs:string">
<sql:query connection="$db-connect" table="people" column="initials" where="PeopleID = '47'"
row-tag="#auto" column-tag="#auto"/>
</xsl:variable>
<xsl:template match="@* | *">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="article">
<xsl:choose>
<xsl:when test="not(element-available('sql:connect'))">
<xsl:message terminate="yes">
<xsl:text>ERROR: sql:connect IS NOT AVAILABLE.</xsl:text>
</xsl:message>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Database says: </xsl:text>
<xsl:value-of select="$ucpj-test"/>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
<xsl:copy copy-namespaces="yes">
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Additional libraries present" error on starting 22.1
Hi,
Let's say that you copy that extra jar to the Oxygen 22.1 "lib" folder, if you follow my advice above:
Regards,
Radu
Let's say that you copy that extra jar to the Oxygen 22.1 "lib" folder, if you follow my advice above:
does Oxygen 22.1 start working with your XSLT and the original transformation scenario?In the Oxygen "lib" folder there is a "libraries.list" file. Delete that file and re-start Oxygen, it will no longer show that error on startup and will load your additional library.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 71
- Joined: Sat Jan 07, 2017 1:23 am
Re: "Additional libraries present" error on starting 22.1
Hi Radu,
Yes, if I go back to the configuration that worked with 21.1 and move "libraries.list" from the lib directory, the MySQL connection is made and the transformation works.
I do prefer your solution #1 though, since it makes sharing the framework or upgrading to a new version a bit easier.
Yes, if I go back to the configuration that worked with 21.1 and move "libraries.list" from the lib directory, the MySQL connection is made and the transformation works.
I do prefer your solution #1 though, since it makes sharing the framework or upgrading to a new version a bit easier.
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: "Additional libraries present" error on starting 22.1
Hi,
Thanks for the details, we have an internal issue to look into first making such a connection work with the JAR library included in the main Oxygen libraries, after this to try and move the JAR library as an extension in the transformation scenario and try to make it work this way. If we manage to fix this problem we'll update this forum thread.
Regards,
Radu
Thanks for the details, we have an internal issue to look into first making such a connection work with the JAR library included in the main Oxygen libraries, after this to try and move the JAR library as an extension in the transformation scenario and try to make it work this way. If we manage to fix this problem we'll update this forum thread.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service