Error while inserting into ms access using jsp

i am using the following code to insert values from textboxes into access database
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection(url);
          Statement stmt=con.createStatement();
          //ResultSet rs = null;
          //String sql = ("INSERT INTO co-ords VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ");
          String sql = "INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('" + nam + "','" + lat + "','" + lon + "','"+ latm +"','"+ lonm +"','"+ latmd +"','"+ lonmd +"','"+ latms +"','"+ lonms +"') ";
          out.println(sql);
          stmt.executeUpdate(sql);
the output i get is
INSERT INTO co-ords (nam ,lat , lon , latm ,lonm , latmd , lonmd ,latms , lonms) VALUES ('cck','28.656529681148545','77.23440170288086','28','77','39','14','23.508','3.8472') Exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
can somebody help me?

Simple,
Some error in your query right. Unable to understand Quotation stuff.
Well understand it properly else error will follow forever :)
Without String, Straight Away Values
stmt1.executeUpdate("insert into Login_Details values('Example','Exmaple')");This is the query with Login_Id Pass_Word String containing the value
stmt1.executeUpdate("insert into Login_Details values('"+Login_Id+"','"+Pass_Word+"')");Then storing sql as string and pass it in executeUpdate(sql)
String sql="insert into Login_Details values ('example','example') "String + Values in String
String sql="insert into Login_Details values ('"+example+"','"+example+"') "Just first it . Hope this reply solve ur SQL EXCEPTIONG
Sachin Kokcha

