Subject | Re: [Firebird-Java] TestPoolingConnectionManager error |
---|---|
Author | Ludek Falta |
Post date | 2002-12-18T10:35:01Z |
Hi Rick,
this error message I receive under Win2K and Red Hat 7.1 and you are
right this
may be a timing problem.
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
[Firebird-Java] TestPoolingConnectionManager error:
this error message I receive under Win2K and Red Hat 7.1 and you are
right this
may be a timing problem.
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,test
> That is a bogus error message that is caused by a timing problem in the
> 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/