tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AGerdessen <>
Subject OpenEJB, localclient module name
Date Tue, 01 Jun 2010 09:08:22 GMT


We use OpenEJB to test out EJB's and entities, it works perfectly when using
ant because we have full control of the classpath. When trying to run the
test-cases directly from Eclipse the test-cases fail.
This is due to openEJB finding more LocalClient on the classpath with the
same directory structure.

This is mainly caused by Eclipse not understand the concept of test-classes
and normal classes. I cannot fix this within eclipse.

Its mainly cause because project one depends on project two, and both
projects have their own test-classes annotated with LocalClient.

The directory structure is:
project\1\build\test-classes\<annotated classes with LocalClient in here>
project\2\build\test-classes\<annotated classes with LocalClient in here>

Because project 1 depends on project 2, eclipse adds all these to the
classpath and openEJB discovers both LocalClients. 
The problem is what OpenEJb tries to deploy these localclients, the same
module name is used and I get output like this:

 client].info                 -
startup].info                 - Undeploying app: classpath.ear
startup].debug                - Undeployed app: classpath.ear
startup].error                - Application could not be deployed: 
org.apache.openejb.OpenEJBException: Creating application failed:
classpath.ear: ParsedName{path=openejb/client/test-classes/comp/env,

What I think is happening is that OpenEJB uses the same module name for:

Which means the second will fail.
If I change the output directory for the test-classes to test-classes2 for
project 2 it works just fine.
So I think openEJB derives the module name via the directory

Is there any way I can influence this module name?

Exclude and include patterns dont help me unless I hardcore project names
and I do not want this.

Any ideas?

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message