Judy Tang wrote:
> Hi Richard,
>
> I am happy to know you got it to work. I like your suggestion. I have
> added my comment bellow to this issue. I will also follow up with
> developer :-)
>
> "As Richard suggested we should doc this. I also wonder if we could
> put in the code to do the following 2 things:
>
> (1) Add code to check for the required dependency order
No: In this case, the extra dependency is not necessary (and wrong) as
the needed apis are in the full standalone embedded jar which by
definition contains all it needs to run as embedded.
>
> (2) If dependency order is not correct, issue more meaningful error
> message"
Good luck with that i.e almost impossible to list all possible
configuration cases that would trigger an issue with a classpath
ordering scheme.
In this example, the exception throws by the jvm runtime is not clear
enough because the mentioned jar is a postprocessed jar that is not
meant to be used at runtime including test-runtime.
Only solution is this thread and the bug filed that will be indexed by
Google and Bing for people to find when searching for the exception text :-)
Ludo
>
> Thanks,
> Judy
>
> Richard Kolb wrote:
>> Hi Judy
>>
>> Seems I solved the issue, yay.
>> Can someone please document this please.
>>
>> regards
>> Richard
>>
>>
>> ---------- Forwarded message ----------
>> From: <rjdkolb_at_dev.java.net <mailto:rjdkolb_at_dev.java.net>>
>> Date: 2010/1/6
>> Subject: [Issue 11388] [other] [embedded] Unable to get basic unit
>> test working in Maven
>> To: rjdkolb_at_dev.java.net <mailto:rjdkolb_at_dev.java.net>
>>
>>
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=11388
>>
>>
>>
>>
>>
>>
>> ------- Additional comments from rjdkolb_at_dev.java.net
>> <mailto:rjdkolb_at_dev.java.net> Wed Jan 6 06:35:17 +0000 2010 -------
>> Problem solved!
>>
>> What you need to do is have the embedded dep before the javaee-api-6 dep
>> <dependency>
>> <groupId>org.glassfish.extras</groupId>
>> <artifactId>glassfish-embedded-all</artifactId>
>> <version>3.0</version>
>> </dependency>
>> <dependency>
>> <groupId>javax</groupId>
>> <artifactId>javaee-api</artifactId>
>> <version>6.0</version>
>> <scope>provided</scope>
>> </dependency>
>>
>> Can someone document this please.
>>
>>
>>
>>
>>
>>