Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- s:fileupload control problem with Ajax

- s:fileupload control problem with Ajax

2007-07-15       - By lkw

 Back
Hi,

I get a NullPointerException when submitting a form that contains s:uploadfile
control in Seam 1.2.1GA.  Refer code below.

I can submit the form successfully using the JSF commandButton control.
However, when I click on the Ajax4Jsf commandButton, JBoss give a
NullPointerException.  Has anyone encounter the same problem?

Thanks.



<h:form enctype="multipart/form-data">                
 |     <div class="prop">
 |     <div class="rectangle">              
 |       <table width="100%" cellspacing="1" cellpadding="1" border="1">
 |         <tr>
 |           <td>
 |             <div class="valueInline">
 |               <h:inputText value="#{entityBean.primaryName}" size="40" />
 |             </div>
 |           </td>
 |         </tr>
 |         <tr>
 |           <td colspan="3">
 |             <div class="name">
 |               <h:outputLabel for="pictureLogo">Logo</h:outputLabel>
 |             </div>
 |             <div class="valueInline">
 |               <s:fileUpload id="pictureLogo" data="#{entityBean.logo}" size="80" />
 |             </div>
 |           </td>
 |         </tr>
 |       </table>
 |     </div>
 |   <div>
 |     <a:commandButton value="Save" action="#{restaurantWorker.addRestaurant}"
/>
 |     <h:commandButton value="Save" action="#{restaurantWorker.addRestaurant}"
/>
 |   </div>
 | </h:form>

Caused by: javax.faces.el.EvaluationException Source code of javax.faces.el.EvaluationException: /addInfo2.xhtml @(protected),78 action="#
{actionBean.method}": javax.ejb.EJBTransactionRolledbackException: java.lang
.NullPointerException
 |   at com.sun.facelets.el.LegacyMethodBinding Source code of com.sun.facelets.el.LegacyMethodBinding(LegacyMethodBinding.java
:73)
 |   at org.apache.myfaces.application.ActionListenerImpl Source code of org.apache.myfaces.application.ActionListenerImpl
(ActionListenerImpl.java:63)
 |   ... 44 more
 | Caused by: javax.ejb.EJBTransactionRolledbackException: java.lang
.NullPointerException
 |   at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
 |   at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
 |   at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:195)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.aspects.tx.TxPropagationInterceptor.invoke
(TxPropagationInterceptor.java:76)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke
(StatefulInstanceInterceptor.java:83)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.aspects.security.AuthenticationInterceptor.invoke
(AuthenticationInterceptor.java:77)
 |   at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke
(Ejb3AuthenticationInterceptor.java:102)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.ejb3.ENCPropagationInterceptor.invoke
(ENCPropagationInterceptor.java:47)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke
(AsynchronousInterceptor.java:106)
 |   at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation
.java:101)
 |   at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer
.java:203)
 |   at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy
.java:98)
 |   at $Proxy284.addRestaurant(Unknown Source)
 |   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 Source code of java.lang.reflect.Method(Method.java:585)
 |   at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
 |   at org.jboss.seam.intercept.RootInvocationContext.proceed
(RootInvocationContext.java:31)
 |   at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed
(ClientSideInterceptor.java:72)
 |

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4064329#4064329

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4064329
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.