Vijay shrivastava
Vijay shrivastava
Originally posted by Vijay Shrivastava:
For configuring the WLS6.1 server with ORACLE8.17 using ORACLE driver.
Assuming you have the ORACLE driver file named CLASSES12.zip. Add Oracle driver class file in the weblogic startup script where you set WEBLOGIC_CLASSPATH.
Set WEBLOGIC_CLASSPATH=./directoyoforacle/CLASSES12.zip
And from the WLS6.1 Console setup ConnectionPool by providing the URL of database and the driver detail for thin driver. Also you need to specify username and password and make sure that you have added this pool for this server(WebLogicServer instance). Browse through all the tabs of ConnectionPool setup on console as you will need to have configure all parameters like size at startup.
When you start server you will see that ConnectionPool is setup.
Originally posted by parthasarathy madhira:
hi..
assuming that u have properly created connection pools and corresponding datasources using administration console...
ur classpath should b set to the classes111.zip and classes12.zip which will be present in ur %ORACLE_HOME%\jdbc\lib directory where %ORACLE_HOME% is the directory in which u installed oracle...
for this all u have to do is file ensure that the follwing line is present in ur setEnv.bat
set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\lib\weblogic_sp.jar;%WL_HOME%\lib\weblogic.jar;%ORACLE_HOME%\jdbc\lib\classes111.zip;%ORACLE_HOME%\jdbc\lib\classes12.zip;%CLASSPATH%
the order of the classpath should be the same...weblogic.jar should appear before classesXXX.zip appears...
apart from this u need not set any paths to neither dll files nor any other files...
Hope this will help u...
Regards
Vijay shrivastava
Originally posted by parthasarathy madhira:
hi...
sorry...but my startExamplesEnv.cmd file contains the following path setting
set PATH=.\bin;%PATH%
set
CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\samples\eval\cloudscape\lib\cloudscape.jar
;.\config\examples\serverclasses
echo off
it doesnt contain any path setting to the weblogicoci37.dll
though my connection to the database is working fine...
the best solution in my view for this is change ur path setting to the .dll file itself...ie
change ur 'SET PATH' line as
set PATH=.\bin;.\bin\oci817_8\weblogicoci37.dll;c:\oracle\ora81\bin;%PATH%
if this also doesnt work then try giving absolute path like
c:\bea\wlserver6.1\oci817_8\weblogicoci37.dll
else try to test ur database using database connection utility provided by bea...then u can check the java.library.path...
the utility is
java utils.dbping ORACLE SCOTT TIGER ORXML
where oracle is database
scott,tiger r username and password
orxml is the database name to which u r trying to connect...
else
before starting the wlserver using startExamplesServer.cmd just try setting ur path to weblogicoci37.dll at the command line...which in fact is not needed
i think one of out of these will click
regards,
Originally posted by Vijay Shrivastava:
For configuring the WLS6.1 server with ORACLE8.17 using ORACLE driver.
Assuming you have the ORACLE driver file named CLASSES12.zip. Add Oracle driver class file in the weblogic startup script where you set WEBLOGIC_CLASSPATH.
Set WEBLOGIC_CLASSPATH=./directoyoforacle/CLASSES12.zip
And from the WLS6.1 Console setup ConnectionPool by providing the URL of database and the driver detail for thin driver. Also you need to specify username and password and make sure that you have added this pool for this server(WebLogicServer instance). Browse through all the tabs of ConnectionPool setup on console as you will need to have configure all parameters like size at startup.
When you start server you will see that ConnectionPool is setup.
Originally posted by parthasarathy madhira:
try this and send me the sequence of classpath settings that u made in running the utility...
hope this helps...
Originally posted by parthasarathy madhira:
hi there...
first try testing ur driver and database connection using java utils.dbping utility...
it'll give all errors if u dont have something ie required in ur classpath...
first start with nothing in ur classpath and go on setting ur classpath as the utility runs and demands...here is how i worked it out...once the utility is successful i think there should b no problems for u to use the driver....
important thing to note is the 2nd classpath setting ie for the license.bea file present in BEA_HOME directory....
D:\>java utils.dbping ORACLE SCOTT TIGER ORXML
Exception in thread "main" java.lang.NoClassDefFoundError: utils/dbping
D:\>set classpath=d:\bea\wlserver6.1\lib\weblogic.jar;
D:\>java utils.dbping ORACLE SCOTT TIGER ORXML
Missing license file for: WebLogic Server 6.1
Error encountered:
java.sql.SQLException: Fail to load jDriver/Oracle due to license checking failed!
at weblogic.jdbc.oci.Driver.loadLibraryIfNeeded(Driver.java:182)
at weblogic.jdbc.oci.Driver.connect(Driver.java:76)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at utils.dbping.main(dbping.java:167)
D:\>set classpath=%classpath%d:\bea;
D:\>java utils.dbping ORACLE SCOTT TIGER ORXML
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", "SCOTT");
props.put("password", "TIGER");
java.sql.Driver d = (java.sql.Driver)Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn = d.connect("jdbc:weblogic racle:ORXML", 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:ORXML", "SCOTT", "TIGER");
**** or ****
java.util.Properties props = new java.util.Properties();
props.put("user", "SCOTT");
props.put("password", "TIGER");
props.put("server", "ORXML");
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
Driver.connect("jdbc:weblogic racle", props);
D:\>
Originally posted by parthasarathy madhira:
hi there...
i started with nothing in my path and classpath ...
what u do is ...give the following 2 lines in the command line and then follow the same steps which i followed...
set path="" and set classpath=""
D:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
'java' is not recognized as an internal or external command,
operable program or batch file.
D:\bea>set path=c:\jdk1.3\bin;
D:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
Exception in thread "main" java.lang.NoClassDefFoundError: utils/dbping
D:\bea>set classpath=d:\bea\wlserver6.1\lib\weblogic.jar;
D:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError: 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:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at utils.dbping.main(dbping.java:167)
here u can c that i got the same error which u got...so in the next command i am setting the path to it...as follows...and fixed the error...
D:\bea>set path=%path%d:\bea\wlserver6.1\bin\oci817_8;
D:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
Starting Loading jDriver/Oracle .....
Error encountered:
java.sql.SQLException: System.loadLibrary(weblogicoci37) threw java.lang.UnsatisfiedLinkError: D:\bea\wlserver6.1\bin\oci817_8\weblogicoci37.dll: Can't find dependent 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:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at utils.dbping.main(dbping.java:167)
now i got this error bcas previously there was oracle bin directory(which contains oci.dll file which is required by weblogicoci37.dll) in my path...but as i've emptied the path in this command prompt window i got this error...so i am setting the path variable now to oracle bin directory...
after which it works very fine....
D:\bea>set path=%path%d:\oracle\ora81\bin;
D:\bea>java utils.dbping ORACLE SCOTT TIGER ORXML
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", "SCOTT");
props.put("password", "TIGER");
java.sql.Driver d = (java.sql.Driver)Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn = d.connect("jdbc:weblogic racle:ORXML", 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:ORXML", "SCOTT", "TIGER");
**** or ****
java.util.Properties props = new java.util.Properties();
props.put("user", "SCOTT");
props.put("password", "TIGER");
props.put("server", "ORXML");
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
Driver.connect("jdbc:weblogic racle", props);
D:\bea>
i suggested u this process bcas after this u'll b very clear what is exactly required in the "path" and "classpath" variables...after this u can accordingly change ur classpath settings in startExamplesServer.cmd file....
hope this helps...
all the best and
Best Regards....
Originally posted by sateesh kommineni:
Hi,
I followed all the above steps and in my machine i have installed 8.0.5 Client version and i am testing the utils.dbping program . I am getting the following error..
The Procedure entry point OCILobLocatorAssign could not be located in the dynamic link library OCI.dll
Please help me...
Thanks
Sateesh
Originally posted by sateesh kommineni:
Hi,
I followed all the above steps and in my machine i have installed 8.0.5 Client version and i am testing the utils.dbping program . I am getting the following error..
The Procedure entry point OCILobLocatorAssign could not be located in the dynamic link library OCI.dll
Please help me...
Thanks
Sateesh