hi redyz,

i did it,
the problem is that in statefull session bean i had define Query class object 
and this class is not a serializable.

you must define this class as transient or use it only method scope.....
my programm example 





  | @Stateful
  | @Remote(CountFasade.class)
  | public class CountFasadeBean implements CountFasade {
  | 
  |         @PersistenceContext(unitName = "srvProvOracle")
  |     private EntityManager oracleManager;
  | 
  |     Query _query = null;
  | 
  |     public void addCount() throws Exception {
  |             try {
  |                     _query = oracleManager.createNativeQuery("some query");
  |             } catch (Exception e) {
  |                     e.printStackTrace();
  |                     throw e;
  |             }
  |     }
  | }
  | 
  | 


must be like this :


  | @Stateful
  | @Remote(CountFasade.class)
  | public class CountFasadeBean implements CountFasade {
  | 
  |         @PersistenceContext(unitName = "srvProvOracle")
  |     private EntityManager oracleManager;
  | 
  |         @Transient
  |     Query _query = null;
  | 
  |     public void addCount() throws Exception {
  |             try {
  |                     _query = oracleManager.createNativeQuery("some query");
  |             } catch (Exception e) {
  |                     e.printStackTrace();
  |                     throw e;
  |             }
  |     }
  | }
  | 

or like this :


  | @Stateful
  | @Remote(CountFasade.class)
  | public class CountFasadeBean implements CountFasade {
  | 
  |         @PersistenceContext(unitName = "srvProvOracle")
  |     private EntityManager oracleManager;
  | 
  |     public void addCount() throws Exception {
  |             try {
  |                     Query _query =  oracleManager.createNativeQuery("some 
query");
  |             } catch (Exception e) {
  |                     e.printStackTrace();
  |                     throw e;
  |             }
  |     }
  | }
  | 
  | 


good luck

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

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

Reply via email to