Similar Messages

  • Error while inserting into MS-SQL Server from Oracle using HS

    Hi,
    I am using hetrogeneous connection.
    I want to insert into MS-SQL Server Table by selecting from Oracle Tables.
    insert into tableone@mssql select * from table2;
    Table2 is in oracle database.
    while executing i'm getting
    ORA-02025: all tables in the SQL statement must be at the remote database
    Please guide me.
    Regards
    Salih KM

    some guy come up a solution by himself before. go ahead and try it
    ORA-02025 error while insert into emp@custard select ....

  • Error while insert into database using DB adpater for Field BLOB

    Hello All
    I am trying to tranfer data from Database A to Database B using Oracle DB adapter.
    Table of databse A contains field BLOB, which cotains the resume /doc file.After transformation in Database B format ,while invoking the DB adapter to insert, I am getting follwing error
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="summary"><summary>file:/u01/bpelvinc/product/10.1.3.1/OracleAS_1/bpel/domains/viapps/tmp/.bpel_ERecuit_Application_New_1.0_d1c2b2149a9e0c7c745279667ad1fc84.tmp/DB_APPL_111.wsdl [ DB_APPL_111_ptt::insert(RtmApplicantCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    ; nested exception is:
         ORABPEL-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [DBAPPL111.RtmApplicant]. [Caused by: Error in encoded stream, got 2]
    Caused by Exception [TOPLINK-3001] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.ConversionException
    Exception Description: The object [xs:base64Binary 43524541544520544193B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2.
    </summary>
    </part><part name="detail"><detail>
    Exception Description: The object [xs:base64Binary 4352E616D65293B0D0A], of class [class java.lang.String], could not be converted to [class java.sql.Timestamp].
    Internal Exception: java.io.IOException: Error in encoded stream, got 2</detail>
    </part></bindingFault>
    Please let me know ,what are the possibilities.
    Thanks
    Satendra

    Hi...
    well... My flow goes like Pl/SQl ---> BPEL,
    Now PL/SQL code reads data from the Database A and Send it to BPEL which inserts into the Database B.
    with respest to above design, I found the problem in pl/sql block.
    Actually I am sending a BLOB field in the soap message. but some how pl/sql now ablt tot handle that or sending some wrong data.
    my question is how to send a blob filed data to bpel using pl/sql block. this the reasion I am getting above error.
    Thanks

  • ORA-02025 error while insert into emp@custard select ....

    Hello All,
    I want to insert the row in MS Access 2003 database from SQL PLUS. My oracle version is 9.2.0.1. and OS is Windows 2000 server.
    Insert command is:
    SQL> insert into emp@custard select empno, ename, job, mgr, hiredate, sal, comm, deptno from emp ;
    and the error is
    ORA-02025: all tables in the SQL statement must be at the remote database.
    Thanks for helping me.
    Akshay.
    PS: i am able to see the records of Access table in SQL Plus using below command
    select * from acc_tab@custard ;

    Hi,
    I got the solution.
    You can not use directly Insert into remote_table select * from local_table while the other database is not oracle database. The same can be done as:
    SQL> select * from emp@custard ;
    no rows selected
    SQL> copy from scott/tiger@trimcap insert emp@custard using select * from emp ;
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
    14 rows selected from scott@trimcap.
    14 rows inserted into EMP@CUSTARD.
    14 rows committed into EMP@CUSTARD at DEFAULT HOST connection.
    SQL> select * from emp@custard ;
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7369 SMITH CLERK 7902 17/DEC/80 800
    20
    7499 ALLEN SALESMAN 7698 20/FEB/81 1600 300
    30
    7521 WARD SALESMAN 7698 22/FEB/81 1250 500
    30
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7566 JONES MANAGER 7839 02/APR/81 2975
    20
    7654 MARTIN SALESMAN 7698 28/SEP/81 1250 1400
    30
    7698 BLAKE MANAGER 7839 01/MAY/81 2850
    30
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7782 CLARK MANAGER 7839 09/JUN/81 2450
    10
    7788 SCOTT ANALYST 7566 19/APR/87 3000
    20
    7839 KING PRESIDENT 17/NOV/81 5000
    10
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7844 TURNER SALESMAN 7698 08/SEP/81 1500 0
    30
    7876 ADAMS CLERK 7788 23/MAY/87 1100
    20
    7900 JAMES CLERK 7698 03/DEC/81 950
    30
    EMPNO ENAME JOB MGR HIREDATE SAL COMM
    DEPTNO
    7902 FORD ANALYST 7566 03/DEC/81 3000
    20
    7934 MILLER CLERK 7782 23/JAN/82 1300
    10
    14 rows selected.
    SQL>
    Hope this helps others... if you stuck like me.
    Thanks & Regards,
    Akshay Brahmbhatt.

  • Error while inserting data in Forms10G using TEXT_IO

    Dear all i am using 10g Forms.
    I am using Text_io to read the text file and putting into table and again reading the tables and putting into another text file .
    I was testing in 3 tables which is the same copy of the original table but only the name is different .
    But after testing when i change the table name to Original table name , it is not inserting for 1 table .
    What could be the reason ?
    I already check the columns and all , everything is current .
    Edited by: Sandy on Sep 14, 2010 5:39 PM

    Please use tags when posting your code over here and format it proper so others can read it more easily.
    e.g.
    [code]
    procedure my_proc is
      num_data number;
    begin
      select 1
      into num_data
      from dual;
      if num_data = 2 then
    end;
    [/code]
    Are you sure you are getting here:
    [code]
    INSERT INTO MU_PAY_OLB(RECORD_TYPE,LOAD_NO,TRAN_AMT,OLB_CODE,ACCT_NO,BEN_NAME,PAY_DTL,MACCS_IND)
    VALUES(lval,l_val,DTL_AMT,lbank,DTL_BEN_AC_NO,DTL_BEN_NM,Null,'N');
    [/code]
    Also: only trap the exceptions you expect, and not ALL exceptions e.g.
    [code]
    begin
      INSERT INTO MU_PAY_OLB(RECORD_TYPE,LOAD_NO,TRAN_AMT,OLB_CODE,ACCT_NO,BEN_NAME,PAY_DTL,MACCS_IND)
      VALUES(lval,l_val,DTL_AMT,lbank,DTL_BEN_AC_NO,DTL_BEN_NM,Null,'N');
    exception
      when dup_val_on_index then
        --do whatever you need to do in that case
    end;
    [/code]
    Maybe your tablespace is full and thus your insert statement fails? You need to inform the user so he/she can inform the DBA.
    and at last this one:
    [code]
    WHEN Others THEN
      Text_IO.Fclose(in_file);
    END;
    [/code]
    You are hiding all possible exceptions; it might be a numeric or value error as the line you are reading is longer then your line buffer, or $add_any_possible_exception_here. You only close the file and behave like nothing ever happened. If you need to close your text file in any case it should look like this:
    [code]
    exception
      when others then
        if text_io.is_open(in_file) then
          text_io.fclose(in_file);
        end if;
        raise;
    end;
    [/code]
    By that you are closing the file if necessary (the exception might occur after you closed the file and closing it again will cause another exception), and reraise your exception so it can be processed by the higher element in the call stack; maybe your calling procedure expects some exceptions in your procedure too and handles them respectively. If no one in the call stack expects the exception and traps it, it finds it's way to the end user (who is you in that case). If it throws an exception take a look where it happens and take actions.
    So remove your when others exceptions and look if some other exceptions occur. By now there might occur an exceptions but as you are hiding them all we and you have no clue about if, when, why and where it happens. Remove / replace the exception handlers as shown and you should get a clue about if, when, why and where.
    cheers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error while inserting into blob column through PL/SQL

    Hi All,
    I am trying to insert into column having blob as datatype.
    INSERT INTO imagedb(image_name, content,description) VALUES ('logo.png',
    ?{file 'c:\logo.png'}, 'logo');
    it gives me error Unknown JDBC escape sequence:
    Is there anything wrong in above insert syntax for inserting into BLOB data type.
    Can any body please help me.
    Regards,
    Hiren

    It is not valid SQL as far as Oracle SQL is concerned. I assume that the file construct is suppose to replace that with the contents of the file?
    What happens when the file size exceeds the max length of the SQL command?
    And do you have any idea what will happen to the SQL Shared Pool on Oracle that needs to store the entire SQL command for every single SQL command passed to it? The whole purpose of the Shared Pool is for storing shared SQL. Not non-sharable SQL containing hardcoded values.
    Bind variable are to be used.. if you expect Oracle to perform like only Oracle can.
    And my bet is that you have not even bothered to read [url http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm]Oracle® Database Application Developer's Guide - Large Objects guide....

  • Error while inserting into secure store when installing solution manager

    hi all,
    I have problem when the installation of solution manager try to insert into secure store,
    the installation completed creating the secure store, but at the inserting the error raised...
    i need your helps,
    Thanks in advanced

    thi is the insallation log:Import Monitor jobs: running 0, waiting 0, completed 30, failed 0, total 30.
    INFO 2010-12-29 15:06:23.972
    Execute step extractMigrationCheckerArchive of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0
    INFO 2010-12-29 15:06:25.315
    Execute step runPackageChecker of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0
    INFO 2010-12-29 15:06:25.378
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:25.409
    Creating file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\package_checker.java.log.
    INFO 2010-12-29 15:06:25.409
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:25.425
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    INFO 2010-12-29 15:06:25.425
    Output of C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath migcheck.jar -showversion com.sap.inst.migcheck.MigrationChecker -checkPackages -installDir "C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS" -packageFile "W:\soman cd instation export2-442\DATA_UNITS\EXP4\DATA\SAPSTR.LST" -trace all is written to the logfile package_checker.java.log.
    INFO 2010-12-29 15:06:25.675
    Execution of the command "C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath migcheck.jar -showversion com.sap.inst.migcheck.MigrationChecker -checkPackages -installDir "C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS" -packageFile "W:\soman cd instation export2-442\DATA_UNITS\EXP4\DATA\SAPSTR.LST" -trace all" finished with return code 0. Output:
    java version "1.4.2_29"
    Java(TM) Platform, Standard Edition for Business (build 1.4.2_29-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 1.4.2_29-b01, mixed mode)
    INFO 2010-12-29 15:06:26.269
    Execute step runObjectChecker of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_ABAP_Import_Dialog|ind|ind|ind|ind|5|0|NW_ABAP_Import|ind|ind|ind|ind|0|0
    INFO 2010-12-29 15:06:26.331
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:26.362
    Creating file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\object_checker.java.log.
    INFO 2010-12-29 15:06:26.378
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:26.378
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    INFO 2010-12-29 15:06:26.378
    Output of C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath migcheck.jar -showversion com.sap.inst.migcheck.MigrationChecker -checkObjects -dbType ORA -tskDir "C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS" -strDirs "W:\soman cd instation export1-442\DATA_UNITS\EXP1\DATA;W:\soman cd instation export1-442\DATA_UNITS\EXP2\DATA;W:\soman cd instation export2-442\DATA_UNITS\EXP3\DATA;W:\soman cd instation export2-442\DATA_UNITS\EXP4\DATA" -trace all is written to the logfile object_checker.java.log.
    INFO 2010-12-29 15:06:28.878
    Execution of the command "C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath migcheck.jar -showversion com.sap.inst.migcheck.MigrationChecker -checkObjects -dbType ORA -tskDir "C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS" -strDirs "W:\soman cd instation export1-442\DATA_UNITS\EXP1\DATA;W:\soman cd instation export1-442\DATA_UNITS\EXP2\DATA;W:\soman cd instation export2-442\DATA_UNITS\EXP3\DATA;W:\soman cd instation export2-442\DATA_UNITS\EXP4\DATA" -trace all" finished with return code 0. Output:
    java version "1.4.2_29"
    Java(TM) Platform, Standard Edition for Business (build 1.4.2_29-b01)
    Java HotSpot(TM) 64-Bit Server VM (build 1.4.2_29-b01, mixed mode)
    INFO 2010-12-29 15:06:29.487
    Execute step unpackJ2EEINSTALL of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0
    INFO 2010-12-29 15:06:30.347
    Execute step createSecureStore of component |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0
    INFO 2010-12-29 15:06:30.847
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:30.878
    Creating file C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS\SecureStoreCreate.log.
    INFO 2010-12-29 15:06:30.878
    Switched to user: s01adm.
    INFO 2010-12-29 15:06:30.878
    Working directory changed to C:\Program Files\sapinst_instdir\SOLMAN\SYSTEM\ORA\CENTRAL\AS.
    INFO 2010-12-29 15:06:30.878
    Output of C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath "C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/launcher.jar" -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS "C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/lib/iaik_jce.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/exception.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/logging.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/tc_sec_secstorefs.jar" create -s S01 -f
    sapdev/sapmnt/S01/SYS/global/security/data/SecStore.properties -k
    sapdev/sapmnt/S01/SYS/global/security/data/SecStore.key -enc -p XXXXXX is written to the logfile SecureStoreCreate.log.
    INFO 2010-12-29 15:06:31.628
    Execution of the command "C:\j2sdk1.4.2_29-x64\bin\java.exe -classpath "C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/launcher.jar" -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS "C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/lib/iaik_jce.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/exception.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/logging.jar;C:/Program Files/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/tc_sec_secstorefs.jar" create -s S01 -f
    sapdev/sapmnt/S01/SYS/global/security/data/SecStore.properties -k
    sapdev/sapmnt/S01/SYS/global/security/data/SecStore.key -enc -p XXXXXX" finished with return code 0. Output:
    SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    Store with encryption and a key phrase created.
    WARNING[E] 2010-12-29 15:06:31.738
    CJS-30226  Host: 'sapdev' or port: 'undefined' or dbSid: 'D01' is in an inconsistent state or undefined.
    ERROR 2010-12-29 15:06:31.753
    FCO-00011  The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
    and this is the secureStoreCreate.log:
    SAP Secure Store in the File System - Copyright (c) 2003 SAP AG
    Store with encryption and a key phrase created.
    and this is the stepLogMessages.xml:
    <message type="warning" timestamp="2010-12-29 15:10:53.982">Host: 'sapdev' or port: 'undefined' or dbSid: 'D01' is in an inconsistent state or undefined.</message>
      <message type="trace" timestamp="2010-12-29 15:10:53.982">JS Callback has thrown unknown exception. Rethrowing.</message>
      </messageStack>
      </stepMessages>
    thanks for your fast response

  • 'FROM keyword not found where expected'error while Inserting into Text file

    Hi,
    I have created a simple interface for testing purpose. All it has to do is to Read the data from a Source Text file and put it into another text file (exactly the same headers as that of source) ...
    I am using Oracle as my staging area.
    But at 'Insert column Header' Stage, it gives me a warning 'FROM keyword not found where expected' and when it goes to the next step 'Insert Rows' it gives me the same error 'FROM keyword not found where expected' and aborts its execution.
    I checked the query for insertion and found nothing wrong in it (FROM Statement is just where it is expected, that is) but somehow its not working.
    Can somebody help me out as i have done it before on other Installations and dont know why it is occuring that too for the simplest thing in ODI ...
    Regards,
    Nitesh.

    Probably you missed the concat operator.
    select rpad(nvl(lu_parid,' '),1,19)|| v_comma ||
    rpad(nvl(lu_class,' '),1,3)
    from temp_te07                                                                                                                                                                                                                                                                                                           

  • Error while logging into CR server using SDK API

    I have crystal reports server 2008 running on Redhat linux machine. The CMS server (running on port 6400)and other servers are all up and running.
    When I try to communicate to the server using the SDK API I am getting error message. Can someone help me. I tried many things like shutting down firewall at the  server etc bit nothing work . The netstat -na command shows server is running on port 6400. I am going mad.
                  String  authentication = "secEnterprise"
                  ISessionMgr sm = CrystalEnterprise.getSessionMgr();
              enterpriseSession = sm.logon(userName,password,cms,authentication)
    Exception:
    com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$CommunicationError: Communication error occurred when trying to connect to server 15.7.204.107:6400 (FWM 01009)
    cause:com.crystaldecisions.thirdparty.org.omg.CORBA.TRANSIENT: attempt to establish connection failed: java.net.ConnectException: Connection timed out: connect  minor code: 0x4f4f0001  completed: No
    detail:Communication error occurred when trying to connect to server 15.7.204.107:6400 (FWM 01009) attempt to establish connection failed: java.net.ConnectException: Connection timed out: connect
         at com.crystaldecisions.enterprise.ocaframework.RawAPSDirectory.find(RawAPSDirectory.java:252)
         at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildAPSClusterInfo(APSServerHandler.java:425)
         at com.crystaldecisions.enterprise.ocaframework.APSServerHandler.buildServerInfo(APSServerHandler.java:142)
         at com.crystaldecisions.enterprise.ocaframework.ServerController.redirectServer(ServerController.java:546)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.redirectServer(ServiceMgr.java:1060)
         at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:250)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:694)
         at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:504)
         at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:648)
         at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogon(LogonService.java:295)
         at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon(SecurityMgr.java:162)
         at com.crystaldecisions.sdk.framework.internal.SessionMgr.authenticate(SessionMgr.java:598)

    Thanks for the reply. What do you mean by enterprise machine. Can you explain.
    I will try wireshark and let you know.
    I can login into infoview, cmc and ssh to that machine without problems.Very strange.

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • Please help --Error in insert into Statement

    Error in insert into statement while connecting to ms-access.
    import java.sql.*;
    public class stupid8
         public stupid8()
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection con=DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};"+"DBQ=d:/Servlet/registration.mdb");
                   PreparedStatement s=con.prepareStatement("insert into Deposit (username,date,amount) values(?,?,?)");
                   s.setString(1,"username");
                   s.setString(2,"date");
                   s.setString(3,"amount");
                   s.executeUpdate();
                   System.out.println("Success");
              catch(Exception e)
                   System.out.println("Error: "+e);
         public static void main(String args[])
              new stupid8();
    }

    My first guess is that the database is objecting to the use of "date" as a column name; "date" is often a reserved word in databases.
    It would be less of a guess if you posted the actual error message.

  • Problem while inserting into a table which has ManyToOne relation

    Problem while inserting into a table *(Files)* which has ManyToOne relation with another table *(Folder)* involving a attribute both in primary key as well as in foreign key in JPA 1.0.
    Relevent Code
    Entities:
    public class Files implements Serializable {
    @EmbeddedId
    protected FilesPK filesPK;
    private String filename;
    @JoinColumns({
    @JoinColumn(name = "folder_id", referencedColumnName = "folder_id"),
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private Folders folders;
    public class FilesPK implements Serializable {
    private int fileId;
    private int uid;
    public class Folders implements Serializable {
    @EmbeddedId
    protected FoldersPK foldersPK;
    private String folderName;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "folders")
    private Collection<Files> filesCollection;
    @JoinColumn(name = "uid", referencedColumnName = "uid", insertable = false, updatable = false)
    @ManyToOne(optional = false)
    private Users users;
    public class FoldersPK implements Serializable {
    private int folderId;
    private int uid;
    public class Users implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer uid;
    private String username;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "users")
    private Collection<Folders> foldersCollection;
    I left out @Basic & @Column annotations for sake of less code.
    EJB method
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    FoldersPK folderPk = new FoldersPK(folderID, uid);
         // My understanding that it should automatically handle folderId in files table,
    // but it is not…
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    It is giving error:
    Internal Exception: java.sql.SQLException: Field 'folderid' doesn't have a default value_
    Error Code: 1364
    Call: INSERT INTO files (filename, uid, fileid) VALUES (?, ?, ?)_
    _       bind => [hello.txt, 1, 0]_
    It is not even considering folderId while inserting into db.
    However it works fine when I add folderId variable in Files entity and changed insertFile like this:
    public void insertFile(String fileName, int folderID, int uid){
    FilesPK pk = new FilesPK();
    pk.setUid(uid);
    Files file = new Files();
    file.setFilename(fileName);
    file.setFilesPK(pk);
    file.setFolderId(folderId) // added line
    FoldersPK folderPk = new FoldersPK(folderID, uid);
    file.setFolders(em.find(Folders.class, folderPk));
    em.persist(file);
    My question is that is this behavior expected or it is a bug.
    Is it required to add "column_name" variable separately even when an entity has reference to ManyToOne mapping foreign Entity ?
    I used Mysql 5.1 for database, then generate entities using toplink, JPA 1.0, glassfish v2.1.
    I've also tested this using eclipselink and got same error.
    Please provide some pointers.
    Thanks

    Hello,
    What version of EclipseLink did you try? This looks like bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=280436 that was fixed in EclipseLink 2.0, so please try a later version.
    You can also try working around the problem by making both fields writable through the reference mapping.
    Best Regards,
    Chris

  • ERROR WHILE INSERTING BLOBS AS PARAMETERS OF EXISTING STORED PROCEDURE

    I have 2 simple tables to keep large application data (as XMLDOCUMENT in one table and BLOB in another):
    SQL> desc bindata_tbl;
    Name Null? Type
    BDATA_ID NOT NULL NUMBER(10)
    BDATA NOT NULL BLOB
    SQL> desc metadata_tbl;
    Name Null? Type
    MDATA_ID NOT NULL NUMBER(10)
    MDATA NOT NULL SYS.XMLTYPE
    and stored preocedure to input new data into those tables:
    "SP_TEST_BIN_META_DATA"
    i_MetaData in METADATA_TBL.MDATA%TYPE,
    i_BinData in BINDATA_TBL.BDATA%TYPE
    as
    begin
    if i_MetaData is not null then
    insert into METADATA_TBL (MDATA_ID, MDATA)
    values (METADATA_SEQ.nextval, i_MetaData);
    end if;
    if i_BinData is not null then
    insert into BINDATA_TBL (BDATA_ID, BDATA)
    values (BINDATA_SEQ.nextval, i_BinData);
    end if;
    COMMIT;
    -- Handle exceptions
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RAISE;
    end;
    I communicate with database from .Net application using "Oracle.DataAccess 10.1.0.200 (Runtime version v1.0.3705)" component.
    Following procesure is a [simplified] examlple of the code I use, which demonstrates the errors while inserting XMLDOCUMENT and BLOB values simultaneously.
    In my application those should be quite big objects (~200 K XML and ~5-25M binary image data), but following sample keeps failing even with very small-sized objects:
    Line Number
    1          private void PureTest()
    2          {
    3               OracleConnection conn = null;
    4               OracleTransaction tx = null;
    5               OracleCommand command = null;
    6
    7               try
    8               {
    9                    // Open connection
    10                    string strConn = "Data Source=AthenaWf; User ID=AthenaWf; Password=Poseidon";
    11                    conn = new OracleConnection( strConn );
    12                    conn.Open();
    13
    14                    // Begin transaction (not sure if really needed)
    15                    tx = conn.BeginTransaction();
    16
    17                    // Create command
    18                    string strSql = "SP_TEST_BIN_META_DATA";
    19                    command = new OracleCommand();
    20                    command.Connection = conn;
    21                    command.CommandText = strSql;
    22                    command.CommandType = CommandType.StoredProcedure;
    23
    24                    // Create parameters
    25                    // 1) XmlType parameter
    26                    string strXml = "<?xml version=\"1.0\"?><configuration testValue=\"123456789\"/>";
    27                    XmlDocument xmlDoc = new XmlDocument();
    28                    xmlDoc.LoadXml( strXml );
    29                    OracleXmlType oraXml = new OracleXmlType( conn, xmlDoc );
    30                    //oraXml = null;
    31                    //
    32                    OracleParameter xmlPrm = new OracleParameter();
    33                    xmlPrm.ParameterName = "i_MetaData";
    34                    xmlPrm.Direction = ParameterDirection.Input;
    35                    xmlPrm.OracleDbType = OracleDbType.XmlType;
    36                    xmlPrm.Value = oraXml;
    37                    command.Parameters.Add( xmlPrm );
    38
    39                    // 2) Blob type
    40                    byte[] buf = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    41                    OracleBlob oraBlob = new OracleBlob( conn, true );
    42                    //oraBlob.Write( buf, 0, buf.Length );
    43                    oraBlob = null;
    44                    //
    45                    OracleParameter blobPrm = new OracleParameter();
    46                    blobPrm.ParameterName = "i_BinData";
    47                    blobPrm.Direction = ParameterDirection.Input;
    48                    blobPrm.OracleDbType = OracleDbType.Blob;
    49                    blobPrm.Value = oraBlob;
    50                    command.Parameters.Add( blobPrm );
    51
    52
    53                    // Execute command finally
    54                    command.ExecuteNonQuery();
    55                    tx.Commit();
    56               }
    57               catch( Exception ex )
    58               {
    59                    // Clean-up
    60                    if( command != null )
    61                    {
    62                         command.Dispose();
    63                    }
    64                    if( tx != null )
    65                    {
    66                         tx.Dispose();
    67                    }
    68                    if( conn != null )
    69                    {
    70                         conn.Dispose();
    71                    }
    72
    73                    // Display error message
    74                    MessageBox.Show( ex.Message, "Error" );
    75               }
    76          }
    If I try insert only XMLDOCUMENT object (lines 30, 42 are commented out, 43 IS NOT) - everything is OK.
    If I try to insert only BLOB object (lines 30, 42 are NOT COMMENTED OUT, line 43 is commented out) - everything is OK again.
    If I try to insert them both having some values (lines 30, 43 are commented out, 42 is not commented out) - it fails right on "command.ExecuteNonQuery();" (line 54)
    with the following exception:
    "ORA-21500: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%]".
    Even when I nullify oraBlob before assigning it to OracleParameter value (line 30 is commented out, line 42 and 43 are not) I have the same exception.
    XMLDOCUMENT and DLOB data logically are very coupled objects (in my application), so I really want to insert them simultaneously in one stored procedure in transactional way.
    Is it bug of drivers, server, .net environment, or I miss something in implementation?
    PS. In some articles on Oracle web and in MSDN site I found a mention about necessity of wrapping all write/update operations in a transaction, while working with temporary LOBs. I use it here, but it does not look like changing anything.

    Hello,
    I tested your code with the 10.1.0.4.0 ODP and 10.1.0.4.0 Client and it worked fine.
    Can you please apply the 10.1.0.4.0 patches for both ODP and client to see if this resolves the issue for you.
    Here is the output from the same execution of the ODP application you provided as a testcase. These rows were inserted at the same time when I executed the application and passed the data as parameters to the SP you provided.
    Results of Testing with 10.1.0.4.0
    ==========================
    SQL> select count(*) from BINDATA_TBL
    2 ;
    COUNT(*)
    1
    SQL> select count(*) from METADATA_TBL;
    COUNT(*)
    1
    SQL> select dbms_lob.getlength(bdata) from BINDATA_TBL;
    DBMS_LOB.GETLENGTH(BDATA)
    10
    SQL> select mdata from METADATA_TBL;
    MDATA
    <?xml version="1.0"?><configuration testValue="123456789" />

  • Error while logging into applications in R12(21.1.3)

    Hi,
    We are getting below error while logging into applications in R12 (12.1.3).
    **"You have encountered an unexpected error. Please contact the system administrator for assistance"**
    Everytime we face this issue, we will bounce OACORE services then the issue will not occur again.
    Can you please help me in finding permanent fix for this issue?
    FYI,
    I have performed the following debugging steps to check the issue further
    1.     Enabled FND diagnostics at the site level .
    2.     Added following lines in ocj4.properties file
    AFLOG_ENABLED=true
    AFLOG_LEVEL=statement
    AFLOG_MODULE=% (% captures all - preferable to use products such as fnd, ies, por)
    AFLOG_FILENAME=/tmp/test.log
    3.     Examined the output from aoltest.jsp. Please find the attached AOL-J diagnostics test file.
    Then I have reproduced the issue, and examined all the log files but couldn’t find any error information.
    Thanks,
    Srinivasulu.

    Everytime we face this issue, we will bounce OACORE services then the issue will not occur again.
    Can you please help me in finding permanent fix for this issue?
    Then I have reproduced the issue, and examined all the log files but couldn’t find any error information. If bouncing the services fixes the issue, then there must be some details about the error in the logs.
    R12, 12.1 - How To Enable and Collect Debug for HTTP, OC4J and OPMN [ID 422419.1]
    How to enable Apache, OC4J and OPMN logging in Oracle Applications R12 [ID 419839.1]
    Thanks,
    Hussein

  • Error while creating the DWH tables using DAC

    Hi,
    I am getting error while creating the DWH tables using DAC. I have created a ODBC DSN using merant driver with DAC repository DB credentials and the test connection is successful. And while creating the tables i gave the olap dw credentials and the DSN name which i created earlier. But it throws the error as below:
    Please find the below mentioned error message
    =====================================
    STD OUTPUT
    =====================================
    CREATING SIEBEL DATABASE OBJECTS
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ******* /c DB_DAC /G "SSE_ROLE" /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b "" /K "" /X "" /W N
    Error while importing Siebel database schema.
    =====================================
    ERROR OUTPUT
    =====================================
    Siebel Enterprise Applications ODBC DDL Import Utility, Version 7.7 [18030] ENU
    Copyright (c) 2001 Siebel Systems, Inc. All rights reserved.
    This software is the property of Siebel Systems, Inc., 2207 Bridgepointe Parkway,
    San Mateo, CA 94404.
    User agrees that any use of this software is governed by: (1) the applicable
    user limitations and other terms and conditions of the license agreement which
    has been entered into with Siebel Systems or its authorized distributors; and
    (2) the proprietary and restricted rights notices included in this software.
    WARNING: THIS COMPUTER PROGRAM IS PROTECTED BY U.S. AND INTERNATIONAL LAW.
    UNAUTHORIZED REPRODUCTION, DISTRIBUTION OR USE OF THIS PROGRAM, OR ANY PORTION
    OF IT, MAY RESULT IN SEVERE CIVIL AND CRIMINAL PENALTIES, AND WILL BE
    PROSECUTED TO THE MAXIMUM EXTENT POSSIBLE UNDER THE LAW.
    If you have received this software in error, please notify Siebel Systems
    immediately at (650) 295-5000.
    F:\DAC\bifoundation\dac\UTILITIES\BIN\DDLIMP /I N /s N /u infdomain /p ***** /c DB_DAC /G SSE_ROLE /f F:\DAC\bifoundation\dac/conf/sqlgen/ctl-file/oracle_bi_dw.ctl /b /K /X /W N
    Connecting to the database...
    28000: [DataDirect][ODBC Oracle driver][Oracle]ORA-01017: invalid username/password; logon denied
    Unable to connect to the database...
    any help is appreciated.
    Thanks,
    RM

    The fact that you are getting an "ORA-01017: invalid username/password; logon denied" message indicates that you are at least talking to the database.
    The log shows that username "infdomain" is being used. Can you double check the username and password you have in DAC in a SQL*Plus/SQL Developer session?
    Please mark if useful/helpful,
    Andy.

Maybe you are looking for

  • How to output times of foreach

    i want to output the times of c:foreach, for example <c:forEach items="unitList" var="element" > <!--how can i out put times--> </c:forEach> like for(int i=0;i<len;i++) array=1; i want to output i, in c:foreach, how to do it ,thank you very much!

  • New iPhone 5 keeps crashing, help?

    Okay, so I've just upgraded from my very solid 3GS (a bit slow albiet) to the brand new iPhone 5 which I'm very pleased with, I love it, especially since I've just got retina, Siri and all the rest of the stuff the 4+4S owners enjoyed. There is just

  • Add Minutes to a Timestamp column

    Hello there, I need to know how to add minutes to a timestamp column in APEX. I was looking for an answer on the internet but the DATEADD function doesn't work in APEX. Any ideas? Ruben

  • Backflush field is missing in MRP 2 view

    Hi   There is one material, the backflush indicator field is missing in mrp2 view. Can you help me why? Is it because the material type or something else? Thanks

  • Error when refreshing report region: ORA-20876: Stop APEX Engine

    I'm using Apex 4.2. On click of a button, I refresh 2 Standard Region Reports with a Dynamic Action. This dynamic action has been working without problems for WEEKS and all of a sudden i'm getting the ORA-20876: Stop APEX Engine error when I click th