Are you including spring and acegi in your ear?  If so, which versions?

Geronimo includes 2.0.5 and if you are using a different version that may cause conflicts. You could try including

<dep:hidden-classes>
  <dep:filter>org.springframework.</dep:filter>
</dep:hidden-classes>

in your geronimo-web.xml plan and perhaps also in geronimo- application.xml.

Is your ear a single jar file or is it exploded (unpacked)? If it's unpacked maybe it is not all copied in place before the hot deployer starts trying to deploy it??

Hope this results in at least different behavior :-)

thanks
david jencks

On Aug 27, 2007, at 4:49 PM, Paolo Denti wrote:

Kevan, thanks for the welcome.

- first of all, there is definitely a problem with the hot deploy
01:38:30,491 ERROR [DirectoryMonitor] Unable to scan file / Applications/geronimo-jetty6-jee5-2.0.1/deploy/lautizieEar.ear during initialization
java.lang.NullPointerException
at org.apache.geronimo.deployment.hot.DirectoryHotDeployer.getDeploymentT ime(DirectoryHotDeployer.java:237) at org.apache.geronimo.deployment.hot.DirectoryMonitor.initialize (DirectoryMonitor.java:240) at org.apache.geronimo.deployment.hot.DirectoryMonitor.run (DirectoryMonitor.java:213)
        at java.lang.Thread.run(Thread.java:613)
01:38:36,340 ERROR [Deployer] Deployment failed due to
java.lang.NullPointerException
at org.apache.geronimo.deployment.CopyResourceContext.addFile (CopyResourceContext.java:144) at org.apache.geronimo.deployment.DeploymentContext.addFile (DeploymentContext.java:461) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.installM odule(AbstractWebModuleBuilder.java:288)
...
- second, even with standard deploy, as you suggested, there is another problem. it looks related to my application but i think it is related to some classloader issue

