Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

sirisha alam

Greenhorn
+ Follow
since Dec 17, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sirisha alam

Hi,

Could someone point me to the site from where i can download the jars related to JSR 197. All i find at http://jcp.org/en/jsr/detail?id=197 is the specification and not the required jars to use JSR 197.

Thanks,
Sirisha
16 years ago
Hi,

yes, I am registering the driver. I am able to call the stored procedures also succesfully, if the out parameter is not a cursor. The only issue i have is with the cursors.
I tried with classes12.jar as well as ojdbc14.jar which was listed as thin driver (classes for use with jdk1.4) at http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc101040.html

Both the jars are returning the same error.

Sirisha
Here's my connection string

dbURL = "jdbc racle:thin:";
dbURL = dbURL + dbUser + "/" + dbPasswd + "@" + dbMachine + ":";
dbURL = dbURL + dbPort + ":" + dbServer;
con = DriverManager.getConnection (dbURL);

And i forgot to mention in my original posting that i am using Oracle 10G Database.

Sirisha
Hi,

I trying to retrieve the results from a cursor in java and am getting the following error.

java.sql.SQLException: ORA-03115: unsupported network datatype or representation

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.v8Odscrarr.receive(v8Odscrarr.java:191)
at oracle.jdbc.ttc7.TTC7Protocol.describe(TTC7Protocol.java:586)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:484)
at oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:2661)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4189)
at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4123)
at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:541)
at server.SessionManager.createSession(SessionManager.java:57)
at server.MMServer.doPost(MMServer.java:74)
at server.MMServer.doGet(MMServer.java:47)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)


Here's the snippet of my java code:

cstmt = sqlUtil.createCallableStatement(query.toString());

cstmt.setString(1, userId);
cstmt.registerOutParameter(2, OracleTypes.CURSOR);
cstmt.execute();
rs = (ResultSet) cstmt.getObject(2); // error is pointing to this statement.

And i am using Oracle thin driver.

Your help is highly appreciated.

Thanks,
Sirisha
Check the version of the Tomcat you are using. The latest versions of tomcat server starting from around v4.1.24 doesn't require restarting the server when the servlet is changed.
I am trying to connect to DB2 database from java and am getting the fllowing error.
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
I have set the required classpath. And here is the code that i am trying to use:
import java.io.*;
import java.sql.*;
public class SingleDBConnect
{
static SingleDBConnect dbConnection = null;
private Connection con = null;

private SingleDBConnect()
{
try
{
Class.forName("com.ibm.db2.jcc.DB2Driver");
con = DriverManager.getConnection("jdbc b2:univ", "db2admin", "db2admin");
}
catch(ClassNotFoundException ex)
{
System.out.println("Exception in SingleDBConnect : " + ex);
}
catch(SQLException ex)
{
System.out.println("SQLException : " + ex);
}
}
public static Connection getConnection()
{
if( dbConnection == null )
{
dbConnection = new SingleDBConnect();
}
return dbConnection.con;
}
}
Please advise me on this.
Hello,
I am pretty new to JSTL, and we are trying to change the existing application which is using java code snippets in the jsp file to use JSTL. We are trying to change it in parts, not all at a time.
Currently we have some valiables declared in java code snippets, and i want to use those same variables in the JSTL tags.
We have some code like this
<%int idealType = 0;
if (dealType != null) idealType = Integer.parseInt(dealType);
%>
I want to use the idealType variable in my JSTL tag.
Ex: <c:if test="${idealType == 17}">
Is there any way that i can access the variable idealType in the JSTL tag.
Thanks,
Sirisha
18 years ago
JSP
Can anyone please suggest me a small project for college which involves jdbc, servlets, jsp and ejb.
Thanks in advance.
18 years ago
JSP
Can anyone please suggest me a small project for college which involves jdbc, servlets, jsp and ejb.
Thanks in advance.
I am a sun certified java2 programer, and i want to know which other certification should i do next. Which is the the most popular certification now in the job market.
18 years ago
Thanks a lot for your suggestions.
19 years ago
can anyone write some java interview questions.
[ December 17, 2002: Message edited by: sirisha alam ]
19 years ago