8 Replies Latest reply on Dec 21, 2006 11:57 AM by hmesha

    Tutorial not working

    vs008

      When trying the tutorial
      file:///B:/tools/JBossCache-1.4.1.BETA/docs/tutorial/en/html/index.html

      The tutorial says:

      1.
      On the first window for the GUI, type sh build.sh to see the available commands. To run the GUI, type sh build.sh run.demo .

      This is the error I get:
      JBossCache-1.4.0.SP1 1266>build.sh run.demo
      java.lang.InstantiationException: org.apache.tools.ant.Main
      at java.lang.Class.newInstance(I)Ljava.lang.Object;(Unknown Source)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:195)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

      2. runShellDemo.sh, the screen does not shows up. I am running onLinux with Exceed.
      java -cp $CP $ARGS $JAVA_OPTS -Djboss.aop.aoppath=$AOP_PATH bsh.Console &
      When I remove the ampersand, the beanshell shows up.


        • 1. Re: Tutorial not working
          manik
          • 2. Re: Tutorial not working
            vs008

            Thanks Manik!

            We had met in JBoss World along with Bela. Will send you email separately.

            - VS007

            • 3. Re: Tutorial not working
              hmesha

              I think you're trying to run the demo in 1.4.1.BETA


              file:///B:/tools/JBossCache-1.4.1.BETA/docs/tutorial/en/html/index.html

              from within 1.4.0.SP1 build with the wrong path to the ant runtime.

              JBossCache-1.4.0.SP1 1266>build.sh run.demo

              Therefore ant complains about finding the right runtime libraries and you get the ant exception.

              I tested both demos with 1.4.1.BETA and they're both working fine. I didn't test 1.4.1.SP1 so I can't tell if the issue there. In anycase, you should be testing 1.4.1.BETA.

              Also, make sure that your prompt is at JBossCache.1.4.1.BETA directory when invoking sh build.sh run.demo

              Let us know how it's working for you.

              Cheers


              • 4. Re: Tutorial not working
                hmesha

                And http://jira.jboss.com/jira/browse/JBCACHE-912 is resolved with status 'can't reproduce bug'

                If you can't run the tutorials as per my last post, please reopen the issue

                • 5. Re: Tutorial not working
                  vs008

                  Thanks Hany.

                  Not sure, how to reopen the jira case, hence commenting here:

                  Thanks for your response. I am also convinced that its somewhere in my env.
                  This is the first command I ran after downloading. The dir is right as you can see in the pwd output and I also put echo statements for CACHE_HOME and ANT_HOME

                  JBossCache-1.4.1.BETA 1518>pwd
                  /home/vsubrama/tools/JBossCache-1.4.1.BETA

                  JBossCache-1.4.1.BETA 1519>sh build.sh run.demo
                  CACHE_HOME=.
                  ANT_HOME=./ant-dist
                  java.lang.InstantiationException: org.apache.tools.ant.Main
                  at java.lang.Class.newInstance(I)Ljava.lang.Object;(Unknown Source)
                  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:195)
                  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
                  JBossCache-1.4.1.BETA 1520>

                  • 6. Re: Tutorial not working
                    hmesha

                    The cause of this is that there is an old version of ant somewhere in the class path or configuration.

                    See Ant FAQ for the issue http://ant.apache.org/faq.html#InstantiationException

                    • 7. Re: Tutorial not working
                      vs008

                      Yup, that fixed it.

                      Maybe the build.sh script should reset the classpath to make the env kosher.

                      The GUI is kinda rudimentary.

                      • 8. Re: Tutorial not working
                        hmesha

                        The shell script already set $ANT_HOME variable local to the script. If you uncomment the classpath line (line 6) in the script that would do exactly what you're suggesting.

                        I'm not sure why this line is commented in the script!!

                        Anybody?