users@glassfish.java.net

Re: Running embedded test with multimodule project

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Thu, 17 Jun 2010 22:35:24 +0200

Same result :(

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running hu.sch.ejb.UserManagerTest
2010.06.17. 22:31:21 com.sun.logging.LogDomains$1 log
SEVERE: ejb.embedded.location_not_exists
2010.06.17. 22:31:21 com.sun.enterprise.util.EarlyLogger add
INFO: Total time to parse domain.xml: 201 milliseconds
2010.06.17. 22:31:22 com.sun.logging.LogDomains$1 log
INFO: GlassFish3.1-SNAPSHOT (aldaris-private) startup time :
Embedded(742ms) startup services(435ms) total(1177ms)
2010.06.17. 22:31:22 com.sun.logging.LogDomains$1 log
INFO: enterprise_used_delegate_name
2010.06.17. 22:31:22 com.sun.logging.LogDomains$1 log
INFO: JMXStartupService: JMXConnector system is disabled, skipping.
2010.06.17. 22:31:23 AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
... skipping... glassfish-embedded-all-3.1-SNAPSHOT.jar
2010.06.17. 22:31:24 com.sun.logging.LogDomains$1 log
INFO: [EJBContainerImpl] Deploying app: /tmp/ejb-app4150263082025648217
2010.06.17. 22:31:32 com.sun.logging.LogDomains$1 log
SEVERE: Exception while deploying the app
java.lang.IllegalArgumentException: Invalid ejb jar [test-classes.jar]:
it contains zero ejb.
...

//with a freshly build GlassFish trunk

Thanks,
Peter

2010-06-17 20:30 keltezéssel, Marina Vatkina írta:
> OK. It's EJB embeddable API. With 3.0.1 there is no support for
> "libraries" in the classpath - they are ignored.
>
> If an ejb in an ejb jar fails to load because of unresolved dependencies
> (or any other issues), the jar becomes a non-ejb jar :( and you get this
> famous zero ejb message.
>
> Can you try with the latest trunk (but either add 'Bundle-SymbolicName:
> org.glassfish.embedded.all' to its manifest or wait until tomorrow when
> the fix is available in the nightly build)? The only missing feature for
> separate entity jar currently is dropping tables in case of more than 1
> ejb jar in the classpath.
>
> Best,
> -marina
>
> Major Péter wrote:
>> public class UserManagerTest {
>>
>> private static UserManagerLocal userManager;
>>
>> @BeforeClass
>> public static void initialize() {
>> try {
>> EJBContainer ejb = EJBContainer.createEJBContainer();
>> Context ic = ejb.getContext();
>> userManager = (UserManagerLocal)
>> ic.lookup("UserManagerBean");
>> } catch (Throwable t) {
>> t.printStackTrace();
>> }
>> }
>>
>> @Test
>> public void doSomething() {
>> assertTrue(userManager != null);
>> }
>> }
>>
>> Here the createEJBContainer() fails, the embedded glassfish should
>> notice the domain.xml AFAIK at
>> test/resources/org/glassfish/embed/domain.xml.
>> What am I missing?
>>
>> Thanks,
>> Peter
>>
>> 2010-06-17 20:19 keltezéssel, Marina Vatkina írta:
>>
>>> How does your test code look like?
>>>
>>> thanks,
>>> -marina
>>>
>>> Major Péter wrote:
>>>
>>>> I'm trying to use exactly this:
>>>> <dependency>
>>>> <groupId>org.glassfish.extras</groupId>
>>>> <artifactId>glassfish-embedded-all</artifactId>
>>>> <version>3.0.1</version>
>>>> <scope>test</scope>
>>>> </dependency>
>>>>
>>>> Thanks,
>>>> Peter
>>>>
>>>> 2010-06-17 20:12 keltezéssel, Marina Vatkina írta:
>>>>
>>>>
>>>>> Are you using EJB embeddable API or embedded GF API?
>>>>>
>>>>> Best,
>>>>> -marina
>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>