voyent
Messages posted by: rowe  XML
Profile for rowe -> Messages posted by rowe [12]
Author Message
I saw this recently while running some Selenium tests.
The tests click very fast and I assume that the tests clicked too fast for the server to update something.
Just posting this in case someone else runs into the same problem.

Robert

Code:
 [#|2013-01-07T11:50:03.788-0600|SEVERE|glassfish3.1.2|org.icefaces.util.DOMUtil|_ThreadID=23;_ThreadName=Thread-3;|Pruning failure
 java.lang.NullPointerException
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:530)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.compareNodes(DOMUtils.java:603)
     at org.icefaces.impl.util.DOMUtils.nodeDiff(DOMUtils.java:494)
     at org.icefaces.impl.util.DOMUtils.domDiff(DOMUtils.java:461)
     at org.icefaces.impl.context.DOMPartialViewContext.domDiff(DOMPartialViewContext.java:307)
     at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:149)
     at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:978)
     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
     at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:411)
     at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
     at com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
     at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
     at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
     at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
     at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
     at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
     at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
     at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
     at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
     at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
     at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
     at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
     at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
     at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
     at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:680)
 |#]
 
I see this in Icefaces 3.2 as well. I am trying to port an Icefaces 1.8 application to 3.2 and have the same problem -- the error does not say which component it does not like.

I downloaded the Icefaces source code and changed
compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/OutputTextRenderer.java to include the path to the offending component (see attached patch). After running ant compat I copied the new icefaces-compat.jar into my WEB-INF/lib/ and rebuild my war.

After adding enough of id=... attributes I could find out which outputText actually did have a null value.

Turns out some "" gets treated as null and I had to add the rendered attribute to get it to not crash.
Code:
<ice:outputText id="Hint" rendered="#{!empty page.hint}" value="#{page.hint}"/>


Hope this helps.

Robert
Great, thanks, that worked.

However, I'd like to keep the jspx extension for my pages. This is an existing project and the files are named .jspx for historical reasons. I am afraid that SVN won't handle the big rename in the branch very well when merging.

Code:
     <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jspx</url-pattern>
     </servlet-mapping>
 
     <context-param>
         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
         <param-value>.jspx</param-value>
     </context-param>
 


I added this to web.xml but this gets me the NullPointerException again. It only works with the page renamed to .xhtml.

How can I keep the jspx extension?

Thanks,

Robert

achutak wrote:

<ice:outputText id="marks" value="Welcome to ICEfaces 3"/>
<ice:outputText id="marks" value="hai"></h:outputText>
...
11:16:04,871 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http--127.0.0.1-8080-1) JSF1007: Duplicate component ID j_idt7:marks found in view.
 


Looks like you use the same ID ("marks") twice. Change one of them.

Robert
Using Glassfish 3.1.2.2 and Icefaces 3.2, the attached minimal example project crashes with a NullPointerException in org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:80) on Mac OS 10.8.1.

Code:
 tar xzvf npe.tgz
 cd npe
 export DEPLOY_DIR=/Users/robert/glassfish3/glassfish/domains/domain1/autodeploy
 ant clean npe.war
 


then point your browser to http://127.0.0.1:8080/npe

Code:
 [#|2012-11-16T18:26:51.553-0600|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=17;_ThreadName=Thread-3;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
 java.lang.NullPointerException
         at org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:80)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:680)
 |#]
 


This is a new installation of Glassfish using default values.

What am I missing?

Robert
Hey,

I am porting an Icefaces 1.8.2 application to 3.2.
The old code used the view number as in
Code:
 ((BridgeFacesContext) FacesContext.getCurrentInstance()).getViewNumber()

to tell browser tabs apart, but I cannot find BridgeFacesContext in either Icefaces 3 nor the compatibility jars.
What's the Icefaces 3 way to tell browser tabs apart?

(Background: I want to at most one tab of a certain configuration page open so that people don't overwrite each others changes, or, for that matter, that one user doesn't overwrite his own changes in a different tab.)

Any pointers appreciated.

Robert
Hi,

I ran into problems Icefaces 1.8.2 with Icefaces extended request scoped beans implementing DisposableBean: when I tried to get an application scoped bean from the faces context, I'd always get a NullPointerException. Turned out that FacesContext.getCurrentInstance() already returned null. I assume dispose() is called asynchronously and the context is already destroyed?

