java.lang.ClassCastException while debugging plugin

Post here questions and problems related to oXygen frameworks/document types.
DirkDubois
Posts: 22
Joined: Thu Jan 30, 2014 11:53 pm
Contact:

java.lang.ClassCastException while debugging plugin

Post by DirkDubois »

Hello All,

I have been trying to debug a plugin for Oxygen using eclipse. I followed the steps outlined here http://www.oxygenxml.com/doc/ug-editor/ ... lugin.html.

Firstly, I would note that the

Code: Select all

C:\[OXYGEN_DIR]
folder specified in step 6 does not contain lib immeditely inside its hierarchy but rather in

Code: Select all

C:\[OXYGEN_DIR]\oxygen\lib
and that the path should be corrected in the instructions.

I created the project as specified and used the workspace access plugin as a starting point. I have previously deployed the workspace-access plugin manually after running Maven install, so I am certain that the source code works correctly. Every time I launch the debugged instance of oxygen I would get a java.lang.ClassCastException, and the plugin would not load.

I tried to setup the oxygen-sample-plugin-workspace-access project by following the debugging instructions instead but when I launch oxygen, I get the same java.lang.ClassCastException, and the plugin does not load. If I exclude the VM argument to adjust the plugin path, the debugged instance of oxygen works correctly. Note, I have set the Java JRE to be the one included with Oxygen, so I am sure there isn't any major version mismatches.

Any help related to this problem would be greatly appreciated.

Thanks,
Dirk
XML Programmer, Technical Writing
Matrox Imaging
DirkDubois
Posts: 22
Joined: Thu Jan 30, 2014 11:53 pm
Contact:

Re: java.lang.ClassCastException while debugging plugin

Post by DirkDubois »

Hello All,

After fiddling with path settings I was able to resolve my issue. Step 4 indicates to adjust the library reference to ..\classes. However, in a default eclipse project they are placed in bin\classes and in the maven projects they are placed in target\classes. I have now adjusted the path and the debugging instance works correctly.

Thank you for all your help,
Dirk
XML Programmer, Technical Writing
Matrox Imaging
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: java.lang.ClassCastException while debugging plugin

Post by alex_jitianu »

Hello Dirk,

Yes, you are right. I will make the required changes. We already added some clarifications in that topic but we didn't notice the part with the compiled classes folder.

Best regards,
Alex
Post Reply