Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Testing connection with Oracle thin driver

401 views
Skip to first unread message

Madhuri

unread,
Oct 26, 2001, 1:10:38 PM10/26/01
to
Hi !
I am testing Oracle connection from dos prompt and I get the SQL Error SQLEXCEPTION.
How do I connect Petstore to Oracle database? When I test the connection I get error message that java.sql.SQLException No License: weblogic.comon.LicenseNotFoundException. The file is in weblogic home directory.

Sree Bodapati

unread,
Oct 26, 2001, 5:40:39 PM10/26/01
to
Hi Madhuri,

Try placing the folder in which you have the license file in your classpath.
Can you post the SQL Exception?

/
sree

"Madhuri" <mvpw...@hotmail.com> wrote in message
news:3bd98afe$1...@newsgroups.bea.com...

Madhuri

unread,
Oct 29, 2001, 12:02:16 PM10/29/01
to


Hi Sree !
Following is the error message I am getting:
java.sql.SQLException: No License: weblogic.common.LicenseNotFoundException: weblogic.common.LicenseNotFoundException:
Could not find licensing file:
Your WebLogic license file, named either WebLogicLicense.xml or
WebLogicLicense.class must be located in a directory that is
in your CLASSPATH. By default, your license file is located in the
/license directory located in your WebLogic home directory
(the root directory of your WebLogic installation).

As of version 4.0 of WebLogic, a new XML-format license file has
replaced the older, compiled class format license file.
The WebLogic Server will recognize either format.

For additional information on WebLogic licenses or on setting your class
path, see the installation instructions in the WebLogic Server documentation,
av
ailable at
http://e-docs.bea.com/


at weblogic.jdbcbase.oci.Driver.connect(Driver.java:72)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at utils.dbping.main(dbping.java:156)

One more thing I would like to tell you that the file (including class file) is
in the weblogic directory and the folder is also in the classpath. I am trying
the following command :
java utils.dbping ORACLE scott tiger TNS_alias

Thanks in advance.
.Madhuri

Sree Bodapati

unread,
Oct 29, 2001, 12:40:35 PM10/29/01
to

Try,

java -classpath %WL_HOME%;%WL_HOME%\license;%CLASSPATH% utils.dbping ORACLE
scott tiger TNS_alias

and see if it helps, make sure WL_HOMe is set properly.

/
sree

"Madhuri" <mvpw...@hotmail.com> wrote in message

news:3bdd8b98$1...@newsgroups.bea.com...

Madhuri

unread,
Oct 30, 2001, 12:12:19 PM10/30/01
to

Hi Sree !
I tried this but still I get an error. Please see the following :
E:\bea\wlserver6.1>java -classpath %WL_HOME%;%WL_HOME%\license;%CLASSPATH% utils
dbping ORACLE <username> <password> <database>
Missing license file for: WebLogic Server 6.1

Error encountered:

java.sql.SQLException: Fail to load jDriver/Oracle due to license checking faile
d!
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)

Hi why it is complaining for OCI drivers when I am using thin driver?
Thanks
..Madhuri

Sree Bodapati

unread,
Oct 30, 2001, 1:33:12 PM10/30/01
to
The license file for WLS6.1 is license.bea file that is normally in the
BEA_HOME folder.

Usage for utils.dbping:
Usage: java utils.dbping ORACLE USER PASS DBNAME
or java utils.dbping ORACLE_THIN USER PASS HOST:PORT:DBNAME
or java utils.dbping JCONNECT USER PASS HOST:PORT/DBNAME
or java utils.dbping INFORMIX4 USER PASS DBNAME@HOST:PORT
or java utils.dbping MSSQLSERVER4 USER PASS DBNAME@HOST:PORT

Try to use the second one and it should work. What you were using was the
dbping for OCI driver.

/
sree

"Madhuri" <mvpw...@hotmail.com> wrote in message

news:3bdedf73$1...@newsgroups.bea.com...

Madhuri

unread,
Oct 30, 2001, 3:42:29 PM10/30/01
to

Hi Sree !
Thanks for your prompt reply. I have tried your solution but still I am having
problem and I don't find more info. about this on Bea site. Please see following
:
E:\bea\wlserver6.1>java utils.dbping ORACLE_THIN <username> <password> host:port:database
name
Valid DBTYPE values:
ORACLE, ORACLE_JDBC20, INFORMIX4, [JCONNECT | SYBASE], MSSQLSERVER4
Where I should have to use dbtype, is there something missing in command ?
Please let me know.
After the connection pool test is successful, it should take me to SQLPLUS, am
I right? What message I should be expecting?

Sree Bodapati

unread,
Oct 30, 2001, 5:47:56 PM10/30/01
to
can you point me to the doc which talks about the valid DBTYPE values (url)?

java utils.dbping ORACLE_THIN scott tiger
<machineip_or_name>:1521:<tns_alias >

this should work fine. for out of box usage, just goto the the folder
<wl_home>/config/mydomain and execute setenv.cmd / setenv.sh then execute
the above command from the same shell.

This command is not testing connection pool. its making sure that you can
connect to the db and it will not take you into sqlplus, it will show you
multiple ways to code your connections to the database.

/
sree

"Madhuri" <mvpw...@hotmail.com> wrote in message

news:3bdf...@newsgroups.bea.com...

Madhuri

unread,
Oct 31, 2001, 12:26:11 PM10/31/01
to

Hi Sree !
Thanks !
After I ran the SetEnv.cmd, this is working and I guess I am ok now to use this
connection pool.
Thank you very much.
0 new messages