aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: invalid name pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: invalid name pattern" Watch "java.sql.SQLException: invalid name pattern" New topic
Author

java.sql.SQLException: invalid name pattern

Sanket Akre
Greenhorn

Joined: Jul 16, 2008
Posts: 15
I am suffering from the problem as follows:
java.sql.SQLException: invalid name pattern

I know one thing that if you enable connection pooling then oracle object such as TAB,ARRAY doesn't work.

My problem is that in one oc4j app-server my code for inserting ARRAY in database work fine. But in another oc4j app-server, it doesn't.

Someone told me it may be the problem with classes12.jar. Then I have deleted the same and add ojdbc.jar.
Still I am facing same problem.
kindly provide me the solution.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


I know one thing that if you enable connection pooling then oracle object such as TAB,ARRAY doesn't work.

Why should connection pooling make any difference to this?

What causes the error you are seeing? Are you running a SQL statement? Can you post that statement?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sanket Akre
Greenhorn

Joined: Jul 16, 2008
Posts: 15

oracle.sql.ArrayDescriptor descrip = oracle.sql.ArrayDescriptor.createDescriptor("PLM_PRD_ARRAY",conn);
sqlPrcdPk = new oracle.sql.ARRAY(descrip, conn, arr_Col1);

cst = conn.prepareCall("{call ADM_PRD_LEDGER_MAPPING_PCK.PLM_UPDATE(?,?,?,?,?,?,?,?,?) }");

cst.registerOutParameter(1 , Types.VARCHAR);
cst.registerOutParameter(2 , Types.VARCHAR);
cst.setString(3,"fa_product_ledger_mapping_modify.jsp");
cst.setString(4,strProdLedPk);
cst.setString(5,strProdLedPk);
cst.setArray(6,sqlPrcdPk);
cst.setString(7,strCompanyPk);
cst.setString(8,"Y");
cst.setString(9,lstrUserLoginId);
cst.executeQuery();

strErr = cst.getString(1);



Following code causes error: sqlPrcdPk = new oracle.sql.ARRAY(descrip, conn, arr_Col1);

I thing there is problem in oc4j app- server. Please give me some solution for the same.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I'm guessing a bit here, but "invalid name pattern" sounds like you are calling something using a name Oracle doesn't like. So it could be that it is an invalid name or one that that either doesn't exist or you can't see. Can you create an array type directly PL/SQL using this name?

Sanket Akre
Greenhorn

Joined: Jul 16, 2008
Posts: 15
My Problem is solve by writing Array name as schema.object instead just writing object name.

But now my problem is, if I am using connection pooling in JBoss, I have getting following error:
java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrappedConnection
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: invalid name pattern