Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

java.sql.SQLException: invalid name pattern

 
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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE 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
Hibernate Eclipse IDE 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
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic