users@glassfish.java.net

Re: v3: problem deploying exploded ear with exploded shared entity lib

From: Jacques <whshub_at_gmail.com>
Date: Sun, 28 Feb 2010 18:34:45 -0800

Thanks for validation of the problem. Please let me know anything you here
back from the JPA team.

I will utilize the workaround available as you mentioned. Have you see any
instability with the plugin when utilizing external jars like this?

Thanks again,
Jacques

On Sun, Feb 28, 2010 at 8:52 AM, Ludovic Champenois <
Ludovic.Champenois_at_sun.com> wrote:

> On 2/28/10 8:33 AM, Ludovic Champenois wrote:
>
> On 2/28/10 7:30 AM, Jacques wrote:
>
> You can find a zip file with the eclipse projects attached to my original
> post here:
>
> http://forums.java.net/jive/thread.jspa?messageID=389136
>
> As an aside, the original problem was found by using the eclipse plugin.
> However, if you simply use the asadmin deployment with the various examples
> I've also included in that zip file, the problem still exists.
>
> I can reproduce....
> So far, thinking about a limitation on the JPA runtime that cannot accept
> exploded library jars in the lib/ directory of an EAR file.
> Currently, Eclipse and our plugin only handles 100% exploded artifacts
> including libs, assuming these libs are also an Eclipse project declared as
> a dependent project.
> The only current workaround I see is to create the jar for this library,
> and add it as a jar in the ear project java ee dependencies as a jar.
> The limitation of this workaround is that if you change files in the
> library project or the entities, you'll have to recreate the jar file for
> it, and then redeploy the ear...Not nice for incremental development...
>
> I'll involve the JPA team (Mitesh) to see how the runtime can be fixed to
> support 100% exploded artifacts, including exploded JPA libs in an EAR lib
> diretory.
>
> Ludo
>
> Relevant stack trace is:
> Caused by: java.lang.IllegalStateException: Unable to retrieve
> EntityManagerFactory for unitName example1
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper.init(EntityManagerWrapper.java:121)
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:141)
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:134)
> at
> com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:252)
> at com.example.EJBTest.setup(EJBTest.java:21)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
>
> You are correct, the entity classes are correctly loaded from the exploded
> jpa lib, but not the persistence.xml content that contains the example1
> unitName,
>
>
>
> Ludo
>
>
>
> On Sun, Feb 28, 2010 at 7:08 AM, Ludovic Champenois <
> Ludovic.Champenois_at_sun.com> wrote:
>
>> Hi, could you send the zip of the eclipse projects that can reproduce the
>> issue, might be some eclipse settings related.
>>
>> Ludo
>>
>>
>> On Feb 27, 2010, at 10:33 PM, glassfish_at_javadesktop.org wrote:
>>
>> This issue matches a problem I'm experiencing.
>>> Same setup: EAR containing EJBs & WARs, Entities in ear's lib dir.
>>> Deploys just fine via Glassfishv3 admin console (unexploded EAR).
>>> Fails to deploy via Eclipse tooling (glassfish plugin), which explodes
>>> the EAR & contents. I get (root) exception:
>>>
>>> Caused by: java.lang.IllegalStateException: Unable to retrieve
>>> EntityManagerFactory for unitName MYPUNAME
>>> [Message sent by forum member 'rsitze' (rsitze_at_us.ibm.com)]
>>>
>>> http://forums.java.net/jive/thread.jspa?messageID=389167
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>