0 Replies Latest reply on Jul 28, 2003 12:05 PM by dobredan

    oreilly-aop examples don't work for me

    dobredan Newbie

      Hi,

      I've tried to run the oreilly-aop examples with the jboss-aop standalone framework, j2sdk 1.4, ant 1.5.3 and xdoclet 1.2b3 under Linux, but it didn't work for me.

      Executing the build.xml I get the following output:

      Apache Ant version 1.5.3 compiled on April 16 2003
      Buildfile: build.xml
      Detected Java version: 1.4 in: /opt/java/j2sdk1.4.1_02/jre
      Detected OS: Linux
      parsing buildfile build.xml with URI = file:/home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.xml
      Project base dir set to: /home/dobredan/Documents/jboss-aop/docs/oreilly-aop
      [property] Loading /home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.properties
      Build sequence for target `example1' is [example1]
      Complete build sequence is [example1, example3, example2, clean.all, generate, build, run, clean, run.all]

      example1:
      Project base dir set to: /home/dobredan/Documents/jboss-aop/docs/oreilly-aop
      [antcall] calling target run in build file /home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.xml
      parsing buildfile /home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.xml with URI = file:/home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.xml
      Project base dir set to: /home/dobredan/Documents/jboss-aop/docs/oreilly-aop
      [property] Loading /home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.properties
      Override ignored for property xdoclet.home
      Override ignored for property xdoclet.lib
      Override ignored for property xdoclet.class.path
      Override ignored for property project.class.path
      Build sequence for target `run' is [generate, build, run]
      Complete build sequence is [generate, build, run, example3, example2, example1, clean.all, clean, run.all]

      generate:

      BUILD FAILED
      file:/home/dobredan/Documents/jboss-aop/docs/oreilly-aop/build.xml:21: taskdef class xdoclet.modules.jboss.aop.JBossAopTask cannot be found
      at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)
      at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
      at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
      at org.apache.tools.ant.Main.runBuild(Main.java:609)
      at org.apache.tools.ant.Main.start(Main.java:196)
      at org.apache.tools.ant.Main.main(Main.java:235)
      Caused by: java.lang.NoClassDefFoundError: xjavadoc/ant/XJavadocTask
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1104)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:921)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
      at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
      at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
      ... 15 more
      --- Nested Exception ---
      java.lang.NoClassDefFoundError: xjavadoc/ant/XJavadocTask
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1104)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:921)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
      at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
      at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
      at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397)
      at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
      at org.apache.tools.ant.Main.runBuild(Main.java:609)
      at org.apache.tools.ant.Main.start(Main.java:196)
      at org.apache.tools.ant.Main.main(Main.java:235)

      Trying execution directly, without ant, I can compile the POJO and the TracerInterceptor with:
      > cd example1
      > export CLASSPATH=.:../../../jboss-common.jar:../../../jboss-aop.jar:../../../javassist.jar
      > javac *java

      , but when I attempt to run the POJO with:

      > java
      -Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader POJO

      I get the following output:
      Exception in thread "main" java.lang.NoClassDefFoundError: POJO

      In both cases I'm sure that the missing Classes are in the Classpath, so I don't understand the errors. Need some help ;-(

      Regards. Dan