Keeping pl/sql portlets state...

Hi!
I'll keep this as short as possible :)
On my Portal I have one pl/sql menu/navigation-portlet and one or more java portlets.
The menu portlet expands end extracts depending on where you click.
The menu knows its own state (the way it is extracted) by posting parameters (id's) whenever it's clicked on.
Url example:
http://host/portal/page?_pageid=35,66260&_dad=portal&_schema=PORTAL&menu.id=111&menu.p_id=222
By getting the parameters above the menu can restore/reload its own state.
Now to my problem:
When the user navigates to a page where I have a java portlet, the menu is extracted a certain way.
My javaportlet has navigation on itself.
When the user navigates by clicking a link on the java portlet the menuparameters are lost because the javaportlet can't see them, thereby the menus state is lost and "closed".
I find it very awkward/clumsy to put "menulogic" on all portlets in order to be able to keep the state of the menu.
The menuparameters must always be present somehow so that the menu knows how to restore its state!!!
Public parameters perhaps? (how do I make the parameters public for a pl/sql portlet?)
Any hints on how to solve this?

You would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
Regards,
Deepak

Similar Messages

  • Keep log sql statement

    Dear all,
    Is there any ways to keep log sql statement after insert,update,delete as the example below :
    ==========================================
    user01     client01     prog01.exe     update emp set name='test';
    user02     client02     prog02.exe     delete from emp1;
    I 'm not sure.Can use trigger? Is anybody have the example code?
    Oracle9i + windows2000
    Thank you for advance
    Chara

    Hi,
    Here is a small resumen About Basic Auditing in Oracle.
    For any Oracle versions prior to 9i you will need to set audit_trail parameter in the pfile ie.g.:
    audit_trail = DBFor later Oracle Versions:
    SQL>alter system set audit_trail = DB;To enable auditing for a specific object run the following command:
    SQL>AUDIT SELECT, INSERT, UPDATE, DELETE ON SCHEMA.TABLE;To stop auditing use:
    SQL>NOAUDIT SELECT, INSERT, UPDATE, DELETE ON SCHEMA.TABLE;Or to audit any statement that queries, delete, insert or updates any table, issue the following statement:
    SQL>AUDIT SELECT TABLE, DELETE TABLE, INSERT TABLE, UPDATE TABLE;If you want to audit a specific user will need to run the following commands:
    SQL>AUDIT ALTER TABLE, SELECT TABLE, INSERT TABLE, … ,GRANT PROCEDURE by <USERNAME>;To stop the audit for the user you will need to run:
    SQL>NOAUDIT ALTER TABLE, SELECT TABLE, INSERT TABLE, … ,GRANT PROCEDURE by <USERNAME>;To see the results of the auditing use please run:
    SQL> select * from dba_audit_trail;This is an excellent Oracle documentation to learn how to implement it:
    - http://download-uk.oracle.com/docs/cd/B19306_01/network.102/b14266/cfgaudit.htm
    Also I’ll recommend you to take a look on the following links:
    - http://www.oracle-base.com/articles/8i/Auditing.php
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • Problem with public pages having PL/SQL portlets

    I am having problem with a public page which has PL/SQL portlets.
    When I try to access that page without doing login, it displays everything but the portlets which are database driven.
    Is this the way this public page should behave?
    Is there anyway by which I can display data to my public pages from PL/SQL portlets without doing login?
    FYI PL/SQL portlets are in portal30 schema.

    Yes, it has is_runnable function and it looks like this :
    function is_runnable
    p_provider_id in integer
    ,p_reference_path in varchar2
    return boolean
    is
    begin
    If p_reference_path is null the caller may be the provider
    framework (i.e. the Refresh operation of the Portlet
    Repository).
    if (p_reference_path is null) then
    The following if statement is the security mechanism that
    the portlet implements. It does not have any other semantic
    meaning. Any portlet is expected to implement their own
    security mechanism.
    This security mechanism checks if the current user is logged
    on or just accessing the portal through the public account.
    if (wwctx_api.is_logged_on) then
    return true;
    else
    return false;
    end if;
    else
    If p_reference_path is not null the caller makes this call as
    a security check against the portlet instance.
    The security mechanism implemented by this portlet for portlet
    instances is null so true is returned. Returning this value
    indicates that all users have access to this portlet instance.
    return true;
    end if;
    end is_runnable;
    +++++++++++++++++++++++++++++++++++++++++++
    What should I need to change with that function? And what exactly is its use?
    FYI : The code which I wrote for my portlet is by doing some modification in downloaded service portlet. But I have not altered is_runaable function.

  • T-sql case statement in a select

    When I execute the following t-sql 2012 statement, the "NO Prod' value is not
    being displayed from the sql listed below:
    SELECT DISTINCT
    IsNull(cs.TYPE,'') as type,
    CASE IsNull(Course.TYPE,'')
    WHEN 'AP' then 'AP Prod'
    WHEN 'IB' then 'IB Prod'
    WHEN 'HR' then 'HR Prod'
    WHEN '' then 'NO Prod'
    END AS label
    FROM CustSection cs
    INNER JOIN dbo.Person p on P.personID = cs.personID
    Left join customCustomer cs564 on cs564.personID = p.personID and
    cs564.attributeID ='564'
       where ( cs.type is null and cs564.attributeID = null)    
         or
        (cs.type IN ('HR','AP') OR
          (cs.type='IB' AND SUBSTRING(cs.code,1,1)='3'))  
    ORDER BY label
    What I want is for 'NO Prod' to be displayed when
    cs.type is null and cs564.attributeId  is null.
    Thus can you tell me how to fix query above so the 'NO Prod'  value is displayed in the
    select statement listed above?

    There is no CASE statement in SQL; we have a CASE expression. We do not use the old 1970's Sybase*- ISNULL(); we have  COALESCE().
    There is no such thing as a magic generic “type” in RDBMS. There is no such thing as a generic “code” in RDBMS. They have to to be “<something in particular>_type” and “<something in particular>_code” in a valid data model. How about blood_type
    and postal_code?? 
    There is no such thing as a generic “person” table in RDBMS. First of all, do you really have only one person, as you said?? But the important point is that these persons play a role in the data model – customers, students, etc. You are doing the wrong thing
    and doing it badly.  This table should not exist any more than a  table of “Things” such exist. 
    And the reason you are beyond any real help is “attribute_id” which tell us that your schema is a total disaster of data and meta data mixed together in a non-RDBMS written in awful SQL. Based on cleaning up bad SQL for 30 years, it looks like you are an OO
    programmer who never unlearned his prior mindset. 
    Why did you allow an encoding schema with blanks? Why do you have so many NULL-able columns? 
    SELECT DISTINCT is very rare in a properly designed schema. The DRI references assure that rows cam be matched. To get you started, look at this skeleton:
    CREATE TABLE Products
    (product_gtin CHAR(15) NOT NULL PRIMARY KEY, 
     product_type CHAR(2) DEFAULT 'XX' NOT NULL
      CHECK (product_type IN ('AP', 'IB', 'HR', 'XX'))
    The table name is a plural noun because it models a set (NOT an OO class).
    The GTIN is an industry standard identifiers, and not have to invent our own.
    The product_type (not blood_type, not automobile_body_type!) has a constraint that assures it is never NULL and never blank; I invented 'XX' as a default. 
    You need more help than you can get in a forum, but if you will follow Netiquette and post the DDL, we can get you started.
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Sample  PL/SQL Portlet Source Code for Oracle Portal 9ias

    Hi, I'm a newbie of Oracle Portal technology, and I have a problem:
    I would create a PL/SQL portlet that realizes the following functions:
    1) Retrieve the username of the portal user logged from WWCTX_API.GET_USER function.
    2) Insert into an oracle db table two values about two hidden fields in the HTML FORM of the portlet.
    3) Realize the insert commit through the click on the submit button on the Html form of the portlet. I would redirect by the same button to an other page url also.
    I've never developed in Portal, and may be useful if someone could post me the source code of the SHOW MODE SECTION in the PROCEDURE SHOW of a SAMPLE PL/SQL PORTLET that realizes the upper functions.
    Thanks a lot....

    Hi
    Here's the code from Helloworld_Portlet example:
    procedure show
    p_portlet_record wwpro_api_provider.portlet_runtime_record
    is
    l_portlet wwpro_api_provider.portlet_record;
    begin
    if (not is_runnable(
    p_provider_id => p_portlet_record.provider_id
    ,p_reference_path => p_portlet_record.reference_path)
    ) then
    raise wwpro_api_provider.PORTLET_SECURITY_EXCEPTION;
    end if;
    Retrieve the portlet information.
    l_portlet := get_portlet_info(
    p_provider_id => p_portlet_record.provider_id
    ,p_language => p_portlet_record.language
    if (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW) then
    if (p_portlet_record.has_title_region) then
    Draw the portlet header and specify what links are available
    from that header (i.e. details, customize, help, and about).
    The has_title property is set at the page region level.
    wwui_api_portlet.draw_portlet_header
    p_provider_id => p_portlet_record.provider_id
    ,p_portlet_id => p_portlet_record.portlet_id
    ,p_title => l_portlet.title
    ,p_has_details => true
    ,p_has_edit => true
    ,p_has_help => true
    ,p_has_about => true
    ,p_referencepath => p_portlet_record.reference_path
    ,p_back_url => p_portlet_record.page_url
    end if;
    Draw the portlet borders.
    The has_border property is set at the page region level.
    wwui_api_portlet.open_portlet(p_portlet_record.has_border);
    Display the content of the portlet in the show mode.
    Use the wwui_api_portlet.portlet_text() API when
    generating the content of the portlet so that the
    output uses the portlet CSS.
    htp.p(wwui_api_portlet.portlet_text(
    p_string => 'Hello World - Mode Show'
    ,p_level => 1
    if (p_portlet_record.has_border) then
    wwui_api_portlet.close_portlet;
    end if;
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_ABOUT) then
    Display the about page for the portlet.
    htp.p('Hello World - Mode Show About');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT) then
    Display the edit page for the portlet.
    htp.p('Hello World - Mode Show Edit');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_HELP) then
    Display the help page for the portlet.
    htp.p('Hello World - Mode Show Help');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_EDIT_DEFAULTS) then
    Display the edit defaults page for the portlet.
    htp.p('Hello World - Mode Edit Defaults');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_SHOW_DETAILS) then
    Display the details page for the portlet.
    htp.p('Hello World - Mode Show Details');
    elsif (p_portlet_record.exec_mode = wwpro_api_provider.MODE_PREVIEW) then
    Display the preview page for the portlet.
    htp.p('Hello World - Mode Show Preview');
    end if;
    end show;
    I think you need to add this:
    You can get the values of your html-form with this command:
    v_hidden_1 varchar2(256);
    v_hidden_2 varchar2(256);
    v_hidden_1 := wwpro_api_parameters.get_value('name_of_hidden_1_in_html_form','p');
    v_hidden_2 := wwpro_api_parameters.get_value('name_of_hidden_2_in_html_form','p');
    You can get the actual URL with this command:
    v_url := p_portlet_record.page_url;
    Hope that helps.
    Regards,
    Mark

  • MS SQL Server Statement could not be prepared. (WIS 10901)

    Here is my situation. We are running Edge 3.0 using SQL Server 2005. I have a Webi report that I created with an existing Universe and the report is able to run fine. I didn't create the Universe, but I had to add new tables to the Universe.
    For some reason when I went to create a System DSN to connect to the Universe, it didn't save the System DSN, but I was able to save it as a User DSN using the same name as the System DSN created on the BOXI Server. I was able to add the new tables and objects.
    I then went to add the new objects to the existing web report and ran the query, I then received the error "A database error occured. The database error text is: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. (WIS 10901)". If I removed the new objects, I am able to run the Query fine.
    When I add the new objects, I can look at the SQL, copy it and run it in MS SQL Server. Once I try to run the query with the new objects, I get the previously stated database error. Then I try to generate the SQL and get the message that Webi can't generate the SQL even though I was able to see the SQL if I hadn't run it.
    I am not sure why I am getting this error, because the report is able to run before adding any new objects. Any suggestions would be helpful. Thanks

    The issue was that I needed to get permission on my computer to create a system DSN and not use a local DSN. My local policy was changed on my computer.
    But I am now writing a different report and getting the same error. Let me explain the situation.
    The report was created and running fine, but the database was created by someone and it only contained partial data. The database is created in a star schema. I had to add more dimension tables. The fact table already had all the columns for the new dimension tables but had a default value of -1. Once I added the missing dimension tables, I reran the DI job that re-populated the fact table with data from all dimension tables. When I go now and run the report if I only run a query with the old dimensions, then the report runs fine and returns data. If I add a object from the newly created dimension fields then I get the error 'A database error occured. The database text is: ... Statement(s) could not be prepared. (WIS 10901)'.
    I am not sure where the problem is. The report is using the same System DSN and the SQL created from the new dimensions works just fine in SQL Server Management Studio. We use Windows AD authentication and use an Windows users as our system account to access the database and it has read permissions.
    Any help would be great. Thanks

  • Templates with pl/sql portlets

    We plan to have several custom pl/sql providers. What do we have to do if we want to use templates and styles with our custom portlets?

    Nilay,
    PL/SQL portlets can (and should) utilize the wwui_api_portlet user interface portlet API package to render the portlet content. For additional font classes (not availble through the API) you can simply generate the appropriate HTML output using PL/SQL Web Toolkit (htp.p).

  • SQL CASE statement in XML template- End tag does not match start tag 'group

    Hi All,
    I am developing a report that has the SQL CASE statement in the query. I am trying to load this into RTF with report wizard and it gives me below error
    oracle.xml.parser.v2.XMLParseException: End tag does not match start tag 'group'
    Does XML publisher support CASE statement?
    My query is something like this
    SELECT customercode,
    SUM(CASE WHEN invoicedate >= current date - 30 days
    THEN balanceforward ELSE 0 END) AS "0-30",
    SUM(CASE WHEN invoicedate BETWEEN current date - 60 days
    AND current date - 31 days
    THEN balanceforward ELSE 0 END) AS "31-60",
    SUM(CASE WHEN invoicedate < current date - 60 days
    THEN balanceforward ELSE 0 END) AS "61>",
    SUM(balanceforward) AS total_outstanding
    FROM MyTable
    GROUP BY customercode
    ORDER BY total_outstanding DESC
    Please advice if the CASE statement or the double quotes are causing this error
    Thanks,
    PP

    I got this to work in the XML but the data is returning zeros for all the case statements. When I run this in toad I get results for all the case conditions but when ran in XML the data displayed is all zeros. I am not sure what I am missing. Can someone shed some light on this please
    Thanks!
    PP

  • Parsing an OPEN SQL select statement

    Hi all,
      I want to parse an open SQL select statement to get the list of tables and the corresponding fields in the select statement.
      Is there some ABAP-internal syntax from the SAP Database Interface that does this? or is the only option to do this is to manually break the statement?
    Thanks.
    Girish

    Hi,
    I doubt if there is something like that available to use. It think you will have to write a parser for yourself.
    Regards

  • Java.sql.SQLException: Statement cancelled, probably by transaction timing

    Hi all,
    I have a problem with transaction handling over 2 applications. I have 2 EAR files (*A.ear* and B.ear) which are deployed on a WLS 12.1. The WLS contains a XA datasource which is connected to a Oracle XE database. Both applications are using the same datasource. The datasource is configured to use the driver oracle.jdbc.xa.client.OracleXADataSource.
    EAR A contains a Remote EJB which is is calling a local EJB. The local EJB calls a Remote EJB from EAR B.
    Here is an example how the code looks like:
    @Remote
    @Stateless(mappedName = "AnyRemote", name = "AnyRemote")
    public class AnyRemoteBean implements AnyRemote {
        @EJB
        private AnyLocal anyLocal;
        @Override
        public void doIt() {
            anyLocal.doSomething();
    @Local
    @Stateless(mappedName = "AnyLocal", name = "AnyLocal")
    public class AnyLocalBean implements AnyLocal {
        @PersistenceContext(unitName = "A")
        private EntityManager entityManager;
        @EJB(mappedName = "AnyCompositeService")
        private AnyCompositeService anyCompositeService;
        @Override
        @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
        public boolean doSomething() {
                try {
                     // do some stuff and save to database within another local EJB
                    anyCompositeService.doSomethingOnEAR_B();
                    return true;
                } catch (final AnyException e) {
                    LOGGER.error("doSomething failed", e);
                    return false;
        @Override
        @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
        public boolean stayOnEar_A() {
                // do some stuff and save to database within another local EJB
                return true;
    }AnyCompositeService located in EAR B looks like this:
    @Remote
    @Stateless(mappedName = "AnyCompositeService ", name = "AnyCompositeService ")
    public class AnyCompositeServiceBean implements AnyCompositeService {
        @Override
        public boolean doSomethingOnEAR_B() throws AnyException {
            // do some calls to some local EJBs and some other remote EJBs and save something to database
            return true;
    }In this process of EAR B I'm using the entitiy manager:
        @PersistenceContext(unitName = "B")
        private EntityManager entityManager;persistence.xml for EAR A looks like this
        <persistence-unit name="A" transaction-type="JTA">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>MyDatasource</jta-data-source>
           <!-- some entities -->
            <properties>
                <property name="hibernate.transaction.jta.platform"
                    value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform" />
                <property name="hibernate.max_fetch_depth" value="3" />
                <property name="hibernate.connection.characterEncoding" value="UTF-8" />
                <property name="hibernate.connection.charSet" value="UTF-8" />
                <property name="hibernate.connection.useUnicode" value="true" />
                <property name="hibernate.default_batch_fetch_size" value="20" />
            </properties>
        </persistence-unit>
    </persistence>persistence.xml for EAR B looks like this
        <persistence-unit name="B" transaction-type="JTA">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>MyDatasource</jta-data-source>
           <!-- some entities -->
            <properties>
                <property name="hibernate.transaction.jta.platform"
                    value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform" />
                <property name="hibernate.max_fetch_depth" value="3" />
                <property name="hibernate.connection.characterEncoding" value="UTF-8" />
                <property name="hibernate.connection.charSet" value="UTF-8" />
                <property name="hibernate.connection.useUnicode" value="true" />
                <property name="hibernate.default_batch_fetch_size" value="20" />
            </properties>
        </persistence-unit>
    </persistence>As you can see the method doSomething() defines the transaction attribute TransactionAttributeType.REQUIRES_NEW.
    When I execute AnyRemote.doIt() I get the following exception:
    Caused By: java.sql.SQLException: Statement cancelled, probably by transaction timing out
         at weblogic.jdbc.wrapper.Statement.postInvocationHandler(Statement.java:69)
         at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.clearBatch(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)
         at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
         at $Proxy452.clearBatch(Unknown Source)
         at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.releaseStatements(AbstractBatchImpl.java:163)
         at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.release(AbstractBatchImpl.java:197)
         at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.close(JdbcCoordinatorImpl.java:139)
         at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.close(TransactionCoordinatorImpl.java:276)
         at org.hibernate.internal.SessionImpl.close(SessionImpl.java:349)
         at org.hibernate.ejb.EntityManagerImpl.close(EntityManagerImpl.java:137)
         at weblogic.persistence.TransactionalEntityManagerProxyImpl.close(TransactionalEntityManagerProxyImpl.java:117)
         at weblogic.persistence.BasePersistenceContextProxyImpl$PersistenceContextCloser.afterCompletion(BasePersistenceContextProxyImpl.java:213)
         at weblogic.transaction.internal.ServerSCInfo.doAfterCompletion(ServerSCInfo.java:1068)
         at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(ServerSCInfo.java:1012)
         at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions(ServerTransactionImpl.java:3074)
         at weblogic.transaction.internal.ServerTransactionImpl.afterRolledBackStateHousekeeping(ServerTransactionImpl.java:2954)
         at weblogic.transaction.internal.ServerTransactionImpl.setRolledBack(ServerTransactionImpl.java:2930)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryRollback(ServerTransactionImpl.java:3172)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRollback(ServerTransactionImpl.java:2920)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:374)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:268)
         at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:332)
         at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:202)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:44)As long as the process only calls EJBs from EAR A only there is no issue. But if the process calls the method doSomethingOnEAR_B() on EAR B the call fails with above exception. If the process throws AnyException the rollback takes place as expected for transaction in EAR B and EAR A.
    Does anybody know what is the issue here? Is there any configuration I have overseen?

    That is a WLS internal message. The statement did get cancelled,
    probably as a part of the process of rolling back the transaction it
    was involved in. If you don't find your core problem, open an
    Oracle support SR, and we could help debug this further.

  • Java.sql.SQLException: statement handle not executed

    hello,
    i am calling a stored procedure and its returns a REF CURSOR and i am getting intermittent exceptions below,
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    and
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxxx_pkg(?,?,?)}]; SQL state [99999]; error code [17009]; Closed Statement; nested exception is java.sql.SQLException: Closed Statement
    any clue what could be the issue,
    Regards
    GG

    its pretty simple have a java class calling hibernateTemplate's findByNamedQueryAndNamedParam method by passing the procedure name and binding parameters/values, and here is the stack
    org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL [{call
    xxx_pkg(?,?)}]; SQL state [99999]; error code [17144]; statement handle not executed; nested exception is java.sql.SQLException: statement handle not executed
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNamedParam(HibernateTemplate.java:1006)
    Caused by: java.sql.SQLException: statement handle not executed
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.jdbc.driver.T4CStatement.doDescribe(T4CStatement.java:701)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3355)
    at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:2009)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
    at org.hibernate.type.StringType.get(StringType.java:18)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
    at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
    at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2091)
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
    at org.hibernate.loader.Loader.getRow(Loader.java:1206)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
    at org.hibernate.loader.Loader.doQuery(Loader.java:701)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    at org.hibernate.loader.Loader.doList(Loader.java:2217)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
    at org.hibernate.loader.Loader.list(Loader.java:2103)
    at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
    at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1696)
    at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
    at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1015)
    at org.springframework.orm.hibernate3.HibernateTemplate$34.doInHibernate(HibernateTemplate.java:1)
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

  • Java.sql.SQLException: Statement cache size has not been set

    All,
    I am trying to create a light weight SQL Layer.It uses JDBC to connect to the database via weblogic. When my application tries to connect to the database using JDBC alone (outside of weblogic) everything works fine. But when the application tries to go via weblogic I am able to run the Statement objects successfully but when I try to run PreparedStatements I get the following error:
    java.sql.SQLException: Statement cache size has not been set
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
    at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_812_WLStub.prepareStatement(Unknown Source)
    i have checked the StatementCacheSize and it is 10. Is there any other setting that needs to be implemented for this to work? Has anybody seen this error before? Any help will be greatly appreciated.
    Thanks.

    Pooja Bamba wrote:
    I just noticed that I did not copy the jdbc log fully earlier. Here is the log:
    JDBC log stream started at Thu Jun 02 14:57:56 EDT 2005
    DriverManager.initialize: jdbc.drivers = null
    JDBC DriverManager initialized
    registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    DriverManager.getDriver("jdbc:oracle:oci:@devatl")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    Oracle Jdbc tracing is not avaliable in a non-debug zip/jar file
    DriverManager.getDriver("jdbc:oracle:oci:@devatl")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    DriverManager.getDriver("jdbc:oracle:oci:@devatl")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    DriverManager.getDriver("jdbc:oracle:oci:@devatl")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    DriverManager.getDriver("jdbc:oracle:oci:@devatl")
    trying driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    getDriver returning driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@12e0e2f]
    registerDriver: driver[className=weblogic.jdbc.jts.Driver,weblogic.jdbc.jts.Driver@c0a150]
    registerDriver: driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@17dff15]
    SQLException: SQLState(null) vendor code(17095)
    java.sql.SQLException: Statement cache size has not been set
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)Hi. Ok. This is an Oracle driver bug/problem. Please show me the pool's definition
    in the config.xml file. I'll bet you're defining the pool in an unusual way. Typically
    we don't want any driver-level pooling to be involved. It is superfluous to the functionality
    we provide, and can also conflict.
    Joe
         at oracle.jdbc.driver.OracleConnection.prepareCallWithKey(OracleConnection.java:1037)
         at weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_OracleConnection.prepareCallWithKey(Unknown Source)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection.prepareCallWithKey(Unknown Source)
         at weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_OracleConnection_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
         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:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    SQLException: SQLState(null) vendor code(17095)

  • PL/SQL Portlets accessed through WAP

    Hi,
    we have developed some PL/SQL portlets (using portal 10g version 9.0.4.0.99) which needs to be accessed in a WAP enabled mobile. need some documents or references for the same.
    Thanks
    Ramya

    You would need to generate MobileXML from the portlet if it has to work with mobile devices. There is no automatic conversion from a regular portlet to a mobile portlet simply because the layout issues are vastly different on each mobile browser. However, you would only need to specify content in MobileXML once and this should work with most mobile browsers including WAP/WML, CHTML, TinyHTML etc. and cover most devices including PocketPC, Palm, Symbian etc. For the exact details of mobile-enabling a portlet, please refer to the Portal documentation. For advanced details on writing content for a mobile portlet, please see the wireless developer's guide.
    Regards,
    Deepak

  • ESI with pl/sql portlets

    Is it possible to use ESI within pl/sql portlets?
    The idea being to only re-execute the query and redraw the resulting HTML rather than re-load the whole portlet.
    Any ideas ?

    Not sure. I'll look into it. In the meantime, you may get a faster response if you repost your question to the Portal Caching forum. A lot more Portal expertise there.

  • Using column number inplace of column name in SQL Select statement

    Is there a way to run sql select statements with column numbers in
    place of column names?
    Current SQL
    select AddressId,Name,City from AddressIs this possible
    select 1,2,5 from AddressThanks in Advance

    user10962462 wrote:
    well, ok, it's not possible with SQL, but how about PL/SQL?As mentioned, using DBMS_SQL you can only really use positional notation... and you can also use those positions to get the other information such as what the column is called, what it's datatype is etc.
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    Row: 2
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    Row: 1
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for

  • Returning Yoga 3 14

    well, too many things have been happening that i finally decided to return my yoga for a replacement before my 30 days was up. kept hoping the glitches would be just random occurances, but it's looking more like the unit is a lemon, or at least I hop

  • Screen dimming

    hey, i'm going to hook my macbook to my HDTV via the DVI adapter and then HDMI to the TV. My question is this: My Macbook has a screen dimming function, whether it's plugged into a wall socket or not after a short time of no operation the screen goes

  • Safari bookmarks not syncing in iOS 8.0.2

    Safari bookmarks stopped syncing at least since 8.0.2 (not sure if it already broke in 8.0.1). I have this configuration iPhone4,1 (4S) iOS 8.0.2 OS X 10.9.5 iTunes 11.4 (18) I read that to sync bookmarks you need 10.8 or earlier, but that doesn't ma

  • Service Definition Refresh in solution manager 4.0 continues infinitely

    Hello, I am trying to refresh service definitions through SDCCN in Solution Manager 4.0 but it is continuing infinitely. The status shows that the task is Active.It seems like getting hanged. Task log says only single line : " Refresh of service defi

  • HT5622 Why i cannot download at appstore??  When i select.. It told to update payment method

    Why i cannot download at appstore??  When i select.. It told to update payment method