Java ORA-01034: ORACLE not available

11,677

Most likely this is a permission issue which needs to be resolved by providing permission to ORACLE_HOME to user say oracle (or whatever os user created for installation of Oracle database).

More details can be found here

Share:
11,677
sunleo
Author by

sunleo

Enthusiastic java tech Lover!!!! திரை கடலோடியும் திரவியம் தேடு http://www.animatedrecursion.com/intro/introduction.html Reversing a nested loop http://dwite.ca/ How to config Tomcat to serve images from an external folder outside webapps? How is my id being generated with JPA using Hibernate with the Oracle 10g dialect? http://balusc.blogspot.be/2007/04/imageservlet.html

Updated on June 04, 2022

Comments

  • sunleo
    sunleo almost 2 years

    My problem is in Exception Block I have shown,I can connect using GUI(PL/SQL developer) but my Eclipsedlink is getting exception while getting connection using Web Application. Please help me. Thanks in Advance.

    I am using ojdbc14.jar, I am getting connection using Normal java(core), but with Eclipse link alone this problem exists.

    Tesing.java :

            String URL = "jdbc:oracle:thin:@IP:1521:devt2x";
            String USER = "username";
            String PASS = "password";
            Class.forName("oracle.jdbc.driver.OracleDriver");
            conn = DriverManager.getConnection(URL, USER, PASS);
            if(conn != null)
                System.out.println("connects");
            else
                System.out.println("not connects");
    
    ouput :
    

    connects

    tnsnames.ora

    CHENNAIDB.WORLD =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = 1526))
        )
        (CONNECT_DATA =
          (SID = devt2x)
        )
      )
    

    Persistence.xml

    <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver" />
    <property name="javax.persistence.jdbc.url"
                    value="jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS=(PROTOCOL = TCP)(HOST = IP)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME =  devt2x)(SERVER = DEDICATED)))" />
                <property name="javax.persistence.jdbc.user" value="username" />
                <property name="javax.persistence.jdbc.password" value="password" />
    

    Exception I am getting : No problem in mapping

    [EL Finer]: 2012-11-20 11:39:39.021--ServerSession(2693887)--Thread(Thread[main,5,main])--DriverManager connect failed, trying direct connect.
    [EL Finer]: 2012-11-20 11:39:39.021--ServerSession(2693887)--Thread(Thread[main,5,main])--java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27123: unable to attach to shared memory segment
    Linux Error: 13: Permission denied