4 Replies Latest reply on Mar 30, 2004 9:12 AM by bill.burke

    Example metadata doesn't work

    kado0002

      I've got a question to the metadata example in the new JBoss 1.0 Beta Version.
      First I use the AnnotationCompiler to create metadata-aop.xml File. After that I compile all java Files (javac *.java) after that I use the jboss Compiler: java org.jboss.aop.standalone.Compiler *.class -verbose -aoppath
      metadata-aop.xml. The jboss-aop.xml File is in the META-INF directory.
      I think it compiled correctly.
      After the Compilation I run the program but I get only the following output:

      -- new Pojo(); --
      empty constructor
      -- new Pojo(int); --
      int constructor
      -- pojo.someMethod(); --
      someMethod
      -- pojo.field = 55; --

      I used JDK1.4_03 and JDK1.5Beta compile and run the program, but it doesn't work. What make I wrong?

        • 1. Re: Example metadata doesn't work
          bill.burke

          Sorry for the late response, but I have been at the AOSD conference without access to internet.

          Can you post the verbose output of the compiler and all the commands you run and your classpath?

          One thing about -aoppath is that there can be only one switch on command line and it must be delimited in the same way as classpath is (OS dependent ':' or ';').

          Bill

          P.S. Did you try the ant task? That works for me.

          • 2. Re: Example metadata doesn't work
            kado0002

            The Problem was the system property

            I thought that when I am put both xml -files into Meta-inf it works, that was the problem.

            With the command
            java -Djboss.aop.aoppath=metadata.xml;jboss-aop.xml
            it works on commandline

            • 3. Re: Example metadata doesn't work
              kado0002

              The Problem was the system property!

              I thought that when I am put both xml -files into Meta-inf it works, that was the problem.

              With the command
              java -Djboss.aop.aoppath=metadata.xml;jboss-aop.xml
              it works on commandline

              • 4. Re: Example metadata doesn't work
                bill.burke

                yes, putting stuff in META-INF only recognizes jboss-aop.xml. The way the AOP framework finds non-system-property-wise is

                ClassLoader.getResource("META-INF/jboss-aop.xml") this method does not take wildcards.

                Bill