Hi Hong
On 5 March 2010 16:28, Hong Zhang <Hong.Zhang_at_sun.com> wrote:
>
> (I could not update the issue as my 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.