Exception at Handle deserialization

Hello all,
I have a problem with deserialization of a previously serialized bean's handle.
What I do:
1. In one java virtual machine I have a piece of code that do the serialization of my bean's handle - something like this:
MyBean session = ......
Handle handle = session.getHandle();
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("./handle.dat")));
oos.writeObject(handle);
oos.close();
2. In the second JVM I do something like this:
ObjectInputStream oois = new ObjectInputStream(new FileInputStream(new File("./handle.dat")));
Handle handle = (Handle)oois.readObject();
oois.close();
EJBObject bean = handle.getEJBObject();
The second JVM runs a very simple client. The JVM has on its classpath weblogic.jar and all needed jars.
When I run the second JVM I get the following while performing oois.readObject() :
java.lang.ExceptionInInitializerError
     at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:99)
     at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1686)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1644)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at com.markocki.server.impl.ClassReader.main(ClassReader.java:31)
Caused by: java.lang.NullPointerException
     at weblogic.rmi.utils.io.RemoteObjectReplacer.<clinit>(RemoteObjectReplacer.java:47)
     ... 6 more
The question is: what I do wrong? Should I do anything extra in the second JVM (prepare it in someway to be capable to deserialize the handle) ?
Ps. Serialization to a file is an example here, I get the same error when I use RMI for passing the handle.
Regards,
Bart

Sorry I forgot to mention that I use Weblogic Server 8.1 SP 3.

Similar Messages

  • Exception while handling request: deserialization error: java.text.ParseExp

    Hi guys,
    While getting the sales order from the JDE database. It is giving
    Caught exception while handling request: deserialization error: java.text.ParseException: Unparseable date: "-11-JA-01T12:00:00-05".
    can any one of you can guide me about this exception
    Expecting a reply from any one ASAP.
    Regards,
    Chakri

    the schema element for this field is having different datatype than what you are receiving the data. Can you check logs and see on which column it is failing? If we know the exact xsd datatype used for the element and and value that is stored in table then we can correct the xsd accordingly. Are you using dynamic sql query or select options to get values from DB.

  • Exception not handled by the Collaxa Cube system

    Hi!
    i have plsql procedure and i published it as a web service using JDev 10.1.3, web service is deployed on OC4J 10.1.3. When i call it directly, everything works fine. When i make a BPEL process jast wrapping this web service (receive, assign, invoke, assign, reply - that`s all) the web service is invoked fine without error, but then error appears in the bpel process:
    Exception not handled by the Collaxa Cube system. An unhandled exception has been thrown in the Collaxa Cube system. The exception reported is: "java.lang.NullPointerException at com.collaxa.cube.engine.delivery.DeliveryHelper.saveAttachments(DeliveryHelper.java:436) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.saveAttachments(WSIFOperation_ApacheAxis.java:3521) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.populateOutMsgParts(WSIFOperation_ApacheAxis.java:1403) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.buildResponseMessages(WSIFOperation_ApacheAxis.java:1303) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeAXISRPCStyle(WSIFOperation_ApacheAxis.java:1815) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1613) at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1083) at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:452) at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:327) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:189) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:601) at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317) at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188) at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408) at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836) at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75) at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166) at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252) at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438) at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217) at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:120) at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:153) at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.syncCreateAndInvoke(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:486) at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:520) at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:435) at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:132) at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:101) at IDeliveryBean_StatelessSessionBeanWrapper22.request(IDeliveryBean_StatelessSessionBeanWrapper22.java:479) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:120) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:70) at _ngDoInitiate._jspService(_ngDoInitiate.java:289) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267) at _displayProcess._jspService(_displayProcess.java:792) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:222) at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:152) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.java:534) ". Exception: java.lang.NullPointerException Handled As: com.collaxa.cube.CubeException
    i found similar problem calling axis web service, but this web service runs on OC4J ... any suggestions what to do?
    Thanks,
    Tomas

    User,
    I'd probably try the [url http://forums.oracle.com/forums/forum.jspa?forumID=212]BPEL Forum for this one.
    Regards,
    John

  • Exception in handler thread. in BI Presentation Services

    Hi
    We are revicing following error in OBIEE 11g presentation services
    Dose anyone know the reason?
    +Exception in handler thread. An error occurred during execution of "send". Broken pipe [Socket:82]^M+
    Error Codes: ETI2U8FA^M
    Location: saw.rpc.variablemos.finalize, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads^M
    +[[+
    File:socketrpcserver.cpp
    Line:565
    Location:
    saw.rpc.server.handleConnection
    saw.rpc.server.dispatch
    saw.threadpool

    Hi ,
    By any chance have you changed anything in socketrpcserver.cpp ??
    looks like the file has changed or not copied propelry.
    Open the socketrpcserver.cpp in vi editor and check if it contains any control M charatcers (^M).
    Or
    It can be because of the JavaHost process not running. Check instanceconfig.xml (check the port number)
    If you have changed the JavaHost Port Number (default is 9810), you need to update it in instanceconfig.xml.
    <JavaHostProxy>
    <Hosts><Host address="myhost.domain.com" port="newport>" /></Hosts>
    </JavaHostProxy>

  • Exception while handling service request: org/apache/soap/Envelope

    Hi all,
    i´ve tried to run a message style webservice .
    Now i always get following Error: Exception while handling service request: org/apache/soap/Envelope
    Can anyone tell me what i should do?
    I use Bea 6.1 and Apache Soap 2.2
    I have deployed the Webservice and when i try to run the samples in apache all
    works fine.
    Thank you very much!!

    found the problem.
    I use apache soap with tomcat 5.5.9
    wrong: place the class file in a jar in the common/lib folder of tomcat
    wright: place the class file in the directory webapps/soap/web-inf/classes
    an other problem is when the method not exist

  • Steps within Exception branch / Handler

    I'm trying to send an Alert message or close a S/A bridge within an Exception branch (handler) and none of these seems to works.
    Do any steps work at all in exception branch. Can we do some clean up work before the exception handler does its thing.
    A bit more on what I'm trying to do.
    1. Open S/A bridge via HTTP
    2. Transform source to target message of RFC type
    3. Make an RFC call in a branch with Exception handler and my exception is ABAP_Abend. We can call over 100 different ABAP programs via the RFC FM based on the data type and some programs Abend in SAP/target system
    4.If RFC is successful, map response to HTTP response and this works fine
    5. If RFC fails due to ABAP_Abend, I would like to close S/A bridge which waits indefinitely otherwise and send an alert message (via steps in exception handler). But this does not seem to work.
    Any ideas on how to take care of some clean up work before the system does the exception handling.
    Thank you for your responses.
    Parimala

    Hi,
    We use the S/A bridge and exception branch to trigger alerts upon error during synchronous calls. Our process gets terminated and the alerts are thrown upon exception. But we do not use RFC - we make http calls to third-party systems.
    I am not familiar with the ABAP-Abend. In case of Abend, do you still get a response back from the RFC? If you still get a response from RFC, you need to inspect the response (switch step is one way of doing it) and raise the exception to transfer the control to the exception branch.
    Regards,
    Suresh.

  • Macbook pro running windows 8.1 system thread exception not handled

    Running Windows 8.1on MacBook Pro with dual operating system. Get BSOD on boot up with following message - system thread exception not handled but no error code.  Have checked drivers all seem to be updated. Ran fine for a few weeks but Is happening daily also external speakers are not working - please help.

    Was W8.1 installed using Bootcamp? Are BC drivers installed? What year/model is the MBP?

  • System Exception:OSoftResSvrAdm.Handle Creat ActiveX Object Error at Admin

    Hi Experts,
    While logging into the BPC admin client, we are facing the following errors:
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: OSoftResSvrAdm.Handle Creat ActiveX Object Error at Admin Server
       at OSoft.Services.Webservice.AdminMainService.AdminMainService.GetText(Int64 intStringNum, String& strReturnString, String sParam1, String sParam2, String sParam3, String sParam4, String sParam5)
       at OSoft.Services.Webservice.AdminMainService.AdminMainService.LoadRes()
       at OSoft.Services.Webservice.AdminMainService.AdminMainService..ctor()
       --- End of inner exception stack trace ---}
    We have been facing this issue since the time the server was restarted after changing the admin password.
    Please help us in resolving this issue.
    Thanks in advance.
    Meera

    So you changed the pwd for installation user of SAP BPC.
    After you performed this change did you open Server Manager and go to Reset Credential link?
    There you have to input the new pwd for installation user.
    After that try to login again using BPC client.
    Regards
    Sorin Radulescu

  • Fail to upgrade my laptop to Windows 10 due to :"system thread exception not handled ndis.sys"

    Hi,I am trying to upgrade my Toshiba satellite Z30 laptop from windows 8.1 to windows 10.every time i try( and i tired more than 8 times already), it goes all the way to finishing installing the drivers and then after the auto reboot it comes up with a :"system thread exception not handled ndis.sys" error. at the second boot phase.I have an Intel I218V network adapter and an Intel(R) Dual Band Wireless-AC 3160.I tries upgrading them manually to a windows 10 compatible driver before the install but still no success.I also tried a clean booot and disabling both adapters before upgrading.does anyone have an additional idea of how to solve this problem? thanks Amose

    My many Win 10 install attempts have failed similarly. In the final phase of install during "Configuring Settings" I get the error message: "System Thread Exception Not handled...."  I'm not sure if it reads, "ndis.sys" at the end. The message doesn't remain long.I have a Satellite L355-S7905 with Windows 7 Home Premium. 

  • Enabled Hyper-V causes "System thread exception not handled" BSOD in builds 10041 and 10049

    I had a Windows 10 TP build 9926 installation with Visual Studio 2013 Community Edition installed, when build 10041 was released Windows Update tried to install it but after restart it got BSOD with "System thread exception not handled" text and
    reverted back to 9926 with error code 0xC1900101-0x40017. I tried update from ISO, got the same BSOD. Tried clean installation, it worked. 
    I decided to install software and restart the system after each installation and discovered that installing Visual Studio 2015 CTP6 caused BSOD after restart if and only if emulators were included. Installation of  Visual Studio 2015 CTP6 without emulators
    and then installation of Tools for Windows 10 also caused BSOD with "System thread exception not handled" error after restart. 
    So I thought that it was Hyper-V related and disabled hardware virtualisation in BIOS settings. It worked, system successfully booted, but, of course, Tools for Windows 10 setup showed up and told me about fail in UAP for Windows Phone package.
    So, my hardware is Gigabyte GA-A75N-USB3 motherboard with AMD A8-3870 APU with integrated graphics, Intel SSDSA2CW080G3 80GB SSD and 8 GB RAM.
    Steps to reproduce are to enable "Virtualisation" item in BIOS settings, install Windows 10 Technology Preview Build 10041, install Visual Studio 2015 CTP6, install Visual Studio Tools for Windows 10 Preview, restart the system and
    see blue screen with white text of description of "System thread exception not handled" error.

    Same issue, MSI A75MA-G55 AMD Fusion Socket FM1 with A8-3850 APU, 16GB RAM.  Hyper-V worked in 9926, but broke in 10041 and remains broken in 10049.  I have found that if you get in this BSOD loop, you can boot to Safe Mode and Un-install Hyper-V
    to recover.  10041 was an update to 9926, and 10049 was a clean install.

  • Invoke Error - ORABPEL-00000 Exception not handled by the Collaxa

    Hi,
    We have a BPEL process that is involking a stubbed .net service which we are trying to simulate using a dummy Sync BPEL process to test the stubbed service. When we add the wsdlRuntimeLocation=DummyBPELProcess.wsdl we get the error ORABPEL-00000 Exception not handled by the Collaxa Cube system. An unhandled exception has been thrown in the Collaxa Cube system. The exception reported is: "java.lang.NullPointerException at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:441) at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:285 .
    The input and output messsages and the namespace for the stubbed .net service and the dummy bpel process is the same.
    When we involke the Dummy BPEL process thru a another BPEL process the message looks
    <?xml version="1.0" encoding="UTF-8" ?><part><messages><Invoke_1_PersistSalesOrder_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="messagePart"><GlobalProductionOrderRequest xmlns:ns="http://schemas.xxx.com/it/fulfillment/RoutingSlip/1.0" xmlns:ns1="http://schemas.xxx.com/it/fulfillment/GlobalProductionOrder/1.0" xmlns="http://schemas.xxx.com/it/fulfillment/GlobalProductionOrder/1.0">
    <ns:RoutingSlip Sender="string" Receiver="string" Direction="RESPONSE" Type="string" MessageID="string" CorrelationID="string" CreateDate="2007-10-26T01:36:28" CreateHost="string" Instance="string"/>
    whereas the invoke message to the stubbed .net service looks like
    <?xml version="1.0" encoding="UTF-8" ?><part><messages>*<input>*<persistGPOInputVar><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="messagePart"><input><GlobalProductionOrderRequest xmlns:ns="http://schemas.xxx.com/it/fulfillment/RoutingSlip/1.0" xmlns:ns1="http://schemas.xxx.com/it/fulfillment/GlobalProductionOrder/1.0" xmlns="http://schemas.xxx.com/it/fulfillment/GlobalProductionOrder/1.0">
    <ns:RoutingSlip Sender="string" Receiver="string" Direction="RESPONSE" Type="string" MessageID="string" CorrelationID="string" CreateDate="2007-10-26T01:36:28" CreateHost="string" Instance="string"/><!--Optional:--><ns1:BackFed>true</ns1:BackFed>
    Is the additional <input> tag the issue ? Why is it coming for the .net stub and not the bpel process.

    Resolved after server Restart

  • Error: [env:ClienT:caught exception while handling request]

    failure when calling to the service Web
    1. I INTRODUCE DIRECTION WSDL URL And SOON PULSE TO SHOW METODOS
    2. And IT INDICATES The METODOS To ME AVAILABLE FOR THIS SERVICE WEB
    3. LATER IT SHOWS THE PARAMETERS TO ME THAT NEEDS TO MAKE THE CALL TO THE PREVIOUS METODO
    4. I INTRODUCE THE VALUE OF THE PARAMETER AND WHEN I TEST THE TEST RESULTS IS THE FOLLOWING ERROR:
    [env:Client : caught exception while handling request: unexpected encoding style: expected=, actual=http://xml.apache.org/xml-soap/literalxml]

    failure when calling to the service Web
    1. I INTRODUCE DIRECTION WSDL URL And SOON PULSE TO SHOW METODOS
    2. And IT INDICATES The METODOS To ME AVAILABLE FOR THIS SERVICE WEB
    3. LATER IT SHOWS THE PARAMETERS TO ME THAT NEEDS TO MAKE THE CALL TO THE PREVIOUS METODO
    4. I INTRODUCE THE VALUE OF THE PARAMETER AND WHEN I TEST THE TEST RESULTS IS THE FOLLOWING ERROR:
    [env:Client : caught exception while handling request: unexpected encoding style: expected=, actual=http://xml.apache.org/xml-soap/literalxml]

  • EJB Handle deserialization ....

    Hi,
    I am running Weblogic Server 8 SP2 with the supplied ejb20_basic_statefulSession example.
    <p>
    My client is a webapp installed on Tomcat and is using the ejb20_basic_statefulSession_client.jar, together with the WebLogic's wlclient.jar. I can successfully invoke the methods (buy, sell, getBalance) and get back the expected results.
    <p>
    Now the problem. I am storing an object containing an EJBHandle to the Trader SFSB in a HTTPSession. Upon HTTPSession passivation, the EJB Handle is serialized out. However, upon HTTPSession activation, deserialization fails and I am getting the following exception:
    <p>
    Error deserializing Session 5E343833AA1183690C6895162B69E1D1.localhost:8005: java.lang.ClassNotFoundException: <b>examples.ejb20.basic.statefulSession._Trader_Stub</b>
    <p>
    The funny thing is that I cannot find the class <b>examples.ejb20.basic.statefulSession._Trader_Stub</b> anywhere. It is not generated by wlappc.
    <p>
    I have tried writeObject()/readObject() and HttpSessionBindingListener's valueBound()/valueUnbound(), but I am still getting the same error.
    Would appreciate any input. Thanks.
    Regards,
    Eric

    Hi getting the below error deserilising the EJBObject after serilizaion.
    Below is the code to obtain it
    ==============================================
    FileInputStream fis = new FileInputStream ("d:/beaexam/serial");
    ObjectInputStream ois = new ObjectInputStream(fis);
    SecondLocal learnLocal1 = null;
    Handle handle = (Handle)ois.readObject();
    ==============================================
    java.lang.ExceptionInInitializerError
    at weblogic.ejb20.internal.HandleImpl.readExternal(HandleImpl.java:99)
    at java.io.ObjectInputStream.readExternalData(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at EJBClientHandle.main(EJBClientHandle.java:14)
    Caused by: java.lang.NullPointerException
    at weblogic.rmi.utils.io.RemoteObjectReplacer.<clinit>(RemoteObjectRepla
    cer.java:47)
    ... 6 more

  • SQL Exception - Invalid Handle

    I am writing a program for a order company using java beans. I have everything working except when i try to add a new item into the database it throws a exception saying: invlaid handle. The code for that bean file is given below..any help will be really appreciated. The error is under setNewItem function on code: results = statement.executeQuery(select).
    package stockBeans;
    import java.sql.*;
    public class StockAccess
         private Connection connection;
         private Statement statement;
         private ResultSet results;
         public StockAccess() throws ClassNotFoundException
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              catch (ClassNotFoundException cnfEx)
                   throw new ClassNotFoundException(
                                  "Unable to locate JDBC driver!");
         public String getStockLevel(String code) throws SQLException
              int stockLevel;
              String returnValue="";
              boolean match=false;
              connectAndCreateStatement();
              results = statement.executeQuery("SELECT * FROM StockItems");          
              while((results.next())&&(match==false))
                   if(code.equalsIgnoreCase(results.getString(1)))
                        match=true;
                        stockLevel = results.getInt(3);
                        returnValue = Integer.toString(stockLevel);
              if(!match)
                   returnValue="error";
              disconnectFromDb();
              return returnValue;
         public void setNewItem(String code, String desc, int currentLvl,int reorderLvl,Float price)
                                       throws SQLException
              boolean found;
              connectAndCreateStatement();
              found = findMatch(code);
              if(found==false)
                   try
                        String select = "SELECT * FROM StockItems";
                        **results = statement.executeQuery(select);**
                        String insert = "INSERT INTO StockItems VALUES (" + "'" + code
                                            + "'" + "," + "'" + desc + "'" + "," +
                                            + currentLvl + "," reorderLvl "," price ")";
                        int result = statement.executeUpdate(insert);
                        System.out.print("Congratulation. Match Data Saved");
                   catch(SQLException sqlEx)
                        System.out.println("* Error Inserting Data! *" + sqlEx);
              else
                   System.out.println("\n Code Already Entered. Try Again \n");
         public void getStock()
                        throws SQLException
              connectAndCreateStatement();
              System.out.println();
              System.out.println("Code"+"\t\t"+" Description"
                        +"\t"+"Current Level"+"\t"+"Reorder Level"+"\t"+"Cost");
              results = statement.executeQuery("SELECT * FROM StockItems");
              while (results.next())
                   System.out.println(results.getString(1)
                                            +"\t\t"+results.getString(2)
                                            +"\t\t"+results.getInt(3)
                                            +"\t\t"+ results.getInt(4)
                                            +"\t\t"+results.getFloat(5));
         public boolean findMatch(String code)
                                       throws SQLException
              boolean found=false;
              connectAndCreateStatement();
              try
                   results = statement.executeQuery("SELECT * FROM StockItems");          
                   while(results.next()&& (found==false))
                        if(code.equalsIgnoreCase(results.getString(1)))
                             found=true;
                        else
                             found=false;
              catch(SQLException sqlEx)
                   System.out.println("Unable to retrieve data");
              disconnectFromDb();
              return found;     
         private void connectAndCreateStatement() throws SQLException
              try
                   connection = DriverManager.getConnection(
                                                 "jdbc:odbc:StockData","","");
                   //*** Change DSN name if yours is different! ***
              catch (SQLException sqlEx)
                   throw new SQLException("Unable to connect to database!");
              try
                   statement = connection.createStatement();
              catch (SQLException sqlEx)
                   throw new SQLException("Unable to create SQL statement!");
         private void disconnectFromDb() throws SQLException
              try
                   connection.close();
              catch (SQLException sqlEx)
                   throw new SQLException(
                             "Unable to disconnect from database!");
    }

    I have found the problem..i am closing the DB in findMatch function.
    Thank You.

  • File Adapter - Exception / Error handling

    We are using File Adapter in BPEL process to read multiple records from the file. Additionally, we have also handled rejectedMessageHandlers & fatalErrorFailoverProcess exception to lunch custom BPEL process. The process is running fine and also successfully launches custom handler processes too.
    Need help / direction in addressing following issues.
    1. While reading from file, if a records errors out, the custom BPEL process is launched (as specified in rejectedMessageHandlers property). In such instance, the previously read valid records are processed but remaining records are marked as errored out. Our requirement is to make entire record set as invalid and would like to perform rollback of entire process.
    2. Whenever an error occurs during reading the records using File adapter, the associated data file is being deleted from the input directory and also NOT available in archive directory also.
    Are we missing any set up ? We are on 10.1.3.1
    thanks
    -Yj
    Sample Log file:
    <2009-04-20 11:46:14,080> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/TestFileRead~1.0/
    <2009-04-20 11:46:14,080> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
    process='bpel://localhost/default/TestFileRead~1.0/'
    domain='default'
    WSDL location='Read.wsdl'
    portType='Read_ptt'
    operation='Read'
    activation properties={portType=Read_ptt, rejectedMessageHandlers=bpel://default|AdapterError2|initiate|payload}
    <2009-04-20 11:46:14,096> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
    <2009-04-20 11:46:14,143> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: c:\temp\yj
    <2009-04-20 11:46:14,143> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
    <2009-04-20 11:46:30,580> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
    <2009-04-20 11:47:14,158> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Translated inbound batch index 1 of file {testdata6.txt} with corrupted message count = 1
    <2009-04-20 11:47:14,158> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Sending message to Adapter Framework for rejection to user-configured rejection handlers : {
    fileName=C:\temp\yj\testdata6.txt, startLine=3, startColumn=1, endLine=-1, endCol=-1, Exception=ORABPEL-11168
    Error while reading native data.
    [Line=3, Col=5] Expected "|" for the data starting at the specified position, while trying to read the data for "element with name C2", using "style" as "terminated" and "terminatedBy" as "|", but not found.
    Ensure that "|", exists for the data starting at the specified position.
    <2009-04-20 11:47:14,158> <WARN> <default.collaxa.cube.activation> <AdapterFramework::Inbound> [Read_ptt::Read(Root-Element)]onReject: Sending invalid inbound message to Exception Handler: bpel://default|AdapterError2|initiate|payload
    <2009-04-20 11:47:14,315> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Setting last error record to : -1
    <2009-04-20 11:47:14,658> <ERROR> <default.collaxa.cube.activation> <AdapterFramework::Inbound> onBatchFailure: Batch 'bpel://localhost/default/TestFileRead~1.0//testdata6.txt_1240205493408' (C:\temp\yj\testdata6.txt) has failed due to: ORABPEL-11168
    Error while reading native data.
    [Line=3, Col=5] Expected "|" for the data starting at the specified position, while trying to read the data for "element with name C2", using "style" as "terminated" and "terminatedBy" as "|", but not found.
    Ensure that "|", exists for the data starting at the specified position.

    Any light / idea on the following issue ?
    1. While reading from file, if a records errors out, the custom BPEL process is launched (as specified in rejectedMessageHandlers property). In such instance, the previously read valid records are processed but remaining records are marked as errored out. Our requirement is to make entire record set as invalid and would like to perform rollback of entire process. Even, if we do not configure rejectedMessageHandlers, the behavior is that valid rows are processed with the rest of BPEL process and for Invalid rows, the records are rejected. Our requirement, is that, even if there is one invalid record, the entire set of record should NOT move ahead with the BPEL process
    2. Whenever an error occurs during reading the records using File adapter, the associated data file is being deleted from the input directory and also NOT available in archive directory also. Note, in case of all valid record the file is available in archive directory

Maybe you are looking for