Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » NoClassDefFoundError when trying to develop custom ODA for Birt
NoClassDefFoundError when trying to develop custom ODA for Birt [message #235051] Tue, 17 April 2007 21:24 Go to next message
Eclipse User
Originally posted by: lmundt.rogers.com

I think this problem should be easy for those of you with more
experience, but so far I haven't been able to find a solution.

I am trying to implement my own custom ODA plug-in for Birt. It is
supposed to leverage a data layer that I have put in stuff.jar.

I add stuff.jar to the project as an external jar. I am then able to
test the methods of my ODA plug-in using junit.

The problem starts when I try to debug the plug-in as an eclipse
framework. My driver appears when I try to create a new data source, so
far so good. When I hit test connection in the new data source wizard
it produces a NoClassDefFoundError. It does this when it tries to
instantiate one of the classes in my stuff.jar.

So I realize that this means that stuff.jar is not in the classpath for
this invocation of the Eclipse/Birt framework.

I have done some reading and the two options seem to be either a. wrap
the contents of stuff.jar in it's own plug-in or b. add it to the
defined libraries for the plug-in. I don't want to create a plug-in as
the jar is used by other non-eclipse apps. I have tried using the
manifest editor and added stuff.jar to the Classpath on the runtime tab
but it still produces the same exception.

I am using eclipse 3.2.2 and Birt 2.1.2

Any assistance would be much appreciated.
Re: NoClassDefFoundError when trying to develop custom ODA for Birt [message #698790 is a reply to message #235051] Wed, 20 July 2011 08:29 Go to previous messageGo to next message
Paul Anderson is currently offline Paul Anderson
Messages: 2
Registered: July 2011
Junior Member
Hi,

Did you find a workaround for this problem? I am having the same issues. I've created an ODA driver which calls JAR file I have created which I added the same way as you. However I get the NoClassDefFoundError when I try to call it. I have downloaded the Eclipse Indigo SDK to do this.

I even created a new java project (HelloWorldX) in the workspace which has a class with a static method to return a string which is called when I test the connection. It produces the same NoClassDefFoundError when I call the line of code. I think I have exhausted every possibility of configuring the class path.


Andez
Re: NoClassDefFoundError when trying to develop custom ODA for Birt [message #698907 is a reply to message #698790] Wed, 20 July 2011 12:55 Go to previous messageGo to next message
Paul Anderson is currently offline Paul Anderson
Messages: 2
Registered: July 2011
Junior Member
I solved my problem. Might be 4 years to late for the original poster.

Having followed the Integrating and Extending BIRT CSV ODA Driver example, I noticed there was a Hibernate Driver. You can download the source from Actuate Site.

This driver was put together differently. It had settings for manipulating the class path when creating it through the wizard. Unfortunately the class path could not be set in the version of Eclipse SDK I downloaded - Indigo. So I thought I would go through manually and see the differences.

To do this you only need to open the MANIFEST.MF in the Eclipse IDE.

build.properties tab

Include all jar files you want to reference/include as follows:

source.odasentinel.jar = src/
output.odasentinel.jar = bin/
bin.includes = plugin.xml,\
META-INF/,\
odasentinel.jar,\
lib/activation.jar\ ...

MANIFEST.MF tab

Set the Bundle-ClassPath setting to include all jar files you want to reference/include as follows:
Bundle-ClassPath: odasentinel.jar,
lib/activation.jar,
lib/bsh-2.0b2.jar,
lib/comm.jar,

You can now run and debug your ODA Driver with Eclipse.

[Updated on: Wed, 20 July 2011 12:56]

Report message to a moderator

Re: NoClassDefFoundError when trying to develop custom ODA for Birt [message #699006 is a reply to message #698907] Wed, 20 July 2011 15:53 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Thanks for posting this Paul.

Jason

On 7/20/2011 8:55 AM, Paul Anderson wrote:
> I solved my problem. Might be 4 years to late for the original poster.
>
> Having followed the Integrating and Extending BIRT CSV ODA Driver
> example, I noticed there was a Hibernate Driver. You can download the
> source from Actuate Site.
>
> This driver was put together differently. It had settings for
> manipulating the class path when creating it through the wizard.
> Unfortunately the class path could not be set in the version of Eclipse
> SDK I downloaded - Indigo. So I thought I would go through manually and
> see the differences.
>
> To do this you only need to open the MANIFEST.MF in the Eclipse IDE.
> build.properties tab
>
> Include all jar files you want to reference/include as follows:
>
> source.odasentinel.jar = src/ output.odasentinel.jar = bin/ bin.includes
> = plugin.xml,\ META-INF/,\ odasentinel.jar,\ lib/activation.jar\ ...
>
> MANIFEST.MF tab
>
> Set the Bundle-ClassPath setting to include all jar files you want to
> reference/include as follows: Bundle-ClassPath: odasentinel.jar,
> lib/activation.jar, lib/bsh-2.0b2.jar, lib/comm.jar,
>
> You can now run and debug your ODA Driver with Eclipse.
>
Re: NoClassDefFoundError when trying to develop custom ODA for Birt [message #789383 is a reply to message #698907] Thu, 02 February 2012 23:17 Go to previous message
Andrew Kolas is currently offline Andrew Kolas
Messages: 1
Registered: February 2012
Junior Member
Paul,

I was trying out your solution, but I couldn't figure out which MANIFEST.MF you're editing. Is it the one that comes in the hibernate3.jar?

Also, did you switch away from the "web service" data source?

Any help is appreciated.
Previous Topic:1 Parameter box for Multiple Data Sets
Next Topic:Birt 3.7 and IE 9
Goto Forum:
  


Current Time: Tue Oct 21 00:43:22 GMT 2014

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

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