voyent
liferay and inputFile ( <ice:portlet> ) problem  XML
Forum Index -> Portals & Portlets
Author Message
h_aptioglu

Joined: 23/Jun/2007 00:00:00
Messages: 45
Offline


hi all

i use icefaces with liferay
i had navigation problem in liferay thats why i remove all html components
(html,body...) and i used <ice:portlet> so it sloved but when i remove <html> this time my fileupload doesn't work :(

is it known issue about using inputFile with <ice:portlet>

icefaces 1.7 DR1
liferay 4.3.4

and here is my jspx
Code:
<?xml version="1.0"  ?>
 <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ice="http://www.icesoft.com/icefaces/component"
 	xmlns:f="http://java.sun.com/jsf/core" version="2.0">
 
 	<f:view>
 		<ice:portlet>
 			<ice:outputDeclaration doctypeRoot="HTML"
 				doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
 				doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />
 			<ice:form>
 				<ice:inputFile id="inputFileComponent" file="#{deneme.file}"
 					progressListener="#{deneme.progress}" />
 				<ice:message for="inputFileComponent" />
 				<ice:outputProgress label="Uploading" value="#{deneme.percent}" />
 				<ice:outputText value="#{deneme.fileLocation}" />
 			</ice:form>
 		</ice:portlet>
 	</f:view>
 </jsp:root>


and deneme.java is
Code:
public class Deneme {
 	private File file;
 	private String fileLocation;
 	private int percent;
 	private PersistentFacesState state;
 	public Deneme() {
 		state = PersistentFacesState.getInstance();
 	}
 	public File getFile() {
 		return file;
 	}
 	public String getFileLocation() {
 		return fileLocation;
 	}
 	public int getPercent() {
 		return percent;
 	}
 	public void setFile(File file) {
 		this.file = file;
 		fileLocation = file.getPath();
 	}
 	public void setPercent(int percent) {
 		this.percent = percent;
 	}
 	// Required to bind the InputFile component to its OutputProgress component.
 	public void progress(EventObject event) {
 		InputFile inputFileComponent = (InputFile) event.getSource();
 		percent = inputFileComponent.getFileInfo().getPercent();
 		try {
 			if (state != null) {
 				state.render();
 			}
 		} catch (RenderingException ee) {
 			System.out.println(ee.getMessage());
 		}
 	}
 
 }


and error
Code:
17:13:37,834 WARN  [UploadServer] File upload failed
 java.lang.NullPointerException
 	at com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:70)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:194)
 	at com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:48)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
 	at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 	at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:116)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 	at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
 	at java.lang.Thread.run(Thread.java:595)
 17:13:37,834 ERROR [[Persistent Faces Servlet]] Servlet.service() for servlet Persistent Faces Servlet threw exception
 java.lang.NullPointerException
 	at com.icesoft.faces.webapp.http.core.UploadServer$2$1.writeTo(UploadServer.java:94)
 	at com.icesoft.faces.webapp.http.common.standard.StreamingContentHandler.respond(StreamingContentHandler.java:24)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:143)
 	at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
 	at com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:92)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:194)
 	at com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:48)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
 	at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 	at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:116)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 	at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
 	at java.lang.Thread.run(Thread.java:595)
 17:13:37,834 ERROR [[uploadServlet]] Servlet.service() for servlet uploadServlet threw exception
 java.lang.NullPointerException
 	at com.icesoft.faces.webapp.http.core.UploadServer$2$1.writeTo(UploadServer.java:94)
 	at com.icesoft.faces.webapp.http.common.standard.StreamingContentHandler.respond(StreamingContentHandler.java:24)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:143)
 	at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
 	at com.icesoft.faces.webapp.http.core.UploadServer$2.servlet(UploadServer.java:92)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.detectEnvironment(ServletRequestResponse.java:194)
 	at com.icesoft.faces.webapp.http.core.UploadServer.service(UploadServer.java:48)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
 	at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 	at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:116)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:76)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 	at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
 	at java.lang.Thread.run(Thread.java:595)


thenks
h_aptioglu

Joined: 23/Jun/2007 00:00:00
Messages: 45
Offline


no response ?
:(
okan1

Joined: 14/Nov/2006 00:00:00
Messages: 9
Offline


I also have the same problem.
Any idea?

Regards,
Okan.
h_aptioglu

Joined: 23/Jun/2007 00:00:00
Messages: 45
Offline


i found this is fixed 1.7 DR2
thanks for your help !
Ragnarok

Joined: 27/Jan/2008 00:00:00
Messages: 12
Offline


h_aptioglu, can you show me a minimal working web.xml, portlet.xml and any xml needed to get working the inputfile, i have version 1.7.0 rc1, i have icefaces and facelets working, but input file not :(

Thanks!!!
h_aptioglu

Joined: 23/Jun/2007 00:00:00
Messages: 45
Offline


Ragnarok wrote:
h_aptioglu, can you show me a minimal working web.xml, portlet.xml and any xml needed to get working the inputfile, i have version 1.7.0 rc1, i have icefaces and facelets working, but input file not :(

Thanks!!! 


i didnt try it on 1.7.0 rc1 i tried on 1.7 DR2 and i did nothing special for inputfile just a normal portlet conf.

Recy

Joined: 31/Jan/2010 00:00:00
Messages: 1
Offline


Same problem here. I am using IceFaces 1.82. It works fine in a non portlet application, but in a portlet I get the same error as h_aptioglu.
Could some one post a working example of the <ice:inputFile> component in a portlet.

Tnx
robermaco

Joined: 23/Mar/2009 00:00:00
Messages: 2
Offline


Hello,

I have the same problem with a portlet. Why de <ice:inputFile> componet fails in a portlet? I'm using icefaces 1.8.1 and liferay 5.2.3

Thank's

 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team