aspose file tools*
The moose likes BEA/Weblogic and the fly likes Hope Mr Parthasarathy madhira or other friend help me to solve this problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Hope Mr Parthasarathy madhira or other friend help me to solve this problem" Watch "Hope Mr Parthasarathy madhira or other friend help me to solve this problem" New topic
Author

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

bryan Lee
Greenhorn

Joined: Mar 30, 2002
Posts: 13
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)
========================================
James Hu
Greenhorn

Joined: Apr 29, 2002
Posts: 15
Please:

[ August 04, 2002: Message edited by: James Hu ]

write once,debug anywhere!!!
James Hu
Greenhorn

Joined: Apr 29, 2002
Posts: 15
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

Joined: Mar 30, 2002
Posts: 13
hi, james
What you posted seems does not solve the problem I addressed.
thanks.
bryan Lee
Greenhorn

Joined: Mar 30, 2002
Posts: 13
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

Joined: Apr 29, 2002
Posts: 15
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hope Mr Parthasarathy madhira or other friend help me to solve this problem