1 Reply Latest reply on Jan 4, 2013 7:14 AM by jrantav

    JBoss AS7 Snapshot: module installation cannot find property file within module

    jrantav

      Been using Aries JNDI as a deployment, which works fine. However, on installing it as a module I get

       

      17:59:59,739 INFO  [org.jboss.osgi.framework] (MSC service thread 1-7) JBOSGI011002: Bundle started: osgi-simple-service:0.0.1.SNAPSHOT

      17:59:59,737 ERROR [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011026: Framework Error: org.osgi.framework.BundleException: JBOSGI011254: Cannot start bundle: org.apache.aries.jndi:0.0.0

              at org.jboss.osgi.framework.spi.AbstractBundleAdaptor.start(AbstractBundleAdaptor.java:190) [jbosgi-framework-core-2.0.1.Final.jar:2.0.1.Final]

              at org.jboss.osgi.framework.internal.DefaultStartLevelPlugin.increaseStartLevel(DefaultStartLevelPlugin.java:265) [jbosgi-framework-core-2.0.1.Final.jar:2.0.1.Final]

              at org.jboss.osgi.framework.internal.FrameworkActive.start(FrameworkActive.java:131) [jbosgi-framework-core-2.0.1.Final.jar:2.0.1.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]

      Caused by: java.lang.ExceptionInInitializerError

              at org.apache.aries.jndi.startup.Activator.start(Activator.java:81)

              at org.apache.aries.jndi.priv.Activator.start(Activator.java:38)

              at org.jboss.osgi.framework.spi.AbstractBundleAdaptor.start(AbstractBundleAdaptor.java:181) [jbosgi-framework-core-2.0.1.Final.jar:2.0.1.Final]

              ... 7 more

      Caused by: java.util.MissingResourceException: Can't find bundle for base name org.apache.aries.jndi.nls.jndiMessages, locale en_US

              at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1499) [rt.jar:1.7.0_07]

              at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1322) [rt.jar:1.7.0_07]

              at java.util.ResourceBundle.getBundle(ResourceBundle.java:724) [rt.jar:1.7.0_07]

              at org.apache.aries.util.nls.MessageUtil.createMessageUtil(MessageUtil.java:144)

              at org.apache.aries.util.nls.MessageUtil.createMessageUtil(MessageUtil.java:107)

              at org.apache.aries.jndi.Utils.<clinit>(Utils.java:48)

              ... 10 more

       

      I can see jndiMessages.properties in org/apache/aries/jndi/nls package within the .jar. Maybe I'd need to specify it separately in module.xml resources section, but how?

        • 1. Re: JBoss AS7 Snapshot: module installation cannot find property file within module
          jrantav

          The problem was actually a bit different. Aries JNDI calls Aries Util with text string that defines which property file (given in the format of class name) to load. Aries JNDI has a dependency to Aries Util, but Util doesn't have reference to JNDI, so it isn't aware of the property file and thus fails to find it.

           

          I have worked around it by adding an optional dependency of JNDI to Util in module.xml (whereas it is mandatory the other way around). This seems to work.