Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » ClassNotFoundException - Using PDE Tools generated Ant build.xml
ClassNotFoundException - Using PDE Tools generated Ant build.xml [message #28402] Thu, 23 October 2008 15:03 Go to next message
John Rodriguez is currently offline John RodriguezFriend
Messages: 8
Registered: July 2009
Junior Member
I have been developing a debugger and editor. I have used Eclipse to debug
problems by startig an Eclipse Application. All classes load correctly.

I then used the PDE Tools to generate an Ant build file.
Plugin.xml -> PDE Tools -> CreateAnt Build File

This generates a build.xml. I then run Ant with the build.xml to generate
my plugin jars using the targets build.jars and build.update.jar

When I add the 2 jars to Eclipse in the plugin directory, I get the
following error when trying to start the editor:

Could not open the editor: The editor class could not be instantiated.
This usually indicates a missing no-arg constructor or that the editor's
class name was mistyped in plugin.xml.

java.lang.ClassNotFoundException: luaeditorideplugin.LuaEditor
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
...

I do have a no-arg constructor:
public LuaEditor() {
STUFF DELETED
}

I also notice that Eclipse is able to successfully find my images for the
editor which are in the jar. The file is displayed under the project with
the correct image.

I looked at the jar file created by build.xml and all the classes are
under the "bin" folder.
bin/luaeditorideplugin/LuaEditor.class
bin/ ...

However, when I looked at the standard Eclipse editors in
org.eclipse.ui.editors_3.4.0.v20080603-2000.jar, the classes are at the
top level:
org/eclipse ...

Is having the bin folder as the top level the problem?

Do I have to include something else in the Manifest to indicate that
classes are in bin?

I did not see a way to specify in the plugin.xml Build tab that bin should
not be included?

Thanks,
John Rodiguez
Re: ClassNotFoundException - Using PDE Tools generated Ant build.xml [message #29118 is a reply to message #28402] Thu, 23 October 2008 18:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zx.code9.com

John Rodriguez wrote:
> I have been developing a debugger and editor. I have used Eclipse to
> debug problems by startig an Eclipse Application. All classes load
> correctly.
>
> I then used the PDE Tools to generate an Ant build file.
> Plugin.xml -> PDE Tools -> CreateAnt Build File
>
> This generates a build.xml. I then run Ant with the build.xml to
> generate my plugin jars using the targets build.jars and build.update.jar
>
> When I add the 2 jars to Eclipse in the plugin directory, I get the
> following error when trying to start the editor:
>
> Could not open the editor: The editor class could not be instantiated.
> This usually indicates a missing no-arg constructor or that the editor's
> class name was mistyped in plugin.xml.
>
> java.lang.ClassNotFoundException: luaeditorideplugin.LuaEditor
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> ..
>
> I do have a no-arg constructor:
> public LuaEditor() {
> STUFF DELETED
> }
>
> I also notice that Eclipse is able to successfully find my images for
> the editor which are in the jar. The file is displayed under the project
> with the correct image.
>
> I looked at the jar file created by build.xml and all the classes are
> under the "bin" folder.
> bin/luaeditorideplugin/LuaEditor.class
> bin/ ...
>
> However, when I looked at the standard Eclipse editors in
> org.eclipse.ui.editors_3.4.0.v20080603-2000.jar, the classes are at the
> top level:
> org/eclipse ...
>
> Is having the bin folder as the top level the problem?
>
> Do I have to include something else in the Manifest to indicate that
> classes are in bin?
>
> I did not see a way to specify in the plugin.xml Build tab that bin
> should not be included?

Why are you generating a build.xml and not using the
File->Export->Deployable Plug-ins wizard?

Cheers,

~ Chris
Re: ClassNotFoundException - Using PDE Tools generated Ant build.xml [message #29194 is a reply to message #29118] Thu, 23 October 2008 19:56 Go to previous message
John Rodriguez is currently offline John RodriguezFriend
Messages: 8
Registered: July 2009
Junior Member
I need a build.xml file because I have to check the source into a source
control system and have the source built and released by a different group
using build tools like Ant or make.

> John Rodriguez wrote:
>> I have been developing a debugger and editor. I have used Eclipse to
>> debug problems by startig an Eclipse Application. All classes load
>> correctly.
>>
>> I then used the PDE Tools to generate an Ant build file.
>> Plugin.xml -> PDE Tools -> CreateAnt Build File
>>
>> This generates a build.xml. I then run Ant with the build.xml to
>> generate my plugin jars using the targets build.jars and build.update.jar
>>
>> When I add the 2 jars to Eclipse in the plugin directory, I get the
>> following error when trying to start the editor:
>>
>> Could not open the editor: The editor class could not be instantiated.
>> This usually indicates a missing no-arg constructor or that the editor's
>> class name was mistyped in plugin.xml.
>>
>> java.lang.ClassNotFoundException: luaeditorideplugin.LuaEditor
>> at
>>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>>
>> at
>>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>>
>> ..
>>
>> I do have a no-arg constructor:
>> public LuaEditor() {
>> STUFF DELETED
>> }
>>
>> I also notice that Eclipse is able to successfully find my images for
>> the editor which are in the jar. The file is displayed under the project
>> with the correct image.
>>
>> I looked at the jar file created by build.xml and all the classes are
>> under the "bin" folder.
>> bin/luaeditorideplugin/LuaEditor.class
>> bin/ ...
>>
>> However, when I looked at the standard Eclipse editors in
>> org.eclipse.ui.editors_3.4.0.v20080603-2000.jar, the classes are at the
>> top level:
>> org/eclipse ...
>>
>> Is having the bin folder as the top level the problem?
>>
>> Do I have to include something else in the Manifest to indicate that
>> classes are in bin?
>>
>> I did not see a way to specify in the plugin.xml Build tab that bin
>> should not be included?

> Why are you generating a build.xml and not using the
> File->Export->Deployable Plug-ins wizard?

> Cheers,

> ~ Chris
Re: ClassNotFoundException - Using PDE Tools generated Ant build.xml [message #583512 is a reply to message #28402] Thu, 23 October 2008 18:32 Go to previous message
Chris Aniszczyk is currently offline Chris AniszczykFriend
Messages: 674
Registered: July 2009
Senior Member
John Rodriguez wrote:
> I have been developing a debugger and editor. I have used Eclipse to
> debug problems by startig an Eclipse Application. All classes load
> correctly.
>
> I then used the PDE Tools to generate an Ant build file.
> Plugin.xml -> PDE Tools -> CreateAnt Build File
>
> This generates a build.xml. I then run Ant with the build.xml to
> generate my plugin jars using the targets build.jars and build.update.jar
>
> When I add the 2 jars to Eclipse in the plugin directory, I get the
> following error when trying to start the editor:
>
> Could not open the editor: The editor class could not be instantiated.
> This usually indicates a missing no-arg constructor or that the editor's
> class name was mistyped in plugin.xml.
>
> java.lang.ClassNotFoundException: luaeditorideplugin.LuaEditor
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> ..
>
> I do have a no-arg constructor:
> public LuaEditor() {
> STUFF DELETED
> }
>
> I also notice that Eclipse is able to successfully find my images for
> the editor which are in the jar. The file is displayed under the project
> with the correct image.
>
> I looked at the jar file created by build.xml and all the classes are
> under the "bin" folder.
> bin/luaeditorideplugin/LuaEditor.class
> bin/ ...
>
> However, when I looked at the standard Eclipse editors in
> org.eclipse.ui.editors_3.4.0.v20080603-2000.jar, the classes are at the
> top level:
> org/eclipse ...
>
> Is having the bin folder as the top level the problem?
>
> Do I have to include something else in the Manifest to indicate that
> classes are in bin?
>
> I did not see a way to specify in the plugin.xml Build tab that bin
> should not be included?

Why are you generating a build.xml and not using the
File->Export->Deployable Plug-ins wizard?

Cheers,

~ Chris
Re: ClassNotFoundException - Using PDE Tools generated Ant build.xml [message #583534 is a reply to message #29118] Thu, 23 October 2008 19:56 Go to previous message
John Rodriguez is currently offline John RodriguezFriend
Messages: 8
Registered: July 2009
Junior Member
I need a build.xml file because I have to check the source into a source
control system and have the source built and released by a different group
using build tools like Ant or make.

> John Rodriguez wrote:
>> I have been developing a debugger and editor. I have used Eclipse to
>> debug problems by startig an Eclipse Application. All classes load
>> correctly.
>>
>> I then used the PDE Tools to generate an Ant build file.
>> Plugin.xml -> PDE Tools -> CreateAnt Build File
>>
>> This generates a build.xml. I then run Ant with the build.xml to
>> generate my plugin jars using the targets build.jars and build.update.jar
>>
>> When I add the 2 jars to Eclipse in the plugin directory, I get the
>> following error when trying to start the editor:
>>
>> Could not open the editor: The editor class could not be instantiated.
>> This usually indicates a missing no-arg constructor or that the editor's
>> class name was mistyped in plugin.xml.
>>
>> java.lang.ClassNotFoundException: luaeditorideplugin.LuaEditor
>> at
>>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>>
>> at
>>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>>
>> ..
>>
>> I do have a no-arg constructor:
>> public LuaEditor() {
>> STUFF DELETED
>> }
>>
>> I also notice that Eclipse is able to successfully find my images for
>> the editor which are in the jar. The file is displayed under the project
>> with the correct image.
>>
>> I looked at the jar file created by build.xml and all the classes are
>> under the "bin" folder.
>> bin/luaeditorideplugin/LuaEditor.class
>> bin/ ...
>>
>> However, when I looked at the standard Eclipse editors in
>> org.eclipse.ui.editors_3.4.0.v20080603-2000.jar, the classes are at the
>> top level:
>> org/eclipse ...
>>
>> Is having the bin folder as the top level the problem?
>>
>> Do I have to include something else in the Manifest to indicate that
>> classes are in bin?
>>
>> I did not see a way to specify in the plugin.xml Build tab that bin
>> should not be included?

> Why are you generating a build.xml and not using the
> File->Export->Deployable Plug-ins wizard?

> Cheers,

> ~ Chris
Previous Topic:Some plugins not recognized in the target platform
Next Topic:headless build "forgets" native swt plugins for linux
Goto Forum:
  


Current Time: Thu Apr 25 21:20:09 GMT 2024

Powered by FUDForum. Page generated in 0.03282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top