Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: invalid name pattern

 
Sanket Akre
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Sanket Akre
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic