You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Siraj Mohamed <Si...@virtusa.com> on 2005/11/22 12:11:56 UTC

Problem with EAR deploy

Hi All,

I am new to Geronimo and I was trying to deploy a small Enterprise
Application (hello world) on Geronimo 1.0 M5. But I am getting following
exception in the server side.

16:13:11,771 ERROR [Deployer] Deployment failed due to
java.lang.NullPointerException
        at
org.openejb.deployment.OpenEJBModuleBuilder.createModule(OpenEJBModuleBu
ilder.java:224)
        at
org.openejb.deployment.OpenEJBModuleBuilder.createModule(OpenEJBModuleBu
ilder.java:189)
        at
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.
invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:118)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:760)
        at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperation
Invoker.java:36)
        at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyM
ethodInterceptor.java:96)
        at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$7314
a515.createModule(<genera
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.addModules(EARConfi
gBuilder.java:518)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getEarPlan(EARConfi
gBuilder.java:222)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(E
ARConfigBuilder.java:118)
        at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$
38e56ec6.invoke(<generate
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:118)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:760)
        at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperation
Invoker.java:36)
        at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyM
ethodInterceptor.java:96)
        at
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7f
01ad87.getDeploymentPlan(
        at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
        at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:87)
        at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invo
ke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:118)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:795)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:180
)
        at
org.apache.geronimo.console.configmanager.DeploymentPortlet.processActio
n(DeploymentPortlet.java:
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
        at
org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:163)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.j
ava:99)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
andler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerIm
pl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerIm
pl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContai
nerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPort
letAction(PortletContaine
        at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
        at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.j
ava:99)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
andler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon
text.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244
)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
org.apache.geronimo.common.DeploymentException:
java.lang.NullPointerException caused by null
        at
org.apache.geronimo.deployment.Deployer.cleanseDeploymentException(Deplo
yer.java:101)
        at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:90)
        at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invo
ke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInv
oker.java:38)
        at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.j
ava:118)
        at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.jav
a:795)
        at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:180
)
        at
org.apache.geronimo.console.configmanager.DeploymentPortlet.processActio
n(DeploymentPortlet.java:
        at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)
        at
org.apache.pluto.core.PortletServlet.doPost(PortletServlet.java:163)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.j
ava:99)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
andler.java:473)
        at
org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:272)
        at
org.mortbay.jetty.servlet.Dispatcher.include(Dispatcher.java:161)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerIm
pl.java:120)
        at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerIm
pl.java:68)
        at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContai
nerImpl.java:164)
        at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPort
letAction(PortletContaine
        at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
        at org.apache.pluto.portalImpl.Servlet.doPost(Servlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.j
ava:99)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)
        at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(Web
ApplicationHandler.java:8
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
andler.java:473)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon
text.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at
org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
        at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244
)
        at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

I am not sure for the error caused and My JDK version is 1.4.2. I have
given details of my helloworld.ear below.

This is the helloworld.ear file contents:
EAR --   helloworld-ejb.jar
            j2ee-deployer-plan.xml
            META-INF/geronimo-application.xml
            META-INF/application.xml

This is the helloworld-ejb.jar file contents:
JAR --   META-INF/openejb-jar.xml
            META-INF/ejb-jar.xml

This is the contents of geronimo-application.xml:

<application
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
    configId="helloworld/j2ee/deployment/test"
    parentId="org/apache/geronimo/Server">
    <module>
        <ejb>helloworld-ejb.jar</ejb>
        <alt-dd>j2ee-deployer-plan.xml</alt-dd>
    </module>
</application>

This is the contents of application.xml:
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
Application 1.2//EN"
"http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
  <display-name>helloworld j2ee application</display-name>
  <description>
     A sample J2EE application that uses a Helloworld Session Bean
     on the server and calls from java/servlet/JSP clients.
  </description>
  <module>
    <ejb>helloworld-ejb.jar</ejb>
  </module>
</application>

This is the contents of openejb-jar.xml:

<?xml version="1.0"?>

<openejb-jar
    xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
    configId="helloworld/test"
    parentId="org/apache/geronimo/Server">

    <cmp-connection-factory>DefaultDatasource</cmp-connection-factory>

    <enterprise-beans>
        <session>
            <ejb-name>HelloBean</ejb-name>
            <jndi-name>ejb/helloworld-ejb/HelloBean</jndi-name>
        </session>
    </enterprise-beans>
</openejb-jar>

This is the contents of ejb-jar.xml:

<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

<ejb-jar>

   <enterprise-beans>
      <session>
         <description>no description</description>
         <display-name>HelloBean</display-name>
         <ejb-name>HelloBean</ejb-name>
         <home>hello.HelloHome</home>
         <remote>hello.Hello</remote>
         <local-home>hello.HelloLocalHome</local-home>
         <local>hello.HelloLocal</local>
         <ejb-class>hello.HelloBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>
      </session>
   </enterprise-beans>

   <assembly-descriptor>
        <method-permission>
            <unchecked/>
            <method>
                <ejb-name>HelloBean</ejb-name>
                <method-name>*</method-name>
            </method>
        </method-permission>
        <container-transaction>
            <description>Transaction attributes for 'HelloBean'
methods</description>
            <method>
                <ejb-name>HelloBean</ejb-name>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    </assembly-descriptor>

</ejb-jar>



I would appreciate if some expert could answer a solution.


Thanks in advance,
- Siraj



---------------------------------------------------------------------------------------------
This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.

Re: Problem with EAR deploy

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
I created a JIRA for this.

Aaron

http://issues.apache.org/jira/browse/GERONIMO-1220

On 11/22/05, Matt Hogstrom <ma...@hogstrom.org> wrote:
> Siraj,
>
> Can you open a JIRA and attach your sample?  It would make a recreate faster
> help us to plug these holes and give more meaningful messages.
>
> Thanks
>
> Matt
>
> Manu George wrote:
> > Hi Siraj,
> > I am no expert :-) but at first glance I can see the following issues
> > 1) the cmp-connection-factory entry is not required for a session bean. Also
> > the syntax is wrong.
> > It should be
> > <cmp-connection-factory>
> > <resource-link>DefaultDatasource</resource-link>
> > </cmp-connection-factory>
> > instead of
> > <cmp-connection-factory>DefaultDatasource</cmp-connection-factory>
> >
> > 2)Another thing that is not clear is if <alt-dd>j2ee-deployer-plan.xml</alt-
> > dd> is your openejb-jar.xml file
> > <module>
> >
> > <ejb>helloworld-ejb.jar</ejb>
> >
> > <alt-dd>j2ee-deployer-plan.xml</alt-dd>
> >
> > </module>
> > In the alt-dd element you need to give the geronimo specific deployment
> > descriptor of the
> > ejb you are trying to deploy i.e. the equivalent of the openejb-jar.xml.
> >
> > 3) A NullPointerException is not at all supposed to occur even if your plans
> > have errors. So you may want to open a JIRA issue.
> >
> > Hope this helps
> >
> > Regards
> > Manu
> >
>
>

Re: Problem with EAR deploy

Posted by Matt Hogstrom <ma...@hogstrom.org>.
Siraj,

Can you open a JIRA and attach your sample?  It would make a recreate faster 
help us to plug these holes and give more meaningful messages.

Thanks

Matt

Manu George wrote:
> Hi Siraj,
> I am no expert :-) but at first glance I can see the following issues
> 1) the cmp-connection-factory entry is not required for a session bean. Also
> the syntax is wrong.
> It should be
> <cmp-connection-factory>
> <resource-link>DefaultDatasource</resource-link>
> </cmp-connection-factory>
> instead of
> <cmp-connection-factory>DefaultDatasource</cmp-connection-factory>
> 
> 2)Another thing that is not clear is if <alt-dd>j2ee-deployer-plan.xml</alt-
> dd> is your openejb-jar.xml file
> <module>
> 
> <ejb>helloworld-ejb.jar</ejb>
> 
> <alt-dd>j2ee-deployer-plan.xml</alt-dd>
> 
> </module>
> In the alt-dd element you need to give the geronimo specific deployment
> descriptor of the
> ejb you are trying to deploy i.e. the equivalent of the openejb-jar.xml.
> 
> 3) A NullPointerException is not at all supposed to occur even if your plans
> have errors. So you may want to open a JIRA issue.
> 
> Hope this helps
> 
> Regards
> Manu
> 


Re: Problem with EAR deploy

Posted by Manu George <ma...@gmail.com>.
Hi Siraj,
I am no expert :-) but at first glance I can see the following issues
1) the cmp-connection-factory entry is not required for a session bean. Also
the syntax is wrong.
It should be
<cmp-connection-factory>
<resource-link>DefaultDatasource</resource-link>
</cmp-connection-factory>
instead of
<cmp-connection-factory>DefaultDatasource</cmp-connection-factory>

2)Another thing that is not clear is if <alt-dd>j2ee-deployer-plan.xml</alt-
dd> is your openejb-jar.xml file
<module>

<ejb>helloworld-ejb.jar</ejb>

<alt-dd>j2ee-deployer-plan.xml</alt-dd>

</module>
In the alt-dd element you need to give the geronimo specific deployment
descriptor of the
ejb you are trying to deploy i.e. the equivalent of the openejb-jar.xml.

3) A NullPointerException is not at all supposed to occur even if your plans
have errors. So you may want to open a JIRA issue.

Hope this helps

Regards
Manu