java.lang.ClassNotFoundException

Having trouble installing Oxygen? Got a bug to report? Post it all here.
cme4oil
Posts: 1
Joined: Mon Mar 29, 2004 1:04 am

java.lang.ClassNotFoundException

Post by cme4oil »

Hi,

I just downloaded this to try. I installed to /home/mydir/Oxygen3.1 and unzipped the com.oxygenxml.editor_3.1_M6.zip to the plugins folder as instructed.

When I try to run Oxygen 3.1 I get a "java.lang.ClassNotFoundException error pointing to the Oxygen3.1/plugins/com.oxygenxml.editor_3.1- .

Anyone have an idea what I need to do to make this work?

Thanks!
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Please note that oXygen is available as a standalone application and as an Eclipse plugin. These two do not interact one with the other. From your message it seems you installed the standalone version then you installed also the Eclipse plugin version but instead of extracting that to the Eclipse plugin directory you extracted it to the oXygen standalone plugin directory.

You should use the standalone version as it is, do not extract the eclipse plugin there. If you want to use oXygen from Eclipse then get the plugin for your Eclipse version and extract the archive in the Eclipse plugin directory.

Best Regards,
George
winnietou
Posts: 1
Joined: Mon Jun 09, 2014 1:14 am

Re: java.lang.ClassNotFoundException

Post by winnietou »

Hi,

I have the same problem. I use the Oxygen XML Editor 16.0. I've load the Oxygen SDK with maven in this way http://www.oxygenxml.com/oxygen_sdk_maven.html with eclipse.

Now, I want to try to integrate one Plugin in the Oxygen Editor http://www.oxygenxml.com/doc/ug-editor/ ... lugin.html

I tried with the Plugin CapLines.

unfortunately the Editor brings a mistake by starting.
java.lang.classnotfoundexception C:\program files\oxygen XML Editor 16\plugins\LatinChar - MyOxygen.mySample.caplines.CapLinesPluginExtension

Do you know what to do? What Files must I copy from the SDK into the plugin-folder and what i write in the plugin.xml?

Please help me (and exquse my terrible english :oops: )
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: java.lang.ClassNotFoundException

Post by Radu »

Hi,

I gave you more details here:

http://www.oxygenxml.com/doc/ug-editor/ ... n.html#345

Basically the "CapLines" plugin sample should be a folder called for example oxygen-sample-plugin-capitalize-lines. In this folder you have a plugin.xml descriptor with the content something like:

Code: Select all

<!-- The plugin.dtd file is located in the OXYGEN_INSATALL_DIR/plugins directory -->
<!DOCTYPE plugin SYSTEM "../plugin.dtd">

<plugin
id="com.oxygenxml.plugin.CapLines"
name="Capitalize Lines"
description="Capitalize the first character on each line"
version="${project.version}"
vendor="SyncRO"
class="com.oxygenxml.sdksamples.caplines.CapLinesPlugin"
classLoaderType="preferReferencedResources">
<runtime>
<library name="lib/capLines.jar"/>
</runtime>
<extension type="selectionProcessor"
class="com.oxygenxml.sdksamples.caplines.CapLinesPluginExtension" keyboardShortcut="ctrl shift EQUALS"/>
</plugin>
In the same plugin folder you should have a lib folder which has a capLines.jar JAR library containing the compiled Java classes "com.oxygenxml.sdksamples.caplines.CapLinesPlugin" and "com.oxygenxml.sdksamples.caplines.CapLinesPluginExtension".

But the Maven Install should build all these sample plugins for you. From the main pom.xml you could remove the reference to these modules which are not necessary to you:

Code: Select all

		<module>oxygen-sample-webapp</module>
<module>oxygen-sample-applet</module>
<module>oxygen-sample-framework</module>
Then right click the oxygen-sdk-samples project folder in Eclipse, choose Run As->Maven Install.

At the end you will have all the plugins built and ready to be deployed in the oxygen-sdk-samples/bundle-plugins/target/deps folder. You should also have a ZIP containing all the sample plugin folders in the oxygen-sdk-samples/bundle-plugins/target/classes/plugins.zip folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
detiwari
Posts: 1
Joined: Mon Mar 21, 2016 1:15 am

Re: java.lang.ClassNotFoundException

Post by detiwari »

Hi,

I am getting the following error while restarting the Oxygen Author, after installing the plugin in the plugins folder:
"java.lang.ClassNotFoundException
C:\Program Files\Oxygen XML Author 16\plugins\uppercase - ro.sync.sample.plugin.uppercase.UppercasePluginExtension"

Can you please suggest what could be the problem here?
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: java.lang.ClassNotFoundException

Post by alex_jitianu »

Hi,

The basic structure of a plugin consists in a JAR file with the plugin's compiled code and a descriptor file (plugin.xml) that refers that JAR. From the error message I would say that the JAR file is missing. Have you used our Maven based SDK sample project to build the Uppercase Plugin? If you have, then the build system produces a ZIP file with all the plugin's required content. That ZIP file is the one that you need to unzip in the plugins directory.

I understand that you want to customize Oxygen Author. If that's the case then you should know that the sample plugin you chose (UppercasePluginExtension) is one that works only in the Text page (not the Author page). A more powerful type of plugin is the Workspace Access extension. Inside the SDK there is an Workspace Access sample project named oxygen-sample-plugin-workspace-access. If you tell me what you desire to achieve with this customization then I can give more hints on which extensions points can help you.

Best regards,
Alex
Post Reply