Error when opening via custom protocol.
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 8
- Joined: Thu May 18, 2017 6:11 pm
Error when opening via custom protocol.
Hello,
Whenever I open a file via my custom protocol I get this error:
Severity: error
Description: Couldn't load custom Extensions Bundle from class: ro.sync.ecss.extensions.dita.DITAExtensionsBundle because: The specified class is not an implementation of ro.sync.ecss.extensions.api.Extension: ro.sync.ecss.extensions.dita.DITAExtensionsBundle
The file still opens just fine, and nothing else seems to be wrong. I haven't done anything with DITAExtensionsBundle. Any ideas why I might be seeing this?
Thanks,
Jack
Whenever I open a file via my custom protocol I get this error:
Severity: error
Description: Couldn't load custom Extensions Bundle from class: ro.sync.ecss.extensions.dita.DITAExtensionsBundle because: The specified class is not an implementation of ro.sync.ecss.extensions.api.Extension: ro.sync.ecss.extensions.dita.DITAExtensionsBundle
The file still opens just fine, and nothing else seems to be wrong. I haven't done anything with DITAExtensionsBundle. Any ideas why I might be seeing this?
Thanks,
Jack
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error when opening via custom protocol.
Hi Jack,
This looks like a class loading error.
Do you obtain this problem when running from the command line or from the workbench you are using to write the plugin Java code (I will assume Eclipse)?
Your plugin.xml references various JAR libraries, right? Could you list them here?
Regards,
Radu
This looks like a class loading error.
Do you obtain this problem when running from the command line or from the workbench you are using to write the plugin Java code (I will assume Eclipse)?
Your plugin.xml references various JAR libraries, right? Could you list them here?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error when opening via custom protocol.
Hi,
By the way, sometimes we get unhandled errors reported from Oxygen by users from Amazon, errors related to bugs in your plugin.
If you contact us via email (support@oxygenxml.com) and provide an email I could try in the future to forward these messages to you.
Regards,
Radu
By the way, sometimes we get unhandled errors reported from Oxygen by users from Amazon, errors related to bugs in your plugin.
If you contact us via email (support@oxygenxml.com) and provide an email I could try in the future to forward these messages to you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Thu May 18, 2017 6:11 pm
Re: Error when opening via custom protocol.
Hey Radu,
I haven't encountered it running from the command line or workbench (I am using Intellij).
My plugin xml includes a folder called lib in my plugin root:
<runtime>
<librariesFolder name="lib"/>
</runtime>
Inside that folder are:
MyPlugin.jar
jxbrowser-6.14.jar
jxbrowser-linux32-6.14.jar
jxbrowser-linux64-6.14.jar
jxbrowser-mac-6.14.jar
jxbrowserwin32-6.14.jar
licence.jar
Besides JxBrowser I am not using any 3rd part libraries.
I'll follow up on the error reports via email.
Thanks!
Jack
I haven't encountered it running from the command line or workbench (I am using Intellij).
My plugin xml includes a folder called lib in my plugin root:
<runtime>
<librariesFolder name="lib"/>
</runtime>
Inside that folder are:
MyPlugin.jar
jxbrowser-6.14.jar
jxbrowser-linux32-6.14.jar
jxbrowser-linux64-6.14.jar
jxbrowser-mac-6.14.jar
jxbrowserwin32-6.14.jar
licence.jar
Besides JxBrowser I am not using any 3rd part libraries.
I'll follow up on the error reports via email.
Thanks!
Jack
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error when opening via custom protocol.
Hi Jack,
About this remark:
If you look in the Oxygen startup script "oxygen.bat", you will see that the Java classpath used to start Oxygen contains only the main "oxygen.jar".
After this Oxygen uses its own class loader to load additional libraries from the "lib" folder, from plugins and frameworks.
So whenever you start our main class you need to only pass as a Java classpath the main Oxygen library, otherwise the main class loader will contain extra libraries that Oxygen will also load, leading to class loader problems similar to what you encounter.
By the way, why instead of the JavaFX browser are you using the JXBrowser? We are considering using the JavaFX browser in various places in our application so I'm just curious if you encountered any limitations with the JavaFX browser.
Regards,
Radu
About this remark:
Then how exactly are you running Oxygen when you obtain that problem?I haven't encountered it running from the command line or workbench (I am using Intellij).
If you look in the Oxygen startup script "oxygen.bat", you will see that the Java classpath used to start Oxygen contains only the main "oxygen.jar".
After this Oxygen uses its own class loader to load additional libraries from the "lib" folder, from plugins and frameworks.
So whenever you start our main class you need to only pass as a Java classpath the main Oxygen library, otherwise the main class loader will contain extra libraries that Oxygen will also load, leading to class loader problems similar to what you encounter.
By the way, why instead of the JavaFX browser are you using the JXBrowser? We are considering using the JavaFX browser in various places in our application so I'm just curious if you encountered any limitations with the JavaFX browser.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Thu May 18, 2017 6:11 pm
Re: Error when opening via custom protocol.
Hey Radu,
I'm running the Oxygen application normally, and I have my plugin installed via an update site. I'm seeing that error in the Error box at the bottom of Oxygen. Usually it pops up there when I open a document. The xml snippet I provided is in my plugin.xml, which as I understand is the normal way to tell Oxygen which libraries should be loaded for your plugin. I don't think I'm doing anything with the classpath.
JavaFX was slow and not compatible with our javascript. JxBrowser hasn't had any such issues.
Thanks,
Jack
I'm running the Oxygen application normally, and I have my plugin installed via an update site. I'm seeing that error in the Error box at the bottom of Oxygen. Usually it pops up there when I open a document. The xml snippet I provided is in my plugin.xml, which as I understand is the normal way to tell Oxygen which libraries should be loaded for your plugin. I don't think I'm doing anything with the classpath.
JavaFX was slow and not compatible with our javascript. JxBrowser hasn't had any such issues.
Thanks,
Jack
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error when opening via custom protocol.
Hi Jack,
Strange. If you right click on the received error and you choose Show message, does the dialog which shows up have a "More details..." link? If so, please click that and provide me with the exception stack trace.
Regards,
Radu
Strange. If you right click on the received error and you choose Show message, does the dialog which shows up have a "More details..." link? If so, please click that and provide me with the exception stack trace.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Thu May 18, 2017 6:11 pm
Re: Error when opening via custom protocol.
It does not, only a description:
Couldn't load custom Extensions Bundle from class: ro.sync.ecss.extensions.dita.map.DITAMapExtensionsBundle because: The specified class is not an implementation of ro.sync.ecss.extensions.api.Extension: ro.sync.ecss.extensions.dita.map.DITAMapExtensionsBundle
Couldn't load custom Extensions Bundle from class: ro.sync.ecss.extensions.dita.map.DITAMapExtensionsBundle because: The specified class is not an implementation of ro.sync.ecss.extensions.api.Extension: ro.sync.ecss.extensions.dita.map.DITAMapExtensionsBundle
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error when opening via custom protocol.
Hi Jack,
We will need to enable full logging in Oxygen to retrieve the exception stack trace.
In the Oxygen installation folder (the folder where the "lib" folder is located) you should create a new file called "log4j.properties" with the following content:
after this, start Oxygen, reproduce the problem and then close it.
Then on your Desktop there should be an oxygenLog folder which you can zip and send to us (support@oxygenxml.com).
You should remove the "log4j.properties" afterwards as it hinders the application's overall performance.
Regards,
Radu
We will need to enable full logging in Oxygen to retrieve the exception stack trace.
In the Oxygen installation folder (the folder where the "lib" folder is located) you should create a new file called "log4j.properties" with the following content:
Code: Select all
log4j.rootCategory= debug, R2
log4j.appender.R2=org.apache.log4j.RollingFileAppender
log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
log4j.appender.R2.MaxFileSize=12000KB
log4j.appender.R2.MaxBackupIndex=20
log4j.appender.R2.layout=org.apache.log4j.PatternLayout
log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
# CLIENT FOR V3
log4j.category.org.apache.commons.httpclient=error
log4j.category.httpclient.wire=debug
log4j.category.ro.sync.net.protocol=debug
# CLIENT FOR V4
log4j.category.org.apache.http.impl.conn=debug
log4j.category.org.apache.http.impl.client=debug
log4j.category.org.apache.http.client=debug
log4j.category.org.apache.http.wire=debug
log4j.category.org.apache.http=debug
Then on your Desktop there should be an oxygenLog folder which you can zip and send to us (support@oxygenxml.com).
You should remove the "log4j.properties" afterwards as it hinders the application's overall performance.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 8
- Joined: Thu May 18, 2017 6:11 pm
Re: Error when opening via custom protocol.
I think I sorted it out. I was calling workspace.open(url) on JxBrowser's thread, after it invoked my callback over the javascript -> java bridge. This seems be to causing some kind of classloader related issue, as you mentioned. Putting Thread.currentThread().setContextClassLoader(PluginWorkspace.class.getClassLoader()); ahead of the open call seems to have fixed it. At least the error has gone away.
Seem plausible?
Seem plausible?
Return to “SDK-API, Frameworks - Document Types”
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