Sun Application Server PE 9.0 and EJB 2.0

Hello,

I'm experiencing some problems deploying a EJB2.0 project from NetBeans 5.5 RC1.

I've tried deploying it through NetBeans, but also tried to deploy it using the upload function in the application server, both with the same results.

The log in the domain on the Applicationserver says this:

Exception occured in J2EEC Phase

com.sun.enterprise.deployment.backend.IASDeploymentException: Deployment Error -- null

at java.util.HashMap$HashIterator.nextEntry(HashMap.java:790)

at java.util.HashMap$KeyIterator.next(HashMap.java:823)

at com.sun.enterprise.deployment.backend.EjbModuleDeployer.generatePolicy(EjbModul eDeployer.java:203)

at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDepl oyer.java:171)

at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)

at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPh ase.java:95)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeplo ymentService.java:871)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentSe rvice.java:266)

at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentSe rvice.java:739)

at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)

at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)

I read in another thread on these forums that this is because:

[quote]

I ran into the same problem, try adding an ejb ( like a @Stateless ejb) and the problem will disapear.

[/quote]

This was in this thread:

http://forum.java.sun.com/thread.jspa?threadID=750700&messageID=4334898

But when I check out the documentation for the Sun Application Server 9.0 it explicitly says this:

[quote]

Although the EJB 1.1 and 2.0 specification continues to be supported in the Application Server, the use of the EJB 3.0 architecture is recommended to leverage its enhanced capabilities.

[/quote]

which is from this article:

http://docs.sun.com/app/docs/doc/819-3663/6n5sag7gs?a=view

The reason I have to use EJB 2.0 is that my school says we have to, so EJB 3.0 is not an option for me.

Any help is greatly appreciated!

Kind regards,

Mattis

Edit:

Sourcecode if that helps:

[package server]

CartBean.java - http://pastebin.ca/208454

Cart.java - http://pastebin.ca/208456

CartHome.java - http://pastebin.ca/208460

ShoppingException.java - http://pastebin.ca/208465

[package domain]

ItemRegister.java - http://pastebin.ca/208461

ItemVO.java - http://pastebin.ca/208466

Message was edited by:

Mattisf

[2849 byte] By [Mattisf] at [2007-11-26 10:53:30]
# 1

In general, the stack trace you were seeing means we didn't see any ejbs in the ejb jar. Therefore we had problems when trying generate policies for the ejb jar. We have improved the error message for this case since 9.0ur1.

The reasons we didn't find any ejbs could be

1. There is really no ejb packaged inside this ejb jar. This seems like the case which was posted for the other forum topic. So once they add an ejb, the problem went away. A valid ejb jar need to package at least one ejb inside of it whether it's a ejb20 type of EJB or ejb30 type of EJB.

OR

2. There is ejb packaged inside the ejb jar, but somehow the processing tells us there is no ejb in there. This seems like the case you've run into.

Do you have a valid ejb-jar.xml which declares the ejbs you have packaged? If it's possible for you to post your archive (ear or the standalone ejb jar) or send it to me (hong.zhang@sun.com), I can take a look for you.

And no, you don't need to use EJB30 with appserver 9.0, EJB20 beans are still supported as long as they are written correctly and packaged properly. :-)

hongzhangsun at 2007-7-7 3:06:28 > top of Java-index,Application & Integration Servers,Application Servers...