Suhem Programmer

Greenhorn
+ Follow
since Feb 13, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Suhem Programmer

Hi All

I got my problem resolved[ ]

First of all I am sorry I had mesed up with my post. As I can not post my original code due to company policy I had to put it in the form of A,B,C.... and my post got messed up.

Anyways problem was with data conversion.
There is one column of my table it datatype is declared as CHAR(3). The value I was passing to Getter method in my accessclass was "A". When I was doing rs.setString(parameterint,"A"). It was not taking value A as the size is for 3 character so in my query i had to use rpad(?,3) function.

After that it worked perfectly fine

Thanks
Suhem
Hi Paul,

I am sorry again. It should be as below
stmt.setInt(1, E);
stmt.setString(2, F);
stmt.setString(3, A);
stmt.setInt(4, B);
stmt.setBigDecimal(5, c);
stmt.setString(6, D);

But the problem is same.

Thanks
Suhem
Hi Paul,

I forgot to mention in previous mail, but yeah I am getting '0' value for the variable count. It is not updating any row.

Thanks
Suhem
Hi Paul,

Thanks again!

But I am passing values for all the elements in where clause.
Surprisingly when I am running query directly from tool, we are using Oracle SQL developer it is working fine. Its just not working through the access class I have written.

Thanks
Suhem
Hi Paul,

Thanks again!

Problem is I am not getting any kind of exceptions nothing.

When I am debugging the code in Debug mode it is taking initially all the values which I am setting for A B ....F
IT is executing the query(at least thats I am assuming since debug cursor is showing me that)
but the database is not been updated.
Is it something related to rights for updates deletes?

I am trying to Log the query in log file or on the consol but I am not sure if I am doing it correctly as I am not saying any query on consol or any logs in log file

I would appreciate it if you or anyone else on the group can help me with this problem.

Thanks
Suhem
Hi Paul

Thanks a lot for the reply.
I am sorry for the inconvenience but in my actual code i have put

stmt.executeUpdate() statment.

Its my bad I didnt copy the code properly on Javaranch.


Thanks
Suhem
Hi all,

I am facing problem when I am trying to update the data base or when i am trying to delete a tuple.
*****************************************************
Plese finf my update string below

private final static String UPDATE_TUPLE_STMT= " UPDATE ABC SET A= ?,B = ? WHERE C= ? AND D= ? AND E= ? AND F= ?";
*******************************************************
Pealse find the method i am writing below:

public Integer updateRow(String A, Integer B,
BigDecimal C, String D, Integer E,
String F) {
PreparedStatement stmt = null;
Integer count = null;

Connection aConnection = getConnection();

if (aConnection != null) {
try {
stmt = aConnection
.prepareStatement(UPDATE_TUPLE_STMT);
stmt.setInt(1, A);
stmt.setString(2, B);
stmt.setString(3, C);
stmt.setInt(4, D);
stmt.setBigDecimal(5, E);
stmt.setString(6, F);

logger.info("****count is given" + count);

} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
aConnection.commit();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
closeStatement(stmt);
closeConnection(aConnection);
}
}
return count;
}




Please help me with this I am not able to understand when Insert statements and select statements are working fine what could be the problem with Update and Delete.

I am using WSAD as application server.

Thanks a lot
Suhem
Hi Scott,

Thanks a lot for the reply. I noticed it after posting my problem to the forum and the code is working perfectly fine
Thanks agian
appreciate it!

Suhem
Hi All,

I would appreciate it if somebody could help with below mentioned exception.

5/8/08 11:06:53:810 EDT] 00000024 SystemErr R com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: ResultSet is closed.
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.runtimeXIfNotClosed(WSJdbcResultSet.java:2691)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getString(WSJdbcResultSet.java:1830)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.alticor.ebs.dbaccess.KeyIndQualStatAccess.getAllKeyIndPercntDtl(KeyIndQualStatAccess.java)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.alticor.ebs.ejb.SBTestBean.testKIQualStatSelect(SBTestBean.java)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.alticor.ebs.ejb.EJSRemoteStatelessSBTest_1452a9d4.testKIQualStatSelect(EJSRemoteStatelessSBTest_1452a9d4.java:594)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.alticor.ebs.ejb._EJSRemoteStatelessSBTest_1452a9d4_Tie.testKIQualStatSelect(_EJSRemoteStatelessSBTest_1452a9d4_Tie.java:374)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.alticor.ebs.ejb._EJSRemoteStatelessSBTest_1452a9d4_Tie._invoke(_EJSRemoteStatelessSBTest_1452a9d4_Tie.java:147)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
[5/8/08 11:06:53:810 EDT] 00000024 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)


The server I am using is WSAD6.1

below is my code

public Collection getAllKeyIndPercntDtl()
{
Collection allKeyIndIBOData = new ArrayList<KeyIndQualStatDtl>();
logger.info("************inside getallkeyInd***********");
logger.debug("**********"+GET_KEY_IND_QUAL_STAT_DTL_STMT+"**********");

Connection aConnection = getConnection();
logger.info("**********got the connection object***********");
ResultSet rs = null;
Statement stmt = null;

try {
stmt = aConnection.createStatement();
rs = stmt.executeQuery(GET_KEY_IND_QUAL_STAT_DTL_STMT);
System.out.println("size of result set is"+rs.getFetchSize());
logger.info(stmt.executeQuery(GET_KEY_IND_QUAL_STAT_DTL_STMT).getStatement());
logger.info("************after executing query******************");
//while(rs.next())
//{
String keyIndCD = rs.getString(1);
Integer bnsPerNO = rs.getInt(2);
BigDecimal affNO = rs.getBigDecimal(3);
String qualStstCD = rs.getString(4);
String qualMthdCD = rs.getString(5);

KeyIndQualStatDtl aKeyIndQualStatDtl = new KeyIndQualStatDtl(keyIndCD,bnsPerNO,affNO,qualStstCD,qualMthdCD);
logger.info("*****constructed data object********");
allKeyIndIBOData.add(aKeyIndQualStatDtl);
//}
} catch (SQLException e) {
// TODO Auto-generated catch block

e.printStackTrace();
}
finally{
logger.info("*************inside finally block**************");
closeConnection(aConnection);
closeStatement(stmt);
}
return allKeyIndIBOData;

}

