Subject | Re: [Firebird-Java] TestPoolingConnectionManager error |
---|---|
Author | Rick Fincher |
Post date | 2002-12-18T20:44:21Z |
Hi Ludek,
----- Original Message -----
> Hi Rick,
>
> this error message I receive under Win2K and Red Hat 7.1 and you are
> right this
> may be a timing problem.
This has been confirmed to be a problem with the test code not JayBird
itself. They just haven't got around to fixing the test code yet.
>
I'm not sure if your old version of the code was before the refactoring but
you need to be sure to put mini-concurrent.jar and mini-j2ee.jar as well as
firebirdsql.jar into CATALINA_HOME/common/lib. Depending on the version of
JDK you are using you may need to put a copy of jndi.jar in there as well
(pre-1.3 JDK).
Are you getting this error when you start the Tomcat server or when you load
this page?
It looks like it is not creating the named resource properly when the server
starts up.
Does this error appear on the browser screen or in the log files?
You may also want to try it with Tomcat 4.1.17 to see if it is a Tomcat bug
that has been fixed in a later release. This is probably not the case since
it was working before, but you never know.
Rick
> I have another problem with the latest firebird java jca-jdbc driver from
> cvs.
> Old version, I'm not sure, I think, from October, works fine with Tomcat
> 4.0
> Server. I'm using this driver in JSP like resource:
>
> <%@page contentType="text/html"%>
> <%@page import="java.sql.*"%>
> <%@page import="org.firebirdsql.jdbc.*"%>
> <%@page import="javax.naming.*"%>
> <html>
> <head><title>JSP Page</title></head>
> <body bgcolor='white'>
> <%
> Connection con = null;
> Statement stmt = null;
> ResultSet rst = null;
> Context initCtx = (Context) new InitialContext();
> Context ctx = (Context) initCtx.lookup("java:comp/env");
> FBWrappingDataSource ds = (FBWrappingDataSource)
> ctx.lookup("jdbc/Employee");
> con = ds.getConnection();
> try {
> stmt = con.createStatement();
> rst = stmt.executeQuery("SELECT * FROM EMPLOYEE");
> out.println("<br>");
> while (rst.next()) {
> out.println(rst.getString(1) + " ");
> out.println(rst.getString(2) + " ");
> out.println(rst.getString(3) + " ");
> out.println(rst.getString(4) + " ");
> out.println(rst.getString(5) + " ");
> out.println(rst.getString(6) + " ");
> out.println(rst.getString(7) + " ");
> out.println(rst.getString(8) + " ");
> out.println(rst.getString(9) + " ");
> out.println(rst.getString(10) + "<br>");
> }
> }
> finally {
> if (rst != null) rst.close();
> if (stmt != null) stmt.close();
> if (con != null) con.close();
> }
> %>
> </body>
> </html>
>
> But with the new driver I have following problems:
>
> javax.naming.NamingException: Cannot create resource instance
> at org.apache.naming.NamingContext.lookup(NamingContext.java:837)
> 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.jsp.firebird$jsp._jspService(firebird$jsp.java:83)
> at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> ...
>
> Could you give me some hint what I have to change to use the latest
> driver.
>
> Thanks,
>
> Ludek
>
>
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
>
> On 12/17/02, 8:51:09 PM, "Rick Fincher" <rnf@...> wrote regarding
Re:
> [Firebird-Java] TestPoolingConnectionManager error:
>
>
> > Hi Ludek,
>
> > That is a bogus error message that is caused by a timing problem in the
> test
> > code when running on some systems. The developers are aware of it.
>
> > You probably see something like this in the build window:
>
> > [junit] Running org.firebirdsql.jca.TestPoolingConnectionManager
> > [junit] Tests run: 4, Failures: 1, Errors: 0, Time elapsed: 90.711 sec
> > [junit] TEST org.firebirdsql.jca.TestPoolingConnectionManager FAILED
>
> > That's what I get under windows 2000.
>
> > Your compiled code is OK to use.
>
> > Rick
>
> > ----- Original Message -----
>
> > > Hi,
> > >
> > > I downloaded the latest version of the firebird jca jdbc driver and
after
> > > compilation at the TestPoolingConnectionManager I got the error:
> > >
> > > testShortBlocking Failure Blocking Timeout occurred in
> > > ShortBlocking test.
> > >
> > > junit.framework.AssertionFailedError: Blocking Timeout
occurred
> > > in ShortBlocking test
> > > at
> > >
org.firebirdsql.jca.TestPoolingConnectionManager.testShortBlocking(TestP
> > > oolingConnectionManager.java:143)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at
> > >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> > > a:39)
> > > at
> > >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> > > Impl.java:25)
> > >
> > > Java Version 1.4.0
> > > Java Vendor Sun Microsystems Inc.
> > > Java VM Name Java HotSpot(TM) Client VM
> > > Java VM Version 1.4.0-b92
> > > Java VM Info mixed mode
> > > OS Name Red Hat Linux 7.1
> > > OS Version 2.4.18-17.7.x
> > > OS Arch i386
> > >
> > > What I have to do to fix it?
> > >
> > > Best regards
> > >
> > > Ludek Falta
>
>
>
> > To unsubscribe from this group, send an email to:
> > Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>