Joined: Mon Jul 24, 2006 10:04 am Posts: 1 Location: Hyderabad, India				
			 | 
			
				
				
					| 
					
						 2.1 
 
 <class name="EmailStatus" table="OAS_EMAIL_STATUS">    <composite-id>      <key-property name='bankCode' column='OAS_COD_BANK'/>      <key-property name='branchCode' column='OAS_COD_BRANCH' /> 	 <key-property name='messageID' column='OAS_MSG_ID' />    </composite-id> 	<property name='transID' column='OAS_TRANS_ID'/>  	<property name='msgStatus' column="OAS_MSG_STATUS"  /> 	<property name='emailSubject' column='OAS_TXT_SUBJECT'/> 	<property name='refNumber' column='OAS_NBR_REF'/> 	<property name='sentDate' column='OAS_DAT_EMAIL' type="java.sql.Date"/> 	<property name='reportType' column='OAS_COD_REPORT_TYPE' /> 	<property name='toTxtList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_TXT_TO_LIST" sql-type="STR_ARRAY100" /> 	</property> 	<property name='ccTxtList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_TXT_CC_LIST" sql-type="STR_ARRAY100" /> 	</property> 	<property name='invalidToList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_INVALID_TO_LIST" sql-type="STR_ARRAY100" /> 	</property> 	<property name='invalidCcList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_INVALID_CC_LIST" sql-type="STR_ARRAY100" /> 	</property> 		<property name='toList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_TO_LIST" sql-type="STR_ARRAY100" /> 	</property> 	<property name='ccList' type='com.examples.components.dao.types.StrArray100Type'> 			<column name="OAS_CC_LIST" sql-type="STR_ARRAY100" /> 	</property> </class> 
 
 		Session hibernateSession = null;         Transaction tx = null;         try {             hibernateSession = HibernateUtil.currentSession();             tx = hibernateSession.beginTransaction();             hibernateSession.save(emailStatus);             tx.commit();         } catch (HibernateException he){             	he.printStackTrace();             if(log.isErrorEnabled()) log.error(" [Hibernate Exception in saveEmailStatus ]",he);             try {                 tx.rollback();                 System.out.println("after rolling back the transaction");             } catch (HibernateException e){                 if(log.isErrorEnabled()) log.error("[ hibernate Exception in saveEmailStatus ]",e);                     throw new SessionException(e.getMessage());             }             throw new SessionException(he.getMessage());         } finally {         	try {                 HibernateUtil.closeSession();             } catch (HibernateException e)  {                 if(log.isErrorEnabled()) log.error("[ hibernate Exception in savEmailStatus ]",e);                 throw new SessionException(e.getMessage());             }        }
 
 java.rmi.MarshalException: error marshalling return; nested exception is:  	java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection 	at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108) 	at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164) 	at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_815_WLStub.physicalConnectionWithin(Unknown Source) 	at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_815_WLStub.physicalConnectionWithin(Unknown Source) 	at oracle.sql.ARRAY.<init>(ARRAY.java:119) 	at com.polaris.components.dao.types.StrArray100Type.nullSafeSet(StrArray100Type.java:166) 	at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118) 	at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393) 	at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:466) 	at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442) 	at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) 	at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418) 	at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371) 	at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240) 	at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) 	at com.orbioasis.events.emailautomation.dao.EODEMailDAO.saveEmailStatus(EODEMailDAO.java:446) 	at com.orbioasis.events.emailautomation.EODEMailService.saveEmailStatus(EODEMailService.java:171) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.generateEmail(EODEMailProcessor.java:213) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.sendEmails(EODEMailProcessor.java:104) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.process(EODEMailProcessor.java:59) 	at com.orbioasis.events.emailautomation.EODEMailCaller.main(EODEMailCaller.java:48) Caused by: java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054) 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278) 	at weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:120) 	at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93) 	at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_WLSkel.internalInvoke1(Unknown Source) 	at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_WLSkel.invoke(Unknown Source) 	at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492) 	at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435) 	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) 	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147) 	at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430) 	at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35) 	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) 	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) --------------- nested within: ------------------ weblogic.rmi.extensions.RemoteRuntimeException: Unexpected Exception - with nested exception: [java.rmi.MarshalException: error marshalling return; nested exception is:  	java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection] 	at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_815_WLStub.physicalConnectionWithin(Unknown Source) 	at weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_815_WLStub.physicalConnectionWithin(Unknown Source) 	at oracle.sql.ARRAY.<init>(ARRAY.java:119) 	at com.polaris.components.dao.types.StrArray100Type.nullSafeSet(StrArray100Type.java:166) 	at net.sf.hibernate.type.CustomType.nullSafeSet(CustomType.java:118) 	at net.sf.hibernate.persister.EntityPersister.dehydrate(EntityPersister.java:393) 	at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:466) 	at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442) 	at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) 	at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2418) 	at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371) 	at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240) 	at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61) 	at com.orbioasis.events.emailautomation.dao.EODEMailDAO.saveEmailStatus(EODEMailDAO.java:446) 	at com.orbioasis.events.emailautomation.EODEMailService.saveEmailStatus(EODEMailService.java:171) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.generateEmail(EODEMailProcessor.java:213) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.sendEmails(EODEMailProcessor.java:104) 	at com.orbioasis.events.emailautomation.EODEMailProcessor.process(EODEMailProcessor.java:59) 	at com.orbioasis.events.emailautomation.EODEMailCaller.main(EODEMailCaller.java:48) 
 
 Oracle 9i
 
 why does this same code work when i am accessing it through a Struts application but it does`nt work from a stand alone java swing application ? 
											 _________________ Thanx & regards,
 K. Bharadwaja
					
  
						
					 | 
				 
				 
			 |