Error running DHIS 2 on Jetty on Ubuntu

Hi, I am getting this when running DHIS 2 on Jetty on Ubuntu.

Installed Sun Java JDK 1.6_17 with apt-get install. Is there anyone who has experienced something similar?

Lars

Exception: Error creating bean with name ‘org.springframework.aop.
config.internalAutoProxyCreator’: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null:

java.lang.IllegalArgumentException: Method must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)

at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:58)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250)

at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282)

at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:597)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366)

at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)

at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)

at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)

at org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)

at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Lars, I am not using jdk from apt-get. But rather the one I have downloaded directly from sun.

java version “1.6.0_14”
Java™ SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot™ Server VM (build 14.0-b16, mixed mode)

mv jetty:run-war working fine here.

Mind you my default tomcat install (which also works) uses the default openjdk on ubuntu:

$ java -version
java version “1.6.0_0”

OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK Server VM (build 14.0-b16, mixed mode)

So I think its probably not to do with the jvm version (or the platform). I know I have seen this error before but I can’t think where. For some reason I think it was on windoze not ubuntu.

I guess you have done the “mvn clean install” a thousand times and tried a prebuilt dhis.war.

There lots of similar reports out in google-land. This one (org.springframework.core.

BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions?

Bob.

···

2009/12/16 Lars Helge Øverland larshelge@gmail.com

Hi, I am getting this when running DHIS 2 on Jetty on Ubuntu.

Installed Sun Java JDK 1.6_17 with apt-get install. Is there anyone who has experienced something similar?

Lars

Exception: Error creating bean with name ‘org.springframework.aop.
config.internalAutoProxyCreator’: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Method must not be null:

java.lang.IllegalArgumentException: Method must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.core.BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)

at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:58)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250)




at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:282)




at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:333)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1247)




at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)




at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)




at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)




at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)




at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)




at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:597)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366)




at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)




at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)




at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)




at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)




at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)




at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)




at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:441)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:383)




at org.mortbay.jetty.plugin.Jetty6RunWar.execute(Jetty6RunWar.java:67)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)




at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)




at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)




at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)




at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
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:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)




at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

There lots of similar reports out in google-land. This one (org.springframework.core.

BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions?

Sorry - not very helpful link. I meant http://forum.springsource.org/showthread.php?t=62392. Note that the reported failed assertion is apparently not in the spring 2.5.6 code.

Bob.

There lots of similar reports out in google-land. This one (org.springframework.core.
BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions?

Bob.

You hit the nail on the head Bob! mvn dependency:tree reveals that struts-spring-plugin introduces transitive dependencies to spring-context, spring-beans and spring-web version 2.5.3. I have enforced version 2.5.6 by including those in the dependency management in the root POM. I am sure we can remove some of them but will wait with that until after the release. Thanks a lot…

Maven black magic. i wish I knew things like mvn dependency:tree. That sounds useful.

···

2009/12/16 Lars Helge Øverland larshelge@gmail.com

There lots of similar reports out in google-land. This one (org.springframework.core.
BridgeMethodResolver.findBridgedMethod(BridgeMethodResolver.java:63)) seemed interesting. Any chance you are mixing spring versions?

Bob.

You hit the nail on the head Bob! mvn dependency:tree reveals that struts-spring-plugin introduces transitive dependencies to spring-context, spring-beans and spring-web version 2.5.3. I have enforced version 2.5.6 by including those in the dependency management in the root POM. I am sure we can remove some of them but will wait with that until after the release. Thanks a lot…

:slight_smile:

Now I am running into more trouble. While building the “core” modules without tests I am getting

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] PermGen space
[INFO] ------------------------------------------------------------------------

[INFO] Trace
java.lang.OutOfMemoryError: PermGen space

This never happened even on windows. I have set JAVA_OPTS in .bashrc to

-Xms512m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=2048m

Any idea why this suddenly is happening or what I might have done wrong?

Lars

···

2009/12/17 Bob Jolliffe bobjolliffe@gmail.com

Maven black magic. i wish I knew things like mvn dependency:tree. That sounds useful.

MAVEN_OPTS seems to be the right place to set memory for MAVEN… although it should be able to use JAVA_OPTS

… but for tomcat there is a similar CATALINA_OPTS

···

Regards,
Saptarshi PURKAYASTHA

Director R & D, HISP India
Health Information Systems Programme

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

2009/12/17 Lars Helge Øverland larshelge@gmail.com

2009/12/17 Bob Jolliffe bobjolliffe@gmail.com

Maven black magic. i wish I knew things like mvn dependency:tree. That sounds useful.

:slight_smile:

Now I am running into more trouble. While building the “core” modules without tests I am getting

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] PermGen space
[INFO] ------------------------------------------------------------------------

