2 Replies Latest reply on May 4, 2003 6:54 AM by jimdowning

    Help with cutdown config?

    jimdowning

      Hi,

      I'm trying to set up JBoss / Jetty + JNDI as a replacement for tomcat. I don't need EJB, JMS or any of that jazz at this point, so I'm trying to add the jetty and JNDI stuff from the minimal configuration example. I've run into problems - I'm getting a ClassNotFoundException:

      ...
      16:23:38,136 INFO [Server] Core system initialized
      16:23:38,303 INFO [MainDeployer] Starting deployment of package: file:/home/ojd/apps/jboss-3.2.0/server/paribus/conf/jboss-service.xml
      16:23:40,929 INFO [SARDeployer] looking for nested deployments in : file:/home/ojd/apps/jboss-3.2.0/server/paribus/conf/jboss-service.xml
      16:23:42,277 WARN [ServiceConfigurator] Failed to complete install
      java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.web.WebService
      at org.jboss.mx.loading.LoadMgr.beginLoadTask(LoadMgr.java:161)
      at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:175)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:822)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:294)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:321)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:85)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:155)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
      at org.jboss.system.ServiceController.install(ServiceController.java:225)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:199)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:784)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:639)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:361)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:268)
      at org.jboss.Main.boot(Main.java:156)
      at org.jboss.Main$1.run(Main.java:394)

      I've put these files in lib:

      asterix:~/apps/jboss-3.2.0/server/paribus$ ls lib/
      jboss-jsr77.jar jboss-minimal.jar jmxri.jar jnpserver.jar
      jboss-management.jar jbossmx.jar jnet.jar log4j.jar

      My conf/jboss-service.xml file is appended. Any pointers on what to do or where to look in the docs gratefully received. Should I start from the default version and cut down, rather than building up from the minimal version?

      Regards,
      jim

      Jim Downing
      Paribus

      === jboss-service.xml ===
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server>
      <!-- $Id: jboss-minimal.xml,v 1.4.2.2 2003/02/24 08:02:30 ejort Exp $ -->

      <!-- ===================================================================== -->
      <!-- -->
      <!-- A minimal JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->



      <!-- Load all jars from the JBOSS_DIST/server//lib directory. This
      can be restricted to specific jars by specifying them in the archives
      attribute.
      -->


      <!-- ==================================================================== -->
      <!-- Log4j Initialization -->
      <!-- ==================================================================== -->

      resource:log4j.xml



      java.rmi.server.RMIClassLoaderSpi
      org.jboss.system.JBossRMIClassLoader



      8083
      <!-- Should resources and non-EJB classes be downloadable -->
      true



      jboss.system:service=MainDeployer
      jboss.system:service=ServiceDeployer
      jboss.web:service=WebServer
      jboss:service=Naming


      <!-- ==================================================================== -->
      <!-- JNDI -->
      <!-- ==================================================================== -->


      <!-- The listening port for the bootstrap JNP service. Set this to -1
      to run the NamingService without the JNP invoker listening port.
      -->
      1099



      <!-- ==================================================================== -->
      <!-- Deployment Scanning -->
      <!-- ==================================================================== -->

      <!-- An mbean for hot deployment/undeployment of archives.
      -->


      <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer

      <!-- The URLComparator can be used to specify a deployment ordering
      for deployments found in a scanned directory. The class specified
      must be an implementation of java.util.Comparator, it must be able
      to compare two URL objects, and it must have a no-arg constructor.
      Two deployment comparators are shipped with JBoss:
      - org.jboss.deployment.DeploymentSorter
      Sorts by file extension, as follows:
      "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
      "*"
      - org.jboss.deployment.scanner.PrefixDeploymentSorter
      If the name portion of the url begins with 1 or more digits, those
      digits are converted to an int (ignoring leading zeroes), and
      files are deployed in that order. Files that do not start with
      any digits will be deployed last, and they will be sorted by
      extension as above with DeploymentSorter.
      -->
      org.jboss.deployment.DeploymentSorter
      <!-- The Filter specifies a java.io.FileFilter for scanned
      directories. Any file not accepted by this filter will not be
      deployed. The org.jboss.deployment.scanner.DeploymentFilter
      rejects the following patterns:
      "#*", "%*", ",*", ".*", "_$*", "*#", "*$", "*%", "*.BAK",
      "*.old", "*.orig", "*.rej", "*.bak", "*,v", "*~", ".make.state",
      ".nse_depinfo", "CVS", "CVS.admin", "RCS", "RCSLOG", "SCCS",
      "TAGS", "core", "tags"
      -->
      org.jboss.deployment.scanner.DeploymentFilter

      5000

      <!-- URLs are comma seperated and unprefixed arguments are considered
      file URLs and resolve relative to server home(JBOSS_DIST/server/default)
      unless the given path is absolute. Any referenced directories cannot
      be unpackaged archives, use the parent directory of the unpacked
      archive.
      -->

      deploy/





        • 1. Re: Help with cutdown config?
          andygodwin

          Jim,

          If you just want to replace Tomcat, couldn't you just
          use Jetty on it's own?

          Otherwise, your jboss-service.xml has an mbean
          declared with code="org.jboss.web.WebService".

          This class isn't in any of the jars in your lib directory
          listing.

          org.jboss.web.WebService (and the associated
          ClassLoader, org.jboss.web.WebClassLoader) live
          in jboss.jar in server/default/lib.

          Try replacing jboss-minimal.jar with jboss.jar.

          jboss-minimal.jar has only those jboss classes
          needed for the minimal server. As you add features
          to the minimal server there's more and more of the
          jboss classes in jboss.jar that you need.

          You could roll-your-own jar containing only those
          classes from jboss.jar that you need, but it's a painful
          process finding out just what classes you do need.
          It's just easier to use the full jar and not worry about
          any unused classes.

          To get Jetty to work you might need more jars from
          the default server, but this should be a start.

          HTH

          • 2. Re: Help with cutdown config?
            jimdowning

            Thanks Andy,

            The extra classes in the jar aren't a problem at all - my main concern is keeping the runtime memory usage down. My reason for moving away from Tomcat is that the JNDI implementation seems to be broken in the places I want to use it. Maybe JettyPlus would be a better choice?

            jim