users@glassfish.java.net

Re: GF 3.1.1: Deployment Error for JEE 1.4 style EJB module

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Fri, 14 Oct 2011 21:10:25 -0400

Please see the deploy man page for compatibility property.

http://download.oracle.com/docs/cd/E18930_01/html/821-2433/deploy-1.html#scrolltoc

Since 3.*, we started to enforce jar visibility rules of Java EE spec to
encourage the writing of portable application. Including library jars
inside standalone ejb jar is not a portable packaging specified by the
Java EE spec, so we no longer support that by default. But we support it
through the compatibilty flag for product backward compatibility.

- Hong

On 10/14/2011 3:19 AM, Bernhard Thalmayr wrote:
> Thanks for the pointer Hong,
>
> the ejb-jar looks as follows ...
>
> META-INF/
> META-INF/MANIFEST.MF
> META-INF/ejb-jar.xml
> META-INF/sun-ejb-jar.xml
> com.test
> com.test....(EJB-related class-files)
> utilities.jar
>
> MANIFEST.MF has
> Class-Path: utilities.jar
>
> I created this EJB module using NB 6.9.1
>
> Deployment works using the 'compatibility flag'.
>
> I tried to read most of the related documentation ... would you mind
> pointing me to the one I obviously have not read?
>
> Thanks again,
> Bernhard
>
> On 10/13/2011 10:33 PM, Hong Zhang wrote:
>> Where is the utility.jar packaged in the ejb module?
>>
>> Try to deploy the ejb jar with the compatibility flag to see if it makes
>> a difference:
>> asadmin deploy --property compatibility=v2 foo.jar
>>
>> Bernhard Thalmayr wrote:
>>> Hi experts,
>>> I'm trying to deploy a simple EJB module (consisting of a basic
>>> stateless session bean).
>>>
>>> The stateless session bean uses a class from an utility jar, packaged
>>> into the module.
>>>
>>> When trying to deploy it using 'asadmin' I get the error
>>>
>>> "remote failuer: Error occured during deployment: Exception while
>>> loading the app : EJB Container initialization error. Please see
>>> server.log for more details."
>>>
>>> Unfortunately there's no information in the server.log at all.
>>>
>>> Even if I set loglevel for '....container.ejb' and
>>> '...tools.deployment' to 'FINER' nothing shows up in the log.
>>>
>>> I suspect it's a classloading issue.
>>>
>>> If put the following entry in MANIFEST.MF
>>>
>>> "Class-Path: <utility-jar>"
>>>
>>> Any pointers available?
>>>
>>> TIA,
>>> Bernhard
>>>
>>
>>
>
>