incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Gibbons" <cgibb...@solutionstream.com>
Subject RE: Newbie problem on startup
Date Wed, 07 Mar 2007 19:59:04 GMT
I assume you are trying to use the <tr:inputFile> tag?  There is a whole section of context-param
sections that need to be added for this tag, and I didn't see them in your web.xml.  In the
Dev Guide in the Trinidad podling page, there is a very well written guide to setting up the
values for using the inputFile tag.  It can be found at:

http://incubator.apache.org/adffaces/devguide/fileUpload.html

-Chris

-----Original Message-----
From: Juan Giovanolli [mailto:juan.giovanolli@santexgroup.com] 
Sent: Wednesday, March 07, 2007 11:37 AM
To: adffaces-user@incubator.apache.org
Subject: Newbie problem on startup

Hi:
    I'm a newbie with Trinidad and I'm getting this error when I'm trying to
enter to my app:
[code]
14:22:57,640 ERROR [SeamExceptionFilter] uncaught exception
java.lang.ClassCastException:
org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl
	at
org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.init(Globa
lConfiguratorImpl.java:343)
	at
org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginReque
st(GlobalConfiguratorImpl.java:187)
	at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(Trini
dadFilterImpl.java:125)
	at
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.ja
va:93)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:92)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:122)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java
:43)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:2
9)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilte
r.java:75)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:21
3)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.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(CachedConnectionVa
lve.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.processC
onnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
	at java.lang.Thread.run(Thread.java:595)
14:22:57,703 INFO  [Exceptions] reading exception mappings from
/WEB-INF/exceptions.xml
14:22:58,296 ERROR [DebugPageHandler] redirecting to debug page
java.lang.ClassCastException:
org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl
	at
org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.init(Globa
lConfiguratorImpl.java:343)
	at
org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginReque
st(GlobalConfiguratorImpl.java:187)
	at
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(Trini
dadFilterImpl.java:125)
	at
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.ja
va:93)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:92)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsF
ilter.java:122)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java
:43)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:2
9)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilte
r.java:75)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:21
3)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.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(CachedConnectionVa
lve.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.processC
onnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
	at java.lang.Thread.run(Thread.java:595)
14:22:58,312 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces
Servlet threw exception java.lang.NullPointerException
	at
org.jboss.seam.core.ConversationEntry.<init>(ConversationEntry.java:44)
	at
org.jboss.seam.core.ConversationEntries.createConversationEntry(Conversation
Entries.java:50)
	at
org.jboss.seam.core.Manager.createConversationEntry(Manager.java:649)
	at org.jboss.seam.core.Manager.beforeRedirect(Manager.java:796)
	at
org.jboss.seam.exceptions.DebugPageHandler.handle(DebugPageHandler.java:25)
	at org.jboss.seam.core.Exceptions.handle(Exceptions.java:67)
	at
org.jboss.seam.servlet.SeamExceptionFilter.endWebRequestAfterException(SeamE
xceptionFilter.java:77)
	at
org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java
:59)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:2
9)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilte
r.java:75)
	at
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:21
3)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
va:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
ationValve.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(CachedConnectionVa
lve.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.processC
onnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
ad.java:112)
	at java.lang.Thread.run(Thread.java:595)
[/code]

My web.xml is:

[code]
<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
	version="2.4">

	<session-config>
		<session-timeout>30</session-timeout>
	</session-config>

	<context-param>
		<param-name>javax.faces.CONFIG_FILES</param-name>
		<param-value>/WEB-INF/navigation.xml</param-value>
	</context-param>

	<!--*************** Ajax4jsf (must come first!)
********************-->
	<filter>
		<display-name>Ajax4jsf Filter</display-name>
		<filter-name>ajax4jsf</filter-name>
		<filter-class>org.ajax4jsf.Filter</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>ajax4jsf</filter-name>
		<url-pattern>*.seam</url-pattern>
	</filter-mapping>

	<context-param>
		<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
		<param-value>
			org.jboss.seam.ui.facelet.SeamFaceletViewHandler
		</param-value>
	</context-param>


	<!--********************* Seam ******************************-->
	<listener>
		<listener-class>
			org.jboss.seam.servlet.SeamListener
		</listener-class>
	</listener>

	<!-- Propagate conversations across redirects -->
	<filter>
		<filter-name>Seam Redirect Filter</filter-name>
		<filter-class>
			org.jboss.seam.servlet.SeamRedirectFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>Seam Redirect Filter</filter-name>
		<url-pattern>*.seam</url-pattern>
	</filter-mapping>

	<filter>
		<filter-name>Seam Exception Filter</filter-name>
		<filter-class>
			org.jboss.seam.servlet.SeamExceptionFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>Seam Exception Filter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>


	<!--********************* JSF ******************************-->
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>client</param-value>
	</context-param>

	<context-param>
		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
		<param-value>.xhtml</param-value>
	</context-param>

	<context-param>
		<param-name>facelets.DEVELOPMENT</param-name>
		<param-value>true</param-value>
	</context-param>

	<context-param>
		<param-name>facelets.LIBRARIES</param-name>
		<param-value>
			/WEB-INF/taglibs/tomahawk.taglib.xml;
			/WEB-INF/taglibs/seam.taglib.xml;
			/WEB-INF/taglibs/platform.taglib.xml ;
			/WEB-INF/taglibs/darwin.taglib.xml;
			/WEB-INF/taglibs/workflow.taglib.xml;
			/WEB-INF/taglibs/trh.taglib.xml;
			/WEB-INF/taglibs/tr.taglib.xml
		</param-value>
	</context-param>

	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
	
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<!-- Faces Servlet Mapping -->
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.seam</url-pattern>
	</servlet-mapping>

	<!-- Trinidad Servlet -->
	<servlet>
		<servlet-name>resources</servlet-name>
		<servlet-class>
			org.apache.myfaces.trinidad.webapp.ResourceServlet
		</servlet-class>
	</servlet>

	<!-- Trinidad Servlet Mapping -->
	<servlet-mapping>
		<servlet-name>resources</servlet-name>
		<url-pattern>/adf/*</url-pattern>
	</servlet-mapping>

	<!--********************* MyFaces ******************************-->
	<context-param>
		<description>
			This parameter tells MyFaces if javascript code
should be
			allowed in the rendered HTML output. If javascript
is
			allowed, command_link anchors will have javascript
code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters
will be
			added as url parameters. Default: "true"
		</description>
		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			This parameter tells MyFaces if javascript code
should be
			allowed in the rendered HTML output. If javascript
is
			allowed, command_link anchors will have javascript
code that
			submits the corresponding form. If javascript is not
			allowed, the state saving info and nested parameters
will be
			added as url parameters. Default: "false"

			Setting this param to true should be combined with
			STATE_SAVING_METHOD "server" for best results.

			This is an EXPERIMENTAL feature. You also have to
enable the
			detector filter/filter mapping below to get
JavaScript
			detection working.
		</description>
	
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			If true, rendered HTML code will be formatted, so
that it is
			"human readable". i.e. additional line separators
and
			whitespace will be written, that do not influence
the HTML
			code. Default: "true"
		</description>
		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
		<param-value>true</param-value>
	</context-param>
	<context-param>
		<description>
			If true, a javascript function will be rendered that
is able
			to restore the former vertical scroll on every
request.
			Convenient feature if you have pages with long lists
and you
			do not want the browser page to always jump to the
top if
			you trigger a link or button action that stays on
the same
			page. Default: "false"
		</description>
		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
		<param-value>true</param-value>
	</context-param>

	<!-- MY FACES EXTENSIONS FILTERS -->
	<filter>
		<filter-name>myFacesExtensionsFilter</filter-name>
		<filter-class>
	
org.apache.myfaces.component.html.util.ExtensionsFilter
		</filter-class>
		<init-param>
			<param-name>uploadMaxFileSize</param-name>
			<param-value>100m</param-value>
			<!--
				<description>Set the size limit for uploaded
files.
				Format: 10 - 10 bytes
				10k - 10 KB
				10m - 10 MB
				1g - 1 GB
				</description>
			-->
		</init-param>
		<init-param>
			<param-name>uploadThresholdSize</param-name>
			<param-value>100k</param-value>
			<!--
				<description>Set the threshold size - files
				below this limit are stored in memory, files
above
				this limit are stored on disk.

				Format: 10 - 10 bytes
				10k - 10 KB
				10m - 10 MB
				1g - 1 GB
				</description>
			-->
		</init-param>
	</filter>

	<!-- extension mapping for adding <script/>, <link/>, and other
resource tags to JSF-pages  -->
	<filter-mapping>
		<filter-name>myFacesExtensionsFilter</filter-name>
		<!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>

	<!-- extension mapping for serving page-independent resources
(javascript, stylesheets, images, etc.)  -->
	<filter-mapping>
		<filter-name>myFacesExtensionsFilter</filter-name>
		<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
	</filter-mapping>

	<!-- extension mapping for adding <script/>, <link/>, and other
resource tags to JSF-pages  -->
	<filter-mapping>
		<filter-name>myFacesExtensionsFilter</filter-name>
		<url-pattern>*.seam</url-pattern>
	</filter-mapping>

	<listener>
		<listener-class>
	
org.apache.myfaces.webapp.StartupServletContextListener
		</listener-class>
	</listener>

	<!-- Filres for Trinidad -->
	<filter>
		<filter-name>trinidad</filter-name>
		<filter-class>
			org.apache.myfaces.trinidad.webapp.TrinidadFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>trinidad</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>

<!-- Some trinidad context parameters -->
	<context-param>
		<param-name>
	
org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE
		</param-name>
		<param-value>false</param-value>
	</context-param>
	<context-param>
		<param-name>
			org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
		</param-name>
	
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
	</context-param>
	<context-param>
		<param-name>
	
org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION
		</param-name>
		<param-value>true</param-value>
	</context-param>

</web-app>
[/code]

Can anybody help me?
Thanks in advance.


Juan Giovanolli
System Developer
Santex America SA - A Santex Group Company 
Córdoba - Argentina 




Mime
View raw message