tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Wallace <tomca...@rwsoft-online.com>
Subject RE: JNDI JDBC COnnection pooling problem...
Date Tue, 13 Aug 2002 08:18:41 GMT
I changed to username, it didn't work either.

Thanks.


On Tue, 2002-08-13 at 04:05, Andrew wrote:
> Try changing the name of your parameter from 'user' to 'username'
> 
> 
> That worked for me with another driver (MSSQL Server JDBC Driver)
> 
> 
> - Andrew
> 
> > -----Original Message-----
> > From: Alexander Wallace [mailto:tomcater@rwsoft-online.com] 
> > Sent: Monday, August 12, 2002 11:33 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: JNDI JDBC COnnection pooling problem...
> > 
> > 
> > Hello. This has to be a very simple one for those who know.
> > 
> > I'm getting a java.lang.NullPointerException in my app, in 
> > the second line here:
> > 
> > Context ctx = (Context) new InitialContext().lookup("java:comp/env");
> > conn = ((DataSource) 
> > ctx.lookup("jdbc/pgsql")).getConnection(); **Error happens here**
> > 
> > And have the following in my server.xml (I put my whole 
> > context in case my error is there) 
> > 
> >         <Context path="/lto" docBase="lto" debug="0"                 
> > reloadable="true" crossContext="true">
> >           <Logger className="org.apache.catalina.logger.FileLogger"
> >                      prefix="localhost_lto_log." suffix=".txt"
> >                   timestamp="true"/>
> >           <Environment name="maxExemptions" type="java.lang.Integer"
> >                       value="15"/>
> >           <Parameter name="context.param.name" 
> > value="context.param.value" override="false"/>
> > 
> >         <Resource name="jdbc/pgsql" auth="Container"
> >                     type="javax.sql.DataSource"/>
> >           <ResourceParams name="jdbc/pgsql">
> >            
> > <parameter><name>user</name><value>awallace</value></parameter>
> >            
> > <parameter><name>password</name><value>passwd</value></parameter>
> >             <parameter><name>driverClassName</name>
> >               <value>org.postgresql.Driver</value></parameter>
> >             <parameter><name>driverName</name>
> >              
> > <value>jdbc:postgresql://10.100.101.1/awallace</value></parameter>
> >           </ResourceParams>
> >           <Resource name="mail/Session" auth="Container"
> >                     type="javax.mail.Session"/>
> >           <ResourceParams name="mail/Session">
> >             <parameter>
> >               <name>mail.smtp.host</name>
> >               <value>localhost</value>
> >             </parameter>
> >           </ResourceParams>
> >                 
> >                 <Realm className="org.apache.catalina.realm.JDBCRealm"
> > debug="99"
> >                         driverName="org.postgresql.Driver"
> >                        
> > connectionURL="jdbc:postgresql://10.100.101.1/awallace?user=aw
> > allace;password=passwd"
> >                         userTable="tbl_users" 
> > userNameCol="user_name" userCredCol="password"
> >                         userRoleTable="user_roles" 
> > roleNameCol="role_name"
> >                         digest="MD5"/>
> >         </Context>
> > 
> > 
> > 
> > Thank you in advance.
> > 
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:tomcat-user-> unsubscribe@jakarta.apache.org>
> > For 
> > additional commands, 
> > e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> > 
> > 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message