How to run oxygen plugin project from Eclipse in DEBUG mode
Oxygen general issues.
-
- Posts: 144
- Joined: Fri Feb 28, 2020 4:02 pm
How to run oxygen plugin project from Eclipse in DEBUG mode
Post by vishwavaranasi »
hello team ,
We have oxygen plugin implemented and we want to run oxygen plugin project from Eclipse in DEBUG mode
please point me to the necessary config steps for the same.
Thanks
vishwa
We have oxygen plugin implemented and we want to run oxygen plugin project from Eclipse in DEBUG mode
please point me to the necessary config steps for the same.
Thanks
vishwa
Thanks,
vishwa
vishwa
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 144
- Joined: Fri Feb 28, 2020 4:02 pm
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Post by vishwavaranasi »
Hi Radu , I have tried the debug plugin from Eclipse , When i run the Run Configration with VM args , it is trying to open oxygen 24 , but while starting got the below error
is this something am missing here?
- image.png (43.79 KiB) Viewed 1252 times
Thanks,
vishwa
vishwa
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Hi,
And the same plugin works when running Oxygen directly, without the debugger right?
If you open the "oxygen.bat" from the Oxygen installation folder, it has a very small classpath:
meaning that it adds to the classpath the Oxygen installation folder and two of libraries from the Oxygen "lib" folder.
When you configure the Java Application configuration in Eclipse you should give it also a very limited classpath with two JAR libraries and the Oxygen installation folder.
Something like:
Oxygen has its own internal custom class loader which should load all other libraries and plugin libraries.
Regards,
Radu
And the same plugin works when running Oxygen directly, without the debugger right?
If you open the "oxygen.bat" from the Oxygen installation folder, it has a very small classpath:
Code: Select all
"%~dp0;%~dp0/classes;%~dp0/lib/oxygen-basic-utilities.jar;%~dp0/lib/oxygen.jar;"
When you configure the Java Application configuration in Eclipse you should give it also a very limited classpath with two JAR libraries and the Oxygen installation folder.
Something like:
- Screenshot 2023-05-15 at 06.47.25.png (211.8 KiB) Viewed 1211 times
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 144
- Joined: Fri Feb 28, 2020 4:02 pm
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Post by vishwavaranasi »
Hi Radu , we are getting back to work on this to debug plugin from eclipse.
our eclipse showing the classpath TAB as below, we dont see Dependencies TAB as you showed
would you please suggest how to proceed.
our eclipse showing the classpath TAB as below, we dont see Dependencies TAB as you showed
- image.png (43.62 KiB) Viewed 1085 times
Thanks,
vishwa
vishwa
-
- Posts: 144
- Joined: Fri Feb 28, 2020 4:02 pm
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Post by vishwavaranasi »
sorry , there was some space in the VM args it was showing the error.
the error is not showing now , and the oxygen opened from eclipse but the plugin is not showing in the oxygen.
plugin.xml
the error is not showing now , and the oxygen opened from eclipse but the plugin is not showing in the oxygen.
plugin.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- The plugin.dtd file is located in the OXYGEN_INSATALL_DIR/plugins directory -->
<!DOCTYPE plugin SYSTEM "../plugin.dtd">
<plugin
id="com.oxygenxml.plugin.WorkspaceAccess"
name="CustomWorkspaceAccess"
description="Test"
version="${project.version}"
vendor="Syncro Soft"
class="com.oxygenxml.sdksamples.workspace.WorkspaceAccessPlugin"
classLoaderType="preferReferencedResources">
<runtime>
<librariesFolder name="lib" />
<library name="../oxygen-plugin-workspace-access/target/classes" />
<librariesFolder name="target/lib" />
</runtime>
<extension type="WorkspaceAccess"
class="com.oxygenxml.sdksamples.workspace.CustomWorkspaceAccessPluginExtension"/>
<!--The sample view which will present messages from the sample plugin.-->
<view id="SampleWorkspaceAccessID" initialSide="WEST" initialRow="0"/>
<!--The sample toolbar which will present messages from the sample plugin.-->
<toolbar id="SampleWorkspaceAccessToolbarID" initialSide="NORTH" initialRow="1"/>
</plugin>
Thanks,
vishwa
vishwa
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Hi,
It's hard to give advice as I do not know how your project structure looks like and how it's referenced from Oxygen.
When you start Oxygen directly (not from Eclipse but using the "oxygen.bat" executable for example), is your plugin loaded?
I assume your "plugin.xml" is inside the "oxygen-plugin-workspace-access" folder, so this library reference:
could probably be changed to this:
In this readme file:
https://github.com/oxygenxml/sample-plu ... ace-access
there is a suggestion about:
If you add "System.err" lines in your plugin's code and start Oxygen using the "OXYGEN_INSTALL_DIR/oxygen.bat" script, do you see those system err lines in the console output?
Regards,
Radu
It's hard to give advice as I do not know how your project structure looks like and how it's referenced from Oxygen.
When you start Oxygen directly (not from Eclipse but using the "oxygen.bat" executable for example), is your plugin loaded?
I assume your "plugin.xml" is inside the "oxygen-plugin-workspace-access" folder, so this library reference:
Code: Select all
<library name="../oxygen-plugin-workspace-access/target/classes" />
Code: Select all
<library name="target/classes" />
https://github.com/oxygenxml/sample-plu ... ace-access
there is a suggestion about:
have you added in the Oxygen installation "plugins" folder a subfolder containing a "plugin.redirect" pointing to your plugin development folder?If you want to debug your Java code and do not want to run "mvn install" and to install the plugin in Oxygen all the time, in the "OXYGEN_INSTALL_DIR\plugins" folder you can create a folder with any name (for example "sample") in which you place a file called "plugin.redirect"....
If you add "System.err" lines in your plugin's code and start Oxygen using the "OXYGEN_INSTALL_DIR/oxygen.bat" script, do you see those system err lines in the console output?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 144
- Joined: Fri Feb 28, 2020 4:02 pm
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Post by vishwavaranasi »
Hi Radu ,
our plugin is comprised of 3 projects
project 1 - db operations where we have dependency of ojdbc
project 2 - middle layer project ( is dependent on project 1)
project 3 - oxygen plugin project ( is dependent of project 2)
in out myplugin/plugin.xml we have specified as
and the oxygen opened , from one of our custom plugin menu options we trying to DB and getting this error.
Cannot get Connection from Datasource: java.lang.SecurityException: sealing violation: package oracle.jdbc.aq is sealed
would you please help us here.
Thanks,
vishwa
our plugin is comprised of 3 projects
project 1 - db operations where we have dependency of ojdbc
project 2 - middle layer project ( is dependent on project 1)
project 3 - oxygen plugin project ( is dependent of project 2)
in out myplugin/plugin.xml we have specified as
Code: Select all
<runtime>
<!-- librariesFolder name="lib" /-->
<!-- <library name="../target/classes" /> -->
<library name="C:/path_to_/project1/target/classes"/>
<library name="C:/path_to_/project2/target/classes"/>
<library name="C:/path_to_/project3/target/classes"/>
<librariesFolder name="../target/lib" />
</runtime>
Cannot get Connection from Datasource: java.lang.SecurityException: sealing violation: package oracle.jdbc.aq is sealed
would you please help us here.
Thanks,
vishwa
Thanks,
vishwa
vishwa
Re: How to run oxygen plugin project from Eclipse in DEBUG mode
Hi,
This last problem does not seem related to the problem you initially reported on this thread. Maybe in such cases you can start a new discussion post.
You mentioned:
This particular " sealing violation: package oracle.jdbc.aq is sealed" would mean that there is a JAR library containing the "oracle.jdbc.aq" package and it is sealed:
https://docs.oracle.com/javase/tutorial ... alman.html
And I think you might have another JAR library containing the same package somewhere else on your classpath. And because the first JAR library is sealed, the Java VM throws an error.
Regards,
Radu
This last problem does not seem related to the problem you initially reported on this thread. Maybe in such cases you can start a new discussion post.
You mentioned:
How exactly are you doing this? Are you calling from your code the Java JDBC APIs?from one of our custom plugin menu options we trying to DB
This particular " sealing violation: package oracle.jdbc.aq is sealed" would mean that there is a JAR library containing the "oracle.jdbc.aq" package and it is sealed:
https://docs.oracle.com/javase/tutorial ... alman.html
And I think you might have another JAR library containing the same package somewhere else on your classpath. And because the first JAR library is sealed, the Java VM throws an error.
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)
- ↳ 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