1 Reply Latest reply on Dec 2, 2004 1:48 PM by Franco

    Problems running JBoss 4.0.0 as Windows Service

    Rohit Jalisatgi Newbie

      I have installed JBoss 4.0.0 on Windows Server 2000. Jboss runs file when run from the command line(run.bat), but does not run properly when started as a Windows service. I get the following error:

      19:56:18,296 INFO [Server] Starting JBoss (MX MicroKernel)...
      19:56:18,296 INFO [Server] Release ID: JBoss [Zion] 4.0.0 (build: CVSTag=JBoss_4_0_0 date=200409200418)
      19:56:18,296 INFO [Server] Home Dir: E:\Jboss\jboss-4.0.0
      19:56:18,296 INFO [Server] Home URL: file:/E:/Jboss/jboss-4.0.0/
      19:56:18,312 INFO [Server] Library URL: file:/E:/Jboss/jboss-4.0.0/lib/
      19:56:18,312 INFO [Server] Patch URL: null
      19:56:18,312 INFO [Server] Server Name: default
      19:56:18,312 INFO [Server] Server Home Dir: E:\Jboss\jboss-4.0.0\server\default
      19:56:18,312 INFO [Server] Server Home URL: file:/E:/Jboss/jboss-4.0.0/server/default/
      19:56:18,312 INFO [Server] Server Data Dir: E:\Jboss\jboss-4.0.0\server\default\data
      19:56:18,312 INFO [Server] Server Temp Dir: E:\Jboss\jboss-4.0.0\server\default\tmp
      19:56:18,312 INFO [Server] Server Config URL: file:/E:/Jboss/jboss-4.0.0/server/default/conf/
      19:56:18,312 INFO [Server] Server Library URL: file:/E:/Jboss/jboss-4.0.0/server/default/lib/
      19:56:18,312 INFO [Server] Root Deployment Filename: jboss-service.xml
      19:56:18,328 INFO [Server] Starting General Purpose Architecture (GPA)...
      19:56:19,078 ERROR [BasicMBeanRegistry] Cannot register MBean
      java.lang.NoClassDefFoundError: org/dom4j/DocumentException
      at javax.management.modelmbean.ModelMBeanAttributeInfo.createDefaultDescriptor(ModelMBeanAttributeInfo.java:268)
      at javax.management.modelmbean.ModelMBeanAttributeInfo.(ModelMBeanAttributeInfo.java:145)
      at org.jboss.mx.metadata.MBeanInfoConversion.toModelMBeanInfo(MBeanInfoConversion.java:80)
      at org.jboss.mx.modelmbean.XMBean.(XMBean.java:212)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:180)
      at org.jboss.mx.server.MBeanServerImpl.(MBeanServerImpl.java:200)
      at org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer(MBeanServerBuilderImpl.java:56)
      at javax.management.MBeanServerFactory$2.run(MBeanServerFactory.java:226)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:221)
      at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:153)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:332)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
      at org.jboss.Main.boot(Main.java:151)
      at org.jboss.Main$1.run(Main.java:405)
      at java.lang.Thread.run(Thread.java:534)

      I have used the following script to install JBoss as a Service:

      JavaService -install "Jboss Service" %Java_Home%\jre\bin\server\jvm.dll -Djava.class.path=%Java_Home%\lib\tools.jar;%JBoss_Home%\bin\run.jar;%JBoss_Home%\bin\shutdown.jar -start org.jboss.Main -params -c default -stop org.jboss.Shutdown -out %JBoss_Home%\server\%2\log\stdout.log -err %JBoss_Home%\server\default\log\stderr.log -current %JBoss_Home%\bin

      Note that JBoss runs fine if I start it using run.bat from the bin directory.
      Please advice.

        • 1. Re: Plans for deploying to JBoss with JBoss-IDE
          Franco Apprentice

          > > Are you talking about building jar/war/ear/rar/sar
          > > files from Eclipse UI? To be honest, I never
          > > considered this as a useful feature and always
          > though
          > > that ant script is the way to go when it comes to
          > > packaging. I think Eclipse workspace has enough
          > > information for the custom deployer
          > Well, that's the question. What I'm thinking to offer
          > is a checklist of the classpath of a project to
          > choose a subset to deploy. So you would deploy always
          > the whole set ? For example JBoss client jars needn't
          > be deployed. The question is if such a subset this
          > a.) increases performance *significantly*
          > b.) might avoid trouble (although I can't make up a
          > usecase for this)
          > But you have more experience with this. If you think
          > there is no point for this that's less work and good
          > news (:
          We can't deploy everything. For example, you'll get ClassNotFoundException if you deploy ejb.jar file from Sun. Current code reads "excludes" list from .classpath.jboss file, but after some thinking I believe that explicit list of what has to be deployed is a better way. Note that it might be necessary to provide different packaging for different server configurations, but it is not a problem because we can create as many EAR projects as we like. Cool!

          > Yes, I was thinking of eclipse doing the packaging
          > and/or creating the build.script to make use of the
          > information we have. The idea with custom ant tasks
          > to use this information is very interesting.
          I'll start new thread as soon as I find time for it :-(