I can work around that by getting a reference to the object I need when the bean is created. However, it would be nice if limitations and potential pitfalls like this would be mentioned in the DisposableBean javadoc.

Anything else that's not obvious and that I still should NOT do in dispose()?

In particular, can I still trigger a Ajax push request via executeAndRender()? Should be safe since dispose() seems to have its own thread?

Thanks,

Robert
For using enter to close a popup (i.e., if a user presses Enter in a text field in a popup, assume the user clicked the Ok button or Save button):

In the page:
Code:
 <ice:panelPopup id="myPopup" rendered="true" visible="#{mybean.showPopup}" modal="true">
 
     <f:facet name="header">Popup</f:facet>
 
     <f:facet name="body">
         <ice:inputText id="foo" size="40" value="#{mybean.fooval}" action="#{mybean.myPopupPressEnter}">
             <f:attribute name="fieldRef" value="..." />
         </ice:inputText>
 
         <ice:commandButton id="PopupSave" image="images/bttn_save.gif" action="#{mybean.popupPressEnter}" partialSubmit="true"/>
         <ice:commandButton id="PopupCancel" image="images/bttn_cancel.gif" actionListener="#{mybean.myPopupCancel}" immediate="true"/>
      </f:facet>  
 </ice:panelPopup>
 


In Java:
Code:
     private boolean showPopup = false;
 
     public boolean getShowPopup() {
         return showPopup;
     }
 
     public void setShowPopup(boolean b) {
         showPopup = b;
     }
 
     public void myPopupPressEnter() {
         myPopupSave(null);
     }
      
     public void myPopupSave(ActionEvent e) {
         // ...
         showPopup = false;
     }
 
     public void myPopupCancel(ActionEvent e) {
         // ...
         showPopup = false;
     }
 


Robert
I see similar behavior here.

With 1.6.1, for each DnD event I got event.getTargetDropValue() and event.getTargetDragValue() would return the same object.

With 1.7 RC1 build 7 revision 16090, I can drag & drop tree nodes even if they are command links, and I see the source and destination node elements (almost) as expected.

I also get a cornucopia of DnD events for dragging the tree node named src onto dest:

drag-handler src to dest
drop-handler src to dest

This is what I expected. But it doesn't stop here, I get these as well:

drag-handler dest to src
drop-handler dest to src
drag-handler src to dest
drop-handler src to dest
drag-handler dest to src
drop-handler dest to src

The eventType() for these is always 3, which DndEvent.getEventName() translates to 'dropped'.
From printing to System.err I see in the Glassfish logs that the first 4 events have the same _RequestID, and the second 4 also have the same (but different from the first) _RequestID.
Source of the event is always the same HtmlPanelGroup.

If I do not use a command link in the tree nodes I get only half of the events, i.e. only the first 4 in the list above.

I am confused about the additional events, especially about those that seem to indicate a "reverse" drag & drop action. Why are these events sent? Also, I wonder why using commandLinks in the tree duplicates the events. What am I missing here?

Any pointers appreciated.

Robert
Hi,

I am looking for a control that lets users pick files on the server.

Imagine a managing your homepage though an ICEfaces web UI: navigate folders, pick a file to edit (or delete, or rename, or move), create new files, and so on.

I searched with Google and in this forum but all I found were file upload components.

Is there a component for server-side file system navigation?
If not, has anyone else encountered this problem and what did you do about it?

Any pointers appreciated.

Robert
Hi,

I have a modal panelPopup with a text input field and two buttons, Ok and Cancel.

Entering text and hitting <Enter> has the same effect as clicking the Ok button: I defined an action property pointing to a method that called the method connected to the Ok button. Works.

How can I have <Escape> do the same as clicking the Cancel button?

I searched the forums and the web, but didn't find anything useful.

Any pointers appreciated.

Robert
I noticed that JWebUnit seems to have problems with dynamic changes to the DOM tree, e.g. checking for static text and links is fine, but if your code e.g. adds an item to a selectManyCheckbox, JWebUnit doesn't see that.

Robert
 
Profile for rowe -> Messages posted by rowe [12]
Go to:   
Powered by JForum 2.1.7ice © JForum Team