let me know if i have done anything wrong
When I am debugging my programme following are the logger statements I am getting at consol

O INFO KeyIndQualStatAccess.getAllKeyIndPercntDtl(): ************inside getallkeyInd***********
[5/8/08 11:02:29:666 EDT] 00000024 InternalOracl I DSRA8203I: Database product name : Oracle
[5/8/08 11:02:29:697 EDT] 00000024 InternalOracl I DSRA8204I: Database product version : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters and Data Mining options
[5/8/08 11:02:29:697 EDT] 00000024 InternalOracl I DSRA8205I: JDBC driver name : Oracle JDBC driver
[5/8/08 11:02:29:697 EDT] 00000024 InternalOracl I DSRA8206I: JDBC driver version : 10.2.0.1.0
[5/8/08 11:02:29:697 EDT] 00000024 InternalOracl I DSRA8212I: DataStoreHelper name is: com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper@74487448.
[5/8/08 11:02:32:181 EDT] 00000024 SystemOut O INFO KeyIndQualStatAccess.getAllKeyIndPercntDtl(): **********got the connection object***********
[5/8/08 11:05:59:197 EDT] 00000024 SystemOut O size of result set is10
[5/8/08 11:06:16:933 EDT] 00000024 SystemOut O INFO KeyIndQualStatAccess.getAllKeyIndPercntDtl(): com.ibm.ws.rsadapter.jdbc.WSJdbcStatement@3600360
[5/8/08 11:06:37:309 EDT] 00000024 SystemOut O INFO KeyIndQualStatAccess.getAllKeyIndPercntDtl(): ************after executing query******************

Thanks
Suhem
Hi all,

I am using RAD 7.0.0.1 and Websphere 6.1

While running my web service I am getting error as class Xyz not instantiated. When I degub my programme I came to know that it requires webservices.jar file and thats why I added that perticular jar file in that project(which is client to webservice). But I dont understand it is still not getting MessageContext.class which is there in that jar file.
I am stuck with this problem for a day. Any help is appreciated.

error I am getting is
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: WSWS3422E: Error: Can not instantiate com.testpackserv.TestClass.
faultActor: null
faultDetail:

WSWS3422E: Error: Can not instantiate com.testpackserv.TestClass.
at com.ibm.ws.webservices.engine.xmlsoap.builders.WebServicesFaultProcessor.createFault(WebServicesFaultProcessor.java:419)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPFault.getFault(SOAPFault.java:500)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1097)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:754)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:898)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:878)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:280)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:332)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:738)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:659)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:617)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:452)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:908)
at com.testpackserv.TestClassSoapBindingStub.setString(TestClassSoapBindingStub.java:87)
at com.testserv.TestingService.main(TestingService.java:38)

Thanks,
Suhem
16 years ago
Hi all,

If anybody knows the solution Please help me with it.

Suhem
16 years ago
Please find the error log below

Apr 16, 2008 11:54:02 AM com.ibm.ws.util.ImplFactory
WARNING: WSVR0072W
Apr 16, 2008 11:54:03 AM com.ibm.ws.ssl.config.SSLConfigManager
INFO: ssl.disable.url.hostname.verification.CWPKI0027I
WebServicesFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultString: WSWS3422E: Error: Can not instantiate com.testpackserv.TestClass.
faultActor: null
faultDetail:

WSWS3422E: Error: Can not instantiate com.testpackserv.TestClass.
at com.ibm.ws.webservices.engine.xmlsoap.builders.WebServicesFaultProcessor.createFault(WebServicesFaultProcessor.java:419)
at com.ibm.ws.webservices.engine.xmlsoap.SOAPFault.getFault(SOAPFault.java:500)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:1097)
at com.ibm.ws.webservices.engine.SOAPPart.getFault(SOAPPart.java:754)
at com.ibm.ws.webservices.engine.Message.getFault(Message.java:898)
at com.ibm.ws.webservices.engine.Message.ifFaultThrowSelf(Message.java:878)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:280)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:332)
at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:738)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:659)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:617)
at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:452)
at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:908)
at com.testpackserv.TestClassSoapBindingStub.setString(TestClassSoapBindingStub.java:87)
at com.testserv.TestingService.main(TestingService.java:38)
16 years ago
Hi all,

I am using RAD 7.0.0.1 and Websphere 6.1

While running my web service I am getting error as class Xyz not instantiated. When I degub my programme I came to know that it requires webservices.jar file and thats why I added that perticular jar file in that project(which is client to webservice). But I dont understand it is still not getting MessageContext.class which is there in that jar file.
I am stuck with this problem for a day. Any help is appreciated.

Thanks,
Suhem
16 years ago
Hi Craig,

Thanks a lot for the reply. But all the tables have one to one relationship. So is that fine if I put them all together in one table?

I am sorry about not mentioning it before, I am using relational detabase(oracle 10g)

Thanks,
Hemali
16 years ago
Hi All,

Can someone suggest me please whether to create multiple tables or it is ok if we create just one table.

I have a situation where I am storing persons' data in multiple tables.I was just wondering can I use one table instead to store the information about a person?
16 years ago