aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: Protocol violation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Protocol violation" Watch "java.sql.SQLException: Protocol violation" New topic
Author

java.sql.SQLException: Protocol violation

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

I am doing a SQL Operation (Select ) inside my servlet .
The query is simple select (Select sal from emp)
I am getting java.sql.SQLException: Protocol violation

Please tell me why i am getting this exception :

Protocol violation
java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.ja
va:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:1
33)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:263)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:271)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:445)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1053)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:
780)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.jav
a:855)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1187)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:
1378)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatemen
tWrapper.java:387)
at TestServlet.doGet(TestServlet.java:45)


Save India From Corruption - Anna Hazare.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30293
    
150

Ravi,
Let's try to narrow down the problem. Are you able to:
1) Run the SQL statement from the Oracle command line?
2) Run a different SQL statement in Java?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Ya jaenne ,

I am able to run it under SQL Developer tool .

But not with in Servlet .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: Protocol violation