wood burning stoves 2.0*
The moose likes Servlets and the fly likes Unexpected Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unexpected Exception" Watch "Unexpected Exception" New topic
Author

Unexpected Exception

Maria Smith
Ranch Hand

Joined: Apr 01, 2004
Posts: 40
I am trying to insert/update one of the DB2 table using Java servlet
and it fails when I call pstmt.executeUpdate(); method.
Same Code works fine on my PC. But it gives following error message
on Unix box and brings the tomcat server down.

I am not sure what is the Problem

Can some one Please help me

Thanks
Maria

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xFF33060C
Function=memcpy+0x1C
Library=/usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1

Current Java thread:
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.SQLExecute(Native Method)
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java:1079)
at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdate(DB2PreparedStatement.java:726)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:207)
at DataManageServlet.service(DataManageServlet.java:202)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:466)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
at AddressMaintainServlet.service(AddressMaintainServlet.java:929)
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:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:261)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Dynamic libraries:
0x10000 /usr/j2se/bin/java
0xff350000 /usr/lib/libthread.so.1
0xff390000 /usr/lib/libdl.so.1
0xff200000 /usr/lib/libc.so.1
0xff330000 /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
0xfe000000 /usr/j2se/jre/lib/sparc/client/libjvm.so
0xff2e0000 /usr/lib/libCrun.so.1
0xff1e0000 /usr/lib/libsocket.so.1
0xff100000 /usr/lib/libnsl.so.1
0xff0d0000 /usr/lib/libm.so.1
0xff1c0000 /usr/lib/libsched.so.1
0xff310000 /usr/lib/libw.so.1
0xff0a0000 /usr/lib/libmp.so.2
0xff060000 /usr/j2se/jre/lib/sparc/native_threads/libhpi.so
0xfe7d0000 /usr/j2se/jre/lib/sparc/libverify.so
0xfe790000 /usr/j2se/jre/lib/sparc/libjava.so
0xfe770000 /usr/j2se/jre/lib/sparc/libzip.so
0xfb8d0000 /usr/j2se/jre/lib/sparc/libnet.so
0xf97c0000 /opt/IBMdb2/V7.1/lib/libdb2jdbc.so
0xee800000 /export/home/db2inst1/sqllib/lib/libdb2.so.1
0xf97a0000 /usr/lib/libposix4.so.1
0xf9450000 /usr/lib/libresolv.so.2
0xf96e0000 /usr/lib/libaio.so.1

Heap at VM Abort:
Heap
def new generation total 2112K, used 990K [0xf1400000, 0xf1620000, 0xf1b10000)
eden space 2048K, 45% used [0xf1400000, 0xf14e7968, 0xf1600000)
from space 64K, 100% used [0xf1610000, 0xf1620000, 0xf1620000)
to space 64K, 0% used [0xf1600000, 0xf1600000, 0xf1610000)
tenured generation total 8192K, used 5252K [0xf1b10000, 0xf2310000, 0xf5400000)
the space 8192K, 64% used [0xf1b10000, 0xf2031270, 0xf2031400, 0xf2310000)
compacting perm gen total 8960K, used 8754K [0xf5400000, 0xf5cc0000, 0xf9400000)
the space 8960K, 97% used [0xf5400000, 0xf5c8cad8, 0xf5c8cc00, 0xf5cc0000)

Local Time = Wed Aug 4 14:25:07 2004
Elapsed Time = 527
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
#
# An error report file has been saved as hs_err_pid1362.log.
# Please refer to the file for further information.
Amar Nandigam
Greenhorn

Joined: Nov 26, 2002
Posts: 1
Hi Maria,
What kind of drivers are you using to connect to DB2 Database on the Unix machine?

amar
Maria Smith
Ranch Hand

Joined: Apr 01, 2004
Posts: 40
I am using JDBC driver. Java version 1.4.2
and db2 connect server version 7.1.1
Shawn Clark
Greenhorn

Joined: Aug 03, 2004
Posts: 7
I had a similar problem with this on an Oracle OC4J instance connecting to Oracle databases. I ended up changing my JDBC driver class and it fixed the problem. I am guessing that you are trying to do something that your current JDBC driver can't handle properly so it is causing the VM to crash.
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Hi Maria,

There are 4 basic types of JDBC driver: Type 1 - JBDC/ODBC bridge; Type 2 - Native-API (part Java); Type 3 - Net protocol (all Java); and Type 4 - Native protocol (all Java).

I think I'm right in saying that if you want a platform-independent driver, i.e. one that you can use on both UNIX and Windows, then you need Type 3 or Type 4 drivers. Yours is probably a Type 2, so you need to change driver.

Incidentally, if you were wondering, Signal 11 is SIGSEGV (Segmentation Violation), which is UNIX's way of saying, "Bang! You're dead!"

Jules
[ August 06, 2004: Message edited by: Julian Kennedy ]
 
wood burning stoves
 
subject: Unexpected Exception
 
Similar Threads
Error in jasper report generation
JasperException: Exception creating bean of class ?
Servlet crash every morning, was working ok before I went to sleep
javax/crypto/CipherSpi
Error in jasper report generation