4 Replies Latest reply on Jul 12, 2004 10:08 AM by belaban

    Error starting the demo

    ccaprar

      Hi all,

      I am trying to run the simple demo (build run.demo) on Windows using JBoss Cache 1.02. I get the following output:

      ***************************************************
      F:\Java\jboss-cache_102>java -cp ./ant-dist/lib/ant.jar;./ant-dist/lib/optional.jar;./ant-dist/lib/junit.jar;f:\java\jdk1.4.2/lib/tools.jar org.apache.tools.ant.Main run.demo
      Buildfile: build.xml

      init:

      compile:
      [copy] Copying 2 files to F:\Java\jboss-cache_102\output\etc

      run.demo:
      [java] org.xml.sax.SAXParseException: Document root element is missing.
      [java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
      [java] at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
      [java] at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
      [java] at org.apache.crimson.parser.Parser2.parse(Unknown Source)
      [java] at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
      [java] at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(Unknown Source)
      [java] at org.jboss.cache.PropertyConfigurator.loadDocument(PropertyConfigurator.java:92)
      [java] at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:169)
      [java] at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:153)
      [java] at org.jboss.cache.TreeCacheView2.main(TreeCacheView2.java:106)
      [java] java.lang.NullPointerException
      [java] at org.jboss.cache.PropertyConfigurator.getMBeanElement(PropertyConfigurator.java:114)
      [java] at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:170)
      [java] at org.jboss.cache.PropertyConfigurator.configure(PropertyConfigurator.java:153)
      [java] at org.jboss.cache.TreeCacheView2.main(TreeCacheView2.java:106)

      BUILD SUCCESSFUL
      Total time: 3 seconds
      ***************************************************

      Of course, nothig starts. This worked just fine with 1.01 (I just tried on this same machine).

      Any help is appreciated. Am I doing something wrong? From the tutorial, it does not seem so.

      Thanks,
      Cristi

        • 1. Re: Error starting the demo

          Cristi,

          Hmmn, I don't know what happened but "build.bat run.demo" works fine on my XP box with 1.02 release.

          I am running JDK1.4.2_06.

          -Ben

          • 2. Re: Error starting the demo
            ccaprar

            Hi Ben,

            I am using JDK 1.4.2_04 on Win2K Pro.

            Can you tell me which is the document loaded in:

            org.jboss.cache.PropertyConfigurator.loadDocument(PropertyConfigurator.java:92) (or where do I find the sources to look myself ;-))?

            Maybe there is a mistake in that XML file.

            Thanks,
            Cristi

            • 3. Re: Error starting the demo

              You can download the cvs source from sourceforge under jboss-head. You should use -r JBossCache1_0x to check out the 1.02 branch.

              It is trying to load the config xml file. So you should put it in your class path. Of course, run.demo should have done that already.

              -Ben

              • 4. Re: Error starting the demo
                belaban

                Look at your XML file; it is probably corrupted. Happened to me too when I tried to open it with notepad.

                Bela