ORA-00936 not being returned.

I by accident ran across a syntactical error that SQL Developer is not reporting. Run this select query is both SQL Plus and SQL Developer....
select table_name, upper(substr(table_name,1,instr(table_name,'\')- 1)),
upper(substr(table_name, instr(table_name,'\') ,444)),
from all_tables;
Notice that SQL-Plus will return "ORA-00936: missing expression" because there is an extra comma just before "from all_tables". However, SQL Developer does not do this properly and states "All rows fetched: 0".
My versions...
SQL Developer 1.5.4
Oracle 10.2.0.4

Srinivas,
Yes, yes, and yes
A little more background...  we're attempting to move the process to a new SAP box which uses AIX.  The SAP RFC toolkit was installed and the C program was compiled successfully.  The only things changed were the directories where the program resides.
I think you're correct in saying something in the code probably does not work properly with AIX, but I was hoping for hints as to what it might be (since it compiled in AIX). 
...guess I need to track down a C/AIX/RFC expert...
Rob,
I double-checked, no short dumps are occurring.  The RFC appears successful, but the data is not returned.
Thanks again.

Similar Messages

  • JDBC Connections not being returned to pool

    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         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.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

    Hi. Show us your pool definition. You should turn off refresh test minutes.
    Set it to 9999999.
    Joe
    Mncedisi Kasper wrote:
    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         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.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

  • Oracle SOA Suite - SOAP Fault content not being returned

    It starts with a fairly standard scenario: from within a BPEL process in Oracle SOA Suite, I’m making a call to an external web service. The not-so-standard part: the owner of the external web service has decided to return all errors in the form of a SOAP fault. Unfortunately, this error schema is not included in the WSDL. If we call the external web service directly (via SOAPUI, for example), we get the following, including a nice explanation of why it errored out:
    <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:err="error.xml.common">
    <faultcode>soapenv:Server</faultcode>
    <faultstring>Undefined</faultstring>
    <detail>
    <err:ErrorList>
    <err:Error>
    <err:Application>CIA</err:Application>
    <err:Code>1031</err:Code>
    <err:Description>Field value is invalid Credit Card Number V failed mod10 check</err:Description>
    <err:ServerTime>2010-02-25T17:37:38.472-05:00</err:ServerTime>
    </err:Error>
    <err:StackTrace>subscription.memberservices.common.exception.ServiceInvocationException: 1031~Field value is invalid Credit Card Number V failed mod10 check
    at subscription.memberservices.common.client.http.CiaHttpClient.checkForErrors(CiaHttpClient.java:120)
    at subscription.memberservices.common.client.http.CiaHttpClient.enroll(CiaHttpClient.java:50)
    at subscription.memberservices.na.processes.enroll.EnrollProcess.callCiaEnroll(EnrollProcess.jpd:1003)
    at subscription.memberservices.na.processes.enroll.EnrollProcess_wf$ImplControlSend14.invoke(EnrollProcess_wf.java:145)
    at com.bea.wli.bpm.runtime.Perform.execute(Perform.java:32)
    ... 38 more</err:StackTrace>
    </err:ErrorList>
    </detail>
    </soapenv:Fault>
    No matter what I try, however, I can’t fetch the information in the “detail” element above. When examining the audit trail in SOA Suite, I can only see this:
    <fault>
    <faultType>0</faultType>
    <remoteFault>
    <part name="summary">
    <summary>Undefined</summary>
    </part>
    <part name="detail">
    <detail>javax.xml.ws.soap.SOAPFaultException: Undefined</detail>
    </part>
    <part name="code">
    <code>null</code>
    </part>
    </remoteFault>
    </fault>
    It seems SOA Suite is “protecting” my service from the other SOAP fault elements instead of passing everything back, only passing the faultstring element. I even tried adding an ErrorList schema to match theirs but to no avail. Anyone out there have any experience, luck or ideas with this problem?
    Thanks for the assistance,
    Rob

    Re: Oracle SOA suite server does not startBut I can see that server has got started -
    <21-Jul-2010 12:04:47 o'clock BST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>em application gets deployed on admin server and not on SOA server. You may access em console on - http://<hostName>:<admin_server_port>/em
    By default admin server port is 7001.
    Regards,
    Anuj

  • Firefox is not remembering passwords for sites that i visit regularly. Ihave checked the box "remember passwords for sites" in the security tab under tools, but the passwords are not being remembered when I return to the sites.

    Firefox is not remembering passwords for sites that i visit regularly. Ihave checked the box "remember passwords for sites" in the security tab under tools, but the passwords are not being remembered when I return to the sites. I am running v 3.6.18

    Websites remembering you and automatically log you in is stored in a cookie.
    * Create an allow cookie exception (Tools > Options > Privacy > Cookies: Exceptions) to keep such a cookie, especially for secure websites and if cookies expire when Firefox is closed.
    Make sure that you do not run Firefox in Private Browsing mode.
    * https://support.mozilla.com/kb/Private+Browsing
    * In [[Private Browsing]] mode all cookies are session cookies that expire if that session is ended, so websites won't remember you.
    * Do not use [[Clear Recent History]] to clear the "Cookies" and the "Site Preferences"
    Clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.
    * http://kb.mozillazine.org/Cookies

  • BUG: Return listener not being called for manually launched dialog

    Hello all,
    I have found a bug in the dialog framework. To set the stage, I have a ADF Faces page with a command button on it. The partial submit property is set to "true" and the use window property is also set to "true." I also have the returnListener property set to a method in the backing bean. When I set the Action property of the command button to a global navigation rule that launches a dialog, the return listener is being called correctly when I dismiss the dialog.
    However, when I launch the dialog from an action listener, the return listener is not being called. Here is my action listener code:
      public void al (ActionEvent ae)
        FacesContext context = FacesContext.getCurrentInstance();
        ViewHandler vh = context.getApplication().getViewHandler();
        UIViewRoot dialog = vh.createView(context, "/infrastructure/ICConfirmDelete.jspx");
        HashMap properties = new HashMap();
        properties.put("width", new Integer(300));
        properties.put("height", new Integer(300));
        AdfFacesContext.getCurrentInstance().launchDialog(dialog, null, ae.getComponent(), true, properties);
      }and here is my return listener:
      public void rl(ReturnEvent re)
        System.out.println("in return");
        System.out.println((String) re.getReturnValue());
      }OK - here's an update. If the command button is in the Actions facet of the page, everything works as expected. However, if the button is in the selection facet of a table (inside of afTableSelectOne) - it does not work properly as documented here. It also works correctly if the button is in the actions facet of the table. I think that this is a bug and needs to work - my use case (as you might tell from my code) is to do a delete confirmation dialog. My short-term workaround is to use the Action instead of ActionListener property on the command button, but the issue I have is that the pop-up dialog is just a tad too small, and is showing scrollbars.
    Regards,
    John
    Message was edited by:
    John Stegeman
    Added additional information about tableSelectOne

    Gabrielle,
    Sorry for the confusion.
    What does not work:
    Initiating a dialog from the ActionListener attached to a command button (where the command button is inside an afSelectTableOne) will not fire the returnListener when the dialog is closed.
    What does work:
    Initiating a dialog by returning a dialog-based navigation rule (e.g. a string starting with "dialog:") from the Action attached to a command button (even if the command button is inside an afSelectTableOne) - the return listener is called when the dialog is closed
    What also does work:
    Initiating a dialog with either method (Action or ActionListener) when the command button is elsewhere on the Page (e.g. in the Actions facet)
    Hope this clarifies the bug. I could send a test case if desired.
    Kind regards,
    John

  • ORA-06512 and/or ORA-00936 ... simple procedure problem probably

    I'm passing in codes like the following to the stored procedure (below):
    ",IRE,UK,FR,SCOT,WALES" (a string of words seperated by a ',')
    Problem is I get the following error:
    ORA-00936: missing expression ORA-06512: at "APPNAME.PKG_TOOL", line 132 ORA-06512: at line 1
    I googled the two ORA's but am still stumped. I'd appreciate any help at all as I'm still not overly familiar with SQL.
    PROCEDURE sp_check_code_Exist(p_CodeList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select * from codes_data c where ';
              thissql := thissql || 'c.code in ('|| p_CodeList ||') ';
              open p_cursor FOR thissql;
              begin
                     Execute immediate thissql;
              end;
         END sp_check_code_Exist;

    I know this is digressing a bit from the thread heading but I'd like to know if I really will be screwed if I don't optimise.
    The machine that this is being hosted on will be a top notch machine with a very fat line and will have probably only thousands of codes.
    This is the code as it stands now
    PROCEDURE sp_check_GenericCodes(p_GenericsList IN varchar, p_cursorSMB IN OUT cursorSMB) IS
         thissql varchar(1000);
         BEGIN
              thissql := thissql || 'select distinct generic_code from emc_codes_data ed where ';
              thissql := thissql || 'ed.generic_code in ('||p_GenericsList||')';
              open p_cursorSMB FOR thissql;
         END sp_check_GenericCodes;So all I'll be returning is a few thousand words which will then be sorted alphabetically and will be then compared to another string which will be sorted alphabetically, to see if there is any missing code, and if there are then those codes will be spit out to an admin who will realise he made a mistake and where the mistake is.
    This is how its all called:
    public string checkGenericCodesExist(string codesList)
                   OracleDataReader rdr = null;
                   DBConnect dbConnLocal = null;
                   OracleCommand cmd = null;
                   string sRetVal = null;
                   string CurrentFunction = "PPTEngine.clsPart.genericCodeExsists";               
                   try
                        dbConnLocal = new DBConnect(CurrentFunction, "Pkg_SMBTool.sp_check_GenericCodes", m_Stream);
                        // Pass in parameters
                        dbConnLocal.addParam(new OracleParameter("p_cursorSMB", OracleType.Cursor));                    
                        dbConnLocal.setParamDirection("p_cursorSMB",ParameterDirection.Output);
                        dbConnLocal.addParam(new OracleParameter("p_GenericsList", OracleType.VarChar));
                        dbConnLocal.setParamValue("p_GenericsList", codesList);                    
                        // Execute
                        cmd = dbConnLocal.ExecuteProcedure();
                        rdr = (OracleDataReader)cmd.Parameters["p_cursorSMB"].Value;
                        // Loop
                        if (rdr.HasRows)
                             while (rdr.Read())
                                  if (!rdr.IsDBNull(rdr.GetOrdinal("Generic_Code"))) m_GenericCode = rdr.GetString(rdr.GetOrdinal("Generic_Code"));
                        rdr.Close();
                        //remove the '
                        string[] PPTCodes = codesList.Replace( "'", null).Split("','".ToCharArray());
                   catch (Exception e)
                        Log.WriteToFile(CurrentFunction + " - " + e.Message, System.Diagnostics.TraceLevel.Error);
                        throw e;
                   finally
                        if (dbConnLocal!=null) dbConnLocal.Close();
                   return sRetVal;
              }The above function is still a work in progress, but is almost there.

  • Calendar Display Issue / Unable to render component: ORA-00936: missing exp

    I am trying to display a range of dates in an APEX calendar, where the start and end date are in the record being selected.
    The SQL statement works fine in sqlplus, however when put into the calendar renders the error message "Unable to render component: ORA-00936: missing expression".
    select task, start_due + l - 1 "date"
    from calendar_tasks
    , (select level l from dual connect by level <= (select max(stop_date - start_date) + 1 from calendar_tasks))
    where
    l <= stop_date - start_date + 1 and
    task_status = 'SCHEDULED'
    Looking to understand this error in the calendar context and any possible solutions.
    Thanks!

    Try a column alias other than "date" and either not double-quoted or in upper case if double-quoted.
    Scott

  • ORA-01422- exact fetch returns more than requested number of rows in D2K Report

    Hi All,
    Greetings.
    I am using a report which is being called from the from in one of my application. The report is working fine from quiet a long time. I have an error with a particular record alone and it is working fine for all other records.
    When I try to run the report, I am getting the error as Rep-1401- 'cf_vatformula' : Fatal pl/sql error occured.
                                                                                ORA-01422- Exact fetch returns more than requested number of rows.
    I opened the formula column and run the sql codes that are used in the formula column cf_vat and all of them are working fine. None of them are fetching more a single row. But, when I run the report, I am getting the same error as mentioned above.
    Please help me resolve the issue ASAP. Thanks in Advance.
    Regards,
    Bhaskar.

    Hi InoL,
    Thanks for your time.
    I am sure that there is no other procedure used in cf_vatformula. It has select queries in and all of them are fetching the data not more than a single row.
    I have tested each and every select query with every possible output.
    Regards,
    Bhaskar.

  • Automatic Row Processing fetch error (ORA-00936: missing expression)

    Hi there,
    I have a bit of a problem setting up automatic row processing. The Apex processing is causing an error, but I'm not sure what PL/SQL code is being run (obviously, I don't have access to the Apex code) and all I get is the error following:
    0.13: Processing point: AFTER_HEADER
    0.13: ...Process "Notes load": DML_FETCH_ROW (AFTER_HEADER) F|#OWNER#:PUPIL_NOTE:P29_PUPIL_ID:PUPIL_ID:P29_ACHIEVEMENT_SET_ID:ACHIEVEMENT_SET_ID
    0.16: Show ERROR page...
    and then the following exception report on the page:
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Can anyone tell me how I can diagnose the problem?
    Many thanks,
    Robert
    Message was edited to change subject

    I am having a very similiar problem
    0.02: Fetch session state from database
    0.03: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.03: Computation point: BEFORE_HEADER
    0.03: Processing point: BEFORE_HEADER
    0.04: ...DML_FETCH_ROW (BEFORE_HEADER) F|#OWNER#:JOH:P66_JOH_ID:JOH_ID
    0.49: Show ERROR page...
    0.50: Processing point: AFTER_ERROR_HEADER
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    JOH was a synonym (allowing other shemas to access the table) but @I delted those
    P66_JOH_ID is a DB column (which it wasnt)
    but I still get the error
    ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored
    Any ideas how I can track this down?

  • 11g ODBC SQLGetTypeInfo result COLUMN_SIZE column being returned as 64bit v

    Using InstantClient 11.2 ODBC I'm getting odd behavior for the SQLGetTypeInfo call on a 64bit Win2K3 machine.
    When binding the result column 2 (COLUMN_SIZE) as an integer (as per the ODBC spec), it looks like this is being returned in a 64bit word (even though the buffer buffer size is specified as a SQLUINTEGER).
    This is obviously causing some issues - is this a known bug?
    My solution is to move this value's storage to the end of the struct I'm using to store all the columns of the result and add some additional padding but my concern is that there are other areas where the ODBC interface is not following the ODBC specification. Is there a list of known exceptions to the ODBC specification for the oracle instant client drivers for 64 bit architectures?

    Thanks. That's doing the trick.
    We can use PASSTHROUGH PACKAGE to change the SQL_MODE for a particular session using the MySQL statement: set session sql_mode='ANSI_QUOTES';
    It will then look like:
    - first setting in the session ANSI_SQL using PASSTHROUGH:
    DECLARE
    ret integer;
    c integer;
    BEGIN
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@mysql;
    DBMS_HS_PASSTHROUGH.PARSE@mysql(c, 'SET SESSION SQL_MODE=''ANSI_QUOTES'';'));
    ret := DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@mysql(c);
    dbms_output.put_line(ret ||' passthrough output');
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@mysql(c);
    END;
    REMARK: The passthrough statement SET SQL_MODE=''ANSI_QUOTES''; uses 2 single quotes ... !!no DOUBLE QUOTES !!
    Now selects works using double qoutes:
    SQL> select * from "test"@mysql;
    col1 col2
    Hello 1
    As soon as I disconnect and connect again and try to run the select without the PASSTHROUGH we get the old error again:
    SQL> select * from "test"@mysql;
    select * from "test"@mysql
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.37-community]You have an error in your SQL
    syntax; check the manual that corresponds to your MySQL server version for the
    right syntax to use near '"col1",A1."col2" FROM "test" A1' at line 1
    ORA-02063: preceding 2 lines from MYSQL
    So using PASSTHROUGH at the beginning of each session allows us to change the ANSI mode for a particular session only without affecting all the other clients and might be a good workaround.

  • IPhone core data - fetched managed objects not being autoreleased on device (fine on simulator)

    I'm currently struggling with a core data issue with my app that defies (my) logic. I'm sure I'm doing something wrong but can't see what. I am doing a basic executeFetchRequest on my core data entity, but the array of managed objects returned never seems to be released ONLY when I run it on the iPhone, under the simulator it works exactly as expected. This is despite using an NSAutoreleasePool to ensure the memory footprint is minimised. I have also checked with Instruments and there are no leaks, just ever increasing allocations of memory (by '[NSManagedObject(_PFDynamicAccessorsAndPropertySupport) allocWithEntity:]'). In my actual app this eventually leads to a didReceiveMemoryWarning call. I have produced a minimal program that reproduces the problem below. I have tried various things such as faulting all the objects before draining the pool, but with no joy. If I provide an NSError pointer to the fetch no error is returned. There are no background threads running.
    +(natural_t) get_free_memory {
        mach_port_t host_port;
        mach_msg_type_number_t host_size;
        vm_size_t pagesize;
        host_port = mach_host_self();
        host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
        host_page_size(host_port, &pagesize);
        vm_statistics_data_t vm_stat;
        if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS) {
            NSLog(@"Failed to fetch vm statistics");
            return 0;
        /* Stats in bytes */
        natural_t mem_free = vm_stat.free_count * pagesize;
        return mem_free;
    - (void)viewDidLoad
        [super viewDidLoad];
        // Set up the edit and add buttons.
        self.navigationItem.leftBarButtonItem = self.editButtonItem;
        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject)];
        self.navigationItem.rightBarButtonItem = addButton;
        [addButton release];
        // Obtain the Managed Object Context
        NSManagedObjectContext *context = [(id)[[UIApplication sharedApplication] delegate] managedObjectContext];
        // Check the free memory before we start
        NSLog(@"INITIAL FREEMEM: %d", [RootViewController get_free_memory]);
        // Loop around a few times
        for(int i=0; i<20; i++) {
            // Create an autorelease pool just for this loop
            NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init];
            // Check the free memory each time around the loop
            NSLog(@"FREEMEM: %d", [RootViewController get_free_memory]);
            // Create a minimal request
            NSEntityDescription *entityDescription = [NSEntityDescription                                                 
                                                  entityForName:@"TestEntity" inManagedObjectContext:context];
            // 'request' released after fetch to minimise use of autorelease pool       
            NSFetchRequest *request = [[NSFetchRequest alloc] init];
            [request setEntity:entityDescription];
            // Perform the fetch
            NSArray *array = [context executeFetchRequest:request error:nil];       
            [request release];
            // Drain the pool - should release the fetched managed objects?
            [looppool drain];
        // Check the free menory at the end
        NSLog(@"FINAL FREEMEM: %d", [RootViewController get_free_memory]);
    When I run the above on the simulator I get the following output (which looks reasonable to me):
    2011-06-06 09:50:28.123 renniksoft[937:207] INITIAL FREEMEM: 14782464
    2011-06-06 09:50:28.128 renniksoft[937:207] FREEMEM: 14807040
    2011-06-06 09:50:28.135 renniksoft[937:207] FREEMEM: 14831616
    2011-06-06 09:50:28.139 renniksoft[937:207] FREEMEM: 14852096
    2011-06-06 09:50:28.142 renniksoft[937:207] FREEMEM: 14872576
    2011-06-06 09:50:28.146 renniksoft[937:207] FREEMEM: 14897152
    2011-06-06 09:50:28.149 renniksoft[937:207] FREEMEM: 14917632
    2011-06-06 09:50:28.153 renniksoft[937:207] FREEMEM: 14938112
    2011-06-06 09:50:28.158 renniksoft[937:207] FREEMEM: 14962688
    2011-06-06 09:50:28.161 renniksoft[937:207] FREEMEM: 14983168
    2011-06-06 09:50:28.165 renniksoft[937:207] FREEMEM: 14741504
    2011-06-06 09:50:28.168 renniksoft[937:207] FREEMEM: 14770176
    2011-06-06 09:50:28.174 renniksoft[937:207] FREEMEM: 14790656
    2011-06-06 09:50:28.177 renniksoft[937:207] FREEMEM: 14811136
    2011-06-06 09:50:28.182 renniksoft[937:207] FREEMEM: 14831616
    2011-06-06 09:50:28.186 renniksoft[937:207] FREEMEM: 14589952
    2011-06-06 09:50:28.189 renniksoft[937:207] FREEMEM: 14610432
    2011-06-06 09:50:28.192 renniksoft[937:207] FREEMEM: 14630912
    2011-06-06 09:50:28.194 renniksoft[937:207] FREEMEM: 14651392
    2011-06-06 09:50:28.197 renniksoft[937:207] FREEMEM: 14671872
    2011-06-06 09:50:28.200 renniksoft[937:207] FREEMEM: 14692352
    2011-06-06 09:50:28.203 renniksoft[937:207] FINAL FREEMEM: 14716928
    However, when I run it on an actual iPhone 4 (4.3.3) I get the following result:
    2011-06-06 09:55:54.341 renniksoft[4727:707] INITIAL FREEMEM: 267927552
    2011-06-06 09:55:54.348 renniksoft[4727:707] FREEMEM: 267952128
    2011-06-06 09:55:54.702 renniksoft[4727:707] FREEMEM: 265818112
    2011-06-06 09:55:55.214 renniksoft[4727:707] FREEMEM: 265355264
    2011-06-06 09:55:55.714 renniksoft[4727:707] FREEMEM: 264892416
    2011-06-06 09:55:56.215 renniksoft[4727:707] FREEMEM: 264441856
    2011-06-06 09:55:56.713 renniksoft[4727:707] FREEMEM: 263979008
    2011-06-06 09:55:57.226 renniksoft[4727:707] FREEMEM: 264089600
    2011-06-06 09:55:57.721 renniksoft[4727:707] FREEMEM: 263630848
    2011-06-06 09:55:58.226 renniksoft[4727:707] FREEMEM: 263168000
    2011-06-06 09:55:58.726 renniksoft[4727:707] FREEMEM: 262705152
    2011-06-06 09:55:59.242 renniksoft[4727:707] FREEMEM: 262852608
    2011-06-06 09:55:59.737 renniksoft[4727:707] FREEMEM: 262389760
    2011-06-06 09:56:00.243 renniksoft[4727:707] FREEMEM: 261931008
    2011-06-06 09:56:00.751 renniksoft[4727:707] FREEMEM: 261992448
    2011-06-06 09:56:01.280 renniksoft[4727:707] FREEMEM: 261574656
    2011-06-06 09:56:01.774 renniksoft[4727:707] FREEMEM: 261148672
    2011-06-06 09:56:02.290 renniksoft[4727:707] FREEMEM: 260755456
    2011-06-06 09:56:02.820 renniksoft[4727:707] FREEMEM: 260837376
    2011-06-06 09:56:03.334 renniksoft[4727:707] FREEMEM: 260395008
    2011-06-06 09:56:03.825 renniksoft[4727:707] FREEMEM: 259932160
    2011-06-06 09:56:04.346 renniksoft[4727:707] FINAL FREEMEM: 259555328
    The amount of free memory reduces each time round the loop in proportion to the managed objects I fetch e.g. if I fetch twice as many objects then the free memory reduces twice as quickly - so I'm pretty confident it is the managed objects that are not being released. Note that the entities that are being fetched are very basic, just two attributes, a string and a 16 bit integer. There are 1000 of them being fetched in the examples above. The code I used to generate them is as follows:
    // Create test entities
    for(int i=0; i<1000; i++) {
        id entity = [NSEntityDescription insertNewObjectForEntityForName:@"TestEntity" inManagedObjectContext:context];
        [entity setValue:[NSString stringWithFormat:@"%d",i] forKey:@"name"];
        [entity setValue:[NSNumber numberWithInt:i] forKey:@"value"];
    if (![context save:nil]) {
        NSLog(@"Couldn't save");
    If anyone can explain to me what is going on I'd be very grateful! This issue is the only only one holding up the release of my app. It works beautifully on the simulator!!
    Please let me know if there's any more info I can supply.

    Update: I modified the above code so that the fetch (and looppool etc.) take place when a timer fires. This means that the fetches aren't blocked in viewDidLoad.
    The result of this is that the issue happens exactly as before, but the applicationDidReceiveMemoryWarning is fired as expected:
    2011-06-08 09:54:21.024 renniksoft[5993:707] FREEMEM: 6131712
    2011-06-08 09:54:22.922 renniksoft[5993:707] Received memory warning. Level=2
    2011-06-08 09:54:22.926 renniksoft[5993:707] applicationDidReceiveMemoryWarning
    2011-06-08 09:54:22.929 renniksoft[5993:707] FREEMEM: 5615616
    2011-06-08 09:54:22.932 renniksoft[5993:707] didReceiveMemoryWarning
    2011-06-08 09:54:22.935 renniksoft[5993:707] FREEMEM: 5656576

  • The apexafterrefresh event not being fired in Chart IR's

    Hi all,
    I am adding additional functionality to IR reports using the plug-in architecture in Apex 4.1.1. A Dynamic action has been added to the "After Refresh" event for the #apexir_WORKSHEET_REGION jQuery selector.
    This works fine in all cases except when no data is found in the report. This has been fixed in 4.2 so I can live with this until the upgrade. However, it also does not work when a chart is created in the report, the apexafterrefresh event does not get raised. Therefore my dynamic action will not fire. Looking at the apex_interactive_reports_4_1.js this event gets raised for the table element with an ID stored in apexir_WORKSHEET_ID ie:
    apex.jQuery('#' + $v("apexir_WORKSHEET_ID")).trigger('apexafterrefresh', that.report_id);However this table element does not get rendered when a Chart is displayed and therefore the apexafterrefresh will not get raised.
    In apex 4.2 the widget.interactiveReport.js has been modified to handle the no data found but not charts:
    var lTriggeringElement$, lWorksheetId;
                            lWorksheetId = $v( "apexir_WORKSHEET_ID" );
                            if ( $x( lWorksheetId ) ) {
                                // If the table element containing data exists (ie when the report returns rows),
                                // use that to trigger the event.
                                lTriggeringElement$ = apex.jQuery( '#' + lWorksheetId );
                            } else {
                                // Otherwise, use the span holding the no data found message.
                                lTriggeringElement$ = apex.jQuery( '#apexir_NO_DATA_FOUND_MSG' );
                            lTriggeringElement$.trigger( 'apexafterrefresh', that.report_id );I have created a test case on apex.oracle.com - http://apex.oracle.com/pls/apex/f?p=41357:1 In this example I simply display an alert from a Dynamic action with the following attributes:
    Event - After Refresh
    Selection Type - Region
    Region - Interactive Report
    As can be seen when the user navigates to the report the alert displays, however when you navigate to the Chart the alert does not display.
    In my mind this is a bug and the IR reports JavaScript should be modified to raise the event apexir_WORKSHEET DIV Element instead. This would fix both issues.
    Any ideas on how to overcome this issue?
    Thanks
    Chris.

    For everyone's information Bug 16029272 - ALERT (APEXAFTERREFRESH EVENT) NOT BEING FIRED IN CHART OF INTERACTIVE REPORTS has been raised regarding this issue.

  • RE: [iPlanet-JATO] TileView not being displayed

    Craig.you are quite the JATO expert now!
    cb
    -----Original Message-----
    From: Craig V Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098124198039130151196028">craig.conover@S...</a>]
    Sent: Tuesday, April 17, 2001 8:11 PM
    Subject: Re: [iPlanet-JATO] TileView not being displayed
    I had this issue a while ago and forget the exact solution Todd gave me, so
    I'll take a guess untill I can find it somewhere or untill Todd or Mike get
    back online to verify.
    Set the size of the model. I know your TiledView is not bound, but actually
    it is - to the DefaultModel.
    Try this:
    getDefaultModel().setSize(1)
    getPrimaryModel() should work as well.
    let me know if that works or not
    If I find my example, I'll repost.
    c
    ----- Original Message -----
    From: MShanmugam@c...
    Sent: Tuesday, April 17, 2001 7:38 PM
    Subject: [iPlanet-JATO] TileView not being displayed
    Hi All,
    I have a TileView which is not bound to any models.
    It should display one row however none are being displayed. Following
    is the constructor as a reference.
    public pgVoucherListrptCheckInfoTiledView(View parent, String name)
    super(parent, name);
    setMaxDisplayTiles(1);
    setPrimaryModel((DatasetModel) getDefaultModel() );
    registerChildren();
    initialize();
    The problem in the nextTile() method, the super.nextTile allways
    returns false. This seems to be because the
    TiledViewBase.getPrimaryModel().next() allways returns false.
    All the bound tiled views work fine.
    Any help will be appreciated .
    Thanks
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]

    Craig.you are quite the JATO expert now!
    cb
    -----Original Message-----
    From: Craig V Conover [mailto:<a href="/group/SunONE-JATO/post?protectID=219212113009229091025149066024064239039098124198039130151196028">craig.conover@S...</a>]
    Sent: Tuesday, April 17, 2001 8:11 PM
    Subject: Re: [iPlanet-JATO] TileView not being displayed
    I had this issue a while ago and forget the exact solution Todd gave me, so
    I'll take a guess untill I can find it somewhere or untill Todd or Mike get
    back online to verify.
    Set the size of the model. I know your TiledView is not bound, but actually
    it is - to the DefaultModel.
    Try this:
    getDefaultModel().setSize(1)
    getPrimaryModel() should work as well.
    let me know if that works or not
    If I find my example, I'll repost.
    c
    ----- Original Message -----
    From: MShanmugam@c...
    Sent: Tuesday, April 17, 2001 7:38 PM
    Subject: [iPlanet-JATO] TileView not being displayed
    Hi All,
    I have a TileView which is not bound to any models.
    It should display one row however none are being displayed. Following
    is the constructor as a reference.
    public pgVoucherListrptCheckInfoTiledView(View parent, String name)
    super(parent, name);
    setMaxDisplayTiles(1);
    setPrimaryModel((DatasetModel) getDefaultModel() );
    registerChildren();
    initialize();
    The problem in the nextTile() method, the super.nextTile allways
    returns false. This seems to be because the
    TiledViewBase.getPrimaryModel().next() allways returns false.
    All the bound tiled views work fine.
    Any help will be appreciated .
    Thanks
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]

  • THE DATABASE CONNECTION IS LOST :;; WIERD  ORA-01012 NOT LOGGED ON ERROR

    ERROR: ORA-01012 NOT LOGGED ON ERROR
    I AM USING A JAVA SWING INTERFACE (JDK 1.1.8), WHICH USES JNI TO CALL C PROGRAMS WHICH IN TURN CONNECTS TO THE DATABASE, ORACLE 8.1.6.
    A DATABASE CONNECTION IS ESTABLISED IN THE MAIN CLASS BY CALLING A FUNCTION FROM THE CONSTRUCTOR.
    FOR ALL OTHER FUNCTION CALLS WHICH ARE MADE FROM WITHIN THIS CONSTRUCTOR, THE CONNECTION STAYS.
    BUT AFTER THE CONTRUCTOR CALL IS COMPLETE, DATABASE CONNECTION IS STRANGELY LOST. THUS ALL OTHER FUNCTION CALLS FAIL BECAUSE OF CONNECTION ISSUES GIVING ORA-01012. THOUGH IF I CHECK UP IN THE DATABASE, THE CONNECTION DOES FIND AN ENTRY.
    SO IT APPEARS THAT SOMEHOW THE JAVA INTERFACE LOOSES TRACK OF CONNECTION. BUT STRANGELY ALL THE FUNCTIONS WORK IF CALLED FROM THE CONSTRUCTOR......... BUT THATS NOT THE IDEA.
    PLEASE HELP, THIS PROBLEM IS BUGGING ME FOR WEEKS NOW.
    THANKS
    AMIT

    apologise for the caps lock.
    i am working on a previous system with java swing front end which alread uses jni, and connects to database using pro *c.
    My problem is that the connection is lost as soon as the constructor of the main class is run, giving an
    ORA-1012 NOT LOGGED ON ERROR.
    But if i place the same calls in the contructor all the database call work.
    It somehow appears that the java interface looses the connection context. Though the session does find entry in the oracle dynamic tables as long as i dont close the front end main window, thereby meaning that its the jave interface which looses the context.
    part of the code of the main class eiquser.
    //constructor
    public EiqUser() {
         super();
         initMRI();
    private void initMRI() {
         try {
              /* initialize geoManager environment */
              int rccc = new EiqCfuncs().eiqInitEnv();
    //eiqinitenv is a c function which connects to database using pro *C
              EiqCfuncs cfuncs = new EiqCfuncs();
              //EiqCfuncs has the prototypes of c functions used bye the java interface
              this.ivjFileMenu.setText(cfuncs.eiqGetText(resNum.getTEXT_FILE_MENU())); // sets the menu name
    and so on.........
    public void eiqUser_WindowClosed(java.awt.event.WindowEvent windowEvent) {
         new EiqCfuncs().eiqTermEnv(); // gives ora-1012 error
    //eiqtermenv is supposed to disconnect from data base, but returns an ora-1012 not logged on erro
         return;
    //eiqtermenv closes the connection with the data base. But fails in this case. if i place the same call ( eiqtermenv) in the initMRI function or the contructor it succeeds.
    Plus if i dont use the java interace and use a c stub for executing the same sequence of functions, then i dont face any problems.
    the proc calls exectuted ultimately by...
    :::eiqinitenv
    exec sql connect using :sqlid identified by sqlpw; // succeeds giving sqlerr.sqlcode=0;
    ::::eiqterm env
    exec sql commit work; //fails giving 0ra-1012 error
    exec sql rollback work;
    Why is the java interface loosing track of the connection once done with the constructor of the main class?? The session still finds an entry in the oracle dynamic tables.
    Please help
    Thx
    Amit

  • PL/SQL: ORA-22806: not an object or REF  when Using Record in Package

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    I have declared a record type in my package
    create or replace
    PACKAGE MYPKG AS
      TYPE MYREC IS RECORD (VAL1 varchar2(20), val2 date);
      PROCEDURE display_error (pSQLERRM number);
      PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date);
      FUNCTION  F_EPI(refno1 in NUMBER,  refno2 in NUMBER) return MYREC;
    END MYPKG;
    --In My Package Body
    FUNCTION  F_EPI(refno1 in NUMBER,  refno2 in NUMBER) return MYREC is
            F_param MYREC;
            BEGIN
            select myvarchar2, mydate into MYREC from MYTable
              where myrefno1 = refno1
              and myrefno2 = refno2
            Exception
              when others then
              display_error(SQLERRM);
              RETURN F_param;
            END F_EPI ;
      PROCEDURE P_LOAD_DATA (pStartDate Date, pEndDate Date) IS
    insert into atable(myvarchar, mydate)
    select F_EPI(refno1,refno2).val1,F_EPI(refno1,refno2).val2 from tab2;
    END P_LOAD_DATA;
    I get errors
    Error(187,7): PL/SQL: SQL Statement ignored
    Error(225,7): PLS-00382: expression is of wrong type
    Error(225,7): PL/SQL: ORA-22806: not an object or REF
    When I compile the package.
    When I try to call the function from SQL I get an Invalid datatype error.

    Hi,
    Before posting any query/plsql blocks, please ensure that you have written it clean and complete with less syntax errors. ( at least general syntax errors, you can avoid). Then somebody can have an interest to check your logical error.
    About your posting, refer below solution step-by-step. It may help you, about what you are looking for? By the way, you must be knowing, what you are going to to do with. I haven't concentrated about your requirement; as it was not missing in your posting.
    drop table test;
    create table test(myvarchar varchar2(20), mydate date);
    create or replace
        package mypkg as
          type myrec is record (val1 varchar2(20), val2 date);
          --procedure display_error (psqlerrm in number); -- if you are passing sqlerrm, then parameter needs to be string type
       procedure display_error (psqlerrm in varchar2);
          procedure p_load_data (pstartdate in date, penddate in date);
          function  f_epi(refno1 in number,  refno2 in number) return myrec;
       end mypkg;
    Package created.
    --in my package body
    create or replace 
    package body mypkg as -- added
    procedure display_error (psqlerrm in varchar2) -- if you are declared a proc/func in spec, it needs to define in pkg body
    is
    begin
         null; -- you should know, what to do here
      dbms_output.put_line('Err -'||sqlerrm);
    end display_error;
    function  f_epi(refno1 in number,refno2 in number)
    return myrec
    is
    f_param myrec;
    begin
       -- select myvarchar2, mydate into MYREC from mytable
      --  where myrefno1 = refno1
      --  and myrefno2 = refno2;
        select ename, hiredate into f_param from emp -- added demo logic by using emp
        where empno = refno1
         and  mgr  = refno2;
        return f_param;  -- added
    exception
       when others then
         raise; -- if you are using OTHERS then, just raise it
       display_error(sqlerrm);  
       --return f_param; -- what is this?
    end f_epi;
    procedure p_load_data (pstartdate in date, penddate in date) -- you must be knowing the use of 2 params ???
    is
        v_rec myrec; -- added
    begin -- Added
       --insert into atable(myvarchar, mydate)
      -- select f_epi(refno1,refno2).val1,f_epi(refno1,refno2).val1 from tab2;
       -- demo logic added with static params to call f_epi
       v_rec:= f_epi(7499,7698);
       insert into test values v_rec;
        --null; 
    end p_load_data;
    end mypkg;
    Package body created.
    SQL> exec mypkg.p_load_data(null,null);
    PL/SQL procedure successfully completed.
    SQL> select * from test;
    MYVARCHAR            MYDATE
    ALLEN                20-FEB-81
    Thanks!

Maybe you are looking for

  • Can't open Dawsonera protected file on latest version of Adobe

    Everytime I try it says 'An error occurred while performing the operation. Contact and administrator if the problem persists' I tried uninstalling it and reinstalling it but to no avail. Please help as I need to look at this ebook for coursework.

  • How can I move or delete files with PL-SQL???

    I have Oracle 9i and Sun Solaris 5.8 I have a table (“TABLE_FILENAME”) with the files name in one directory. (I read the files name in a directory and put it in a table). I charge some files with external tables and then I have to move some fields to

  • I started installing Arch around 8pm tonight and it's freaken 7am!

    I started installing Arch around 8pm last night and it's almost 7am now and I still don't have a working system.  My xorg.conf file is screwed up, my screen resolution is in the freaken 500x300's, no sound, my wifi don't work.  Nothing works.  I've r

  • Java Tree's & XML Files ??

    Hi ye's - Listen I'm a little stuck - and need yer help ??? If ye's can .........please - The problem is this - I have a Massive XML File containing all the different Categories, Tags, Tag Descriptions, Indicators and valid Subfields, Repeatable Subf

  • Change wav file names on iPod - unreadable

    Hi. I was asked to import some important imterviews made on an iPod mini and an ExtremeMac Micromemo onto a Mac, but, as requested, I change the file names first. Since changing the file names the files are completely unplayable, undownloadable and u