Subject Re: [Firebird-Java] firebirdsql.jar
Author Luca Lafranchi
Hi :)

Try with firebirdsql-full.jar

Ciao
Luca
d_rampazo wrote:

> Hi,
> =20
> I can=B4t make TOMCAT (version 4.1.24) see the firebirdsql.jar. I=B4m
> using the connection pooling, but in all cases it talks:
> " org.apache.commons.dbcp.BasicDataSource@56b93a Cannot load JDBC
> driver class 'null' "
> What I=B4m doing wrong?
> =20
> firebirdsql.jar is in these folders:
> Tomcat/common/lib
> Tomcat/server/lib
> Tomcat/webapps/teste/WEB_INF/lib
> =20
> How it can=B4t load ?
> =20
> My Server.xml:
> =20
> <?xml version=3D'1.0' encoding=3D'utf-8'?>
> <Server className=3D"org.apache.catalina.core.StandardServer" debug=3D"0"
> port=3D"8005" shutdown=3D"SHUTDOWN">
> <Listener
> className=3D"org.apache.catalina.mbeans.ServerLifecycleListener"
> debug=3D"0" jsr77Names=3D"false"/>
> <Listener
> className=3D"org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
> debug=3D"0"/>
> <GlobalNamingResources>
> <Environment name=3D"simpleValue" override=3D"true"
> type=3D"java.lang.Integer" value=3D"30"/>
> <Resource auth=3D"Container" description=3D"User database that can be
> updated and saved" name=3D"UserDatabase" scope=3D"Shareable"
> type=3D"org.apache.catalina.UserDatabase"/>
> <Resource auth=3D"Container" name=3D"jdbc/DBFirebird"
> scope=3D"Shareable" type=3D"javax.sql.DataSource"/>
> <ResourceParams name=3D"UserDatabase">
> <parameter>
> <name>factory</name>
> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
> </parameter>
> <parameter>
> <name>pathname</name>
> <value>conf/tomcat-users.xml</value>
> </parameter>
> </ResourceParams>
> <ResourceParams name=3D"jdbc/DBFirebird">
> <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> </parameter>
> <parameter>
> <name>url</name>
> =20=20=20=20=20=20=20
> <value>jdbc:firebirdsql:192.168.1.157/3050:f:\\db\\company.ib</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>masterkey</value>
> </parameter>
> <parameter>
> <name>maxActive</name>
> <value>4</value>
> </parameter>
> <parameter>
> <name>maxWait</name>
> <value>5000</value>
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>org.firebirdsql.jdbc.FBDriver</value>
> </parameter>
> <parameter>
> <name>username</name>
> <value>SYSDBA</value>
> </parameter>
> <parameter>
> <name>maxIdle</name>
> <value>2</value>
> </parameter>
> </ResourceParams>
> </GlobalNamingResources>
> <Service className=3D"org.apache.catalina.core.StandardService"
> debug=3D"5" name=3D"Tomcat-Standalone">
> <Connector className=3D"org.apache.coyote.tomcat4.CoyoteConnector"
> acceptCount=3D"100" bufferSize=3D"2048" compression=3D"off"
> connectionLinger=3D"-1" connectionTimeout=3D"20000" debug=3D"0"
> disableUploadTimeout=3D"true" enableLookups=3D"true"
> maxKeepAliveRequests=3D"100" maxProcessors=3D"75" minProcessors=3D"5"
> port=3D"8080"
> protocolHandlerClassName=3D"org.apache.coyote.http11.Http11Protocol"
> proxyPort=3D"0" redirectPort=3D"8443" scheme=3D"http" secure=3D"false"
> tcpNoDelay=3D"true" useURIValidationHack=3D"false">
> <Factory
> className=3D"org.apache.catalina.net.DefaultServerSocketFactory"/>
> </Connector>
> <Connector className=3D"org.apache.coyote.tomcat4.CoyoteConnector"
> acceptCount=3D"10" bufferSize=3D"2048" compression=3D"off"
> connectionLinger=3D"-1" connectionTimeout=3D"0" debug=3D"0"
> disableUploadTimeout=3D"false" enableLookups=3D"true"
> maxKeepAliveRequests=3D"100" maxProcessors=3D"75" minProcessors=3D"5"
> port=3D"8009"
> protocolHandlerClassName=3D"org.apache.jk.server.JkCoyoteHandler"
> proxyPort=3D"0" redirectPort=3D"8443" scheme=3D"http" secure=3D"false"
> tcpNoDelay=3D"true" useURIValidationHack=3D"false">
> <Factory
> className=3D"org.apache.catalina.net.DefaultServerSocketFactory"/>
> </Connector>
> <Engine className=3D"org.apache.catalina.core.StandardEngine"
> debug=3D"5" defaultHost=3D"localhost"
> mapperClass=3D"org.apache.catalina.core.StandardEngineMapper"
> name=3D"Standalone">
> <DefaultContext
> className=3D"org.apache.catalina.core.StandardDefaultContext"
> cookies=3D"true" crossContext=3D"true" name=3D"defaultContext"
> reloadable=3D"false" swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> </DefaultContext>
> <Host className=3D"org.apache.catalina.core.StandardHost"
> appBase=3D"/teste" autoDeploy=3D"true"
> configClass=3D"org.apache.catalina.startup.ContextConfig"
> contextClass=3D"org.apache.catalina.core.StandardContext" debug=3D"5"
> deployXML=3D"true"
> errorReportValveClass=3D"org.apache.catalina.valves.ErrorReportValve"
> liveDeploy=3D"true"
> mapperClass=3D"org.apache.catalina.core.StandardHostMapper"
> name=3D"localhost2" unpackWARs=3D"true">
> </Host>
> <Host className=3D"org.apache.catalina.core.StandardHost"
> appBase=3D"webapps" autoDeploy=3D"true"
> configClass=3D"org.apache.catalina.startup.ContextConfig"
> contextClass=3D"org.apache.catalina.core.StandardContext" debug=3D"0"
> deployXML=3D"true"
> errorReportValveClass=3D"org.apache.catalina.valves.ErrorReportValve"
> liveDeploy=3D"true"
> mapperClass=3D"org.apache.catalina.core.StandardHostMapper"
> name=3D"localhost" unpackWARs=3D"true">
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Tomcat
> Manager Application" docBase=3D"../server/webapps/manager"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/manager" privileged=3D"true" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> <ResourceLink global=3D"UserDatabase" name=3D"users"
> type=3D"org.apache.catalina.UserDatabase"/>
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0"
> docBase=3D"D:/Java/TomCat/bin/../webapps/myweb"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/myweb" privileged=3D"false" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> <ResourceLink global=3D"jdbc/DBFirebird"
> name=3D"jdbc/DBFirebird" type=3D"javax.sql.DataSource"/>
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" docBase=3D"/teste"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"D:\Java\TomCat\webapps\teste" privileged=3D"false"
> reloadable=3D"true" swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> <Resource name=3D"testeDB" scope=3D"Shareable"
> type=3D"javax.sql.DataSource"/>
> <ResourceParams name=3D"testeDB">
> <parameter>
> <name>url</name>
> =20=20=20=20=20=20=20=20=20=20=20=20=20
> <value>jdbc:firebirdsql:192.168.1.157:f:\\db\\company.ib</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value>masterkey</value>
> </parameter>
> <parameter>
> <name>maxActive</name>
> <value>4</value>
> </parameter>
> <parameter>
> <name>maxWait</name>
> <value>5000</value>
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>org.firebirdsql.jdbc.FBDriver</value>
> </parameter>
> <parameter>
> <name>username</name>
> <value>SYSDBA</value>
> </parameter>
> <parameter>
> <name>maxIdle</name>
> <value>2</value>
> </parameter>
> </ResourceParams>
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Tomcat
> Examples" docBase=3D"examples"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/examples" privileged=3D"false" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> <Logger className=3D"org.apache.catalina.logger.FileLogger"
> debug=3D"0" directory=3D"logs" prefix=3D"localhost_examples_log."
> suffix=3D".txt" timestamp=3D"true" verbosity=3D"1"/>
> <Parameter name=3D"context.param.name" override=3D"false"
> value=3D"context.param.value"/>
> <Ejb description=3D"Example EJB Reference"
> home=3D"com.mycompany.mypackage.AccountHome" name=3D"ejb/Account"
> remote=3D"com.mycompany.mypackage.Account" type=3D"Entity"/>
> <Ejb home=3D"com.wombat.empl.EmployeeRecordHome"
> name=3D"ejb/EmplRecord" remote=3D"com.wombat.empl.EmployeeRecord"
> type=3D"Entity"/>
> <Environment name=3D"maxExemptions" override=3D"true"
> type=3D"java.lang.Integer" value=3D"15"/>
> <Environment name=3D"foo/name1" override=3D"true"
> type=3D"java.lang.String" value=3D"value1"/>
> <Environment name=3D"minExemptions" override=3D"true"
> type=3D"java.lang.Integer" value=3D"1"/>
> <Environment name=3D"name3" override=3D"true"
> type=3D"java.lang.Integer" value=3D"1"/>
> <Environment name=3D"foo/bar/name2" override=3D"true"
> type=3D"java.lang.Boolean" value=3D"true"/>
> <Environment name=3D"foo/name4" override=3D"true"
> type=3D"java.lang.Integer" value=3D"10"/>
> <LocalEjb description=3D"Example Local EJB Reference"
> home=3D"com.mycompany.mypackage.ProcessOrderHome"
> local=3D"com.mycompany.mypackage.ProcessOrder" name=3D"ejb/ProcessOrder"
> type=3D"Session"/>
> <Resource auth=3D"Container" name=3D"mail/Session"
> scope=3D"Shareable" type=3D"javax.mail.Session"/>
> <Resource auth=3D"SERVLET" name=3D"jdbc/EmployeeAppDb"
> scope=3D"Shareable" type=3D"javax.sql.DataSource"/>
> <ResourceParams name=3D"mail/Session">
> <parameter>
> <name>mail.smtp.host</name>
> <value>localhost</value>
> </parameter>
> </ResourceParams>
> <ResourceParams name=3D"jdbc/EmployeeAppDb">
> <parameter>
> <name>url</name>
> <value>jdbc:HypersonicSQL:database</value>
> </parameter>
> <parameter>
> <name>password</name>
> <value></value>
> </parameter>
> <parameter>
> <name>driverClassName</name>
> <value>org.hsql.jdbcDriver</value>
> </parameter>
> <parameter>
> <name>username</name>
> <value>sa</value>
> </parameter>
> </ResourceParams>
> <ResourceLink global=3D"simpleValue"
> name=3D"linkToGlobalResource" type=3D"java.lang.Integer"/>
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Tomcat
> Documentation" docBase=3D"D:\Java\TomCat\webapps\tomcat-docs"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/tomcat-docs" privileged=3D"false" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0"
> docBase=3D"D:\Java\TomCat\webapps\teste"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/teste" privileged=3D"false" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Webdav
> Content Management" docBase=3D"D:\Java\TomCat\webapps\webdav"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/webdav" privileged=3D"false" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Welcome t=
> o
> Tomcat" docBase=3D"D:\Java\TomCat\webapps\ROOT"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper" path=3D""
> privileged=3D"false" reloadable=3D"false" swallowOutput=3D"false"
> useNaming=3D"true" wrapperClass=3D"org.apache.catalina.core.StandardWrapper=
> ">
> </Context>
> <Context className=3D"org.apache.catalina.core.StandardContext"
> cachingAllowed=3D"true"
> charsetMapperClass=3D"org.apache.catalina.util.CharsetMapper"
> cookies=3D"true" crossContext=3D"true" debug=3D"0" displayName=3D"Tomcat
> Administration Application" docBase=3D"../server/webapps/admin"
> mapperClass=3D"org.apache.catalina.core.StandardContextMapper"
> path=3D"/admin" privileged=3D"true" reloadable=3D"false"
> swallowOutput=3D"false" useNaming=3D"true"
> wrapperClass=3D"org.apache.catalina.core.StandardWrapper">
> <Logger className=3D"org.apache.catalina.logger.FileLogger"
> debug=3D"0" directory=3D"logs" prefix=3D"localhost_admin_log." suffix=3D".t=
> xt"
> timestamp=3D"true" verbosity=3D"1"/>
> </Context>
> <Logger className=3D"org.apache.catalina.logger.FileLogger"
> debug=3D"0" directory=3D"logs" prefix=3D"localhost_log." suffix=3D".txt"
> timestamp=3D"true" verbosity=3D"1"/>
> </Host>
> <Logger className=3D"org.apache.catalina.logger.FileLogger"
> debug=3D"9" directory=3D"logs" prefix=3D"catalina_log." suffix=3D".txt"
> timestamp=3D"true" verbosity=3D"1"/>
> <Realm className=3D"org.apache.catalina.realm.UserDatabaseRealm"
> debug=3D"0" resourceName=3D"UserDatabase" validate=3D"true"/>
> </Engine>
> </Service>
> </Server>
> =20
> =20
> Web.xml
> =20
> <?xml version=3D"1.0" encoding=3D"utf-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
> <welcome-file-list>
> <welcome-file>indexx.jsp</welcome-file>
> </welcome-file-list>
> <error-page>
> <error-code>404</error-code>
> <location>/error.jsp</location>
> </error-page>
> <resource-ref>
> <res-ref-name>testeDB</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> </web-app>
> =20
> =20
> Index.jsp
> =20
> <html>
> <head>
> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
> 1">
> <title>DB Test</title>
> </head>
> <body>
> <%@ page import=3D"javax.naming.*" %>
> <%@ page import=3D"javax.sql.*" %>
> <%@ page import=3D"java.sql.*" %>
>
>
> <% try{ %>
> try !!! <br>
>
> <% Context ctx =3D new InitialContext(); %>
> Context !!! <BR>
> <%
> if(ctx =3D=3D null )=20
> throw new Exception("Boom - No Context");
> %>
> CTX not null <br>=20
> <%
> DataSource ds =3D (DataSource)ctx.lookup("java:comp/env/testeDB");=20
> %>
> Data Source<br>
> <%=20
>
> if (ds !=3D null) {
> Connection conn =3D ds.getConnection();%>
>
> Conected!!<br>
>
> <% if(conn !=3D null) { %>
>
> Works <br>
>
> <% } else { %>
> No....<br>
> <%=20
> }
> conn.close();
> }
> }catch(Exception e) { %>
> <%=3De.getMessage()%>=20
> <% e.printStackTrace();
> }
>
>
>
> %>
>
> </body>
> </html>
>
> =20
> []=B4s
> Davi Rampazo
>
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
> =20
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20
>
>