|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Class not found when doing JNDI lookupI have ifxjdbc.jar in WEB-INF/lib, which contains the Informix driver I'm
looking for (I opened it and verified). I have the following in context.xml: <Context path=""> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <Resource name="jdbc/proteus" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="install" password="install" driverClassName="com.informix.jdbc.IfxDriver" url="jdbc:informix-sqli://sigma:1960/proteus:INFORMIXSERVER=sigma;IFX_LOCK_M ODE_WAIT=-1;IFX_ISOLATION_LEVEL=1"> </Resource> </Context> I get an error through the context lookup that I cannot load class "com.informix.jdbc.IfxDriver". Here is the lookup: this.setDataSource((DataSource)new InitialContext().lookup("java:comp/env/jdbc/proteus")); Here's the web.xml entry: <resource-env-ref> <description> Connection pool for xmlrpc. </description> <resource-env-ref-name> jdbc/proteus </resource-env-ref-name> <resource-env-ref-type> javax.sql.DataSource </resource-env-ref-type> </resource-env-ref> Is JNDI somehow masking the classpath of WEB-INF/lib? I have verified that there are not multiple jars with this class in the webapp, and it is not in the common/lib for tomcat. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Class not found when doing JNDI lookup> From: Mike Baranski [mailto:list-subscriptions@...]
> Subject: Class not found when doing JNDI lookup > > I have ifxjdbc.jar in WEB-INF/lib, which contains the Informix driver > I'm looking for (I opened it and verified). To quote from the doc: "Before you proceed, don't forget to copy the JDBC Driver's jar into $CATALINA_HOME/lib." The jar must be in Tomcat's lib directory, not the webapp's WEB-INF/lib, if you want Tomcat to manage the connection pool. > I have the following in context.xml: > <Context path=""> The path attribute is not allowed. Also, you appear to be modifying the global conf/context.xml, which is a really, really bad idea. The <Resource> element for the webapp should be in the webapp's <Context> element, located in the webapp's META-INF/context.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Class not found when doing JNDI lookupMike Baranski wrote:
> Is JNDI somehow masking the classpath of WEB-INF/lib? I have verified that > there are not multiple jars with this class in the webapp, and it is not in > the common/lib for tomcat. > The correct way is to place resource-referenced jars in common/lib (or just lib for tomcat 6.x). Simply speaking, WEB-INF/lib is inaccessible when container creates resources specified in context.xml. -- Mikolaj Rydzewski <miki@...> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
RE: Class not found when doing JNDI lookupDuh! That makes perfect sense.
>-----Original Message----- >From: Caldarale, Charles R [mailto:Chuck.Caldarale@...] >Sent: Tuesday, November 03, 2009 10:38 AM >To: Tomcat Users List >Subject: RE: Class not found when doing JNDI lookup > >> From: Mike Baranski [mailto:list-subscriptions@...] >> Subject: Class not found when doing JNDI lookup >> >> I have ifxjdbc.jar in WEB-INF/lib, which contains the Informix driver >> I'm looking for (I opened it and verified). > >To quote from the doc: >"Before you proceed, don't forget to copy the JDBC Driver's jar into >$CATALINA_HOME/lib." > >The jar must be in Tomcat's lib directory, not the webapp's WEB-INF/lib, >if you want Tomcat to manage the connection pool. > >> I have the following in context.xml: >> <Context path=""> > >The path attribute is not allowed. Also, you appear to be modifying the >global conf/context.xml, which is a really, really bad idea. The ><Resource> element for the webapp should be in the webapp's <Context> >element, located in the webapp's META-INF/context.xml file. > > - Chuck > > >THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY >MATERIAL and is thus for use only by the intended recipient. If you >received this in error, please contact the sender and delete the e-mail >and its attachments from all computers. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: users-unsubscribe@... >For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |