Hi Anton,
Try setting the module id with an application-client.xml in each module like so:
<application-client id="theName"/>
That *should* do the trick. Definitely let us know if it doesn't.
-David
On Jun 1, 2010, at 2:08 AM, AGerdessen wrote:
>
> Hello,
>
> 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\classes
> project\1\build\test-classes\<annotated classes with LocalClient in here>
> project\2\build\classes
> 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 -
> LocalClient(class=com.vanderlande.odb.eis.package_data_service.PackageDataServiceTestCase,
> module=test-classes)
> startup].info - Undeploying app: classpath.ear
> startup].debug - Undeployed app: classpath.ear
> startup].error - Application could not be deployed:
> classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: ParsedName{path=openejb/client/test-classes/comp/env,
> component=env}
>
> What I think is happening is that OpenEJB uses the same module name for:
> project\2\build\test-classes\
> and
> project\1\build\test-classes\
>
> 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?
>
> Anton
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/OpenEJB-localclient-module-name-tp2238205p2238205.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>