4 Replies Latest reply on Mar 11, 2013 12:16 AM by sumit barwad

    Caused by: java.io.FileNotFoundException /bootstrap.xml

    suhail_shaikh Newbie



      I am getting below exception while starting the server. I read through various posts related to similar issue and tried few suggestions but none have worked for me. So, I am just wondering what can be the possible causes of server not locating this file. I would like to confirm that , the file exists at it's physical location.


      01:25:12,700 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file://root/MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml
      Failed to boot JBoss:
      java.lang.RuntimeException: Error unmarshalling file://root/MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml
              at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:60)
              at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:123)
              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(Thread.java:619)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file://root/MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml
              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:177)
              at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:119)
              at org.jboss.bootstrap.xml.BootstrapParser.parse(BootstrapParser.java:53)
              ... 5 more
      Caused by: java.io.FileNotFoundException: /MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml
              at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:105)
              at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:112)
              at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
              at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
              ... 7 more
      01:25:12,942 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
      01:25:13,555 INFO  [ServerImpl] Shutdown complete
      Shutdown complete
      Halting VM


      Here are my env details:


      • Linux
      • jboss-5.1.0.GA
      • jdk-6u20-linux-i586


      I am starting the server using below command . -c option is used all the files are copied from 'default' location to 'JBOSS_SERVER_NAME'.


      export JAVA_HOME=/usr/java/jdk1.6.0_20
      export PROJECT_HOME=/root/MYPROJECT/build/project_stage

      export JAVA_OPTS="-Xms128M -Xmx512M -XX:MaxPermSize=256M"

      export JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address= -Djava.security.auth.login.config=$PROJECT_HOME/config/jaas-prj.properties"
      export JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/root/dumps/jboss-5.1.0.GA/native/linux/32"

      export JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

      export JBOSS_HOME=/root/dumps/jboss-5.1.0.GA
      export JBOSS_SERVER_NAME=project_server


      set MODE=dev

      export PROJECT_SERVER_DIR="-Djboss.server.base.url=file:/$PROJECT_HOME -Djboss.server.base.dir=$PROJECT_HOME"

      # start JBoss server
      echo starting JBoss server ...

        • 1. Re: Caused by: java.io.FileNotFoundException /bootstrap.xml
          Peter Johnson Master

          Are you running as root? You should not be.


          Does /root/MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml exist? According to your rearlier statement, "all the files are copied from 'default' location to 'JBOSS_SERVER_NAME'.". Does that mean that you copied /root/dumps/jboss-5.1.0.GA/server/default to /root/dumps/jboss-5.1.0.GA/server/project_server? If so, how does /root/MYPROJECT/build/project_stage/project_server relate to /root/dumps/jboss-5.1.0.GA/server/project_server? Is it s symbolic link? If so, try with without a symbolic link.

          • 2. Re: Caused by: java.io.FileNotFoundException /bootstrap.xml
            suhail_shaikh Newbie

            Yes, I am running as 'root' . Do you think this could cause any problem in running JBOSS. I am setting up a 'non-root' user run JBOSS.


            Yes, the file bootstrap.xml does exist at the /root/MYPROJECT/build/project_stage/project_server/conf/ location.


            The files are copied from 'default' to /root/MYPROJECT/build/project_stage/project_server and not /root/dumps/jboss-5.1.0.GA/server/project_server.


            I hope this is clear now. Any help to resolve this error will be appreciated.

            • 3. Re: Caused by: java.io.FileNotFoundException /bootstrap.xml
              Peter Johnson Master

              Yes, running as root can cause strange problems. And it also open a huge security hole.


              If I understand correctly, you are try to run with the 'server' directory located someplace other than JBOSS_HOME/server. Wow, you are really asking for headaches. Why don't you want to use JBOSS_HOME/server?


              Also, I noted the wrong file name in my first post. Here is the file that could not be found (and I have no idea why the '/root' prefix is missing, might have something to do with running as root):


              Caused by: java.io.FileNotFoundException: /MYPROJECT/build/project_stage/project_server/conf/bootstrap.xml


              I seriously doubt that file exists.

              • 4. Re: Caused by: java.io.FileNotFoundException /bootstrap.xml
                sumit barwad Newbie

                its a bug in jboss jboss-5.1.0.GA,I to got the same problem but i got solution,

                made one change in  <!-- The attachment store -->  you can find it in  "jboss-5.1.0.GA/server/simulator/conf/bootstrap/profile.xml"


                Added a line in    <parameter > shown in bold letters in below.


                <!-- The attachment store -->

                    <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">

                        <constructor><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>