[jboss-as7-dev] resource bundle loading

William DeCoste wdecoste at redhat.com
Thu Jan 5 11:45:34 EST 2012


I'll give that a shot

On 1/5/12 8:43 AM, David M. Lloyd wrote:
> For a workaround, would removing the OSGi subsystem suffice?
>
> On 01/05/2012 10:34 AM, Brian Stansberry wrote:
>> It's too early to say. Looking at that Felix URLHandlers class it seems
>> to be making some attempt to delegate back to our
>> URLStreamHandlerFactory that its reflection hack replaced. I'm not sure
>> why that doesn't work; it will take some time to debug, since it
>> requires me to debug the Felix code.
>>
>> On 1/5/12 9:53 AM, William DeCoste wrote:
>>> Thanks Brian.
>>>
>>> Safe to say this is a problem with the .war and not AS7 even though it
>>> deploys and runs in EAP5? I hate to say something used to work, but
>>> doesn't anymore.
>>>
>>> -Bill
>>>
>>> On 1/4/12 8:23 PM, Brian Stansberry wrote:
>>>> What's happening is this lovely stuff in apache felix that gets run when
>>>> this war gets deployed:
>>>>
>>>> http://trac.i2p2.de/browser/src/main/java/org/apache/felix/framework/URLHandlers.java?rev=c22c723ed3b4996126d8eaf319aaf86d7aeba45f#L177
>>>>
>>>> Basically if it finds a URLStreamHandlerFactory registered with
>>>> java.net.URL it uses reflection to make the static field in the URL
>>>> class null so it can replace it with it's own factory.
>>>>
>>>> That's breaking the AS since it's evil and all.
>>>>
>>>> When JBoss Modules tries to create a URL out of
>>>> jar:file:/Users/bstansberry/dev/jbossas/bootstrap/jboss-as/build/target/jboss-as-7.1.0.Final-SNAPSHOT/modules/org/jboss/as/web/main/jbossweb-7.0.7.Final.jar!/org/apache/tomcat/util/http/res/LocalStrings.properties
>>>>
>>>>
>>>> the felix URLStreamHandler throws
>>>>
>>>> java.net.MalformedURLException: Unknown protocol: jar
>>>>
>>>> The net result is the ResourceBundle can't load.
>>>>
>>>> On 1/4/12 6:03 PM, William DeCoste wrote:
>>>>> Hi all,
>>>>>
>>>>> I've got a war ( org.apache.sling.launchpad-6.war from
>>>>> http://sling.apache.org/site/downloads.cgi) that deploys and functions
>>>>> properly in EAP5, but fails in AS7. In AS7, the war deploys without
>>>>> error but when accessing
>>>>> http://localhost:8080/org.apache.sling.launchpad-6 the web app fails
>>>>> with an NPE (stacktrace below). Looks like a resource bundle is not
>>>>> being loaded in AS7. This issue originally came up with an Express user,
>>>>> but is recreatable outside of Express.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Do I need to explicitly list the resource bundle jar in AS7?
>>>>>
>>>>> Thanks -Bill
>>>>>
>>>>> 17:13:07,607 INFO [org.jboss.as.server.controller]
>>>>> (DeploymentScanner-threads - 2) Deployed "org.apache.sling.launchpad-6.war"
>>>>> 17:13:08,740 ERROR [stderr] (FelixStartLevel) 2012-01-02 22:13:08.739
>>>>> GMT Thread[FelixStartLevel,5,main] java.io.FileNotFoundException:
>>>>> derby.log (Permission denied)
>>>>>
>>>>> I have noticed the error on the last line, but that should not, by my
>>>>> experience, cause the app to fail completely. However, when attempting
>>>>> to request http://appname-namespace.rhcloud.com, the following is logged:
>>>>>
>>>>> 17:15:26,654 ERROR [org.apache.catalina.connector.CoyoteAdapter]
>>>>> (http--127.1.0.129-8080-1) An exception or error occurred in the
>>>>> container during the request processing: java.lang.NullPointerException
>>>>> at
>>>>> org.apache.tomcat.util.res.StringManager.getString(StringManager.java:113)
>>>>> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
>>>>> at
>>>>> org.apache.tomcat.util.http.HttpMessages.getMessage(HttpMessages.java:68) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
>>>>> at
>>>>> org.apache.coyote.http11.InternalOutputBuffer.getMessage(InternalOutputBuffer.java:463)
>>>>> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
>>>>> at
>>>>> org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:430)
>>>>> [jbossweb-7.0.1.Final.jar:7.0.2.Final]
>>>>>
>>>>>
>>>>> --
>>>>> Bill DeCoste
>>>>> Principal Software Engineer, Red Hat
>>>>> 978-204-0920
>>>>> wdecoste at redhat.com
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>

-- 
Bill DeCoste
Principal Software Engineer, Red Hat
978-204-0920
wdecoste at redhat.com



More information about the jboss-as7-dev mailing list