• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle Ref Cursor problem

 
Chris Staten
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing a project which requires that I use an Oracle Ref Cursor and I am having a problem because I can�t import oracle.jdbc.driver.*. I have my classpath set to point at my classes12.zip file, but when I try to import oracle.jdbc.driver.* I get
�the import oracle cannot be resolved�
.

My IDE is WSAD and I have j2ee 1.4 and j2se 1.5 installed.

Am I missing something?
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Staten:
I have my classpath set to point at my classes12.zip file, but when I try to import oracle.jdbc.driver.* I get .

Am I missing something?


Check whether your class path has any typographial errors.
Normally in Unix flavours "$" & ":" are used & in windows "%" & ";" are used check these .
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Which classpath is set? Double check that it is the project classpath (right click the project, properties, build path.) Also, I think you need to point to the classes12.jar (instead of zip) for WSAD to pick it up.

Also note that WSAD doesn't yet support java 1.5.

This is definitely a classpath/IDE issue, so I'm moving to our IDEs forum.
 
Chris Staten
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I�ve moved Oracle�s classes12.jar into my project. I can now import oracle.jdbc.driver.* without getting the ��import oracle cannot be resolved� error. Now I can�t seem to use the OracleTypes.class file. I get almost the same error as before, now it says �OracleTypes cannot be resolved or is not a type�, and I can see that the class is there (oracle.jdbc.driver.OracleTypes). Here is the code that is broken:



The line with cstmt.registerOutParameter(1, OracleTypes.CURSOR); is giving me the �OracleTypes cannot be resolved or is not a type� error.

Also, here is the class that I am dealing with in the classes12 package:
oracle.jdbc.driver.OracleTypes.class � It looks like this extends oracle.jdbc.internal.OracleTypes.class, which is an abstract class that extends another abstract class oracle.jdbc.OracleTypes.class. I can click on the abstract class in oracle.jdbc.OracleTypes.class and bring it up in WSAD to see that the value of OracleTypes.CURSOR is set to -10.

I obviously seem to be messing something up in my code, but what?

-Thanks.


Edit: This may need to be moved back out of the IDE forum now that I can import the class, but I don't know and I'm to confused to think that hard :\ .
[ January 18, 2005: Message edited by: Chris Staten ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34218
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Try using "OpenType" (on the navigation menu) to see where WSAD thinks OracleTypes is. You want to make sure it WSAD picks up on the fact that it is in classes12.jar.

Another possibility is that there are two OracleTypes classes in your imports. Try adding:
import oracle.jdbc.driver.OracleTypes;

It's still an IDEs/classpath issue since WSAD can't find OracleTypes. Once the compilation issues get resolved, please post a new thread in JDBC if you have a JDBC question. This one should stay in IDEs to help people in the future.

Thanks,
Jeanne
JDBC/IDEs Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic