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

Oracle thind driver using RI 1.3.b2 -- java.sql.SQLException: Null user or password not supported in THIN driver

16 views
Skip to first unread message

Murali Vemulapalli

unread,
Jul 23, 2001, 2:47:34 PM7/23/01
to
Hello !

I am running into the following error while using J2EE Reference
Implementation
j2sdkee1.3b2 and using Oracle thin driver as JDBC driver.

java.sql.SQLException: Null user or password not supported in THIN
driver

The stack trace is at the end of the email. My configuration file
%J2EE_HOME%\config\resource.properties has the following entries.

jdbcDataSource.0.name=jdbc/CustomerSupport
jdbcDataSource.0.url=jdbc:oracle:thin:murali/murali@estes:1521:est1

I tried all the following variations as the URL string without any
success.

jdbc:oracle:thin:@estes:1521:est1
jdbc:oracle:thin:murali:murali@estes:1521:est1
jdbc:oracle:thin:@estes:1521:est1@murali/murali
jdbc:oracle:thin:@estes:1521:est1:murali:murali
jdbc:oracle:thin@estes:1521:est1

and lot more.

I could connect to database using my username, password with out a
problem.

The following few lines of code from a JSP works fine.

Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection
("jdbc:oracle:thin:murali/murali@estes:1521:est1", "murali",
"murali");
//con = DriverManager.getConnection
("jdbc:oracle:thin:murali/murali@estes:1521:est1");

I was not able to get it working using RI configuration files. Any
quick help is greatly appreciated. Thanks much,

--
Murali
murali_ve...@yahoo.com


java.sql.SQLException: Null user or password not supported in THIN
driver
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAl
locator.java:49)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolM
anagerImpl.java:181)
at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.
java:60)
at com.sun.enterprise.resource.Jdbc10XaAllocator.createResource(Jdbc10Xa
Allocator.java:70)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolM
anagerImpl.java:181)
at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerIm
pl.java:130)
at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(Jdbc
DataSource.java:141)
at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSour
ce.java:55)
at reefwork.ffc.util.FrmwkUtilities.getConnection(FrmwkUtilities.java:16
3)
at reefwork.ffc.util.FrmwkUtilities.getConnection(FrmwkUtilities.java:18
7)
at org.apache.jsp._0002fDBConnectionTest_jsp._jspService(_0002fDBConnect
ionTest_jsp.java:80)
at reefwork.servlet.FrmwkBaseJSP.service(FrmwkBaseJSP.java:128)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
vlet.java:200)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
79)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:254)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationF
ilterChain.java:198)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilt
erChain.java:177)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:255)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:225)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:882)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2227)

Murali Vemulapalli

unread,
Jul 23, 2001, 3:15:46 PM7/23/01
to

Anthony Miller

unread,
Jul 24, 2001, 3:34:53 AM7/24/01
to
Hi,

I have done this many times and I think that your string in your servlet
is wrong.

My servlets have only ever had the following syntax

jdbc:oracle:thin:@127.0.0.1:1521:c1036304", "scott", "tiger")

Therefore I believe that if you remove the murali/murali part in your
connection string this may work.

Hope this helps

Anthony

N. J. O'Neill

unread,
Jul 24, 2001, 12:34:20 PM7/24/01
to
The URL format with user name and password for the thin driver is

jdbc:oracle:thin:<user>/<password>@<database>


You should get yourself a copy of the Oracle "JDBC Developer's Guide
and Reference" which is available online here
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/index.htm
(may require free registration).


-- N. J. O'Neill

murali_ve...@yahoo.com (Murali Vemulapalli) wrote in message news:<17bddb4.01072...@posting.google.com>...

Murali Vemulapalli

unread,
Jul 24, 2001, 1:15:37 PM7/24/01
to
Anthony Miller <anthony...@baesystems.com> wrote in message news:<3B5D251D...@baesystems.com>...

Thanks for the comments. Let me add that I was successful in
connecting to the database from the JSP and/or servlet by doing

Connection con = null;


Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection

("jdbc:oracle:thin:@estes:1521:est1", "murali", "murali");

I am running into problem from using it as a dataSource from the J2EE
RI configuration files. From the file
<J2EEHome>/config/resource.properties


Thanks much,

DimitriM

unread,
Aug 7, 2001, 9:16:18 AM8/7/01
to
Murali,

Why don't you have a look at the Merant DataDirect SequeLink driver?
Sun used this driver to make the J2EE SDK v1.2 a J2EE Compatible
Implementation. More info about this can be found on the official SUN
JAVASOFT site on http://java.sun.com/j2ee/compatibility.html.

HP Bluestone, ATG, IONA, iPlanet and IBM all used the DataDirect JDBC
drivers to make their application servers pass the CTS tests.

A free eval is available
http://www.merant.com/products/datadirect/jdbc/sl5/overview.asp.

Cheers,
Dimitri

0 new messages