4 Replies Latest reply on Jan 16, 2012 3:30 AM by Rostislav Svoboda

    How to make a jar visible from all modules?

    Ondrej Zizka Master

      Certain use cases need some jars visible from all modules. E.g. test coverage measurement.

      How can I achieve that?

       

      My guess is that I need to create a module exporting the necessary packages, and then setting  JAVA_OPTS="-Djboss.modules.system.pkgs=com.vladium.emma".

      I've tried that, but I still get CNFEx.

       

      What's the right way?

       

       

      =========================================================================
      
        JBoss Bootstrap Environment
      
        JBOSS_HOME: /home/ondra/work/AS7/ozizka-git/testsuite/integration/smoke/target/jbossas-smoke
      
        JAVA: /sw/jdk/1.6.0_27/bin/java
      
        JAVA_OPTS: -server  -Djboss.modules.system.pkgs=com.vladium
      
      =========================================================================
      
      Exception in thread "main" java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
              at org.jboss.logmanager.LogManager.$VRi(LogManager.java)
              at org.jboss.logmanager.LogManager.<clinit>(LogManager.java)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at java.lang.Class.newInstance0(Class.java:355)
              at java.lang.Class.newInstance(Class.java:308)
              at java.util.logging.LogManager$1.run(LogManager.java:167)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.util.logging.LogManager.<clinit>(LogManager.java:156)
              at org.jboss.modules.Main.main(Main.java:271)
      Caused by: java.lang.ClassNotFoundException: com.vladium.emma.rt.RT
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:395)
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
              ... 12 more
      

       

      Thanks,

      Ondra