users@glassfish.java.net

Re: Running embedded test with multimodule project

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Thu, 17 Jun 2010 14:39:31 -0700

You have META-INF/ejb-jar.xml in that dir, which makes it an EJB module.
And in the /tmp/ejb-app* it's copied over with _jar suffix, i.e. from
initial asserion it *was* considered an EJB module (but initial sorting
is very preliminary - it doesn't match ejb-jar.xml content, just looks
for its existance).

Unless persistence.xml is there on purpose, remove META-INF dir altogether.

Best,
-marina

Major Péter wrote:
>> Yes. Please check the complete contents of the test-classes dir.
>>
>
> The content of the dir is:
> + hu/sch/ejb/
> + UserManagerTest.class
> + META-INF
> + application.xml (or not)
> + ejb-jar.xml
> + persistence.xml
> + org/glassfish/embed
> + domain.xml
>
>
>> We should make it work :).
>>
>> Can you check the content of the exploded ear? It will be called
>> ejb-app<digits> and located in "java.io.temp" dir.
>>
>
> I have the feeling that my current packaging (without testing) is buggy
> right now, since I saw this zero ejb messages before with maven tweaking
> (I had to set some modules to compile scope multiple times to be able to
> deploy the ear on standalone GF), so if you could check my pom's it
> would be great and probably much faster:
> http://idp.sch.bme.hu/cgi-bin/gitweb.cgi?p=aldaris/korok;a=shortlog;h=refs/heads/testing
>
> Anyways the output of 'ls -R' in the /tmp/ejb-app* folder:
> [code]
> .:
> classes_jar lib test-classes_jar
>
> ./classes_jar:
> hu META-INF
>
> ./classes_jar/hu:
> sch
>
> ./classes_jar/hu/sch:
> ejb
>
> ./classes_jar/hu/sch/ejb:
> EntitlementManagerBean.class LdapManagerBean.class
> LdapManagerBean$PersonForSearchContextMapper.class
> MailManagerBean.class SvieManagerBean.class TimerServiceBean$1.class
> UserManagerBean.class
> LdapManagerBean$1.class LdapManagerBean$PersonContextMapper.class
> LogManagerBean.class
> PostManagerBean.class SystemManagerBean.class TimerServiceBean.class
> ValuationManagerBean.class
>
> ./classes_jar/META-INF:
> ejb-jar.xml persistence.xml
>
> ./lib:
> activation-1.1.jar commons-lang-2.1.jar hibernate-3.0.jar
> junit-4.8.1.jar mail-1.4.2.jar
> sch-kp-domain-2.3.1-SNAPSHOT.jar spring-beans-2.5.6.jar
> spring-core-2.5.6.jar spring-tx-2.5.6.jar
> aopalliance-1.0.jar commons-logging-1.0.4.jar javaee-api-6.0.jar
> log4j-1.2.14.jar postgresql-8.4-701.jdbc4.jar
> sch-kp-ejb-services-2.3.1-SNAPSHOT.jar spring-context-2.5.6.jar
> spring-ldap-core-1.3.0.RELEASE.jar
>
> ./test-classes_jar:
> hu META-INF org
>
> ./test-classes_jar/hu:
> sch
>
> ./test-classes_jar/hu/sch:
> ejb
>
> ./test-classes_jar/hu/sch/ejb:
> UserManagerTest.class
>
> ./test-classes_jar/META-INF:
> application.xml ejb-jar.xml persistence.xml
>
> ./test-classes_jar/org:
> glassfish
>
> ./test-classes_jar/org/glassfish:
> embed
>
> ./test-classes_jar/org/glassfish/embed:
> domain.xml
> [/code]
>
> as you can see there are two persistence.xml's one with test config and
> one with production classes_jar and test-classes_jar.
>
> Thanks again,
> Peter
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>