this is the stacktrace given by the deploy.sh
============================================
org.apache.geronimo.kernel.config.LifecycleException: start of default/myappEar/1188257714796/car failed at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:547) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:511) at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ $FastClassByCGLIB$$ce77a924.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:865) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:239) at org.apache.geronimo.kernel.KernelGBean.invoke (KernelGBean.java:342) at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$ $1cccefc9.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:865) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:239) at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke (MBeanGBeanBridge.java:168) at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke (DynamicMetaDataImpl.java:213) at com.sun.jmx.mbeanserver.MetaDataImpl.invoke (MetaDataImpl.java:220) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke (DefaultMBeanServerInterceptor.java:815) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke (JmxMBeanServer.java:784) at javax.management.remote.rmi.RMIConnectionImpl.doOperation (RMIConnectionImpl.java:1408) at javax.management.remote.rmi.RMIConnectionImpl.access$100 (RMIConnectionImpl.java:81) at javax.management.remote.rmi.RMIConnectionImpl $PrivilegedOperation.run(RMIConnectionImpl.java:1245)
        at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation (RMIConnectionImpl.java:1348) at javax.management.remote.rmi.RMIConnectionImpl.invoke (RMIConnectionImpl.java:782)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch (UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages (TCPTransport.java:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run (TCPTransport.java:707)
        at java.lang.Thread.run(Thread.java:613)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exception at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration GBeans(ConfigurationUtil.java:514) at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration GBeans(ConfigurationUtil.java:485) at org.apache.geronimo.kernel.config.KernelConfigurationManager.start (KernelConfigurationManager.java:187) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:530)
        ... 36 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: Configuration default/myappEar_myappWeb.war/1188257714796/car failed to start due to the following reasons: The service J2EEApplication=default/myappEar/1188257714796/ car,WebFilter=Acegi Filter Chain Proxy,WebModule=myappWeb.war,j2eeType=URLWebFilterMapping,name="[/% 5C*]" did not start because default/myappEar/1188257714796/car? J2EEApplication=default/myappEar/1188257714796/ car,WebModule=myappWeb.war,j2eeType=WebFilter,name=Acegi%20Filter% 20Chain%20Proxy did not start. The service J2EEApplication=default/myappEar/1188257714796/ car,WebFilter=sitemesh,WebModule=myappWeb.war,j2eeType=URLWebFilterMap ping,name="[/%5C*]" did not start because default/myappEar/ 1188257714796/car?J2EEApplication=default/myappEar/1188257714796/ car,WebFilter=Acegi%20Filter%20Chain% 20Proxy,WebModule=myappWeb.war,j2eeType=URLWebFilterMapping,name=%22 [/%5C*]%22 did not start. The service J2EEApplication=default/myappEar/1188257714796/ car,WebModule=myappWeb.war,j2eeType=Servlet,name=myappweb did not start because org.apache.geronimo.kernel.proxy.DeadProxyException: Proxy is no longer valid to gbean: default/myappEar/1188257714796/ car?J2EEApplication=default/myappEar/1188257714796/ car,j2eeType=WebModule,name=myappWeb.war The service J2EEApplication=default/myappEar/1188257714796/ car,WebModule=myappWeb.war,j2eeType=WebFilter,name=Acegi Filter Chain Proxy did not start because Error creating bean with name 'messageSource' defined in ServletContext resource [/WEB-INF/ applicationContextListener.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.getMostSpecificMethod(Ljava/ lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;

at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration GBeans(ConfigurationUtil.java:477)
        ... 39 more
===========================
as you see the cause is
Error creating bean with name 'messageSource' defined in ServletContext resource [/WEB-INF/applicationContextListener.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.getMostSpecificMethod(Ljava/ lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;

the stack in geronimo, during the deploy, is
===========================
01:41:33,902 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource' defined in ServletContext resource [/WEB-INF/applicationContextListener.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.getMostSpecificMethod(Ljava/ lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;
Caused by:
java.lang.NoSuchMethodError: org.springframework.util.ClassUtils.getMostSpecificMethod(Ljava/ lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method; at org.springframework.transaction.interceptor.AbstractFallbackTransactio nAttributeSource.computeTransactionAttribute (AbstractFallbackTransactionAttributeSource.java:144) at org.springframework.transaction.interceptor.AbstractFallbackTransactio nAttributeSource.getTransactionAttribute (AbstractFallbackTransactionAttributeSource.java:103) at org.springframework.transaction.interceptor.TransactionAttributeSource Advisor$TransactionAttributeSourcePointcut.matches (TransactionAttributeSourceAdvisor.java:102) at org.springframework.aop.support.AopUtils.canApply (AopUtils.java:195) at org.springframework.aop.support.AopUtils.canApply (AopUtils.java:236)
.....
===========================

consider that the application is working and the the loading of the resourcebundle is done by this part of spring config
================================
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMes sageSource">
        <property name="basenames">
            <list>
                <value>/WEB-INF/resourcebundle/mailMessages</value>
            </list>
        </property>
        <property name="cacheSeconds" value="0"/>
    </bean>
=================================

just my impression is that the problem lies in loading the resources

Paolo

Kevan Miller wrote:

On Aug 27, 2007, at 5:47 PM, Paolo Denti wrote:

Hi, i am a brand new geronimo user (or at least i am trying to be)
I am trying to deploy already existing applications (EARs), already working on jboss, without any particular deployment descriptior, on geronimo. I always get NPEs at geronimo startup. below you can find the stacktrace. it happens if i deploy with geronimo running or if i deploy with geronimo stopped and then start geronimo.

environment is
- geronimo 2.0.1 with jetty
- os x 10.4.10
- jdk 1.5.0_07
- JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home

Hi Paolo,
Welcome... :-)

Thanks for the info.

Rather than using the hot deploy directory, could you try to deploy your ear using the deploy command?

Remove your EAR from geronimo-jetty6-jee5-2.0.1/deploy/

Start the server (e.g. geronimo-jetty6-jee5-2.0.1/bin/geronimo.sh run)

Then, in a separate term window deploy your app using the following:

  geronimo-jetty6-jee5-2.0.1/bin/deploy.sh <your-ear-file>

If this fails in the same way, then we'll need to dig a little further... Well, we'll need to dig a bit further, regardless, to understand why the hot-deploy directory isn't working...

--kevan


thanks
Paolo

Geronimo Application Server started
23:16:07,293 ERROR [Deployer] Deployment failed due to
java.lang.NullPointerException
at org.apache.geronimo.deployment.CopyResourceContext.addFile (CopyResourceContext.java:144) at org.apache.geronimo.deployment.DeploymentContext.addFile (DeploymentContext.java:461) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.instal lModule(AbstractWebModuleBuilder.java:288) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$ $FastClassByCGLIB$$8523248f.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.ModuleBuilder$ $EnhancerByCGLIB$$ab38932.installModule(<generated>) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.installMo dule(SwitchingModuleBuilder.java:153) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$ $FastClassByCGLIB$$d0c31844.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.ModuleBuilder$ $EnhancerByCGLIB$$ab38932.installModule(<generated>) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurat ion(EARConfigBuilder.java:567) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ $FastClassByCGLIB$$38e56ec6.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$ $EnhancerByCGLIB$$41e10347.buildConfiguration(<generated>) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:304) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:126) at org.apache.geronimo.deployment.Deployer$ $FastClassByCGLIB$$734a235d.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:865) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:239) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.do Deploy(AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run (DistributeCommand.java:61)
        at java.lang.Thread.run(Thread.java:613)
23:16:07,311 ERROR [DirectoryHotDeployer] Unable to deploy: java.lang.NullPointerException org.apache.geronimo.common.DeploymentException: java.lang.NullPointerException at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:385) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:126) at org.apache.geronimo.deployment.Deployer$ $FastClassByCGLIB$$734a235d.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:865) at org.apache.geronimo.kernel.basic.BasicKernel.invoke (BasicKernel.java:239) at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.do Deploy(AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run (DistributeCommand.java:61)
        at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NullPointerException
at org.apache.geronimo.deployment.CopyResourceContext.addFile (CopyResourceContext.java:144) at org.apache.geronimo.deployment.DeploymentContext.addFile (DeploymentContext.java:461) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.instal lModule(AbstractWebModuleBuilder.java:288) at org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$ $FastClassByCGLIB$$8523248f.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.ModuleBuilder$ $EnhancerByCGLIB$$ab38932.installModule(<generated>) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.installMo dule(SwitchingModuleBuilder.java:153) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$ $FastClassByCGLIB$$d0c31844.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.ModuleBuilder$ $EnhancerByCGLIB$$ab38932.installModule(<generated>) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurat ion(EARConfigBuilder.java:567) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ $FastClassByCGLIB$$38e56ec6.invoke(<generated>) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java: 53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$ $EnhancerByCGLIB$$41e10347.buildConfiguration(<generated>) at org.apache.geronimo.deployment.Deployer.deploy (Deployer.java:304)
        ... 10 more

23:16:09,671 ERROR [DirectoryHotDeployer] Unable to undeploy
java.lang.NullPointerException
at org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTarg etModuleIDs(ConfigIDExtractor.java:174) at org.apache.geronimo.deployment.hot.DirectoryHotDeployer.fileRemoved( DirectoryHotDeployer.java:350) at org.apache.geronimo.deployment.hot.DirectoryMonitor.scanDirectory (DirectoryMonitor.java:325) at org.apache.geronimo.deployment.hot.DirectoryMonitor.run (DirectoryMonitor.java:216)
        at java.lang.Thread.run(Thread.java:613)




Reply via email to