0 Replies Latest reply on Nov 16, 2004 10:10 AM by Uno Engborg

    Empty Resultset from Firebird in Tomcat Servlet

    Uno Engborg Newbie

      I try to set up a servlet to connect to a firebird database. It seams that I can lookup the Datasource and get a Connection. I then create a Statement and do executeQuery. I get back a ResulSset. The problem is that the ResultSet is empty. Even though it shouldn't be.

      I use the Firebird-ds.xml file from the example directory and have only altered the database location, and sysdba password to fit my Firebird setup.
      The firebirdsql.rar seams to be deployed OK.

      The datasource shows in the jmx-web console JNDI view as java:FirbirdDS

      My web.xml :

      <web-app >
       <display-name>Name for Test</display-name>
       <description><![CDATA[Description for Test]]></description>
       <resource-ref >

      My jboss-web.xml:


      The calling code in the servlet looks like this

      ServletContext cont=config.getServletContext();
      try {
       InitialContext context=new InitialContext();
      } catch (NamingException e) {
       Connection con=ds.getConnection("sysdba","masterkey");
       Statement stmt=con.createStatement();
       ResultSet res=stmt.executeQuery("select * from test");
       String s=res.getString("FNAME");
      }catch(java.sql.SQLException e){
       p.println("Frågan misslyckades"+e.getMessage());

      I use JBoss 4.00 with Tomcat servlet container. Sun Jdk1.5.0, Win2k
      Firebird 1.51, JayBird 1.54