Win a copy of Spring Boot in Practice this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Hope Mr Parthasarathy madhira or other friend help me to solve this problem

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what i have followed according to previous posted suggestions about the topic:
"connect to oracle8.1.7 database thru weblogic6.1 and EJB using a Oracle driver"
I use a oci jDriver for Oracle:
Can anybody tell me where is the problem "java.sql.SQLException: ORA-24327: need explicit attach before authenticating a u
ser - (SCOTT/********@oracle)" comes from (after try whole afternoon and night, i really exhausted)
Thank you very much
my running results:
===============================================
C:\>set path="" and set classpath=""
C:\>cd bea
C:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
'java' is not recognized as an internal or external command,
operable program or batch file.
C:\bea>java utils.dbping ORACLE SCOTT TIGER oracle
'java' is not recognized as an internal or external command,
operable program or batch file.
C:\bea>set path=c:\j2sdk1.4.0\bin;
C:\bea>java utils.dbping ORACLE SCOTT TIGER oracle
Exception in thread "main" java.lang.NoClassDefFoundError: utils/dbping
C:\bea>set classpath=c:\bea\wlserver6.1\lib\weblogic.jar;
C:\bea>java utils.dbping ORACLE SCOTT TIGER oracle
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.Unsati
fiedLinkError: no weblogicoci37 in java.library.path
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at utils.dbping.main(dbping.java:167)
C:\bea>set path=%path%c:\bea\wlserver6.1\bin\oci816_8;
C:\bea>java utils.dbping ORACLE SCOTT TIGER oracle
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.Unsati
fiedLinkError: C:\bea\wlserver6.1\bin\oci816_8\weblogicoci37.dll: Can't find de
endent libraries
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at utils.dbping.main(dbping.java:167)
C:\bea>set path=%path%c:\Oracle\Ora81\bin;
C:\bea>java utils.dbping ORACLE SCOTT TIGER oracle
Starting Loading jDriver/Oracle .....

---------- LOGIN ERROR CODE: 24327
Error encountered:
java.sql.SQLException: ORA-24327: need explicit attach before authenticating a
ser - (SCOTT/********@myservername)
at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:161
at weblogic.jdbc.oci.Driver.connect(Driver.java:112)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at utils.dbping.main(dbping.java:167)
========================================
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please:

[ August 04, 2002: Message edited by: James Hu ]
 
James Hu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The example like this:
D:\bea>java utils.dbping ORACLE user_name user_password oradb
Starting Loading jDriver/Oracle .....
**** Success!!! ****
You can connect to the database in your app using:
java.util.Properties props = new java.util.Properties();
props.put("user", "fcx");
props.put("password", "fcx");
java.sql.Driver d = (java.sql.Driver)Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn = d.connect("jdbc:weblogic racle radb", props);
// This mode is superior, especially in serverside classes because
// it avoids DriverManager calls are class synchronized, and will
// bottleneck any other JDBC in the server, even already-running
// connections, because all JDBC drivers use DriverManager.println()
// to log info and exceptions, and that call is also class synchronized.
// For repeated connecting, a single driver instance can be re-used.
**** or ****
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
Driver.connect("jdbc:weblogic racle radb", "fcx", "fcx");
**** or ****
java.util.Properties props = new java.util.Properties();
props.put("user", "fcx");
props.put("password", "fcx");
props.put("server", "oradb");
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
Driver.connect("jdbc:weblogic racle", props);
 
bryan Lee
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, james
What you posted seems does not solve the problem I addressed.
thanks.
 
bryan Lee
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I add/specify "weblogicoci37.dll" to the PATH, the problem changed to the following:
============================
C:\>set path=c:\j2sdk1.4.0\bin;
C:\>set classpath=c:\bea\wlserver6.1\lib\weblogic.jar;
C:\>set path=c:\j2sdk1.4.0\bin;c:\bea\wlserver6.1\bin\oci816_8\weblogicoci37.dll
;
C:\>set path=c:\j2sdk1.4.0\bin;c:\bea\wlserver6.1\bin\oci816_8\weblogicoci37.dll
;c:\Oracle\Ora81\bin;
C:\>set classpath=c:\bea\wlserver6.1\lib\weblogic.jar;c:\bea;
C:\>java utils.dbping ORACLE SCOTT TIGER oracle
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.Unsatis
fiedLinkError: no weblogicoci37 in java.library.path
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:226)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at utils.dbping.main(dbping.java:167)
======================
Any suggestions, thanks
 
James Hu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,you want to connect to oracle8.1.7 database,but you use the oci jDriver of 816.Why you don't use the direction of 817 like that:
set path=%path%c:\bea\wlserver6.1\bin\oci817_8;
[ August 05, 2002: Message edited by: James Hu ]
reply
    Bookmark Topic Watch Topic
  • New Topic