Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to connect to oracle database

 
N.srinivas chowdary
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
iam able to compile the class,i have set the path to classes12.zip,but when iam running the class iam getting the following error.plz help me in this regard.
Exception in thread "main" java.sql.SQLException: ORA-01034: ORACLE not availabl
e

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java:429)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:248)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:252)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at DBTest.main(DBTest.java:11)
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORA-01034: ORACLE not available

Is oracle available? Make sure it is running and able to be accessed by (for example) sqlplus and SquirrelSQL

Dave
 
Adam Richards
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is not Java in this case. You are loading the Oracle driver correctly, or you wouldn't be getting an Oracle error message. Here's the description of the error, from the official Oracle documentation at
(http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76999/e900.htm#1656):

ORA-01034 ORACLE not available

Cause: Oracle was not started. Possible causes include the following:

The SGA requires more space than was allocated for it.

The operating-system variable pointing to the instance is improperly defined.

Action: Refer to accompanying messages for possible causes and correct the problem mentioned in the other messages. If Oracle has been initialized, then on some operating systems, verify that Oracle was linked correctly. See the platform-specific Oracle documentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic