5 Replies Latest reply on Oct 16, 2002 4:42 PM by Jeroen Jansen

    JBoss3+Struts+Jetty=java.lang.NoClassDefFoundError

    Jeroen Jansen Newbie

      Hello,

      I was patching my application, i just finished an update of it and I was very happy with my code, until.....
      all of a sudden, struts is not working correctly on startup in conjuntion with my JBoss3.0-Jetty

      I have the WAR file unpacked in the default/deploy dir.
      Everything used to work fine. Now struts is crashing on initialization, something seems f*cked up while loading the message resources. I have no idea what. Ive been trying all sorts of things, including deploying on 3.0.3,
      copying struts-lib to the server-wide dir, etc, etc

      I did not change a thing, except for recompiling the app.
      resources class. The configuration files were NOT changed.
      Im very puzzled about this.

      Im getting the following stack trace. Ive been trying all sorts of things. The strange thing is that the controller
      of Struts is executed but somehow is not able find the
      MessageResources class whereas this class *is* in the struts.jar

      I really hope someone can help, because Im getting an headache.

      Regards,
      Jeroen Jansen.

      2002-10-12 21:18:24,485 INFO [org.jboss.jetty.Jetty] action: Loading application resources from resource subdomain.util.DomaincareMessageResources
      2002-10-12 21:18:24,675 INFO [STDOUT] MessageResourcesFactory.createFactory
      2002-10-12 21:18:24,675 INFO [STDOUT] java.lang.NoClassDefFoundError: org/apache/struts/util/MessageResources
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.lang.ClassLoader.defineClass0(Native Method)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      2002-10-12 21:18:24,675 INFO [STDOUT] at org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.java:227)
      2002-10-12 21:18:24,675 INFO [STDOUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      2002-10-12 21:18:24,675 INFO [STDOUT] at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoader.java:235)
      2002-10-12 21:18:24,675 INFO [STDOUT] at org.jboss.mx.loading.UnifiedLoaderRepository.loadClassFromRepository(UnifiedLoaderRepository.java:387)
      2002-10-12 21:18:24,675 INFO [STDOUT] at org.jboss.mx.loading.UnifiedLoaderRepository.loadClass(UnifiedLoaderRepository.java:146)
      2002-10-12 21:18:24,675 INFO [STDOUT] at org.jboss.mx.loading.UnifiedClassLoader.loadClass(UnifiedClassLoader.java:285)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:553)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:217)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.mortbay.http.ContextLoader.loadClass(ContextLoader.java:201)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.Class.forName0(Native Method)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.Class.forName(Class.java:120)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:161)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.apache.struts.action.ActionServlet.initApplication(ActionServlet.java:1028)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.apache.struts.action.ActionServlet.init(ActionServlet.java:463)
      2002-10-12 21:18:24,685 INFO [STDOUT] at javax.servlet.GenericServlet.init(GenericServlet.java:258)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:225)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:414)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:446)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.jetty.Jetty.deploy(Jetty.java:405)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.jetty.JettyService.performDeploy(JettyService.java:244)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      2002-10-12 21:18:24,685 INFO [STDOUT] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      2002-10-12 21:18:24,685 INFO [STDOUT] at java.lang.reflect.Method.invoke(Native Method)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      2002-10-12 21:18:24,695 INFO [STDOUT] at $Proxy4.deploy(Unknown Source)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      2002-10-12 21:18:24,695 INFO [STDOUT] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      2002-10-12 21:18:24,695 WARN [org.jboss.jetty.Jetty] WARNING: action: Cannot load application resources bundle subdomain.util.DomaincareMessageResources
      java.lang.NullPointerException
      at org.apache.struts.action.ActionServlet.initApplication(ActionServlet.java:1030)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:463)
      at javax.servlet.GenericServlet.init(GenericServlet.java:258)
      at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:225)
      at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:414)
      at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:446)
      at org.jboss.jetty.Jetty.deploy(Jetty.java:405)
      at org.jboss.jetty.JettyService.performDeploy(JettyService.java:244)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

      2002-10-12 21:18:24,705 INFO [org.jboss.jetty.Jetty] action: Cannot load application resources bundle subdomain.util.DomaincareMessageResources: java.lang.NullPointerException
      2002-10-12 21:18:24,705 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/E:/jboss3/server/default/deploy/diensten.com.war/
      org.jboss.deployment.DeploymentException: Cannot load application resources bundle subdomain.util.DomaincareMessageResources; - nested throwable: (javax.servlet.UnavailableException: Cannot load application resources bundle subdomain.util.DomaincareMessageResources)
      at org.jboss.jetty.Jetty.deploy(Jetty.java:423)
      at org.jboss.jetty.JettyService.performDeploy(JettyService.java:244)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      + nested throwable:
      javax.servlet.UnavailableException: Cannot load application resources bundle subdomain.util.DomaincareMessageResources
      at org.apache.struts.action.ActionServlet.initApplication(ActionServlet.java:1042)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:463)
      at javax.servlet.GenericServlet.init(GenericServlet.java:258)
      at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:225)
      at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:414)
      at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:446)
      at org.jboss.jetty.Jetty.deploy(Jetty.java:405)
      at org.jboss.jetty.JettyService.performDeploy(JettyService.java:244)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      2002-10-12 21:18:24,705 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@5869fd4f{ url=file:/E:/jboss3/server/default/deploy/diensten.com.war/, deployedLastModified=1034450058000 }