[jboss-jira] [JBoss JIRA] Commented: (JBAS-9261) AS7: "IllegalArgumentException: key is null" on deploy
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Sat Apr 9 03:54:33 EDT 2011
[ https://issues.jboss.org/browse/JBAS-9261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594604#comment-12594604 ]
jaikiran pai commented on JBAS-9261:
------------------------------------
We don't yet support jndi name references outside of java: namespace. So a ejb-ref/ejb-local-ref with a lookup name outside of java: namespace leads to this exception. For now, I have updated the code to provide a "better" exception message than this key is null message.
To workaround this issue, you'll have to do the following:
1) *Remove* the jboss-web.xml containing this:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 5.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<context-root>StatelessWeb</context-root>
<!-- EJB References -->
<!-- Ohne diesen Eintrag ergibt das Deploy der Anwendung einen Server-Fehler:
"org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-ref: ejb/GeometricModel, no ejb-link in web.xml and no jndi-name in jboss-web.xml)"-->
<ejb-ref>
<ejb-ref-name>ejb/GeometricModel</ejb-ref-name>
<jndi-name>Keks</jndi-name>
</ejb-ref>
<!-- EJB Local References -->
<ejb-local-ref>
<ejb-ref-name>ejb/GeometricModelLocal</ejb-ref-name>
<local-jndi-name>KeksLocal</local-jndi-name>
</ejb-local-ref>
</jboss-web>
{code}
2) Edit the ejb-ref and ejb-local-ref in web.xml to add a ejb-link to point to the target bean:
{code:xml}
<ejb-ref>
<ejb-ref-name>ejb/GeometricModel</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<ejb-link>GeometricModelBean</ejb-link>
<remote>de.fhw.komponentenarchitekturen.knauf.stateless.GeometricModelRemote</remote>
<injection-target>
<injection-target-class>de.fhw.komponentenarchitekturen.knauf.stateless.GeometricModelServlet</injection-target-class>
<injection-target-name>geometricModel</injection-target-name>
</injection-target>
</ejb-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/GeometricModelLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<ejb-link>GeometricModelBean</ejb-link>
<local>de.fhw.komponentenarchitekturen.knauf.stateless.GeometricModelLocal</local>
<injection-target>
<injection-target-class>de.fhw.komponentenarchitekturen.knauf.stateless.GeometricModelServlet</injection-target-class>
<injection-target-name>geometricModelLocal</injection-target-name>
</injection-target>
</ejb-local-ref>
</web-app>
{code}
This should get you past those errors.
> AS7: "IllegalArgumentException: key is null" on deploy
> ------------------------------------------------------
>
> Key: JBAS-9261
> URL: https://issues.jboss.org/browse/JBAS-9261
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 7.0.0.Beta2
> Reporter: Wolfgang Knauf
>
> I have a small JavaEE5 sample app, which consists of a stateless bean, a web client project (servlet + jsp) and an app client app, all bundled to an EAR file. There are no annotations, just deployment descriptors. The app worked fine on AS5.
> I copy it to the "standalone\deployed" folder of a JBoss pulled from GIT and built yesterday (2011-04-06). It fails with this error:
>
> 23:12:28,258 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."Stateless.ear"."StatelessWeb.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Stateless.ear"."StatelessWeb.war".INSTALL: Failed to process phase INSTALL of subdeployment "StatelessWeb.war" of deployment "Stateless.ear"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:108)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1344)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
> at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
> Caused by: java.lang.IllegalArgumentException: key is null
> at org.jboss.msc.service.UnlockedReadHashMap.put(UnlockedReadHashMap.java:230)
> at org.jboss.msc.service.ServiceContainerImpl.getOrCreateRegistration(ServiceContainerImpl.java:431)
> at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:499)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:188)
> at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:1808)
> at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:310)
> at org.jboss.as.ee.component.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:83)
> at org.jboss.as.ee.component.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:51)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:102)
> ... 4 more
> The sample can be found here: http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/stateless/StatelessNoAnnotation.ear
> (rename EAR file to "Stateless.ear" before deploying)
> The same sample, which uses annotations instead of deployment descriptors, deploys without errors (http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/stateless/Stateless.ear).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list