quality@glassfish.java.net

Re: EJB developers : Something to look out for

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 08 Mar 2010 08:46:47 -0500

Actually about the latest builds, I have just seen Jane replying to
another email thread about latest v3.1 nightly:

The latest GF v3.1 nightly (this is similar to what I tried):
http://download.java.net/glassfish/v3.1/nightly/latest-glassfish.zip


The latest GF v3.0.1 nightly
http://download.java.net/glassfish/v3.0.1/nightly/latest-glassfish.zip

Hong Zhang wrote:

> Hi, Richard
> I was using a build I built from the latest v3.1 trunk workspace
> (not sure about the license situation). Were you using the v3 FCS
> release? If so, I can try with the same build to see what I got. I
> have also asked Tim to try it out to see what he gets...
>
> - Hong
>
>>
>>
>> On 5 March 2010 16:28, Hong Zhang <Hong.Zhang_at_sun.com
>> <mailto:Hong.Zhang_at_sun.com>> wrote:
>>
>>
>> (I could not update the issue as my java.net
>> <http://java.net> account was somehow disabled now and I need to
>> get that fixed).
>>
>>
>> Yes, I see. There were some strange issues on Friday.
>>
>>
>>
>> Thanks for attaching the jar. When I tried to deploy the
>> problematic ejb jar, the deployment failed for me with the
>> following error message:
>>
>> $ asadmin deploy ejbproblem-0.0.1-SNAPSHOT.jar
>> com.sun.enterprise.admin.cli.CommandException: remote failure:
>> Exception while deploying the app :
>> java.lang.IllegalArgumentException: Invalid ejb jar
>> [ejbproblem-0.0.1-SNAPSHOT]: it contains zero ejb.
>> Note:
>> 1. A valid ejb jar requires at least one session, entity (1.x/2.x
>> style), or message-driven bean.
>> 2. EJB3+ entity beans (@Entity) are POJOs and please package them
>> as library jar.
>> 3. If the jar file contains valid EJBs which are annotated with
>> EJB component level annotations (@Stateless, @Stateful,
>> @MessageDriven, @Singleton), please check server.log to see
>> whether the annotations were processed properly.
>>
>>
>> And #3 seems to be the right cause in this case, and if you
>> follow its instruction to look at the server.log, you will see
>> the NoClassDefFoundError as you have seen:
>>
>> [#|2010-03-05T09:19:31.717-0500|SEVERE|glassfishv3.0|global|_ThreadID=23;_ThreadName=Thread-1;|Class
>> [ Lorg/apache/log4j/Logger; ] not found. Error while loading [
>> class za.co.enerweb.entity.ejbs.EJBTest1 ]|#]
>>
>> [#|2010-03-05T09:19:31.717-0500|WARNING|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=23;_ThreadName=Thread-1;|Error
>> in annotation processing: java.lang.NoClassDefFoundError:
>> Lorg/apache/log4j/Logger;|#]
>>
>>
>> So the deployment was succcessful for you?
>>
>>
>> Yes, it deployed and only two of the four EJB's deployed.
>>
>>
>> How did you deploy the app? I deployed through admin cli..
>>
>>
>> I originally deployed with the web front end
>>
>> I just tried again on a clean Glassfish 3 release.
>> Now deployed with the command line.
>>
>> I got the following :
>> (I needed to create the jdbc/sample jdbc data source)
>>
>> ./bin/asadmin deploy ejbproblem-0.0.1-SNAPSHOT.jar
>> Authentication failed with password from login store:
>> /home/richard/.asadminpass
>> Enter admin password for user "admin">
>> Application deployed successfully with name ejbproblem-0.0.1-SNAPSHOT.
>>
>>
>> Command deploy executed successfully.
>>
>> And the in the logs :
>>
>> [#|2010-03-08T11:17:06.527+0200|SEVERE|glassfishv3.0|global|_ThreadID=29;_ThreadName=Thread-1;|Class
>> [ Lorg/apache/log4j/Logger; ] not found. Error while loading [ class
>> za.co.enerweb.entity.ejbs.EJBTest1 ]|#]
>>
>> [#|2010-03-08T11:17:06.528+0200|WARNING|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=29;_ThreadName=Thread-1;|Error
>> in annotation processing: java.lang.NoClassDefFoundError:
>> Lorg/apache/log4j/Logger;|#]
>>
>>
>>
>> Are you using a updated version of GlassFish 3 ?
>> As far as I know I don't get updates because I don't have a
>> subscription. And I can't get a subscription until Sun and Oracle
>> sort out their licensing stuff. Perhaps I am wrong ?
>>
>> regards
>> Richard.
>>
>