package oracle.jdbc.driver does not exist

Hi All,

I am newbie using IntelliJIDEA 9.0.3 for my j2ee web application development. One of my module uses oracle database connection. But I get the error
package oracle.jdbc.driver does not exist, package oracle.sql does not exist.

I tried the following solutions but I still get the error
1. In the module setting -> dependencies-> classes12. Created the project library called classes12 and I have included the sources for classes12.jar.
    This is my path C:/app/username/product/11.1.0/client_1/oui/jlib/classes12.jar
2. I have my path and classpath set to .;C:\Program Files\Java\jdk1.6.0_21\jre\lib\classes.jar;C:\app\username\product\11.1.0\client_1\oui\jlib;
3. The module also has the jar file in its package folder

I am not sure what I am missing. Can anyone please help me solve this isseue.

4 comments

I would say the classes12.jar file is not being deployed and doesn't exist in the webserver.

Either make sure the webserver has classes12.jar available or in Idea go to "File -> Project Structure -> Artifacts" and make sure classes12.jar is included in the deployment artifact.

0

Hi Carlos,

Thanks for your reply. I still get the same error. In the project settings->artifacts. I have added the jar file classes12.jar and gave corresponding destination directory. When I make or compile the module I still get the same error. Is there something I am missing to do. Since the IDE itself is new to me I am not sure if I am doing the right way.

Thanks.

0

You didn't specify earlier that you where having compile problems, so I (mistakenly) assumed runtime deployment problems.

First, inside IDEA, only project/module libraries are used for compiling (and running). Path and classpath (specified in environment variables) are ignored so are of no use (and I prefer having these unspecified guaranteeing no side effects when testing apps outside IDEA).

Second, I just noticed that you wrote "... and I have included the sources for classes12.jar..." and this seems to be the mistake. For adding classes/jars to your libraries you use the "Attach Classes..." button. "Attach Sources..." is used to let idea know where the java source files used to build the library are located (just for your convenience when debugging, etc).

Finally, the Artifacts section is only used when deploying the module: creating a war file, deploying to your app server, etc, so it has no effect on compiling. But you wrote "...I have added the jar file classes12.jar..." I think this may work, but I would add the entire "classes12" library to your artifact, not only a jar.

If this doesn't solve the problem, please post an image of your library details and of your module depencency details.

0

Thanks a lot. I was able to compile the modules.


0

Please sign in to leave a comment.