How to save image into blob:java.sql.SQLException: ORA-01465:nvalid hex

hi all,
I am trying to save an image (blob) into oracle. When i try this i am getting following error.
                  java.sql.SQLException: ORA-01465: invalid hex number
                         BLOB blob = BLOB.createTemporary(con , false, BLOB.DURATION_SESSION);
                   String dir = "C:\\opt\\temp";
                   File binaryFile = new File(dir+"/"+filename);
                            FileInputStream instream = new FileInputStream(binaryFile);
                      OutputStream outstream = blob.setBinaryStream(1L);
                      int size = blob.getBufferSize();
                      byte[] buffer = new byte[size];
                      int length = -1;
                      while ((length = instream.read(buffer)) != -1)
                        outstream.write(buffer, 0, length);
                      instream.close();
                      outstream.close();
                              System.out.println("blob:>>>>>>"+blob);
                String sqlText =
                          "INSERT INTO test_fileupload (filename, blobfile) " +
                          "   VALUES('" + filename + "','" + outstream  + "')";
                      st.executeUpdate(sqlText);
                      con.commit();In the above Insert statement i tried with "blob" insted of "outstream" still same but when i try with the string "3s34se"
it is inserting into database..
I am new to blob can any one explain me why is like that.
Thanq in adv.
Edited by: Ajayuppalapati on Nov 21, 2008 4:40 PM

ORA-01465: invalid hex number
[http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=3&t=012434]
[http://forums.sun.com/thread.jspa?threadID=261091&forumID=31]

Similar Messages

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • Java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."DESCRIPTION"."TYPE")

    insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('','','',41)
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SYSTEM"."DESCRIPTION"."TYPE")
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
    at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1125)
    at com.event.struts.InsertDetails.doPost(InsertDetails.java:78)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source
    and i my
    Action class is
    public class InsertDetails extends HttpServlet{
    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
    // TODO Auto-generated method stub
    Connection conn = null;
    try{
    List list = (List) req.getSession().getAttribute("listbean");
    InputBean ib = (InputBean) list.get(0);
    InputBean ib1 = (InputBean) list.get(1);
    InputBean ib2 = (InputBean) list.get(2);
    InputBean ib3 = (InputBean) list.get(3);
    InputBean ib4 = (InputBean) list.get(4);
    InputBean ib5 = (InputBean) list.get(5);
    InputBean ib6 = (InputBean) list.get(6);
    InputBean ib7 = (InputBean) list.get(7);
    conn = ConnectionUtils.getConnection();
    Statement stmt = conn.createStatement();
    String sql1 = "select seq.nextval from DUAL";
    ResultSet rs1 = stmt.executeQuery(sql1);
    rs1.next();
    int event_id = rs1.getInt(1);
    //Advanced and general info
    String sql2 = "insert into EVENT_INFO (EVENT_ID,EVENT_NAME,SHORT_NAME,EVENT_START_DATE,EVENT_END_DATE,EVENT_START_TIME,EVENT_END_TIME,event_LOCATION,ADDRESS1,ADDRESS2,CITY,STATE,ZIP_CODE,COUNTRY,event_COMMENT,EVENT_OVERVIEW,EXTRA1,EXTRA2,MEMBERSHIP_OPTION,EXTRA3,EXTRA4,EXTRA5,KID,TEEN,ADULT,SENIOR,SENILE,EVENT_TYPE1,EVENT_TYPE2,DETAILED_DESCRIPTION,IS_DETAILED_DESCRIPTION_HTML,ADDITIONAL_URL,BYPASS_INFORMATION_PAGE,CANCELLATION_POLICY,ADDTIONAL_INFO) values("+event_id+",'"+ib.getName()+"','"+ib.getShortname()+"','"+ib.getStartdate()+
    "','"+ib.getEnddate()+"','"+ib.getStarttime()+"','"+ib.getEndtime()+"','"+ib.getLocation()+"','"+ib.getAddress1()+"','"+ib.getAddress2()+"','"+
    ib.getCity()+"','"+ib.getState()+"','"+ib.getZip()+"','"+ib.getCountry()+"','"+ib.getComment()+"','"+ib.getTextarea()+"','"+ib.getExtra1()+"','"+
    ib.getExtra2()+"','"+ib.getExtra3()+"','"+ib.getExtra4()+"','"+ib.getExtra5()+"','"+ib.getExtra6()+"','"+ib.getExtra7()+"','"+ib.getExtra8()+"','"+
    ib.getExtra9()+"','"+ib.getExtra10()+"','"+ib.getExtra11()+"','"+ib.getExtra12()+"','"+ib.getExtra13()+"','"+ib1.getTextarea()+"','"+ib1.getExtra1()+"','"+
    ib1.getName()+"','"+ib1.getExtra2()+"','"+ib2.getCancellation_policy()+"','"+ib2.getTextarea()+"')";
    stmt.executeQuery(sql2);
    //Description
    List list1 = (List) ib2.getList();
    DescriptionBean db = (DescriptionBean) list1.get(0);
    DescriptionBean db1 = (DescriptionBean) list1.get(1);
    DescriptionBean db2 = (DescriptionBean) list1.get(2);
    DescriptionBean db3 = (DescriptionBean) list1.get(3);
    DescriptionBean db4 = (DescriptionBean) list1.get(4);
    DescriptionBean db5 = (DescriptionBean) list1.get(5);
    DescriptionBean db6 = (DescriptionBean) list1.get(6);
    if(db.getDescription()!=" "){
    String s1 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db.getDescription()+"','"+db.getTextarea()+"','"+db.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s1);
    if(db1.getDescription()!=" "){
    String s2 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db1.getDescription()+"','"+db1.getTextarea()+"','"+db1.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s2);
    if(db2.getDescription()!=" "){
    String s3 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db2.getDescription()+"','"+db2.getTextarea()+"','"+db2.getHtmlbutton()+"',"+event_id+")";
    System.out.println(s3);
    stmt.executeQuery(s3);
    if(db3.getDescription()!=" "){
    String s4 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db3.getDescription()+"','"+db3.getTextarea()+"','"+db3.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s4);
    if(db4.getDescription()!=" "){
    String s5 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db4.getDescription()+"','"+db4.getTextarea()+"','"+db4.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s5);
    if(db5.getDescription()!=" "){
    String s6 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db5.getDescription()+"','"+db5.getTextarea()+"','"+db5.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s6);
    if(db6.getDescription()!=" "){
    String s7 = "insert into DESCRIPTION (TYPE,DESCRIPTION,IS_HTML,EVENT_ID) values('"+db6.getDescription()+"','"+db6.getTextarea()+"','"+db6.getHtmlbutton()+"',"+event_id+")";
    stmt.executeQuery(s7);
    //Activity
    String sql3 = "insert into ACTIVITY (ACTIVITY_NAME,ACTIVITY_START_DATE,ACTIVITY_END_DATE,ACTIVITY_START_TIME,ACTIVITY_END_TIME,TYPE,CAPACITY,EVENT_ID) values('"+ib3.getName()+"','"+ib3.getStartdate()+"','"+
    ib3.getEnddate()+"','"+ib3.getStarttime()+"','"+ib.getEndtime()+"','"+ib3.getExtra1()+"',"+event_id+")";
    stmt.executeQuery(sql3);
    i put condition for null .But if i dont fill the fields,even then the executeQuery is executing without checking the condition.
    wht is the problem
    what i want to change in my code.

    1. Use code tags when you post code.
    2. Use prepared statements.
    3. If you have a field that requires a non-null entry then you must provide a non-null value. And for Oracle that means non-empty as well.

  • Java.sql.SQLException: ORA-00933: error when  executing query

    Hello,
    I am trying to execute the following query from a jsp page.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
    stmt.executeQuery(sqlUpdate);
    I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
    Thanks,
    Nikky128

    Nikky128 wrote:
    Hello,
    I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
    %

  • Java.sql.SQLException: ORA-01002: fetch out of sequence

    We are getting 'Fetch out of sequence' error whrn we try to execute a 'for update' query.
    We are first inserting values into the DLX_ASSET table and if there is image to be inserted the particualr row is fetched using the query. The insert query inserts values into the database.
    'SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE'. While executing this query we are getting this exception. This is not happening when we are trying it from our local machine. But its happening everywhere else where its deployed.
    We are using Websphere Application Server 6 and Oracle 9i. We have set autommit to false before the method is called and are commiting the transaction only after the whole set of queries are executed.
    Please see below the code snippet,
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  logger.logInfo("QUERY is...."+query);
                                  logger.logInfo("Connection closed:"+ con.isClosed());
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();                              logger.logInfo("inside updating high res image 1");
                                  while (rsHighRes.next()) {
                                       logger.logInfo("inside while high res image 2");
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       logger.logInfo("before update high res");
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       logger.logInfo(" after update query asset id: " + assetId);
                                       logger.logInfo(" query high res:: " + UPDATE_QRY);
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
                                       logger.logInfo("after update high res");
                                  //checking if thumbnail is present: if bulk upload thumb nail won't be present
    the exception is occuring in the line 'rsHighRes = (OracleResultSet) psHighResObj.executeQuery();'
    This is exception trace
    java.sql.SQLException: ORA-01002: fetch out of sequence
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java(Inlined Compiled Code))
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java(Compiled Code))
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
    at com.deluxe.imax.dataaccess.impl.extended.TelevisionAssetCustomDAOImpl.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.ejb.TelevisionFacadeJBean.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.handler.TelevisionHandler.createWebElectronicTrailersAsset(Unknown Source)
    at com.deluxe.imax.business.television.action.WebNewAction.processExecute(Unknown Source)
    at com.deluxe.imax.business.framework.BaseAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1284)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1241)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)
    at com.deluxe.imax.business.framework.security.SecurityFilter.doFilter(Unknown Source)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:671)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3003)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
    at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1958)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:88)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.ja
    Please share your feedback.
    Thanks in advance!
    Edited by: Sanu Sasidharan on May 11, 2011 4:26 AM

    Hi Peter,
    We tried pointing to the same database from local as well as QA. Works from local but not from QA.
    assetId is the generated primary key in the same method.
    Yes the exception is thrown from execute statement itself. the logger put just after the execute is not coming.
    This is the method
    public boolean createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO, OracleConnection con) throws DAOException {
              methodName ="createWebElectronicTrailersAsset(TelevisionResultDTO[] teleResultDTO,OracleConnection con) :: ";
              //Value to be returned by method
              boolean createInd = false;
              OraclePreparedStatement psHighResObj = null;
              OraclePreparedStatement psThumbnailObj = null;
              OracleResultSet rsHighRes = null;
              OracleResultSet rsThumbnail = null;
              PreparedStatement psmt = null;
              OraclePreparedStatement stmt1 = null;
              OraclePreparedStatement stmt2 = null;
              OrdImage highResImg = null;
              OrdImage thumbnailImg = null;
              ImaxGroupsTO groupsTO = null;
              try {
                   long tvAssetId = 0;
                   long assetId = 0;
                   long cst_dwnld_asset_id = 0;
                   AssetCustomTO assetCustomTo = null;
                   AssetCustomDownloadTO assetCustDwnldTO = null;
                   CustomTVAssetTO tvAssetTo = null;
                   String DLX_ASSET_QRY = "";
                   String UPDATE_QRY = "";
                   String DLX_ASSET_TV_QRY = "";
                   String DLX_CUSTOM_DOWNLOAD_ASSET = "";
                   int k = 1;
                   for (int iCount = 0; iCount < teleResultDTO.length; iCount++) {
                        tvAssetId = (int) OraclePKGenerator.getInstance().getKey(InternalConstants.TV_ASSET_SEQUENCE);
                        assetId =(long) OraclePKGenerator.getInstance().getKey(InternalConstants.ASSET_SEQUENCE);
                        assetCustomTo = teleResultDTO[iCount].getAssetCustomTO();
                        tvAssetTo = teleResultDTO[iCount].getTv_Asset();
                        groupsTO= teleResultDTO[iCount].getGroupsTO();
                        if (assetCustomTo.getHighResolutionImageIn() != null) {
                             DLX_ASSET_QRY ="INSERT INTO DLX_ASSET("
                                                      + "ASSET_ID,"
                                                      + "CREATED_BY,"
                                                      + "CREATED_DATE,"
                                                      + "REVISED_BY,"
                                                      + "REVISED_DATE,"
                                                      + "FILE_NAME,"
                                                      + "FILE_SIZE,"
                                                      + "FILE_TYPE,"
                                                      + "SYS_FILE_NAME,"
                                                      + "HIGH_RES_IMAGE,"
                                                      + "THUMBNAIL_IMAGE,"
                                                      + "ASSET_STATUS_ID,"
                                                      + "DMX_PART1_REF,"
                                                      + "DMX_PRODUCT_ID_REF,"
                                                      + "DMX_PRODUCT_DESC_REF,"
                                                      + "ASSET_AVAIL_1_IND,"
                                                      + "DMX_PART_2,"
                                                      + "DMX_PRODUCT_2,"
                                                      + "DMX_PRODUCT_DESC_2,"
                                                      + "ASSET_AVAIL_2_IND,"
                                                      + "EFFECTIVE_DATE,"
                                                      + "EXPIRATION_DATE,"
                                                      + "FILE_NAME1,"
                                                      + "SYS_FILE_NAME1,"
                                                      + "ASSET_TYPE_ID,"
                                                      + "MATERIALS_CATEGORY,"
                                                      + "PART_1_NOTES,"
                                                      + "PART_2_NOTES,"
                                                      + "PHY_ORDER_STATUS)"
                                                      + "VALUES (?,?,SYSDATE,?,SYSDATE,?,?,?,?,ORDSYS.ORDImage.init(),"
                                                      +" ORDSYS.ORDImage.init(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                        }else if(){
    // condition if images are not uploaded
                             psmt = con.prepareStatement(DLX_ASSET_QRY);
                             k=1;
                             psmt.setLong(k++, assetId);
                             psmt.setString(k++, assetCustomTo.getCreated_by());
                             psmt.setString(k++, assetCustomTo.getRevised_by());
                             if(assetCustomTo.getAssetTextIn()!=null ){
                                  psmt.setString(k++, assetCustomTo.getFile_name());
                                  psmt.setString(k++, assetCustomTo.getFile_size());
                                  psmt.setString(k++, assetCustomTo.getFile_type());
                                  psmt.setString(k++, assetCustomTo.getSys_file_name());
                                  /* UPLOAD PREVIEW VIDEO FILE INTO FILE SYSTEM .....*/
                                  Util.upLoadFile(assetCustomTo.getAssetTextIn(),assetCustomTo.getSys_file_name());     
                             }else if(assetCustomTo.getAssetTextIn()==null && assetCustomTo.getSys_file_name() != null
                                            && assetCustomTo.getSys_file_name().trim().length() != 0){
                                       psmt.setString(k++, assetCustomTo.getFile_name());
                                       psmt.setString(k++, assetCustomTo.getFile_size());
                                       psmt.setString(k++, assetCustomTo.getFile_type());
                                       psmt.setString(k++, assetCustomTo.getSys_file_name());
                             } else{
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_status_id());
                             if(assetCustomTo.getDmx_product_desc_1()!=null && assetCustomTo.getDmx_product_desc_1().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_1());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_1());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_1());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_1());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_2()!=null && assetCustomTo.getDmx_product_desc_2().trim().length()!=0){
                                  psmt.setLong(k++, assetCustomTo.getDmx_part_2());
                                  psmt.setLong(k++, assetCustomTo.getDmx_productId_2());
                                  psmt.setString(k++, assetCustomTo.getDmx_product_desc_2());
                                  psmt.setString(k++, assetCustomTo.getAsset_order_status_2());                    
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.INTEGER);
                                  psmt.setNull(k++,Types.VARCHAR);
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getEffectiveDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getEffectiveDate());
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             if(assetCustomTo.getExpirationDate()!=null){
                                  psmt.setTimestamp(k++, assetCustomTo.getExpirationDate());     
                             }else{
                                  psmt.setNull(k++,Types.TIMESTAMP);
                             psmt.setString(k++, assetCustomTo.getHighresFileName());     
                             if(assetCustomTo.getSys_file_name1()!=null && assetCustomTo.getSys_file_name1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getSys_file_name1());
                             }else{
                                  psmt.setNull(k++, Types.VARCHAR);
                             psmt.setLong(k++, assetCustomTo.getAsset_type_id());
                             psmt.setLong(k++, assetCustomTo.getMaterialCategory());
                             if(assetCustomTo.getPart_notes_1()!=null && assetCustomTo.getPart_notes_1().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_1());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getPart_notes_2()!=null && assetCustomTo.getPart_notes_2().trim().length()!=0){
                                  psmt.setString(k++, assetCustomTo.getPart_notes_2());
                             }else{
                                  psmt.setNull(k++,Types.VARCHAR);
                             if(assetCustomTo.getDmx_product_desc_1()!=null){
                                  psmt.setLong(k++,assetCustomTo.getPhy_asset_status());     
                             }else{
                                  psmt.setNull(k++,Types.INTEGER);
                             psmt.execute();
                             if (assetCustomTo.getHighResolutionImageIn() != null) {
                                  /* UPDATE HIGH RESOLUTION IMAGE INTO DLX_ASSET TABLE */
                                  logger.logInfo("inside IF condition ,,,,,,,,,,,"+assetId);
                                  String query ="SELECT HIGH_RES_IMAGE FROM DLX_ASSET WHERE ASSET_ID ="+assetId+ " FOR UPDATE ";
                                  psHighResObj =(OraclePreparedStatement) con.prepareStatement(query);
                                  logger.logInfo("inside updating high res AFTER prepare statement"+psHighResObj);
                                  rsHighRes = (OracleResultSet) psHighResObj.executeQuery();
                                  while (rsHighRes.next()) {
                                       highResImg =(OrdImage)rsHighRes.getCustomDatum(1,OrdImage.getFactory());
                                       highResImg.loadDataFromInputStream(assetCustomTo.getHighResolutionImageIn());
                                       assetCustomTo.getHighResolutionImageIn().close();
                                       UPDATE_QRY = "UPDATE DLX_ASSET SET HIGH_RES_IMAGE = ? WHERE ASSET_ID=" + assetId;
                                       stmt1 =(OraclePreparedStatement) con.prepareCall(UPDATE_QRY);
                                       highResImg.setSource(assetCustomTo.getHighresFileType(),"",assetCustomTo.getSys_file_name1());
                                       highResImg.setContentLength(Integer.parseInt(assetCustomTo.getHighresFileSize()));
                                       highResImg.setProperties();
                                       stmt1.setCustomDatum(1, highResImg);
                                       stmt1.execute();
    The connection in the method is passed from the service layer.
    Thanks
    Edited by: Sanu Sasidharan on May 12, 2011 2:30 AM

  • Java.sql.SQLException: ORA-00942: table or view does not exist

    Hi all,
    I have an Oracle table called: USER_APP_VERSION with the fields (all String): (username, application_name, version).
    I use PreparedStatement to insert rows into table:
    String psInsertRpt = "INSERT INTO USER_APP_VERSION (username, application_name, version) VALUES (?, ?, ?)";
    rptPS = conn.prepareStatement(psInsertRpt);
    rptPS.setString(1, username);
    rptPS.setString(2, source);
    rptPS.setString(3, version);
    rptPS.executeUpdate(); At executeUpdate() line, I get the following error:
    java.sql.SQLException: ORA-00942: table or view does not exist
    The table does exist, I can use the "INSERT INTO USER_APP_VERSION (username, application_name, version) VALUES ("name", "source", "version")";
    to insert rows into db at sql command line, however, when run the same query as part of my Java code, get the SQLException.
    Any idea? Any help is greatly appreciated.

    Thanks for the raply. I can connect to the db using a username and password, and run the query with no problem. I use the same username and password to make a jdbc connection from Java code. Since username and password are the same, does "permission" is still an issue? If yes, how can I solve it?

  • Java.sql.SQLException: ORA-02014

    Hello.
    We are running an application on BEA WLS 8.1 SP1 on Fedora Core1 and HP-UX, connected to an Oracle 9.2.0.4 with the appropriate driver.
    In jdbc.log we keep receiving the exception below when deploying or starting our WLS:
    SQLException: SQLState(42000) vendor code(2014)
    java.sql.SQLException: ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)
    at weblogic.jdbc.wrapper.Statement.executeQuery(Statement.java:316)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.verifySelectForUpdateSupported(RDBMSPersistenceManager.java:964)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.setup(RDBMSPersistenceManager.java:202)
    at weblogic.ejb20.manager.BaseEntityManager.setupPM(BaseEntityManager.java:217)
    at weblogic.ejb20.manager.BaseEntityManager.setup(BaseEntityManager.java:184)
    at weblogic.ejb20.manager.DBManager.setup(DBManager.java:164)
    at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:1004)
    at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1322)
    at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:610)
    at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3012)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2076)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2057)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2005)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3136)
    at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1688)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:407)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:230)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
    at weblogic.Server.main(Server.java:32)
    It seems that the BEA deployer is trying to update a locked row in a table. Is there any experience on ORA side on how to deal with this issue? On BEA side there obviously isn't as we have not received satisfactory hints ...
    Thanks,
    Alex

    I had the same problem using INSTEAD OF in combination with VPD. When i remember correctly, for views without VPD, the FOR UPDATE NOWAIT works.
    You can overwrite the lock() method in your EntityImpl and lock the tables manually like this:try {
      getDBTransaction(  ).executeCommand( "declare v_my_table_id integer; begin "
                             + "SELECT my_table_id INTO v_my_table_id FROM mytable "
                             + "WHERE my_table_id = "
                             + getMyTableId(  )
                             + " FOR UPDATE NOWAIT; END;" );
      setLocked( true );
    } catch( RuntimeException exception ) {
        throw exception;
    }Sadly there is no SAVEPOINT support in BC4J, so if you have more than one table, better create a DB Package function that issues a savepoint, try to lock each of the tables and do a ROLLBACK TO savepoint if one of the SELECT FOR UPDATE fails.
    hth, Markus

  • JBO-27122: SQL error during statement preparation IN OAF(java.sql.SQLException: ORA-01008: not all variables bound)

    Hi Friends,
    I have have extended CO where i have added dynamic where condition to VO,it's throwing error.
    Code added in controller :
    public class Custom_HomePageCO extends HomePageCO
      public Custom_HomePageCO()
    public void processRequest(OAPageContext pageContext,OAWebBean webBean)
      super.processRequest(pageContext,webBean);
      System.out.println("NewClase");
      OAApplicationModule am=pageContext.getApplicationModule(webBean);
      System.out.println(am);
      OAApplicationModule am1=(OAApplicationModule)am.findApplicationModule("TrackExpenseReportsAM");
    System.out.println(am1);
      OAViewObject vo=(OAViewObject)am1.findViewObject("TrackExpenseReportsVO");
      System.out.println(vo);
      vo.setWhereClause("REPORT_SUBMITTED_DATE is not null");
        vo.executeQuery();
    public void processFormRequest(OAPageContext pageContext,OAWebBean webBean)
      super.processFormRequest(pageContext,webBean);
    Error message:
    Exception Details.
    Error Details
           Logout
          Error Page
          Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.  Statement: SELECT * FROM (SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,         
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           PO_VENDORS PV,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT'
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND PV.EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :1
    AND P.PERSON_ID = PV.EMPLOYEE_ID
    AND PV.VENDOR_ID = AI.VENDOR_ID
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
              )  <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)       
    UNION
    SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)),  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,         
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           PO_VENDORS PV,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' in ('STANDARD','MIXED')
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :2
    AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID
    AND PV.VENDOR_ID = AI.VENDOR_ID
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
            ) <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)            
    UNION ALL
    SELECT
    AERH.DESCRIPTION PURPOSE,
    AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE,
    AERH.WEEK_END_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AERH.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL,
    PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    PER_EMPLOYEE.FULL_NAME FULL_NAME,
    NVL(AERH.expense_status_code,
      AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag,
      AERH.report_header_id, 'Y', 'N')) STATUS_CODE,
    AERH.source SOURCE,
    NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source,
            AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER,
    ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,
              sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    0 VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,  
    DECODE(AERH.expense_current_approver_id,
    -99999, 'AMEMultipleApprovers',
    decode(PER_APPROVER.full_name,
      null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    -1 INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X PER_EMPLOYEE,
           PER_PEOPLE_X PER_APPROVER
    WHERE  AERH.VOUCHNO +0 =0
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AERH.EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :3
    AND PER_EMPLOYEE.PERSON_ID = AERH.EMPLOYEE_ID
    AND (AERH.Source <> 'NonValidatedWebExpense'
         OR AERH.Workflow_approved_flag IS NULL)
    AND AERH.expense_current_approver_id = PER_APPROVER.person_id
    AND decode(AERH.total,0,ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30
    AND AERH.SOURCE <> 'Both Pay'
    UNION
    SELECT
    AERH.DESCRIPTION PURPOSE,
    AERH.DEFAULT_CURRENCY_CODE CURRENCY_CODE,
    AERH.WEEK_END_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AERH.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) ||' '|| AERH.DEFAULT_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(nvl(AERH.AMT_DUE_CCARD_COMPANY+AERH.AMT_DUE_EMPLOYEE+nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),AERH.TOTAL),FND_CURRENCY_CACHE.GET_FORMAT_MASK
      (AERH.DEFAULT_CURRENCY_CODE,30)) REPORT_TOTAL,
    PER_EMPLOYEE.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    PER_EMPLOYEE.FULL_NAME FULL_NAME,
    NVL(AERH.expense_status_code,
      AP_WEB_OA_ACTIVE_PKG.GetReportStatusCode(AERH.Source, AERH.Workflow_approved_flag,
      AERH.report_header_id,'Y','N')) STATUS_CODE,
    AERH.source SOURCE,
    NVL (PER_APPROVER.full_name, AP_WEB_OA_ACTIVE_PKG.GetCurrentApprover(AERH.Source,
            AERH.Workflow_approved_flag, AERH.report_header_id, AERH.expense_status_code)) CURRENT_APPROVER,
    ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,
              sysdate - AERH.LAST_UPDATE_DATE)) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    0 VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,  
    DECODE(AERH.expense_current_approver_id,
    -99999, 'AMEMultipleApprovers',
    decode(PER_APPROVER.full_name,
      null,'CurrentApproverName','AMESingleApprover')) CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    -1 INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X PER_EMPLOYEE,
           PER_PEOPLE_X PER_APPROVER
    WHERE  AERH.VOUCHNO +0=0
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AERH.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :4
    AND PER_EMPLOYEE.PERSON_ID = PAID_ON_BEHALF_EMPLOYEE_ID
    AND AERH.EMPLOYEE_ID IS NULL
    AND (AERH.Source <> 'NonValidatedWebExpense'
         OR AERH.Workflow_approved_flag IS NULL)
    AND AERH.expense_current_approver_id = PER_APPROVER.person_id
    AND decode(AERH.total,0,ROUND(NVL(sysdate - AERH.EXPENSE_LAST_STATUS_DATE,sysdate - AERH.LAST_UPDATE_DATE)),30) <= 30
    AND AERH.SOURCE <> 'Both Pay'
    UNION ALL
    /* This select is for invoice imported reports by contingent workers */
    SELECT
    AI.DESCRIPTION PURPOSE,
    AI.INVOICE_CURRENCY_CODE CURRENCY_CODE,
    AI.INVOICE_DATE REPORT_DATE,
    AERH.REPORT_SUBMITTED_DATE REPORT_SUBMITTED_DATE,
    AI.INVOICE_NUM REPORT_NUMBER,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30)) ||' '|| AI.INVOICE_CURRENCY_CODE REPORT_TOTAL_CURRENCY,
    TO_CHAR(decode(nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0),
                     0, decode(AI.CANCELLED_DATE,
                                 null, APS.GROSS_AMOUNT,
                                 AERH.TOTAL),
                   nvl(AI.AMT_DUE_CCARD_COMPANY, AERH.AMT_DUE_CCARD_COMPANY) + nvl(AI.AMT_DUE_EMPLOYEE, AERH.AMT_DUE_EMPLOYEE) + nvl(AERH.MAXIMUM_AMOUNT_TO_APPLY,0)) ,  
            FND_CURRENCY_CACHE.GET_FORMAT_MASK
            (AI.INVOICE_CURRENCY_CODE, 30))
    REPORT_TOTAL,
    P.PERSON_ID EMPLOYEE_ID,
    AERH.REPORT_HEADER_ID REPORT_HEADER_ID,
    P.FULL_NAME FULL_NAME ,
    DECODE(AI.CANCELLED_DATE,null,
                              nvl(aerh.expense_status_code, DECODE(APS.GROSS_AMOUNT ,0,'PAID',
                                    decode(AI.Payment_status_flag,'Y','PAID',
                                                            'N','INVOICED',
                                                            'P','PARPAID',NULL))),
                                            'CANCELLED') STATUS_CODE,
    AERH.source SOURCE,
    NULL CURRENT_APPROVER,
    ROUND(sysdate - AI.LAST_UPDATE_DATE) DAYS_SINCE_ACTIVITY,
    AERH.RECEIPTS_STATUS RECEIPTS_STATUS_CODE,
    AERH.HOLDING_REPORT_HEADER_ID,
    AI.VENDOR_ID VENDOR_ID,
    AERH.AMT_DUE_CCARD_COMPANY AMT_DUE_CCARD_COMPANY,
    AERH.AMT_DUE_EMPLOYEE AMT_DUE_EMPLOYEE,          
    'CurrentApproverName' CURRENT_APPROVER_SWITCHER,
    to_char(AERH.LAST_UPDATE_DATE, 'DD-MON-RRRR HH:MI:SS'),
    AI.INVOICE_ID INVOICE_ID
    FROM
           AK_WEB_USER_SEC_ATTR_VALUES A,
           AP_INVOICES AI,
           AP_EXPENSE_REPORT_HEADERS AERH,
           PER_PEOPLE_X P,
           AP_PAYMENT_SCHEDULES APS
    WHERE  AI.INVOICE_ID= APS.INVOICE_ID
    AND    AI.INVOICE_ID = AERH.VOUCHNO(+)
    AND AI.INVOICE_TYPE_LOOKUP_CODE||'' = 'EXPENSE REPORT'
    AND A.ATTRIBUTE_CODE = 'ICX_HR_PERSON_ID'
    AND AI.PAID_ON_BEHALF_EMPLOYEE_ID = A.NUMBER_VALUE
    AND A.WEB_USER_ID = :5
    AND P.PERSON_ID = AI.PAID_ON_BEHALF_EMPLOYEE_ID
    AND AP_WEB_DB_HR_INT_PKG.IsPersonCwk(AI.PAID_ON_BEHALF_EMPLOYEE_ID)='Y'
    AND DECODE (AI.PAYMENT_STATUS_FLAG,
             'Y', sysdate - AI.LAST_UPDATE_DATE,
            decode(APS.GROSS_AMOUNT , 0 ,sysdate - AI.LAST_UPDATE_DATE,0)
              )  <= 30
    AND (AERH.SOURCE <> 'Both Pay' OR AERH.REPORT_HEADER_ID IS NULL)) QRSLT  WHERE (REPORT_SUBMITTED_DATE is not null)
    at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01008: not all variables bound
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4525)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
    at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
    at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
    at oracle.apps.ap.oie.webui.Custom_HomePageCO.processRequest(Custom_HomePageCO.java:26)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01008: not all variables bound
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2548)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2933)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:650)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:578)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
    at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
    at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
    at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4525)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
    at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
    at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
    at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
    at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
    at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
    at oracle.apps.ap.oie.webui.Custom_HomePageCO.processRequest(Custom_HomePageCO.java:26)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136)
    at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926)
    at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646)
    at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
    at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2360)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1759)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
    at _OA._jspService(OA.jsp:33)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
    at java.lang.Thread.run(Thread.java:534)
    I have took the sql from error message and i tried executing the same in toad... i was able execute it smoothly... i dot know why its working while running the page
    Please help me guys...
    Thanks,
    Pavan

    Hi Shobhi,
    Actually this relates to the Iexpenese Module. The VO is "oracle.apps.ap.oie.server.TrackExpenseReportsVO"(Seeded)
    The user Expense home screen is based on the above VO and this view returning multiple line for the same expense number which should be eliminated.
    so for this i need to filter data by adding where clause dynamically on top of the existing where conditions so that i can eliminate the duplicate row.
    Please suggest me !! how to move on
    Thanks,
    Pavan V
    91-9640871542

  • JBO-27122: SQL error & java.sql.SQLException: ORA-01843: not a valid month

    Hi,
    We developed OA page for Employee's Payslip and it is working fine for all the employees but it is not working for only one employee...Getting the error as
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement
    preparation
    ## Detail 0 ##
    java.sql.SQLException: ORA-01843: not a valid month
    Real Scenario is:
    The user "DANISH.LOTFY" is login into application and when he click on Payslip to the month then he is always getting the above error.
    For testing purpose we have removed his employee assignment from user screen(fnd_user) and assigned some other employee name (say MOHAMED.ELBAHY)... After this when DANISH.LOTFY logins into the application and payslip page is working fine...(He can able to see MOHAMED.ELBAHY payslip.....
    Realy we don't know this strange behaviour of OA ...
    ------ Code with Error details------------------
    Statement:
    SELECT * FROM (SELECT DISTINCT ppa.DATE_EARNED, TO_CHAR(ppa.DATE_EARNED,'MON-YYYY') DISPLAY
    , TO_CHAR(ppa.DATE_EARNED,'MM YYYY') PARAM
    FROM
    pay_payroll_actions ppa
    ,pay_assignment_actions pac
    ,PER_ALL_ASSIGNMENTS_F PASS
    ,FND_USER FU
    ,per_time_periods PTP
    WHERE ppa.payroll_id = 61
    AND ppa.payroll_action_id = pac.payroll_action_id
    AND PAC.ASSIGNMENT_ID = PASS.ASSIGNMENT_ID
    AND PASS.PERSON_ID = FU.EMPLOYEE_ID
    AND FU.USER_ID =Fnd_Profile.VALUE('USER_ID')
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) IS NOT NULL
    ---Added by Sudipta C on 28th Janaury 2008
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) <> TRIM(TO_CHAR(SYSDATE,'MON-YYYY'))
    AND ppa.DATE_EARNED=(SELECT MAX(DATE_EARNED) FROM pay_payroll_actions WHERE time_period_id=ppa.time_period_id)
    AND ppa.DATE_EARNED >='30-NOV-2007'
    UNION ALL
    --Query to Display only the Current Month if the Concurrent Request Ran
    SELECT DISTINCT ppa.DATE_EARNED, TO_CHAR(ppa.DATE_EARNED,'MON-YYYY') DISPLAY
    , TO_CHAR(ppa.DATE_EARNED,'MM YYYY') PARAM
    FROM
    pay_payroll_actions ppa
    ,pay_assignment_actions pac
    ,PER_ALL_ASSIGNMENTS_F PASS
    ,FND_USER FU
    ,per_time_periods PTP
    WHERE ppa.payroll_id = 61
    AND ppa.payroll_action_id = pac.payroll_action_id
    AND PAC.ASSIGNMENT_ID = PASS.ASSIGNMENT_ID
    AND PASS.PERSON_ID = FU.EMPLOYEE_ID
    AND FU.USER_ID = Fnd_Profile.VALUE('USER_ID')
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) IS NOT NULL
    AND TRIM(TO_CHAR(ppa.DATE_EARNED,'MON-YYYY')) = TRIM(TO_CHAR(SYSDATE,'MON-YYYY'))
    AND ppa.DATE_EARNED=(SELECT MAX(DATE_EARNED) FROM pay_payroll_actions WHERE time_period_id=ppa.time_period_id)
    AND ppa.DATE_EARNED >='30-NOV-2007'
    --Check the Concurrent Program Ran or not to Display the SYS Month Payroll Period ID
    AND EXISTS
    (SELECT TRIM(TO_CHAR(REQUEST_DATE,'MON-YYYY')) FROM fnd_conc_req_summary_v fcrs
    WHERE program_short_name = 'PROC_EXP1_TESTING'
    AND PHASE_CODE='C' AND STATUS_CODE='C'
    AND TO_CHAR(REQUEST_DATE,'MON-YYYY')=TO_CHAR(SYSDATE,'MON-YYYY')
    AND REQUEST_DATE=(SELECT MAX(REQUEST_DATE) FROM fnd_conc_req_summary_v
    WHERE CONCURRENT_PROGRAM_ID=fcrs.CONCURRENT_PROGRAM_ID))
    ORDER BY 1 DESC) QRSLT WHERE (( UPPER(DISPLAY) like :1 AND (DISPLAY like :2 OR DISPLAY like :3 OR DISPLAY like :4 OR DISPLAY like :5)))
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormData(OAPageBean.java:2555)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1677)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430)
         at oa_html._OA._jspService(_OA.java:84)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
         at oracle.jsp.JspServlet.service(JspServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
         at org.apache.jserv.JServConnection.run(JServConnection.java:294)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01843: not a valid month
    Could any please suggest/provide your valuable inputs to resolve this issue(It is in production , so please treat it as very urgent).
    Thanks & Regards,
    J.Prakash

    Hi,
    This is really a strange behaviour as you are saying that it is happening only for one user so please check his user preferences.
    Regards,
    Reetesh Sharma

  • Oracle error 1403:java.sql.SQLException: ORA-01403: no data found ORA-06512

    My customer has an issue, and error message as below:
    <PRE>Oracle error 1403: java.sql.SQLException: ORA-01403: no data found ORA-06512:
    at line 1 has been detected in FND_SESSION_MANAGEMENT.CHECK_SESSION. Your
    session is no longer valid.</PRE>
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.
    Following is the data collection from customer:
    1. Run UNIX command to check .class file version:
    strings $JAVA_TOP/oracle/apps/bne/utilities/BneViewerUtils.class | grep Header--> S$Header: BneViewerUtils.java 120.33.12010000.17 2010/11/21 22:19:58 amgonzal s$
    2. Run SQL to check you patch level:
    SELECT * FROM fnd_product_installations WHERE patch_level LIKE '%BNE%';--> R12.BNE.B.3
    3. Run SQL to check patch '9940148' applied or not:
    SELECT * FROM ad_bugs ad WHERE ad.bug_number = '9940148';--> No Rows returned
    4. Run SQL to check patch '9785477' applied or not:
    SELECT * FROM ad_bugs WHERE bug_number in ('9785477');-->
    BUG_ID APPLICATION_SHORT_NAME BUG_NUMBER CREATION_DATE ARU_RELEASE_NAME CREATED_BY LAST_UPDATE_DATE LAST_UPDATED_BY TRACKABLE_ENTITY_ABBR BASELINE_NAME GENERIC_PATCH LANGUAGE
    576982 11839583 2011/8/7 上午 08:20:36 R12 5 2011/8/7 上午 08:20:36 5 pjt B n US
    516492 9785477 2011/6/12 上午 11:42:45 R12 5 2011/6/12 上午 11:42:45 5 bne B n US
    546109 9785477 2011/6/12 下午 01:17:41 R12 5 2011/6/12 下午 01:17:41 5 bne B n ZHT
    5. Run SQL to check the status of object ‘FND_SESSION_MANAGEMENT’
    SELECT * FROM dba_objects do WHERE do.object_name = 'FND_SESSION_MANAGEMENT';-->
    OWNER OBJECT_NAME SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_TIME TIMESTAMP STATUS TEMPORARY GENERATED SECONDARY NAMESPACE EDITION_NAME
    APPS FND_SESSION_MANAGEMENT 219425 PACKAGE 2004/10/30 下午 01:52:35 2011/8/7 上午 08:18:39 2011-08-07:08:18:26 VALID N N N 1
    APPS FND_SESSION_MANAGEMENT 226815 PACKAGE BODY 2004/10/31 上午 01:05:40 2011/8/7 上午 08:18:54 2011-08-07:08:18:27 VALID N N N 2
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? Does customer still need to apply patch '9940148' based on action plan of
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.
    Thanks,
    Jackie

    And customer’s statement is: Upgrade from EBS 11.5.10 to 12.1.3. Login the EBS, open any forms and put it in idle. Then refresh the form, error happens
    Idle for how long? Is the issue with all sessions?
    Please see these docs/links
    User Sessions Get Timed Out Before Idle Time Parameter Values Are Reached [ID 1306678.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Timeout+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Then, I checked ISP, and found two notes:
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid (Doc ID 1284094.1)
    Note 1319380.1: Webadi Gl Journal Posting Errors After Atg R12.1.3 (Doc ID 1319380.1)
    But these two notes are both WebADI.Can you find any details about the error in Apache log files and in the application.log file?
    Any errors in the database log file?
    So, my question is: Customer’s BneViewerUtils.java version is already 120.33.12010000.17, which greater than 120.33.12010000.14. Is there any others solutions for this issue? No.
    Does customer still need to apply patch '9940148' based on action plan ofIf the issue not with Web ADI, then ignore this patch. However, if you use Web ADI you could query AD_BUGS table and verify if you have the patch applied.
    Note 1284094.1: Web ADI Journal Upload Errors With ORA-01403 No Data Found ORA-06512 At Line Has Been Detected In FND_SESSION_MANAGEMENT.CHECK_SESSION.Your Session Is No Longer Valid?
    Customer's EBS version is 12.1.3; OS is HP-UX PA-RISC (64-bit); DB is 11.2.0.2.If you could not find any details in the logs, please enable debug as per (R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]).
    Thanks,
    Hussein

  • JDBC Receiver adapter-java.sql.SQLException: ORA-00904: "BATCH_ID": invalid

    Hi
    I am trying insert rows in Oracle database using JDBC receiver adapter setup in PI 7.1. However this receiver adapter is throwing following exception.
    Delivering the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'PRADEEP_OTC_ORDERS' (structure 'statement'): java.sql.SQLException: ORA-00904: "BATCH_ID": invalid identifier .
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:mt_sql_writer xmlns:ns0="http://rdbms_poc">
    <statement>
         <dbtablename action="INSERT">
                <table>PRADEEP_OTC_ORDERS</table>
              <access>
                     <order_id>19126</order_id>
                     <version>1</version>
                     <batch_id>132</batch_id>
                </access>
           </dbtablename>
    </statement>
    </ns0:mt_sql_writer>
    PRADEEP_OTC_ORDERS table has just 3 columns as specified the access segment. However I stil get this ORA-00904 error message.
    Any idea on what could be wrong.?
    Thanks
    -Pradeep

    Hi All,
    Thanks a lot for responding...
    I verified the table structure, table just contains those 3 coulms all varchar type.
    I modified the column name as well, But was still getting ORA-00904. Then I went directly to the the database and executed below insert statement,
    insert into PRADEEP_OTC_ORDERS (mps_order_id, mps_version,mps_batch_id) Values(1,2,3)
    I got exact SQL Error: ORA-00904: "MPS_BATCH_ID": invalid identifier.
    So ISAP JDBC adapter is not enclosing the string values in quotes.
    SAP documentation says it puts quotes for values and treats everything as string(text).
    Anybody has any idea, why JDBC receiver adapter not enclosing the values in quotes?
    Thanks
    -Pradeep

  • Java.sql.SQLException:ORA-01801:date format is too long for internal buffer

    Hi,
    I am getting the following exception when i trying to insert data in to a table through a stored procedure.
    oracle.apps.fnd.framework.OAException: java.sql.SQLException: ORA-01801: date format is too long for internal buffer
    when execute this stored procedure from ana anonymous block , it gets executed successfully, but i use a OracleCallableStatement to execute the procedure i am getting this error.
    Please let me know how to resolve this error.
    Is this error something to do with the Database Configuration ?
    Thanks & Regards
    Meenal

    I don't know if this will help, but we were getting this error in several of the standard OA framework pages and after much pain and aggravation it was determined that visiting the Sourcing Home Page was changing the timezone. For most pages this just changed the timezone that dates were displayed in, but some had this ORA-01801 error and some others had an ORA-01830 error (date format picture ends before converting entire input string). Unfortunately, if you are not using Sourcing at your site, this probably won't help, but if you are, have a look at patch # 4519817.
    Note that to get the same error, try the following query (I got this error in 9.2.0.5 and 10.1.0.3):
    select to_date('10-Mar-2006', 'DD-Mon-YYYY________________________________________________HH24:MI:SS') from dual;
    It appears that you can't have a date format that is longer than 68 characters.

  • JDeveloper tutorial fails with java.sql.SQLException: ORA-00600

    In following the steps to the JDeveloper tutorial, after I successfully created and tested my connections, I proceeded on to run ImageLoader.java (Under DatabaseSetup.jws), and it returns an exception. The debug output log is as follows:
    Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    Successfully loaded properties file using: getResourceAsStream("/oracle/jbo/common/Diagnostic.properties");
    [00] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [01] CommonMessageBundle (language base) being initialized
    [02] Stringmanager using default locale: 'null'
    [03] BC4JDeployPlatform: LOCAL
    [04] Propertymanager: searching for file and system based properties
    [05] {{ begin Loading BC4J properties
    [06] -----------------------------------------------------------
    [07] BC4J Property jbo.default.language='en' -->(MetaObjectManager) from System Default
    [08] BC4J Property jbo.default.country='US' -->(MetaObjectManager) from System Default
    [09] BC4J Property DeployPlatform='LOCAL' -->(SessionImpl) from Client Environment
    [10] Skipping empty Property ConnectionMode from System Default
    [11] Skipping empty Property HostName from System Default
    [12] Skipping empty Property ConnectionPort from System Default
    [13] Skipping empty Property ApplicationPath from System Default
    [14] Skipping empty Property java.naming.security.principal from System Default
    [15] Skipping empty Property java.naming.security.credentials from System Default
    [16] BC4J Property jbo.use.pers.coll='false' -->(SessionImpl) from System Default
    [17] BC4J Property jbo.pers.max.rows.per.node='70' -->(SessionImpl) from System Default
    [18] BC4J Property jbo.pers.max.active.nodes='10' -->(SessionImpl) from System Default
    [19] BC4J Property jbo.pcoll.mgr='oracle.jbo.pcoll.OraclePersistManager' -->(SessionImpl) from System Default
    [20] BC4J Property jbo.fetch.mode='AS.NEEDED' -->(MetaObjectManager) from System Default
    [21] Skipping empty Property JBODynamicObjectsPackage from System Default
    [22] BC4J Property MetaObjectContextFactory='oracle.jbo.server.xml.DefaultMomContextFactory' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [23] BC4J Property MetaObjectContext='oracle.jbo.server.xml.XMLContextImpl' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [24] BC4J Property java.naming.factory.initial='oracle.jbo.common.JboInitialContextFactory' -->(SessionImpl) from Client Environment
    [25] BC4J Property IsLazyLoadingTrue='true' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [26] BC4J Property ActivateSharedDataHandle='false' -->(MetaObjectManager) from System Default
    [27] Skipping empty Property HandleName from System Default
    [28] Skipping empty Property Factory-Substitution-List from System Default
    [29] Skipping empty Property jbo.project from System Default
    [30] BC4J Property jbo.max.cursors='50' -->(MetaObjectManager) from System Default
    [31] BC4J Property jbo.dofailover='true' -->(MetaObjectManager) from System Default
    [32] BC4J Property jbo.doconnectionpooling='false' -->(MetaObjectManager) from System Default
    [33] BC4J Property jbo.recyclethreshold='10' -->(MetaObjectManager) from System Default
    [34] BC4J Property jbo.passivationstore='null' -->(MetaObjectManager) from System Default
    [35] BC4J Property RELEASE_MODE='Reserved' -->(MetaObjectManager) from System Default
    [36] BC4J Property jbo.maxpoolcookieage='-1' -->(MetaObjectManager) from System Default
    [37] Skipping empty Property PoolClassName from System Default
    [38] BC4J Property jbo.maxpoolsize='2147483647' -->(MetaObjectManager) from System Default
    [39] BC4J Property jbo.initpoolsize='0' -->(MetaObjectManager) from System Default
    [40] BC4J Property jbo.poolrequesttimeout='30000' -->(MetaObjectManager) from System Default
    [41] BC4J Property jbo.assoc.consistent='true' -->(MetaObjectManager) from System Default
    [42] BC4J Property jbo.SQLBuilder='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [43] BC4J Property jbo.ConnectionPoolManager='oracle.jbo.server.ConnectionPoolManagerImpl' -->(MetaObjectManager) from System Default
    [44] BC4J Property jbo.TypeMapEntries='Oracle' -->(MetaObjectManager) from /oracle/jbo/server/jboserver.properties resource
    [45] BC4J Property jbo.jdbc.trace='false' -->(MetaObjectManager) from System Default
    [46] BC4J Property oracle.jbo.defineColumnLength='true' -->(MetaObjectManager) from System Default
    [47] Skipping empty Property jbo.tmpdir from System Default
    [48] Skipping empty Property jbo.server.internal_connection from System Default
    [49] Skipping empty Property SessionClass from System Default
    [50] Skipping empty Property TransactionFactory from System Default
    [51] BC4J Property jbo.debugoutput='console' -->(Diagnostic) from System Property
    [52] BC4J Property jbo.debug.prefix='DBG' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [53] BC4J Property jbo.logging.show.timing='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [54] BC4J Property jbo.logging.show.function='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [55] BC4J Property jbo.logging.show.level='false' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [56] BC4J Property jbo.logging.show.linecount='true' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [57] BC4J Property jbo.logging.trace.threshold='6' -->(Diagnostic) from /oracle/jbo/common/Diagnostic.properties resource
    [58] BC4J Property jbo.jdbc.driver.verbose='false' -->(Diagnostic) from System Default
    [59] BC4J Property jbo.ejb.txntimeout='60' -->(SessionImpl) from System Default
    [60] BC4J Property jbo.ejb.txntype='global' -->(MetaObjectManager) from System Default
    [61] Skipping empty Property oracle.jbo.schema from System Default
    [62] WARNING: Unused property: LC='Calling Function' found in /oracle/jbo/common/Diagnostic.properties resource
    [63] }} finished loading BC4J properties
    [64] -----------------------------------------------------------
    Diagnostics: Routing diagnostics to standard output (use -Djbo.debugoutput=silent to remove)
    [65] Diagnostic Properties: Timing:false Functions:false Linecount:true Threshold:6
    [66] JavaVMVersion: 1.2.351 odv
    [67] JavaVMVendor: Oracle Corp.
    [68] JavaVMName: OJVM VM
    [69] OperatingSystemName: Windows NT
    [70] OperatingSystemVersion: 5.0
    [71] OperatingSystemUsername: Administrator
    [72] Connected to Oracle JBO Server - Version: 3.2.9.76.3
    [73] {{+++ id=10000 type: 'BC4J_CREATE_ROOTAM' Create Root Application Module 'ImageLoader.ImageLoaderModule'
    [74] {{+++ id=10001 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.ImageLoaderModule
    [75] {{+++ id=10002 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.ImageLoader
    [76] Loading from /ImageLoader/ImageLoader.xml file
    [77] Loading from indvidual XML files
    [78] Loading the Containees for the Package 'ImageLoader.ImageLoader'.
    [79] }}+++ End Event10003 null
    [80] Loading from /ImageLoader/ImageLoaderModule.xml file
    [81] }}+++ End Event10002 null
    [82] {{+++ id=10003 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.InventoryItem1View
    [83] Loading from /ImageLoader/InventoryItem1View.xml file
    [84] ViewObjectImpl's default fetch mode = 0
    [85] {{+++ id=10004 type: 'METAOBJECT_LOAD' Loading meta-object: ImageLoader.InventoryItem
    [86] Loading from /ImageLoader/InventoryItem.xml file
    [87] Loading Typemap entries from oracle.jbo.server.OracleTypeMapEntries
    [88] CSMessageBundle (language base) being initialized
    [89] }}+++ End Event10005 null
    [90] OracleSQLBuilder reached getInterface
    [91] Oracle SQL Builder Version 3.2.0.0.0
    [92] }}+++ End Event10004 null
    [93] {{+++ id=10005 type: 'BC4J_CREATE_VIEWOBJECT' Create ViewObject 'InventoryItem1View'
    [94] }}+++ End Event10006 null
    [95] Created root application module: 'ImageLoader.ImageLoaderModule'
    [96] Locale is: 'en_US'
    [97] }}+++ End Event10001 null
    [98] Using DatabaseTransactionFactory implementation oracle.jbo.server.DatabaseTransactionFactory
    [99] DBTransactionImpl Max Cursors is 50
    [100] Oracle SQLBuilder: Registered driver: oracle.jdbc.driver.OracleDriver
    [101] {{+++ id=10006 type: 'JDBC_CONNECT' null
    [102] Trying connection/1: url='jdbc:oracle:thin:bc4j/bc4j@localhost:1521:oracle9i'...
    [103] }}+++ End Event10007 null
    [104] Successfully logged in
    [105] JDBCDriverVersion: 8.1.7.0.0
    [106] DatabaseProductName: Oracle
    [107] DatabaseProductVersion: Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production With the Partitioning option JServer Release 9.0.1.1.1 - Production
    [108] Column count: 8
    [109] {{+++ id=10007 type: 'EXECUTE_QUERY' ViewObject executeQueryForCollection InventoryItem1View
    [110] {{+++ id=10008 type: 'VIEWOBJECT_GETSTATEMENT' Viewobject: InventoryItem1View getting prepared statement
    [111] ViewObject : Created new QUERY statement
    [112] SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    [113] {{+++ id=10009 type: 'JDBC_CREATE_STATEMENT' createPreparedStatement - prefetch size: 1
    [114] }}+++ End Event10010 null
    [115] }}+++ End Event10009 ViewObject : Creating new QUERY statementSELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    [116] QueryCollection.executeQuery failed...
    [117] java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
         java.lang.Class java.net.URLClassLoader.findClass(java.lang.String)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String, boolean)
         java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
         java.util.Enumeration oracle.jbo.common.WeakHashtableImpl.elements()
         java.util.Enumeration oracle.jbo.common.WeakHashtable.elements()
         void oracle.jbo.server.ViewObjectImpl.freeStatement(java.sql.PreparedStatement, boolean)
         void oracle.jbo.server.QueryCollection.executeQuery(java.lang.Object[], int)
         void oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(java.lang.Object, java.lang.Object[], int)
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    [118] SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT InventoryItem.ID, InventoryItem.NAME, InventoryItem.DESCRIPTION, InventoryItem.IMAGE, InventoryItem.PRICE, InventoryItem.ONHAND, InventoryItem.SUPPLIER_ID, InventoryItem.CATEGORY_ID FROM INVENTORY_ITEM InventoryItem
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    ## Detail 0 ##
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
         boolean oracle.jbo.server.ViewRowSetIteratorImpl.hasNext()
         boolean oracle.jbo.server.ViewRowSetImpl.hasNext()
         boolean oracle.jbo.server.ViewObjectImpl.hasNext()
         void ImageLoader.ImageLoader.main(java.lang.String[])
    Exception in thread main
    At first I thought maybe this is a configuration specific problem -- but I was able to replicate this on two separate machine with clean Win2K and Oracle9i installs.
    It seems like it is not finding a particular class, which leads me to believe that some particular jar is probably missing -- can anyone help me figure out which one? Or is there something else that may be going wrong?
    TIA

    You need to make sure you're using the Oracle9i JDBC driver, or using the Oracle 8.1.7.2 JDBC driver as I mentioned above.
    If you are using JDeveloper9i release 9.0.2 or 9.0.3, the driver you need is in <jdevhome>\jdbc\lib
    Otherwise, you can also download the drivers from OTN.

  • Exception in thread "main" java.sql.SQLException: ORA-01704: string literal

    Hi Everyone,
    I am Using This Code to read the Mail from server and inserting those into database but i am getting error like
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message[i].getFrom()[0]);
    //System.out.println("Subject : " + message[i].getSubject());
    //System.out.print("Message : ");
    InputStream stream = message[i].getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@***.co.in','"+message[i].getSubject()+"','"+s.toString()+"')");
    stm.execute(strsql+"'"+(i + 1)+"','"+message[i].getSentDate()+"','"+message[i].getFrom()[0]+"','***@****.co.in','"+message[i].getSubject()+"','"+Message_2001+"')");
    folder.close(true);
    store.close();
    when i execute this some messages get inserted into table but for some messages
    Exception in thread "main" java.sql.SQLException: ORA-01704: string literal too long
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:942)
    at ReadMail_OLD.main(ReadMail_OLD.java:64)
    Edited by: 997089 on May 1, 2013 9:29 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

    Hi All,
    Thanks for Your Reply .
    I got the answer i have made a mistake in loop after every iteration i have not cleared the stringBuffer Varaible so the after one or two iteration it givesthe error.
    import java.io.*;
    import java.util.*;
    import javax.mail.*;
    import java.sql.*;
    public class ReadMail_OLD {
    static StringBuffer s= new StringBuffer();
    static StringBuffer s1= new StringBuffer();
    public static void main(String args[]) throws Exception {
    String host = "***.****.co.in";
    String user = "***@***.**.**";
    String password = "******";
    String Message_2000 = new String();
    String Message_2001 = new String();
    Connection conn;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@1.2.3.5:1050:abcgdb", "abc", "efg");
    Statement stm = conn.createStatement();
    String strsql = "insert into READ_MAIL_MSG (MESSAGE_ID,SENT_DATE,MAIL_FROM,MAIL_TO,MAIL_SUBJECT,MESSAGE) values (" ;
    // Get system properties
    Properties properties = System.getProperties();
    // Get the default Session object.
    Session session = Session.getDefaultInstance(properties);
    // Get a Store object that implements the specified protocol.
    Store store = session.getStore("pop3");
    //Connect to the current host using the specified username and password.
    store.connect(host, user, password);
    //Create a Folder object corresponding to the given name.
    Folder folder = store.getFolder("inbox");
    // Open the Folder.
    folder.open(Folder.READ_ONLY);
    Message[] message = folder.getMessages();
    // Display message.
    for (int i = 0; i < message.length; i++)
    //System.out.println("------------ Message " + (i + 1) + " ------------");
    //System.out.println("SentDate : " + message.getSentDate());
    //System.out.println("From : " + message.getFrom()[0]);
    //System.out.println("Subject : " + message.getSubject());
    //System.out.print("Message : ");
    InputStream stream = message.getInputStream();
    int j = 0;
    Message_2000 = "";
    Message_2001 = "";
    while(stream.available()>0 && j < 500)
    // read the byte and convert the integer to character
    s.append((char) stream.read());
    j = j+1;
    Message_2000 = s.toString();
    Message_2001 = Message_2000.replace("'"," ");
    System.out.println(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"s.toString()"')");
    stm.execute(strsql+"'"+(i + 1)+"','"message.getSentDate()"','"message.getFrom()[0]"','***@****.co.in','"message.getSubject()"','"Message_2001"')");
    s.delete(0, s.length());
    folder.close(true);
    store.close();
    Thanks for Reply
    Edited by: 997089 on May 1, 2013 9:28 PM
    Edited by: 997089 on May 1, 2013 9:30 PM

  • Java.sql.SQLException: ORA-03135: connection lost contact

    In the whesphere portal i foun a lot of "ORA-03135: connection lost contact" errors but i cant find this error in the oracle client or oracle database.
    Oracle Client 10.2.0.1
    Oracle RDBMS 10.2.0.3 -- in Rac with 3 nodes
    I have a fragment of the trace:
    [20-NOV-2009 23:38:52:338] --- TRACE CONFIGURATION INFORMATION FOLLOWS ---
    [20-NOV-2009 23:38:52:338] New trace stream is /opt/oracle/product/10.2.0/network/trace/cli_22293.trc
    [20-NOV-2009 23:38:52:338] New trace level is 16
    [20-NOV-2009 23:38:52:338] --- TRACE CONFIGURATION INFORMATION ENDS ---
    [20-NOV-2009 23:38:52:338] --- PARAMETER SOURCE INFORMATION FOLLOWS ---
    [20-NOV-2009 23:38:52:338] Attempted load of system pfile source /opt/oracle/product/10.2.0/network/admin/sqlnet.ora
    [20-NOV-2009 23:38:52:338] Parameter source loaded successfully
    [20-NOV-2009 23:38:52:338]
    [20-NOV-2009 23:38:52:338] Attempted load of local pfile source /home/wasadm/.sqlnet.ora
    [20-NOV-2009 23:38:52:338] Parameter source was not loaded
    [20-NOV-2009 23:38:52:338]
    [20-NOV-2009 23:38:52:338] -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
    [20-NOV-2009 23:38:52:338] Successful parameter table load
    [20-NOV-2009 23:38:52:338] -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
    [20-NOV-2009 23:38:52:338] trace_level_Server = 16
    [20-NOV-2009 23:38:52:338] trace_level_client = 16
    [20-NOV-2009 23:38:52:338] trace_directory_client = /opt/oracle/product/10.2.0/network/trace
    [20-NOV-2009 23:38:52:338] trace_file_server = server
    [20-NOV-2009 23:38:52:338] trace_timestamp_client = ON
    [20-NOV-2009 23:38:52:338] trace_timestamp_Server = ON
    [20-NOV-2009 23:38:52:338] trace_file_client = cli
    [20-NOV-2009 23:38:52:338] trace_unique_client = TRUE
    [20-NOV-2009 23:38:52:338] trace_directory_server = /opt/oracle/product/10.2.0/network/trace/server
    [20-NOV-2009 23:38:52:338] --- PARAMETER SOURCE INFORMATION ENDS ---
    [20-NOV-2009 23:38:52:338] --- LOG CONFIGURATION INFORMATION FOLLOWS ---
    [20-NOV-2009 23:38:52:338] Log stream will be "/home/wasadm/sqlnet.log"
    [20-NOV-2009 23:38:52:338] Log stream validation not requested
    [20-NOV-2009 23:38:52:338] --- LOG CONFIGURATION INFORMATION ENDS ---
    [20-NOV-2009 23:38:52:338] nlstdipi: entry
    [20-NOV-2009 23:38:52:338] nlstdipi: exit
    [20-NOV-2009 23:38:52:338] nigini: entry
    [20-NOV-2009 23:38:52:339] nigini: Count in the NL global area is now 1
    [20-NOV-2009 23:38:52:339] nigini: Count in NI global area now: 1
    [20-NOV-2009 23:38:52:339] nrigbi: entry
    [20-NOV-2009 23:38:52:339] nrigbni: entry
    [20-NOV-2009 23:38:52:339] nrigbni: Unable to get data from navigation file tnsnav.ora
    [20-NOV-2009 23:38:52:339] nrigbni: exit
    [20-NOV-2009 23:38:52:339] nrigbi: exit
    [20-NOV-2009 23:38:52:339] nigini: exit
    [20-NOV-2009 23:38:52:339] niqname: Using nnfsn2a() to build connect descriptor for (possibly remote) database.
    [20-NOV-2009 23:38:52:339] nnfgiinit: entry
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: first request sent to name server will have ID 0
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: initial retry timeout for all name servers is 1500 csecs
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: max request retries per name server is 1
    [20-NOV-2009 23:38:52:338] nlstdipi: exit
    [20-NOV-2009 23:38:52:338] nigini: entry
    [20-NOV-2009 23:38:52:339] nigini: Count in the NL global area is now 1
    [20-NOV-2009 23:38:52:339] nigini: Count in NI global area now: 1
    [20-NOV-2009 23:38:52:339] nrigbi: entry
    [20-NOV-2009 23:38:52:339] nrigbni: entry
    [20-NOV-2009 23:38:52:339] nrigbni: Unable to get data from navigation file tnsnav.ora
    [20-NOV-2009 23:38:52:339] nrigbni: exit
    [20-NOV-2009 23:38:52:339] nrigbi: exit
    [20-NOV-2009 23:38:52:339] nigini: exit
    [20-NOV-2009 23:38:52:339] niqname: Using nnfsn2a() to build connect descriptor for (possibly remote) database.
    [20-NOV-2009 23:38:52:339] nnfgiinit: entry
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: first request sent to name server will have ID 0
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: initial retry timeout for all name servers is 1500 csecs
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: max request retries per name server is 1
    [20-NOV-2009 23:38:52:339] nngsini_init_streams: initializing stream subsystem, cache size is 10
    [20-NOV-2009 23:38:52:339] snsgblini: Max no of descriptors supported is 15000
    [20-NOV-2009 23:38:52:339] snsgblini: exit
    [20-NOV-2009 23:38:52:339] nngtini_init_msg: initializing PDU subsystem, initial pool size is 2
    [20-NOV-2009 23:38:52:339] nncpcin_maybe_init: default name server domain is [root]
    [20-NOV-2009 23:38:52:339] nnfgiinit: Installing read path
    [20-NOV-2009 23:38:52:339] nnfgsrsp: entry
    [20-NOV-2009 23:38:52:339] nnfgsrsp: Obtaining path parameter from names.directory_path or native_names.directory_path
    [20-NOV-2009 23:38:52:339] nnfgsrsp: Parmeter names.directory_path not found, setting path to compiled in default
    [20-NOV-2009 23:38:52:339] nnfgspd: entry
    [20-NOV-2009 23:38:52:339] nnfgspd: setting element TNSNAMES
    [20-NOV-2009 23:38:52:339] nnfgspd: setting element HOSTNAME
    [20-NOV-2009 23:38:52:339] nnfgspd: setting element EZCONNECT
    [20-NOV-2009 23:38:52:339] nnfgspd: setting element LDAP
    [20-NOV-2009 23:38:52:339] nnfgspd: Path set
    [20-NOV-2009 23:38:52:339] nnfgspd: exit
    [20-NOV-2009 23:38:52:339] nnfun2a: entry
    [20-NOV-2009 23:38:52:339] nlolgobj: entry
    [20-NOV-2009 23:38:52:339] nnfgrne: entry
    [20-NOV-2009 23:38:52:339] nnfgrne: Going though read path adapters
    [20-NOV-2009 23:38:52:339] nnfgrne: Switching to TNSNAMES adapter
    [20-NOV-2009 23:38:52:339] nnftboot: entry
    [20-NOV-2009 23:38:52:339] nlpaxini: entry
    [20-NOV-2009 23:38:52:340] nlpaxini: exit
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: entry
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: construction of local names file failed
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: exit
    [20-NOV-2009 23:38:52:340] nlpaxini: entry
    [20-NOV-2009 23:38:52:340] nlpaxini: exit
    [20-NOV-2009 23:38:52:340] nnftmlf_make_system_addrfile: entry
    [20-NOV-2009 23:38:52:339] nnfgspd: Path set
    [20-NOV-2009 23:38:52:339] nnfgspd: exit
    [20-NOV-2009 23:38:52:339] nnfun2a: entry
    [20-NOV-2009 23:38:52:339] nlolgobj: entry
    [20-NOV-2009 23:38:52:339] nnfgrne: entry
    [20-NOV-2009 23:38:52:339] nnfgrne: Going though read path adapters
    [20-NOV-2009 23:38:52:339] nnfgrne: Switching to TNSNAMES adapter
    [20-NOV-2009 23:38:52:339] nnftboot: entry
    [20-NOV-2009 23:38:52:339] nlpaxini: entry
    [20-NOV-2009 23:38:52:340] nlpaxini: exit
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: entry
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: construction of local names file failed
    [20-NOV-2009 23:38:52:340] nnftmlf_make_local_addrfile: exit
    [20-NOV-2009 23:38:52:340] nlpaxini: entry
    [20-NOV-2009 23:38:52:340] nlpaxini: exit
    [20-NOV-2009 23:38:52:340] nnftmlf_make_system_addrfile: entry
    [20-NOV-2009 23:38:52:340] nnftmlf_make_system_addrfile: system names file is /opt/oracle/product/10.2.0/network/admin/tnsnames.ora
    [20-NOV-2009 23:38:52:340] nnftmlf_make_system_addrfile: exit
    [20-NOV-2009 23:38:52:340] nnftboot: exit
    [20-NOV-2009 23:38:52:340] nnftrne: entry
    [20-NOV-2009 23:38:52:340] nnftrne: Original name: pwp
    [20-NOV-2009 23:38:52:340] nnfttran: entry
    [20-NOV-2009 23:38:52:340] nncpdpt_dump_ptable: --- /opt/oracle/product/10.2.0/network/admin/tnsnames.ora TABLE HAS THE FOLLOWING CONTENTS ---
    [20-NOV-2009 23:38:52:340] nncpdpt_dump_ptable: PWP = (DESCRIPTION= (ADDRESS_LIST= (FAILOVER=ON) (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc01-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc02-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc03-vip)(PORT=1521))) (CONNECT_DATA= (SERVICE_NAME=HBCLHIA1.MX.HSBC.COM) (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))))
    [20-NOV-2009 23:38:52:340] nncpdpt_dump_ptable: PIDV = (DESCRIPTION= (ADDRESS_LIST= (FAILOVER=ON) (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=mxtopp1datdbc01-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxtopp1datdbc02-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxtopp1datdbc03-vip)(PORT=1521))) (CONNECT_DATA= (SERVICE_NAME=PIDV.MX.HSBC.COM) (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))))
    [20-NOV-2009 23:38:52:340] nncpdpt_dump_ptable: --- END /opt/oracle/product/10.2.0/network/admin/tnsnames.ora TABLE ---
    [20-NOV-2009 23:38:52:340] nnfttran: exit
    [20-NOV-2009 23:38:52:340] nnftrne: Using tnsnames.ora address (DESCRIPTION= (ADDRESS_LIST= (FAILOVER=ON) (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc01-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc02-vip)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc03-vip)(PORT=1521))) (CONNECT_DATA= (SERVICE_NAME=HBCLHIA1.MX.HSBC.COM) (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)))) for name pwp
    [20-NOV-2009 23:38:52:340] nnftrne: exit
    [20-NOV-2009 23:38:52:340] nnfgrne: exit
    [20-NOV-2009 23:38:52:340] nlolgserv: entry
    [20-NOV-2009 23:38:52:340] nnfggav: entry
    [20-NOV-2009 23:38:52:340] nnftgav: entry
    [20-NOV-2009 23:38:52:340] nnftgav: exit
    [20-NOV-2009 23:38:52:340] nnfgfrm: entry
    [20-NOV-2009 23:38:52:340] nnftfrm: entry
    [20-NOV-2009 23:38:52:340] nnftfrm: exit
    [20-NOV-2009 23:38:52:340] nnfgfrm: exit
    [20-NOV-2009 23:38:52:340] nlolgserv: exit
    [20-NOV-2009 23:38:52:340] nlolgobj: exit
    [20-NOV-2009 23:38:52:340] nlolfmem: entry
    [20-NOV-2009 23:38:52:340] nlolfmem: exit
    [20-NOV-2009 23:38:52:341] nigtrm: Count in the NI global area is now 1
    [20-NOV-2009 23:38:52:341] nigtrm: Count in the NL global area is now 1
    [20-NOV-2009 23:38:52:341] nigini: entry
    [20-NOV-2009 23:38:52:341] nigini: Count in the NL global area is now 2
    [20-NOV-2009 23:38:52:341] nigini: Count in NI global area now: 2
    [20-NOV-2009 23:38:52:341] nigini: exit
    [20-NOV-2009 23:38:52:341] niqname: Hst is already an NVstring.
    [20-NOV-2009 23:38:52:341] niqname: Inserting CID.
    [20-NOV-2009 23:38:52:341] niotns: entry
    [20-NOV-2009 23:38:52:341] niotns: niotns: setting up interrupt handler...
    [20-NOV-2009 23:38:52:341] nigsui: entry
    [20-NOV-2009 23:38:52:341] nigsui: Set User Interrupt: hdl=1, prc=0xb7526534, ctx=0x80c6fe8.
    [20-NOV-2009 23:38:52:341] nigsui: exit (0)
    [20-NOV-2009 23:38:52:341] nttbnd2addr: entry
    [20-NOV-2009 23:38:52:341] nttbnd2addr: ip=loopback specified
    [20-NOV-2009 23:38:52:341] nttbnd2addr: using 127.0.0.1
    [20-NOV-2009 23:38:52:341] snlinGetAddrInfo: entry
    [20-NOV-2009 23:38:52:341] snlinGetAddrInfo: exit
    [20-NOV-2009 23:38:52:341] nttbnd2addr: using host IP address: 127.0.0.1
    [20-NOV-2009 23:38:52:341] snlinFreeAddrInfo: entry
    [20-NOV-2009 23:38:52:341] snlinFreeAddrInfo: exit
    [20-NOV-2009 23:38:52:341] nttbnd2addr: exit
    [20-NOV-2009 23:38:52:341] nttcon: entry
    [20-NOV-2009 23:38:52:341] nttcon: toc = 2
    [20-NOV-2009 23:38:52:341] nttcnp: entry
    [20-NOV-2009 23:38:52:341] nttcnp: creating a socket.
    [20-NOV-2009 23:38:52:341] nttcnp: binding an address to a socket.
    [20-NOV-2009 23:38:52:341] nttcnp: getting sockname
    [20-NOV-2009 23:38:52:341] nttcnp: getting peername
    [20-NOV-2009 23:38:52:341] nttcnp: exit
    [20-NOV-2009 23:38:52:341] nttcon: exit
    [20-NOV-2009 23:38:52:342] nttctl: entry
    [20-NOV-2009 23:38:52:342] nttctl: Setting connection into non-blocking mode
    [20-NOV-2009 23:38:52:342] niotns: Not trying to enable dead connection detection.
    [20-NOV-2009 23:38:52:342] niotns: Calling address: (DESCRIPTION=(ADDRESS_LIST=(FAILOVER=ON)(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc01-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc02-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc03-vip)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=HBCLHIA1.MX.HSBC.COM)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))(CID=(PROGRAM=sqlplus)(HOST=mxchim1csmwas03)(USER=wasadm))))
    [20-NOV-2009 23:38:52:342] nscall: entry
    [20-NOV-2009 23:38:52:342] nsmal: entry
    [20-NOV-2009 23:38:52:342] nsmal: 212 bytes at 0x80d2510
    [20-NOV-2009 23:38:52:342] nsmal: normal exit
    [20-NOV-2009 23:38:52:342] nscall: connecting...
    [20-NOV-2009 23:38:52:342] nladini: entry
    [20-NOV-2009 23:38:52:342] nladini: exit
    [20-NOV-2009 23:38:52:342] nladget: entry
    [20-NOV-2009 23:38:52:342] nladget: exit
    [20-NOV-2009 23:38:52:342] nsc2addr: entry
    [20-NOV-2009 23:38:52:342] nsc2addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mxchpp1datdbc01-vip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=HBCLHIA1.MX.HSBC.COM)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))(CID=(PROGRAM=sqlplus)(HOST=mxchim1csmwas03)(USER=wasadm))))
    [20-NOV-2009 23:38:52:342] nttbnd2addr: entry
    [20-NOV-2009 23:38:52:342] snlinGetAddrInfo: entry
    [20-NOV-2009 23:38:52:342] snlinGetAddrInfo: Invalid IP address string mxchpp1datdbc01-vip
    [20-NOV-2009 23:38:52:342] snlinFreeAddrInfo: entry
    [20-NOV-2009 23:38:52:342] snlinFreeAddrInfo: exit
    [20-NOV-2009 23:38:52:342] snlinGetAddrInfo: exit
    [20-NOV-2009 23:38:52:342] nttbnd2addr: looking up IP addr for host: mxchpp1datdbc01-vip
    [20-NOV-2009 23:38:52:342] snlinGetAddrInfo: entry
    [20-NOV-2009 23:38:52:342] snlinGetAddrInfo: exit
    [20-NOV-2009 23:38:52:342] snlinFreeAddrInfo: entry
    [20-NOV-2009 23:38:52:342] snlinFreeAddrInfo: exit
    [20-NOV-2009 23:38:52:342] nttbnd2addr: exit
    [20-NOV-2009 23:38:52:342] nsc2addr: normal exit
    [20-NOV-2009 23:38:52:342] nsopen: entry
    [20-NOV-2009 23:38:52:342] nsmal: entry
    [20-NOV-2009 23:38:52:343] nsmal: 752 bytes at 0x80d3c98
    [20-NOV-2009 23:38:52:343] nsmal: normal exit
    [20-NOV-2009 23:38:52:343] nsopenmplx: entry
    [20-NOV-2009 23:38:52:343] nsmal: entry
    [20-NOV-2009 23:38:52:343] nsmal: 1580 bytes at 0x80d3f90
    [20-NOV-2009 23:38:52:343] nsmal: normal exit
    [20-NOV-2009 23:38:52:343] nsiorini: entry
    [20-NOV-2009 23:38:52:343] nsbal: entry
    [20-NOV-2009 23:38:52:343] nsbgetfl: entry
    [20-NOV-2009 23:38:52:343] nsbgetfl: normal exit
    [20-NOV-2009 23:38:52:343] nsmal: entry
    [20-NOV-2009 23:38:52:343] nsmal: 84 bytes at 0x80d3690
    [20-NOV-2009 23:38:52:343] nsmal: normal exit
    [20-NOV-2009 23:38:52:343] nsbal: normal exit
    [20-NOV-2009 23:38:52:343] nsiorini: exit (0)
    [20-NOV-2009 23:38:52:343] nscpxget: entry
    [20-NOV-2009 23:38:52:343] nscpxget: normal exit
    [20-NOV-2009 23:38:52:343] nsopenalloc_nsntx: nlhthput on mplx_ht_nsgbu:ctx=80d3c98, nsntx=80d3f90
    [20-NOV-2009 23:38:52:343] nsopenmplx: normal exit
    [20-NOV-2009 23:38:52:343] nsopen: opening transport...
    [20-NOV-2009 23:38:52:343] nttcon: entry
    [20-NOV-2009 23:38:52:343] nttcon: toc = 1
    [20-NOV-2009 23:38:52:343] nttcnp: entry
    [20-NOV-2009 23:38:52:343] nttcnp: creating a socket.
    [20-NOV-2009 23:38:52:343] nttcnp: exit
    [20-NOV-2009 23:38:52:343] nttcni: entry
    [20-NOV-2009 23:38:52:343] nttcni: trying to connect to socket 9.
    [20-NOV-2009 23:38:52:345] snlinGetNameInfo: entry
    [20-NOV-2009 23:38:52:345] snlinGetNameInfo: Using numeric form of host's address 10.217.136.201
    [20-NOV-2009 23:38:52:345] snlinGetNameInfo: exit
    [20-NOV-2009 23:38:52:345] nttcni: connected on ipaddr 10.217.136.201
    [20-NOV-2009 23:38:52:345] nttcni: exit
    [20-NOV-2009 23:38:52:345] nttcon: NT layer TCP/IP connection has been established.
    [20-NOV-2009 23:38:52:345] nttcon: set TCP_NODELAY on 9
    [20-NOV-2009 23:38:52:345] nttcon: exit
    [20-NOV-2009 23:38:52:345] nsopen: transport is open
    [20-NOV-2009 23:38:52:345] nsoptions: entry
    [20-NOV-2009 23:38:52:345] nsoptions: lcl[0]=0x0, lcl[1]=0x102000, gbl[0]=0x0, gbl[1]=0xa01, cha=0x0
    [20-NOV-2009 23:38:52:345] nsoptions: lcl[0]=0xf4ffe9ff, lcl[1]=0x102000, gbl[0]=0xfebf, gbl[1]=0xc01
    [20-NOV-2009 23:38:52:345] nsoptions: normal exit
    [20-NOV-2009 23:38:52:345] nsnainit: entry
    [20-NOV-2009 23:38:52:345] nsnainit: call
    [20-NOV-2009 23:38:52:345] nsnadct: entry
    [20-NOV-2009 23:38:52:345] nsnadct: normal exit
    [20-NOV-2009 23:38:52:345] nsnasvnainfo: entry
    [20-NOV-2009 23:38:52:345] nsnasvnainfo: normal exit
    [20-NOV-2009 23:38:52:345] nainit: entry
    [20-NOV-2009 23:38:52:345] nagblini: entry
    [20-NOV-2009 23:38:52:345] nau_gin: entry
    [20-NOV-2009 23:38:52:345] nau_gparams: entry
    [20-NOV-2009 23:38:52:345] nam_gbp: Reading parameter "sqlnet.authentication_required" from parameter file
    [20-NOV-2009 23:38:52:345] nam_gbp: Parameter not found
    [20-NOV-2009 23:38:52:345] nau_gparams: Using default value "FALSE"
    [20-NOV-2009 23:38:52:345] nau_gslf: entry
    [20-NOV-2009 23:38:52:345] nam_gic: entry
    [20-NOV-2009 23:38:52:345] nam_gic: Counting # of items in "sqlnet.authentication_services" parameter
    [20-NOV-2009 23:38:52:345] nam_gic: Parameter not found
    [20-NOV-2009 23:38:52:345] nam_gic: Found 0 items
    [20-NOV-2009 23:38:52:345] nam_gic: exit
    [20-NOV-2009 23:38:52:345] nau_gslf: Using default value "all available adapters"
    [20-NOV-2009 23:38:52:345] nauss_set_state: entry
    [20-NOV-2009 23:38:52:345] nauss_set_state: exit
    [20-NOV-2009 23:38:52:345] nau_gslf: exit
    [20-NOV-2009 23:38:52:345] nau_gparams: exit
    [20-NOV-2009 23:38:52:345] nau_gin: exit
    Edited by: ghd on 20/11/2009 05:30 PM

    You are right, i added the complete error
    By chance do yo have a recommendation where can i look for to find the source problem?
    Because in oracle client's logs or database's logs i can't find the ORA-03135 : connection lost contact
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
    at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    Caused by: java.sql.SQLException: ORA-03135: connection lost contact
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java(Compiled Code))
    at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java(Inlined Compiled Code))
    at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java(Compiled Code))
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java(Compiled Code))
    at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java(Compiled Code))
    at com.ibm.wps.datastore.impl.DataStoreContext.executeQuery(DataStoreContext.java(Compiled Code))
    ... 67 more

Maybe you are looking for