my dog learned polymorphism*
The moose likes JDBC and the fly likes Not able to connect my J2ee application to Firebird database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Not able to connect my J2ee application to Firebird database" Watch "Not able to connect my J2ee application to Firebird database" New topic
Author

Not able to connect my J2ee application to Firebird database

Anil Cherian
Greenhorn

Joined: Mar 16, 2005
Posts: 2
Hi ,

I am using a database named Firebird 1.0.3 , Tomcat 4.1.27, Java - JDK1.4
My application is not able to connect to the firebird database .

The entries made by me in the server.xml file of tomcat is
<Context path="/nucleus" docBase="nucleus.war" debug="0"
reloadable="true" useNaming="true">
<ResourceParams name="jdbc/FBDS">
<parameter><name>user</name><value>dbuser</value></parameter>
<parameter><name>password</name><value>anilpc</value></parameter>
<parameter><name>driverClassName</name>
<value>org.firebirdsql.jdbc.FBDriver</value></parameter>
<parameter><name>driverName</name>
<value>jdbc:firebirdsql:localhost:c:/fbsql/mydb.fdb</value></parameter>
</ResourceParams>
</Context>

where mydb.fdb is the firebird database file lacated at c:/fbsql/mydb.fdb on my machine
Do I have to enter any port number in the connection string given above..

the whole application works fine with oracle database ...but the problem arises when i am trying to connect to firebird data base

The following are the errors that i get on the tomcat console:

TyrexDataSourceFactory: Cannot create DataSource, Exception
java.lang.NoClassDefFoundError: javax/resource/ResourceException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(TyrexDataSourceFactory.java:2
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:164)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at com.mastek.nucleus.biz.util.ConnectionFactory.getDatasource(ConnectionFactory.java:45)
at com.mastek.nucleus.biz.util.ConnectionFactory.getConnection(ConnectionFactory.java:64)
at com.mastek.nucleus.biz.user.UserBiz.authenticateUser(UserBiz.java:52)
at com.mastek.nucleus.manager.DatabaseManager.authenticateUser(DatabaseManager.java:43)
at com.mastek.nucleus.ui.web.forms.Login.btnLogin_Click(Login.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.mastek.jspx.web.ui.EventHandler.invokeHandlerMethod(EventHandler.java:135)
at com.mastek.jspx.web.ui.EventHandler.raise(EventHandler.java:110)
at com.mastek.jspx.web.ui.WebForm.dispatch(WebForm.java:280)
at com.mastek.jspx.web.ui.WebForm.process(WebForm.java:111)
at com.mastek.jspx.web.ui.RequestHandler.execute(RequestHandler.java:57)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
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.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:534)
ERROR [HttpProcessor[8080][2]] (ConnectionFactory.java:getDatasource()::47) - ConnectionFactory::


Please help ......

thanks ®ards
Anil Cherian
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Looks like you haven't got j2ee.jar in you classpath. That's where javax.resource.ResourceException can be found.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to connect my J2ee application to Firebird database