5 Replies Latest reply on Mar 19, 2010 1:55 PM by peterj

    Starting Jboss from Eclipse

      Hi All.

      Im having a problem starting jboss from eclipse - I can start it fine with run.sh

       

      the console in eclipse states :

       

      log4j:ERROR setFile(null,false) call failed.
      java.io.FileNotFoundException: /usr/jboss/jboss-5.1.0.GA/server/default/log/boot.log (Permission denied)
         at gnu.java.nio.channels.FileChannelImpl.open(libgcj.so.10)
         at gnu.java.nio.channels.FileChannelImpl.<init>(libgcj.so.10)
         at gnu.java.nio.channels.FileChannelImpl.create(libgcj.so.10)
         at java.io.FileOutputStream.<init>(libgcj.so.10)
         at java.io.FileOutputStream.<init>(libgcj.so.10)
         at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
         at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
         at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
         at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
         at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
         at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
         at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
         at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
         at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
         at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
         at java.lang.Class.initializeClass(libgcj.so.10)
         at org.jboss.logging.log4j.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:70)
         at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:603)
         at org.jboss.logging.Logger.<init>(Logger.java:119)
         at org.jboss.logging.Logger.getLogger(Logger.java:567)
         at org.jboss.bootstrap.AbstractServerImpl.doInit(AbstractServerImpl.java:204)
         at org.jboss.bootstrap.AbstractServerImpl.init(AbstractServerImpl.java:173)
         at org.jboss.bootstrap.AbstractServerImpl.init(AbstractServerImpl.java:143)
         at org.jboss.Main.boot(Main.java:218)
         at org.jboss.Main$1.run(Main.java:556)
         at java.lang.Thread.run(libgcj.so.10)
      18:00:26,157 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
      18:00:26,158 INFO  [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)
      18:00:26,158 INFO  [ServerImpl] Bootstrap URL: null
      18:00:26,158 INFO  [ServerImpl] Home Dir: /usr/jboss/jboss-5.1.0.GA
      18:00:26,158 INFO  [ServerImpl] Home URL: file:/usr/jboss/jboss-5.1.0.GA/
      18:00:26,159 INFO  [ServerImpl] Library URL: file:/usr/jboss/jboss-5.1.0.GA/lib/
      18:00:26,159 INFO  [ServerImpl] Patch URL: null
      18:00:26,159 INFO  [ServerImpl] Common Base URL: file:/usr/jboss/jboss-5.1.0.GA/common/
      18:00:26,159 INFO  [ServerImpl] Common Library URL: file:/usr/jboss/jboss-5.1.0.GA/common/lib/
      18:00:26,159 INFO  [ServerImpl] Server Name: default
      18:00:26,159 INFO  [ServerImpl] Server Base Dir: /usr/jboss/jboss-5.1.0.GA/server
      18:00:26,159 INFO  [ServerImpl] Server Base URL: file:/usr/jboss/jboss-5.1.0.GA/server/
      18:00:26,159 INFO  [ServerImpl] Server Config URL: file:/usr/jboss/jboss-5.1.0.GA/server/default/conf/
      18:00:26,159 INFO  [ServerImpl] Server Home Dir: /usr/jboss/jboss-5.1.0.GA/server/default
      18:00:26,160 INFO  [ServerImpl] Server Home URL: file:/usr/jboss/jboss-5.1.0.GA/server/default/
      18:00:26,160 INFO  [ServerImpl] Server Data Dir: /usr/jboss/jboss-5.1.0.GA/server/default/data
      18:00:26,160 INFO  [ServerImpl] Server Library URL: file:/usr/jboss/jboss-5.1.0.GA/server/default/lib/
      18:00:26,160 INFO  [ServerImpl] Server Log Dir: /usr/jboss/jboss-5.1.0.GA/server/default/log
      18:00:26,160 INFO  [ServerImpl] Server Native Dir: /usr/jboss/jboss-5.1.0.GA/server/default/tmp/native
      18:00:26,160 INFO  [ServerImpl] Server Temp Dir: /usr/jboss/jboss-5.1.0.GA/server/default/tmp
      18:00:26,160 INFO  [ServerImpl] Server Temp Deploy Dir: /usr/jboss/jboss-5.1.0.GA/server/default/tmp/deploy
      Failed to boot JBoss:
      java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
         at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
         at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
         at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
         at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:114)
         at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)
         at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:105)
         at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
         at org.jboss.Main.boot(Main.java:221)
         at org.jboss.Main$1.run(Main.java:556)
         at java.lang.Thread.run(libgcj.so.10)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
         at org.jboss.reflect.plugins.MethodInfoImpl.<init>(MethodInfoImpl.java:103)
         at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.<init>(ReflectMethodInfoImpl.java:78)
         at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl$2.run(IntrospectionTypeInfoFactoryImpl.java:211)
         at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl$2.run(IntrospectionTypeInfoFactoryImpl.java:200)
         at java.security.AccessController.doPrivileged(libgcj.so.10)
         at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getMethods(IntrospectionTypeInfoFactoryImpl.java:198)
         at org.jboss.reflect.plugins.ClassInfoImpl.getDeclaredMethods(ClassInfoImpl.java:394)
         at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getMethods(AbstractBeanInfoFactory.java:231)
         at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getBeanInfo(AbstractBeanInfoFactory.java:152)
         at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getBeanInfo(AbstractBeanInfoFactory.java:124)
         at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:69)
         at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:65)
         at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:175)
         at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:120)
         at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
         ...9 more
      18:00:26,333 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
      18:00:26,340 INFO  [ServerImpl] Shutdown complete
      Shutdown complete
      Halting VM

       

       

      Any ideas?

        • 1. Re: Starting Jboss from Eclipse
          peterj
          It would appear that you do not have write access to the log directory. Are you logged in as the 'jboss' user or as some other user? If some other user then you need to modify the permissions on the jboss_home directory and all of its subdirectories to allow write access to your account.
          • 2. Re: Starting Jboss from Eclipse

            Thanks. That got rid of the log4j error. Now its just

             

            googling suggests its the JVM is the wrong version, but I have changed it down to 1.5

             

            Failed to boot JBoss:
            java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
               at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
               at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
               at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
               at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:114)
               at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)
               at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:105)
               at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
               at org.jboss.Main.boot(Main.java:221)
               at org.jboss.Main$1.run(Main.java:556)
               at java.lang.Thread.run(libgcj.so.10)
            Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
               at org.jboss.reflect.plugins.MethodInfoImpl.<init>(MethodInfoImpl.java:103)
               at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.<init>(ReflectMethodInfoImpl.java:78)
               at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl$2.run(IntrospectionTypeInfoFactoryImpl.java:211)
               at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl$2.run(IntrospectionTypeInfoFactoryImpl.java:200)
               at java.security.AccessController.doPrivileged(libgcj.so.10)
               at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getMethods(IntrospectionTypeInfoFactoryImpl.java:198)
               at org.jboss.reflect.plugins.ClassInfoImpl.getDeclaredMethods(ClassInfoImpl.java:394)
               at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getMethods(AbstractBeanInfoFactory.java:231)
               at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getBeanInfo(AbstractBeanInfoFactory.java:152)
               at org.jboss.beans.info.plugins.AbstractBeanInfoFactory.getBeanInfo(AbstractBeanInfoFactory.java:124)
               at org.jboss.config.plugins.AbstractConfiguration.getBeanInfo(AbstractConfiguration.java:69)
               at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:65)
               at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:175)
               at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:120)
               at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
               ...9 more
            20:48:23,631 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
            20:48:23,639 INFO  [ServerImpl] Shutdown complete
            Shutdown complete
            Halting VM

            • 3. Re: Starting Jboss from Eclipse
              peterj

              a) Exactly which binary package did you download for JBoss AS? (What is the name of the file you downloaded?)

               

              b) Which JVM do you have installed? (You could post the results of entering: "java -version")

               

               

              c) What do you have JAVA_HOME set to?

               

              d) Which JVM is Eclipse using?

              • 4. Re: Starting Jboss from Eclipse

                A)  jboss-5.1.0.GA

                 

                B)  1.6 and 1.5.        ah.  java -version shows 1.6 -i'll take a look at that after the weekend, thats probably the problem. Will let you know

                 

                C) echo $JAVA_HOME
                /usr/lib/jvm/java-1.5.0-gcj-4.4

                 

                D) window>preferences>java>installed JREs> = 1.6 and 1.5 - 1.5 is ticked.

                window>preferences>java>compiler> = 1.5

                 

                Thanks for the help

                • 5. Re: Starting Jboss from Eclipse
                  peterj

                  /usr/lib/jvm/java-1.5.0-gcj-4.4

                   

                  This is not a qualified JVM to use with JBoss AS. The 1.6 version you mention for question B, is that a Sun JDK that you downloaded? If so, change JAVA_HOME to reference it.  You will also have to check the soft links for /usr/bin/java (and other java-related soft links) to verify that they all point to a Sun JDK,

                   

                  I suspect that most likely when you ran JBoss AS from the command prompt that you somehow got the 1.6 version, but Eclipse is using the gcj-1.5 version.

                   

                  By the way, the answer you gave for question A is not what I asked for. I asked for the full name of the file you downloaded. I asked that because the full name gives a hint as to whether the binary you downloaded is for JDK 5 or 6. I still do not know what you have since you did not specify the name of the file you downloaded.