Mantis - Resin
Viewing Issue Advanced Details
1303 minor always 08-21-06 11:16 11-20-06 11:11
ferg  
ferg  
normal  
closed 3.0.21  
fixed  
none    
none 3.1.0  
0001303: EJB Date issue with connections
t looks like 3.0.21 does fix the Unsupported major.minor version error reported below. So, things are progressing.

I have a new problem now related to EJB and perhaps type conversion. This is code that has worked all the way back to resin 2. The stack trace follows:

[14:51:07.262] Closing dangling connections. All connections must have a close() in a finally block.
[14:51:07.288] java.lang.IllegalStateException: Connection UserConnection[com.caucho.sql.ManagedConnectionImpl@d9531f] was not closed. Connections must have a close() in a finally block.
[14:51:07.288] at com.caucho.jca.UserTransactionImpl.abortTransaction(UserTransactionImpl.java:497)
[14:51:07.288] at com.caucho.jca.UserTransactionProxy.abortTransaction(UserTransactionProxy.java:183)
[14:51:07.288] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:193)
[14:51:07.288] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
[14:51:07.288] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
[14:51:07.288] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
[14:51:07.288] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:516)
[14:51:07.288] at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[14:51:07.288] at java.lang.Thread.run(Thread.java:552)
[14:51:07.299] javax.servlet.ServletException: java.lang.ClassCastException
[14:51:07.299] at foo.commons.image.BaseCachedImageServlet.service(BaseCachedImageServlet.java:97)
[14:51:07.299] at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
[14:51:07.299] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
[14:51:07.299] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
[14:51:07.299] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
[14:51:07.299] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
[14:51:07.299] at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
[14:51:07.299] at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:516)
[14:51:07.299] at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[14:51:07.299] at java.lang.Thread.run(Thread.java:552)
[14:51:07.299] Caused by: java.lang.ClassCastException
[14:51:07.299] at _ejb.CachedImageBean.CachedImageBean__EJB$Bean.ejbSelectModifiedDate(CachedImageBean__EJB.java:309)
[14:51:07.299] at foo.commons.image.CachedImageBean.ejbHomeGetModifiedDate(CachedImageBean.java:14)
[14:51:07.299] at _ejb.CachedImageBean.CachedImageBean__EJB$LocalHome.getModifiedDate(CachedImageBean__EJB.java:487)
[14:51:07.299] at foo.commons.image.CachedImageServlet.getModifiedDate(CachedImageServlet.java:24)
[14:51:07.299] at foo.commons.image.BaseCachedImageServlet.service(BaseCachedImageServlet.java:60)
[14:51:07.299] ... 9 more


This seems to be related to a Date field on one of my EJBs. I have attached the relevant source for reference

(see Mail on Aug 15)


Notes
(0001596)
ferg   
11-20-06 11:11   
ejb/06dd

The rs.close() has been moved to a finally block.

The class cast exception looks like it may be an application bug.

The value of the select is based on the field type, e.g. java.util.Date. If the return type of the ejbSelect does not match (e.g. java.sql.Date), then you can get a class cast exception.