You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marko Asplund (JIRA)" <de...@myfaces.apache.org> on 2007/03/27 09:37:33 UTC
[jira] Created: (TOMAHAWK-940)
StreamingAddResource.addInlineScriptAtPosition throws NPE
StreamingAddResource.addInlineScriptAtPosition throws NPE
---------------------------------------------------------
Key: TOMAHAWK-940
URL: https://issues.apache.org/jira/browse/TOMAHAWK-940
Project: MyFaces Tomahawk
Issue Type: Bug
Components: ExtensionsFilter
Affects Versions: 1.1.5-SNAPSHOT
Environment: - Oracle JDeveloper 10.1.3.2.0
- OC4J 10.1.3.1.1 (embedded)
- JSF RI 1.1_01 and MyFaces Core 1.1.5
Reporter: Marko Asplund
When I run the following code with the StreamingAddResource
final String viewId = "/jsp/reportLoad.jspx";
FacesContext facesContext = FacesContext.getCurrentInstance();
ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
String actionUrl = viewHandler.getActionURL(facesContext, viewId);
String javaScriptText = "alert('ehlo');";
AddResource addResource = AddResourceFactory.getInstance(facesContext);
addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);
I get an NPE. This doesn't happen with the default AddResource implementation. Same thing happens with JSF RI and MyFaces Core.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOMAHAWK-940)
StreamingAddResource.addInlineScriptAtPosition throws NPE
Posted by "Marko Asplund (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484342 ]
Marko Asplund commented on TOMAHAWK-940:
----------------------------------------
Here's the stack trace:
500 Internal Server Error
javax.faces.FacesException: java.lang.NullPointerException
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:103)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:620)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
at javax.faces.component.UICommand.broadcast(UICommand.java:89)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
... 23 more
Caused by: java.lang.NullPointerException
at org.apache.myfaces.component.html.util.StreamingAddResource$InlineScriptPositionedInfo.writePositionedInfo(StreamingAddResource.java:1111)
at org.apache.myfaces.component.html.util.StreamingAddResource.addInlineScriptAtPosition(StreamingAddResource.java:592)
at fi.medicidata.mdr.web.backing.ReportSelectionHandler.fetchReport(ReportSelectionHandler.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
... 27 more
> StreamingAddResource.addInlineScriptAtPosition throws NPE
> ---------------------------------------------------------
>
> Key: TOMAHAWK-940
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-940
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: ExtensionsFilter
> Affects Versions: 1.1.5-SNAPSHOT
> Environment: - Oracle JDeveloper 10.1.3.2.0
> - OC4J 10.1.3.1.1 (embedded)
> - JSF RI 1.1_01 and MyFaces Core 1.1.5
> Reporter: Marko Asplund
>
> When I run the following code with the StreamingAddResource
> final String viewId = "/jsp/reportLoad.jspx";
> FacesContext facesContext = FacesContext.getCurrentInstance();
> ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
> String actionUrl = viewHandler.getActionURL(facesContext, viewId);
> String javaScriptText = "alert('ehlo');";
> AddResource addResource = AddResourceFactory.getInstance(facesContext);
> addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);
> I get an NPE. This doesn't happen with the default AddResource implementation. Same thing happens with JSF RI and MyFaces Core.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.