Failed to save deployment descriptor - ClassCastException

I have a CMP2.0 EJB that will not deploy. I've made it through my compile, the capture-schema, end of EJBC, but then failure with the message below. I have tried to make my descriptors as close to the samples as possible, but no success. It appears that I am simply missing something or haven't set something. Any help would be userful.

PS. I tried to run the verifier, but I heard that it's broken in the beta. I agree since I got a message that reentrant was not allowed below entity.

Caused by: com.iplanet.ias.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- -- Failed to save deployment descriptor for: rnlg

cause: com.sun.enterprise.deployment.EjbExternalDescriptor

at com.iplanet.ias.deployment.backend.AppDeployer.runEJBC(Unknown Source)

at com.iplanet.ias.deployment.backend.AppDeployer.deploy(Unknown Source)

... 28 more

Caused by: com.iplanet.ias.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- -- Failed to save deployment descriptor for: rnlg

cause: com.sun.enterprise.deployment.EjbExternalDescriptor

at com.iplanet.ias.deployment.backend.EJBCompiler.wrapException(Unknown Source)

at com.iplanet.ias.deployment.backend.EJBCompiler.compile(Unknown Source)

... 30 more

Caused by: com.iplanet.ias.config.ConfigException: Failed to save deployment descriptor for: rnlg

cause: com.sun.enterprise.deployment.EjbExternalDescriptor

at com.iplanet.ias.instance.AppsManager.saveAppDescriptor(Unknown Source)

at com.iplanet.ias.deployment.backend.EJBCompiler.preDeployApp(Unknown Source)

... 31 more

Caused by: java.lang.ClassCastException: com.sun.enterprise.deployment.EjbExternalDescriptor

at com.sun.enterprise.deployment.EjbReferenceDescriptor.getValue(Unknown Source)

at com.sun.enterprise.deployment.EjbReferenceDescriptor.getJndiName(Unknown Source)

at com.iplanet.ias.deployment.xml.IASEjbRuntimeDescriptorNode.setDescriptor(Unknow n Source)

at com.iplanet.ias.deployment.xml.IASEjbRuntimeDescriptorNode.getDocument(Unknown

[2352 byte] By [MattBauer] at [2007-11-25 8:23:30]
# 1

Hi Matt,

Can you please send the ejb-jar.xml and sun-ejb-jar.xml to gopal.jorapur@sun.com

Looks like we are failing when trying to save deployment descriptor

You can try setting Log Level to FINE and deploy to get more information in admin server log

Thanks,

Gopal

Gopal Jorapur at 2007-7-1 14:45:24 > top of Java-index,Application & Integration Servers,Application Servers...
# 2

I found what the problem was. In my sun-ejb-jar.xml file I set the jndi name of my entity bean to the ejb-name in the ejb-jar.xml file. Don't do this. Once I removed this the deployment worked just fine.

A side note. I use ksh, vi an ant to build everything. GUI just get in my way, its a personal preferrence. I'm happy that sun included ant tasks but this whole capture-schema, create a cmp-mapping file could be automated with another ant task. Are there plans for this, out should I code one up?

Thanks,

Matt

Matt Bauer at 2007-7-1 14:45:24 > top of Java-index,Application & Integration Servers,Application Servers...
# 3

Matt,

Thanks for your input. There are no current plans for an Ant task around capture-schema but we will definitely be giving this a closer look. If you can send me the details of the task that you would like to see (user view, integration with existing tasks, etc), it will help get the ball rolling.

We will keep the forums notified of any new tasks that we develop.

Thanks,

- deepak

Deepak Balakrishna at 2007-7-1 14:45:24 > top of Java-index,Application & Integration Servers,Application Servers...