Details

      Description

      Some Application Servers may not be able to load Module Framework, like JBoss EAP 5.1 (because of JBoss BUG). That makes portal unusable. This story allows portal to continue by using dummy implementation of module framework.

      Exception:

      java.lang.IllegalArgumentException: URI is not hierarchical
              at java.io.File.<init>(File.java:392)
              at org.jboss.net.protocol.file.FileURLConnection.<init>(FileURLConnection.java:85)
              at org.jboss.net.protocol.file.Handler.openConnection(Handler.java:40)
              at java.net.URL.openConnection(URL.java:971)
              at sun.net.www.protocol.jar.JarURLConnection.<init>(JarURLConnection.java:84)
              at sun.net.www.protocol.jar.Handler.openConnection(Handler.java:41)
              at java.net.URL.openConnection(URL.java:971)
              at java.net.URL.openStream(URL.java:1037)
              at org.eclipse.osgi.baseadaptor.HookRegistry.mergeFileHookConfigurators(HookRegistry.java:123)
              at org.eclipse.osgi.baseadaptor.HookRegistry.initialize(HookRegistry.java:98)
              at org.eclipse.osgi.baseadaptor.BaseAdaptor.<init>(BaseAdaptor.java:98)
              at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:67)
              at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
              at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
              at com.liferay.osgi.bootstrap.ModuleFrameworkImpl.startFramework(ModuleFrameworkImpl.java:384)
      ...
      

      What is that URL with a problem? Its this one:

      file:D:/java/jboss-eap-5.2/jboss-as/server/default/work/jboss.web/localhost/_/osgi/org.eclipse.osgi.jar
      

      JBoss 5 does not like URLs like this - actually this exception is thrown by File() constructor, as URL is opaque. It has to be like this:

      file:/D:/java/...
      

      When url is opaque (without a path), JBoss will throw this exception.

      Can we change this URL from the outside? There are two framework properties that looks relevant:

      • osgi.install.area
      • osgi.framework

      However, changing them to please JBoss does NOT fix the issue, as they are not used.

      The core problem is in org.eclipse.osgi.baseadaptor.HookRegistry, method mergeFileHookConfigurators. There is a code like this:

      hookConfigurators = cl != null ? cl.getResources(HookRegistry.HOOK_CONFIGURATORS_FILE) : ClassLoader.getSystemResources(HookRegistry.HOOK_CONFIGURATORS_FILE);
      while (hookConfigurators.hasMoreElements()) {
      
      URL url = (URL) hookConfigurators.nextElement();
      InputStream input = null;
      ...
      input = url.openStream();
      

      getResources() returns Enumeration of URLs that JBoss doesn't like.

      The JBoss patch can be activated with:

      JAVA_OPTS=-Dorg.jboss.net.protocol.file.useURI=false 
      

      See:

      Finally, this brings new osgi-related exceptions related to version syntax of system packages.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                edwin.chung Edwin Chung
                Reporter:
                igor.spasic Igor Spasic
                Recent user:
                Shalaka Tendulkar
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: