Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » -> Library Plugin for Digester and mockobjects
-> Library Plugin for Digester and mockobjects [message #146508] Mon, 01 March 2004 12:16 Go to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
Hi there,

I 've added a library plugin project and added all the required libraries
to it and referred to it from project A .

Since I got compile-errors (Project A) I 've added the libraries to the
classpath (thinking eclipse can not simply recognize it during PDE
programming sessions). So I was able to create test cases and to avoid
Plugin-Test runs. But after getting through most of the work and the
current iteration came to an end, I wanted to run the complete test suite.

Well and now it turns out that the library plugin does not work. I played
around with the plugin.xml and build.properties and exported the
plugin to see what it looks like and everything looks like it was expected,
but project A does not find any of the classes (throwing NoClassDefErrors
at me all the time).

So the question is, where is the bad guy?
The tags for the mock api looks like this:

<runtime>
[...]
<library name="mockobjects-core-0.09.jar">
<export name="*"/>
</library>
<library name="mockobjects-jdk1.4-0.09.jar">
<export name="*"/>
</library>
<library name="mockobjects-alt-jdk1.4-0.09.jar">
<export name="*"/>
</library>
</runtime>

The jars are all placed in the plugins main directory.
The build.properties look like:

bin.includes = plugin.xml,\
commons-beanutils.jar,\
commons-collections-3.0.jar,\
commons-digester-1.5.jar,\
commons-logging-api.jar,\
commons-logging.jar,\
log4j-1.2.8.jar,\
mockobjects-alt-jdk1.4-0.09.jar,\
mockobjects-core-0.09.jar,\
mockobjects-jdk1.4-0.09.jar


Can someone help me? It keeps me away from the lucky-land! :(


Thanks,

Martin (Kersten)
Re: -> Library Plugin for Digester and mockobjects [message #146606 is a reply to message #146508] Mon, 01 March 2004 19:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Martin, can you provide your .classpath, please...

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: -> Library Plugin for Digester and mockobjects [message #146612 is a reply to message #146606] Mon, 01 March 2004 19:51 Go to previous messageGo to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
> Martin, can you provide your .classpath, please...
Well I've never messed up with the .classpath file. Can you provide some
information, what its doing and why is it that important.

Since it is missing the plugin.

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/"/>
<classpathentry kind="src" path="src-test/"/>
<classpathentry kind="src" path="src-thirdparty/"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

What does it all mean? kind=src means my src files, output is clear but
what means con? contribute? I thought it all gets updated automatically
due to the plugin editor.

Well I think I am gonna guess what .classpath is used for. It's like
contributing informations to the plugins this plugin is depending on.

Right?

Thanks,

Martin (Kersten)
Re: -> Library Plugin for Digester and mockobjects [message #146618 is a reply to message #146612] Mon, 01 March 2004 19:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Check your library project in the "Java Build Path/Projects" not only in
the "Project References".

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: -> Library Plugin for Digester and mockobjects [message #146625 is a reply to message #146618] Mon, 01 March 2004 20:01 Go to previous messageGo to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
> Check your library project in the "Java Build Path/Projects" not only in
> the "Project References".
I am talking about plugins not plain old java projects. Messing with
JavaBuildPath wont work since everytime the plugin.xml gets build
the java build path will be overriden.

Thanks,

Martin (Kersten)
Re: -> Library Plugin for Digester and mockobjects [message #146695 is a reply to message #146625] Tue, 02 March 2004 00:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

"A" and "library" are plugin projects? OK.

Try to "mess" with 'Prefs/Plugin dev/Java Build Path Control/Use
Classpath containers".

PS. Don't forget to do "Update classpath..." :)

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Re: -> Library Plugin for Digester and mockobjects [message #146713 is a reply to message #146695] Tue, 02 March 2004 09:26 Go to previous messageGo to next message
Martin Kersten is currently offline Martin KerstenFriend
Messages: 306
Registered: July 2009
Senior Member
Hi Sam,

> "A" and "library" are plugin projects? OK.
>
> Try to "mess" with 'Prefs/Plugin dev/Java Build Path Control/Use
> Classpath containers".
Are there any resources about learning what a classpath container is
and how it works?

I think I know why things are going crazy right now. There are two
libraries involved. First the org.junit and the com.mockobjects
(contributing the mock libraries). But running the testcases of a project
depending on both results to org.junit classloader can not find any classes
of com.mockobjects since the classloader looks at the dependency tree
of org.junit. and also on the plugin depending on org.junit.

Adding the mocklibraries to the project (not using a library plugin) works
great. Wired. So my question is what is a classpath container (I only
three or four sentences out of the context help and also some sentences
from Developers guide to eclipse (book).


Thanks,

Martin (Kersten)
Re: -> Library Plugin for Digester and mockobjects [message #147029 is a reply to message #146713] Tue, 02 March 2004 18:09 Go to previous message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

Hi Martin,

> Are there any resources about learning what a classpath container is
> and how it works?

Sorry, I read about this mostly from the source code. (bad practice:)

> I think I know why things are going crazy right now. There are two
> libraries involved. First the org.junit and the com.mockobjects
> (contributing the mock libraries). But running the testcases of a project
> depending on both results to org.junit classloader can not find any classes
> of com.mockobjects since the classloader looks at the dependency tree
> of org.junit. and also on the plugin depending on org.junit.
>
> Adding the mocklibraries to the project (not using a library plugin) works
> great. Wired. So my question is what is a classpath container (I only
> three or four sentences out of the context help and also some sentences
> from Developers guide to eclipse (book).

AFIAK, junit and plugin classloader are heavy-classloader-usage-guys.
It seems, they bite each other in your case.

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Previous Topic:Very limited search results
Next Topic:Finding TODO Task Tags
Goto Forum:
  


Current Time: Mon Jul 22 02:31:07 GMT 2024

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

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

Back to the top