resource bundle loading

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

resource bundle loading

William DeCoste
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
[hidden email]

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

Brian Stansberry
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
> [hidden email]
>
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

William DeCoste
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
>> [hidden email]
>>
>>
>>
>> _______________________________________________
>> jboss-as7-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>

--
Bill DeCoste
Principal Software Engineer, Red Hat
978-204-0920
[hidden email]

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

Brian Stansberry
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
>>> [hidden email]
>>>
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

William DeCoste
OK, thanks. Pls let me know if there's anything I can do to help.

On 1/5/12 8: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
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>

--
Bill DeCoste
Principal Software Engineer, Red Hat
978-204-0920
[hidden email]

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

David Lloyd-2
In reply to this post by Brian Stansberry
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
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>>
>
>


--
- DML
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

William DeCoste
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
>>>>> [hidden email]
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>

--
Bill DeCoste
Principal Software Engineer, Red Hat
978-204-0920
[hidden email]

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

William DeCoste
In reply to this post by David Lloyd-2
Same problem with no OSGi. One interesting note .. deploying this .war
breaks the console ... the page just comes up empty.

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
>>>>> [hidden email]
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> [hidden email]
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>

--
Bill DeCoste
Principal Software Engineer, Red Hat
978-204-0920
[hidden email]

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

Rémy Maucherat
On Thu, 2012-01-05 at 09:26 -0800, William DeCoste wrote:
> Same problem with no OSGi. One interesting note .. deploying this .war
> breaks the console ... the page just comes up empty.

Yes, if you deploy your trojan webapp on startup, AS is essentially dead
since web cannot load any strings.

--
Remy Maucherat <[hidden email]>
Red Hat Inc

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

Brian Stansberry
On 1/5/12 11:32 AM, Remy Maucherat wrote:
> On Thu, 2012-01-05 at 09:26 -0800, William DeCoste wrote:
>> Same problem with no OSGi. One interesting note .. deploying this .war
>> breaks the console ... the page just comes up empty.
>
> Yes, if you deploy your trojan webapp on startup, AS is essentially dead
> since web cannot load any strings.
>

I doubt the AS can load anything, not just the resource bundles. It
can't create a jar URL so anything that's in a jar (e.g. a .class file)
likely can't be loaded.


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: resource bundle loading

Brian Stansberry
In reply to this post by Brian Stansberry
I've filed a bug report against Felix, as further review shows this is
not an AS bug. The bug report has all the nitty-gritty details:

https://issues.apache.org/jira/browse/FELIX-3296

On 1/5/12 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
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> jboss-as7-dev mailing list
>>>> [hidden email]
>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>>
>
>


--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev