8 Replies Latest reply on Feb 24, 2005 4:22 PM by Edouard Chevtchouk Chevtchouk

    Problem with demo

    Pratik Parikh Newbie

      Hi,

      Is their anything special i need to do to run the demo, i can run the gui. but when i try to run runShellDemo.bat, and tried to run follwoing:

      sourceRelative("plain.bsh");

      Then it crashed with error. Did this happen to anyone else? No one have answered my previous question either? Please help?

      Thank You,

        • 1. Re: Problem with demo
          Ben Wang Master

          It should not. What knid of envrionment you are running?

          -Ben

          • 2. Re: Problem with demo
            Pratik Parikh Newbie

            I am running on Windows XP and Java 1.4. And following what i get. Please help me get started.

            [ERROR]

            bsh % sourceRelative("plain.bsh");
            [error] Failed to aspectize class org.jboss.cache.TreeCache. Could not find cla
            ss it references org.jboss.remoting.ServerInvocationHandler.. Do verbose mode if
            you want full stack trace.
            // Error: // Uncaught Exception: Method Invocation this.interpreter.source : at
            Line: 19 : in file: /bsh/commands/sourceRelative.bsh : this .interpreter .source
            ( path , this .caller .namespace )

            Called from method: sourceRelative : at Line: 1 : in file: <unknown file> : sour
            ceRelative ( "plain.bsh" )
            Target exception: java.lang.Error: Error transforming the class org.jboss.cache.
            TreeCache: org.jboss.aop.instrument.TransformationException: Failed to aspectize
            class org.jboss.cache.TreeCache. Could not find class it references org.jboss.
            remoting.ServerInvocationHandler

            java.lang.Error: Error transforming the class org.jboss.cache.TreeCache: org.jbo
            ss.aop.instrument.TransformationException: Failed to aspectize class org.jboss.c
            ache.TreeCache. Could not find class it references org.jboss.remoting.ServerInv
            ocationHandler
            at org.jboss.aop.standalone.SystemClassLoader.loadClass(SystemClassLoade
            r.java:191)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:494)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:260)
            at bsh.classpath.ClassManagerImpl.plainClassForName(Unknown Source)
            at bsh.classpath.ClassManagerImpl.classForName(Unknown Source)
            at bsh.NameSpace.classForName(Unknown Source)
            at bsh.NameSpace.getImportedClassImpl(Unknown Source)
            at bsh.NameSpace.getClassImpl(Unknown Source)
            at bsh.NameSpace.getClass(Unknown Source)
            at bsh.Name.consumeNextObjectField(Unknown Source)
            at bsh.Name.toObject(Unknown Source)
            at bsh.BSHAmbiguousName.toObject(Unknown Source)
            at bsh.BSHAllocationExpression.objectAllocation(Unknown Source)
            at bsh.BSHAllocationExpression.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.BSHAssignment.eval(Unknown Source)
            at bsh.Interpreter.eval(Unknown Source)
            at bsh.Interpreter.source(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:85)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:58)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:60)
            at java.lang.reflect.Method.invoke(Method.java:391)
            at bsh.Reflect.invokeOnMethod(Unknown Source)
            at bsh.Reflect.invokeObjectMethod(Unknown Source)
            at bsh.Name.invokeMethod(Unknown Source)
            at bsh.BSHMethodInvocation.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.BSHReturnStatement.eval(Unknown Source)
            at bsh.BSHBlock.evalBlock(Unknown Source)
            at bsh.BSHBlock.eval(Unknown Source)
            at bsh.BshMethod.invokeImpl(Unknown Source)
            at bsh.BshMethod.invoke(Unknown Source)
            at bsh.BshMethod.invoke(Unknown Source)
            at bsh.Name.invokeLocalMethod(Unknown Source)
            at bsh.Name.invokeMethod(Unknown Source)
            at bsh.BSHMethodInvocation.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.BSHPrimaryExpression.eval(Unknown Source)
            at bsh.Interpreter.run(Unknown Source)
            at bsh.Interpreter.main(Unknown Source)
            [/ERROR]

            • 3. Re: Problem with demo
              Ben Wang Master

              Which JBossCache version you are running? Have you modified runShellDemo.sh or plain.bsh? Basically, it is trying to aop intrumentation but can't find the class in the path.

              -Ben

              • 4. Re: Problem with demo
                Pratik Parikh Newbie

                Hi Ben,

                I am using JBossCache version 1.2, and have not modified runShellDemo.bat nor plain.bsh. what can i do so that it can find the class path.... Please let me know?

                Thank You,

                • 5. Re: Problem with demo
                  Ben Wang Master

                  Can you try out JBossCache1.1 demo just to see if that works or not?

                  Thanks,

                  -Ben

                  • 6. Re: Problem with demo
                    Bela Ban Master

                    add jboss-remoting.jar to your lib dir

                    • 7. Re: Problem with demo
                      Pratik Parikh Newbie

                      do i put the jboss-remoting.jar in java 1.4 lib dir, because it already exist in the demo lib dir. Please let me know? I am also going to try out the 1.1 demo.


                      Thank You,

                      • 8. Re: Problem with demo
                        Edouard Chevtchouk Chevtchouk Newbie

                        You are using windows runShellDemo.bat arent You ?

                        In fact there is a bug in it. The line :

                        set CLASSPATH=%CACHE_LIB%/commons-logging.jar;%CACHE_LIB%/bsh-1.3.0.jar;%CACHE_LIB%/bsh-commands-1.3.0.jar;%CACHE_LIB%/jboss-aop.jar;%CACHE_LIB%/jboss-j2ee.jar;%CACHE_LIB%/jgroups.jar;%CACHE_LIB%/jboss-cache.jar;%CACHE_LIB%/jboss-jmx.jar;%CACHE_LIB%/trove.jar;%CACHE_LIB%/javassist.jar;%CACHE_LIB%/jboss-minimal.jar;%CACHE_LIB%/jboss-common.jar;%CACHE_LIB%/jboss-system.jar;%CACHE_LIB%/log4j.jar;%CACHE_LIB%/concurrent.jar;%CACHE_LIB%/je.jar;%CACHE_LIB/jboss-remoting.jar

                        shuld be changed to

                        set CLASSPATH=%CACHE_LIB%/commons-logging.jar;%CACHE_LIB%/bsh-1.3.0.jar;%CACHE_LIB%/bsh-commands-1.3.0.jar;%CACHE_LIB%/jboss-aop.jar;%CACHE_LIB%/jboss-j2ee.jar;%CACHE_LIB%/jgroups.jar;%CACHE_LIB%/jboss-cache.jar;%CACHE_LIB%/jboss-jmx.jar;%CACHE_LIB%/trove.jar;%CACHE_LIB%/javassist.jar;%CACHE_LIB%/jboss-minimal.jar;%CACHE_LIB%/jboss-common.jar;%CACHE_LIB%/jboss-system.jar;%CACHE_LIB%/log4j.jar;%CACHE_LIB%/concurrent.jar;%CACHE_LIB%/je.jar;%CACHE_LIB%/jboss-remoting.jar

                        As you can see, the first line does not provide the correct path for the jboss-remoting.jar, CASHE_LIB is not evaluated as required : %CACHE_LIB/jboss-remoting.jar

                        Hope it will be helpful.