[INFO] Trace
java.lang.OutOfMemoryError: PermGen space

This never happened even on windows. I have set JAVA_OPTS in .bashrc to

-Xms512m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=2048m

Any idea why this suddenly is happening or what I might have done wrong?

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

And now another one, more detailed:

The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)

at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2383)
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1406)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1365)

at java.util.ResourceBundle.findBundle(ResourceBundle.java:1292)
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1292)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1234)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)

at com.sun.tools.javac.util.Messages.getDefaultBundle(Messages.java:114)
at com.sun.tools.javac.util.Messages.<init>(Messages.java:45)
at com.sun.tools.javac.util.Messages.instance(Messages.java:35)

at com.sun.tools.javac.util.JCDiagnostic$Factory.<init>(JCDiagnostic.java:57)
at com.sun.tools.javac.util.JCDiagnostic$Factory.instance(JCDiagnostic.java:47)
at com.sun.tools.javac.util.Log.<init>(Log.java:104)

at com.sun.tools.javac.util.Log.<init>(Log.java:149)
at com.sun.tools.javac.util.Log.<init>(Log.java:143)
at com.sun.tools.javac.util.Log.instance(Log.java:156)
at com.sun.tools.javac.util.DefaultFileManager.setContext(DefaultFileManager.java:166)

at com.sun.tools.javac.util.DefaultFileManager.<init>(DefaultFileManager.java:159)
at com.sun.tools.javac.util.DefaultFileManager$1.make(DefaultFileManager.java:145)
at com.sun.tools.javac.util.DefaultFileManager$1.make(DefaultFileManager.java:143)

at com.sun.tools.javac.util.Context.get(Context.java:132)
at com.sun.tools.javac.util.Context.get(Context.java:161)
at com.sun.tools.javac.main.Main.compile(Main.java:338)
···

2009/12/17 Lars Helge Øverland larshelge@gmail.com

2009/12/17 Bob Jolliffe bobjolliffe@gmail.com

Maven black magic. i wish I knew things like mvn dependency:tree. That sounds useful.

:slight_smile:

Now I am running into more trouble. While building the “core” modules without tests I am getting

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] PermGen space
[INFO] ------------------------------------------------------------------------

[INFO] Trace
java.lang.OutOfMemoryError: PermGen space

This never happened even on windows. I have set JAVA_OPTS in .bashrc to

-Xms512m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=2048m

Any idea why this suddenly is happening or what I might have done wrong?

Lars

Yeah that was my impression as well. When setting MAVEN_OPTS to the same value as JAVA_OPTS I suddenly get something like “could not allocate resources for the JVM” which indicates that it is now picked up. Building now runs fine. Documented on dhis2.org. Thanks a lot for the tip…

···

On Thu, Dec 17, 2009 at 9:17 AM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

MAVEN_OPTS seems to be the right place to set memory for MAVEN… although it should be able to use JAVA_OPTS
… but for tomcat there is a similar CATALINA_OPTS

PS. I obviously reduced the amount of mem allocated (1024m) first.

···

2009/12/17 Lars Helge Øverland larshelge@gmail.com

On Thu, Dec 17, 2009 at 9:17 AM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

MAVEN_OPTS seems to be the right place to set memory for MAVEN… although it should be able to use JAVA_OPTS
… but for tomcat there is a similar CATALINA_OPTS

Yeah that was my impression as well. When setting MAVEN_OPTS to the same value as JAVA_OPTS I suddenly get something like “could not allocate resources for the JVM” which indicates that it is now picked up. Building now runs fine. Documented on dhis2.org. Thanks a lot for the tip…