[JBoss JIRA] (GTNPORTAL-2790) Potential NPE with Tomcat 7 in developing mode
by Hai Nguyen (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2790?page=com.atlassian.jira.pl... ]
Hai Nguyen updated GTNPORTAL-2790:
----------------------------------
Attachment: portal.xml
> Potential NPE with Tomcat 7 in developing mode
> ----------------------------------------------
>
> Key: GTNPORTAL-2790
> URL: https://issues.jboss.org/browse/GTNPORTAL-2790
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.0.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
> Attachments: portal.xml
>
>
> In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
> But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
> We should use URLConnection.getLastModified instead of use getRealPath and File api
> Step to reproduce:
> - Move webapps/portal.war to wars/portal.war
> - Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
> - Start bin/gatein-dev.sh run
> And go to home page, the NPE occurs:
> java.lang.NullPointerException
> at java.io.File.<init>(File.java:222)
> at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
> at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
> at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
> ...............
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (GTNPORTAL-2790) Potential NPE with Tomcat 7 in developing mode
by Hai Nguyen (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2790?page=com.atlassian.jira.pl... ]
Hai Nguyen updated GTNPORTAL-2790:
----------------------------------
Description:
In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
We should use URLConnection.getLastModified instead of use getRealPath and File api
Step to reproduce:
- Move webapps/portal.war to wars/portal.war
- Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
- Start bin/gatein-dev.sh run
And go to home page, the NPE occurs:
java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
...............
was:
In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
We should use URLConnection.getLastModified instead of use getRealPath and File api
Step to reproduce:
- Move webapps/portal.war to wars/portal.war
- Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
- Start bin/gatein-dev.sh run
And go to home page, the NPE occurs:
java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
...............
> Potential NPE with Tomcat 7 in developing mode
> ----------------------------------------------
>
> Key: GTNPORTAL-2790
> URL: https://issues.jboss.org/browse/GTNPORTAL-2790
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.0.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
>
> In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
> But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
> We should use URLConnection.getLastModified instead of use getRealPath and File api
> Step to reproduce:
> - Move webapps/portal.war to wars/portal.war
> - Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
> - Start bin/gatein-dev.sh run
> And go to home page, the NPE occurs:
> java.lang.NullPointerException
> at java.io.File.<init>(File.java:222)
> at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
> at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
> at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
> ...............
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (GTNPORTAL-2790) Potential NPE with Tomcat 7 in developing mode
by Hai Nguyen (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2790?page=com.atlassian.jira.pl... ]
Hai Nguyen updated GTNPORTAL-2790:
----------------------------------
Description:
In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
We should use URLConnection.getLastModified instead of use getRealPath and File api
Step to reproduce:
- Move webapps/portal.war to wars/portal.war
- Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
- Start bin/gatein-dev.sh run
And go to home page, the NPE occurs:
java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
...............
was:
In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
We should use URLConnection.getLastModified instead of use getRealPath and File api
> Potential NPE with Tomcat 7 in developing mode
> ----------------------------------------------
>
> Key: GTNPORTAL-2790
> URL: https://issues.jboss.org/browse/GTNPORTAL-2790
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 3.5.0.Final
> Reporter: Hai Nguyen
> Assignee: Hai Nguyen
>
> In tomcat 7, the wars does not locate at "appBase" which is not unpacked.
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51294
> But in ServletResourceResolver.isModified, we used ServletContext.getRealPath to get absolute path's file resource which will return NULL. Due to the WAR was not upacked.
> We should use URLConnection.getLastModified instead of use getRealPath and File api
> Step to reproduce:
> - Move webapps/portal.war to wars/portal.war
> - Replace docBase to '${catalina.home}/wars/portal.war' in conf/Catalina/localhost/portal.xml
> - Start bin/gatein-dev.sh run
> And go to home page, the NPE occurs:
> java.lang.NullPointerException
> at java.io.File.<init>(File.java:222)
> at org.exoplatform.resolver.ServletResourceResolver.isModified(ServletResourceResolver.java:77)
> at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:106)
> at org.exoplatform.portal.webui.workspace.UIPortalApplicationLifecycle.processRender(UIPortalApplicationLifecycle.java:124)
> ...............
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] (GTNPORTAL-2789) Declare metadata-complete=true in web.xml to reduce webapp deploying time during startup
by Minh Hoang TO (JIRA)
[ https://issues.jboss.org/browse/GTNPORTAL-2789?page=com.atlassian.jira.pl... ]
Minh Hoang TO updated GTNPORTAL-2789:
-------------------------------------
Description:
For web application which does not configure servlet/filter via annotation/web-fragment, it is better to put the attribute metadata-complete=true to <web-app> element. In this way, servlet3-compliant server will not take time to scan the whole web application for annotated servlet/filter and web-fragment.
> Declare metadata-complete=true in web.xml to reduce webapp deploying time during startup
> ----------------------------------------------------------------------------------------
>
> Key: GTNPORTAL-2789
> URL: https://issues.jboss.org/browse/GTNPORTAL-2789
> Project: GateIn Portal
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Reporter: Minh Hoang TO
>
> For web application which does not configure servlet/filter via annotation/web-fragment, it is better to put the attribute metadata-complete=true to <web-app> element. In this way, servlet3-compliant server will not take time to scan the whole web application for annotated servlet/filter and web-fragment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months