exception on fileupload and clustering
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
exception on fileupload and clustering  XML
Forum Index -> JBoss Seam Integration
Author Message
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi,

When the user performs a fileupload it works fine but in JBoss log I get an exception. The fileupload works and the uploaded data is also persisted in the DB.
But here is the exception I always get :

Code:
 15:28:47,736 ERROR [[/signalisation]] Session attribute event listener threw exception
 java.lang.IllegalStateException: cannot passivate persistence context with active transaction
         at org.jboss.seam.persistence.ManagedPersistenceContext.sessionWillPassivate(ManagedPersistenceContext.java:152)
         at org.jboss.web.tomcat.service.session.ClusteredSession.notifyWillPassivate(ClusteredSession.java:1532)
         at org.jboss.web.tomcat.service.session.JBossCacheManager.storeSession(JBossCacheManager.java:303)
         at org.jboss.web.tomcat.service.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:51)
         at org.jboss.web.tomcat.service.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:147)
         at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:94)
         at org.jboss.web.tomcat.service.session.LockingValve.invoke(LockingValve.java:62)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:619)
 


I use the fileupload component the same way than in the component showcase.

I use the @In seam annotations in all the beans.

Do you have any clue for clustered environments ? (@Clusted annotation on the SFSB)

Georges
[Email]
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi,

I don't think that the problem comes from the @Clustered annotation because removing this also produces the exception.
But removing the <distributable/> tag in web.xml (web session replication) does not produce the exception.

Do you have any information and experience with clustered applications ? With fileupload component ?

Thanks

Georges
[Email]
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


are you using SMPC or container managed transactions? It looks to me like the transaction management may not be configured for clustering. What type of transaction-management have you got configured?
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi,

I tried a lot but without succes till now :

At the moment I have
Code:
 <transaction:ejb-transaction />
 


but also without that line in components.xml I have the same exception.
I also tried th <core:init distributable="true"/> without any luck

thanks for the fast reply

Georges
[Email]
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


To be more precisely I use a SMPC

Code:
 @In
 EntityManager em
 


and not

Code:
 @PersistenceContext
 EntityManager em
 


Georges
[Email]
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


how did you set up your datasources? (not local-tx-datasource ?)
judy.guglielmin

Joined: 20/02/2007 00:00:00
Messages: 1196
Offline


does the backing bean have to be @Stateful. Can you try @Stateless?
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi,

No using XA datasource

Code:
 <datasources> 
     <xa-datasource> 
         <jndi-name>MyDS</jndi-name> 
         <track-connection-by-tx>true</track-connection-by-tx> 
         <isSameRM-override-value>false</isSameRM-override-value> 
         <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> 
         <xa-datasource-property name="URL">jdbc:oracle:thin:@host:1521:SID</xa-datasource-property> 
         <xa-datasource-property name="User">uuuu</xa-datasource-property> 
         <xa-datasource-property name="Password">xxxx</xa-datasource-property> 
         <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> 
         <no-tx-separate-pools/> 
     </xa-datasource> 
 </datasources>
 
[Email]
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi,

tried stateless with the same exception.

Georges
[Email]
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi Judy,

I found the 'source of the evil exception'. It is the progress bar !!

Changing my code from :
Code:
 <ice:inputFile progressRender="true" id="id_fileupload"
                                                            progressListener="#{inputFileSave.fileUploadProgress}"
                                                            actionListener="#{inputFileSave.uploadFile}"
                                                            autoUpload="false"
                                                            />
 
 <ice:outputProgress  id="pro" value="#{inputFileSave.fileProgress}" label="#{inputFileSave.fileProgress}" labelComplete="#{inputFileSave.fileProgress}"/>
 
 


to

Code:
 <ice:inputFile id="id_fileupload"
                                                            actionListener="#{inputFileSave.uploadFile}"
                                                            autoUpload="false"
                                                            />
 


does not produce the exception in the log.

As I mentioned in my first post the fileupload works but it only produces the exception. I will let the outputProgress component in my applications because our users really appreciate this feature.

Hopefully it will be fixed in futur releases. I will open a JIRA for this issue

Thanks

Georges

PS: I think you somehow mentioned that you had problems or did not use the outputprogress component.
[Email]
georges.goebel@pch.etat.l


Joined: 23/06/2007 00:00:00
Messages: 276
Offline


Hi

Jira issue is

http://jira.icefaces.org/browse/ICE-4999

Georges

PS: damn I missed the issue 5000 only by 1 :-)
[Email]
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team