Oracle parsing SQL with Hibernate

Hi,
I build an J2EE application using framework Hibernate. After auditing DBA on any scenario from my soft, I note all request SQL executed are parsed. Same request, using "bind variable", so identical, is parse as many time it execute (ratio 1/1)... Not really powerful, isn't it?
Did somebody already encounter the problem?
Thanks

This sort of technical question needs to be addressed to one of the technical forums. Products | Database | SQL and PL/SQL would seem to be appropriate here.
Have you tried applying the latest patchset for your database? Seems to work for me on 9.2.0.5
SCOTT @ HP92 Local> select * from (
  2  select dept.*,emp.ename from dept
  3  left outer join emp on (emp.deptno=dept.deptno)
  4  )
  5  where (deptno) in
  6  (
  7  select deptno a from
  8  (
  9  select deptno,dname from dept where deptno=10
10  UNION ALL
11  select deptno,dname from dept where deptno=20
12  )
13  )
14  /
    DEPTNO DNAME          LOC           ENAME
        10 ACCOUNTING     NEW YORK      CLARK
        10 ACCOUNTING     NEW YORK      KING
        10 ACCOUNTING     NEW YORK      MILLER
        20 RESEARCH       DALLAS        SMITH
        20 RESEARCH       DALLAS        JONES
        20 RESEARCH       DALLAS        SCOTT
        20 RESEARCH       DALLAS        ADAMS
        20 RESEARCH       DALLAS        FORD
8 rows selected.
SCOTT @ HP92 Local> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
PL/SQL Release 9.2.0.5.0 - Production
CORE    9.2.0.6.0       Production
TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
NLSRTL Version 9.2.0.5.0 - ProductionJustin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Oracle Parsing SQL Statement in ANSI or Oracle Format

    I have problem with a Query ..It seems to be Oracle Bugs .
    When I enter below simple Query (in Oracle Join format ), It works properly
    select * from (
    select dept.*,emp.ename from dept,emp
    where dept.deptno=emp.deptno(+)
    where deptno in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    But When I changed it and use it in ANSI Format ,it is not parsed and shows me ORA-00920: invalid relational operator error ......
    Below shows the changes that I have made to convert it to ANSI Format.
    select * from (
    select dept.*,emp.ename from dept
    left outer join emp on (emp.deptno=dept.deptno)
    where (deptno) in
    select deptno a from
    select deptno,dname from dept where deptno=10
    UNION ALL
    select deptno,dname from dept where deptno=20
    It seems to be Oracle bugs.I appreciate everybody to help me.
    ( Comments : I use Oracle 9i R2 on Windows and I can not change the SQL statement
    because it is created dynamically)
    Best regards

    This sort of technical question needs to be addressed to one of the technical forums. Products | Database | SQL and PL/SQL would seem to be appropriate here.
    Have you tried applying the latest patchset for your database? Seems to work for me on 9.2.0.5
    SCOTT @ HP92 Local> select * from (
      2  select dept.*,emp.ename from dept
      3  left outer join emp on (emp.deptno=dept.deptno)
      4  )
      5  where (deptno) in
      6  (
      7  select deptno a from
      8  (
      9  select deptno,dname from dept where deptno=10
    10  UNION ALL
    11  select deptno,dname from dept where deptno=20
    12  )
    13  )
    14  /
        DEPTNO DNAME          LOC           ENAME
            10 ACCOUNTING     NEW YORK      CLARK
            10 ACCOUNTING     NEW YORK      KING
            10 ACCOUNTING     NEW YORK      MILLER
            20 RESEARCH       DALLAS        SMITH
            20 RESEARCH       DALLAS        JONES
            20 RESEARCH       DALLAS        SCOTT
            20 RESEARCH       DALLAS        ADAMS
            20 RESEARCH       DALLAS        FORD
    8 rows selected.
    SCOTT @ HP92 Local> select * from v$version;
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
    PL/SQL Release 9.2.0.5.0 - Production
    CORE    9.2.0.6.0       Production
    TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
    NLSRTL Version 9.2.0.5.0 - ProductionJustin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Deployement problem in Oracle App Serv with hibernate + JPA and Spring

    Dear All,
         I am facing a problem in deployment of a web application in oracle application server 10g. but the same is working fine with Tomcat. The following Exception. Is being thrown.
         Failed to deploy web application "OraTest". Failed to deploy web application OraTest". . Nested exception Resolution:
    Base Exception:
    java.rmi.RemoteException
    deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version. deploy failed!: ; nested exception is:
    oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version     I am using the following technologies
    1.     Spring 2.0.7
    2.     Struts 2.0.9
    3.     Hibernate 3.3
    4.     JPA 1.0
    5.     Oracle App Server 10.1.2.0.2
    Web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
         <display-name>My Application</display-name>
         <filter>
              <filter-name>struts2</filter-name>
              <filter-class>
                   org.apache.struts2.dispatcher.FilterDispatcher
              </filter-class>
         </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>
              <welcome-file>/index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>dwr-invoker</servlet-name>
              <servlet-class>
                   org.directwebremoting.servlet.DwrServlet
              </servlet-class>
              <init-param>
                   <param-name>debug</param-name>
                   <param-value>true</param-value>
              </init-param>
         </servlet>
         <servlet-mapping>
              <servlet-name>dwr-invoker</servlet-name>
              <url-pattern>/dwr/*</url-pattern>
         </servlet-mapping>
         <listener>
              <listener-class>
                   org.springframework.web.context.ContextLoaderListener
              </listener-class>
         </listener>
         <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>
                   /WEB-INF/conf/spring/datasource-context.xml,
                   /WEB-INF/conf/spring/aop-context.xml          
              </param-value>
         </context-param>
    </web-app>
    /Datasource-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
         <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
         <!--  following code is for using oracle -->
            <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>oracle.jdbc.driver.OracleDriver</value>
              </property>
              <property name="url">
                   <value>jdbc:oracle:thin:@//xxx.xxx.xxx.xxx/mydb</value>
              </property>
              <property name="username">
                   <value>admin</value>
              </property>
              <property name="password">
                   <value>admin</value>
              </property>
         </bean>
         <!--  following code is for using mysql -->
         <!--
         <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>org.gjt.mm.mysql.Driver</value>
              </property>
              <property name="url">
                   <value>jdbc:mysql://192.168.10.157:3306/tpsadmin</value>
              </property>
              <property name="username">
                   <value>tpsadmin</value>
              </property>
              <property name="password">
                   <value>tpsadmin</value>+
              </property>
         </bean>
         -->
         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
              <property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
              <property name="dataSource" ref="dataSource"/>
              <property name="jpaVendorAdapter">
                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
                        <property name="database" value="ORACLE"/>               
                        <property name="showSql" value="true"/>
                   </bean>
              </property>
         </bean>
         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
              <property name="entityManagerFactory" ref="entityManagerFactory"></property>
         </bean>
         <tx:annotation-driven transaction-manager="transactionManager"/>     
    </beans>Aop-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
    <!--  Bean Definition of all the required Interceptors -->
         <bean id="methodLoggingAdvice" class="com.mkcl.sets.common.interceptor.MehodLogInterceptor"/>
         <!--
         <bean id="appCacheManager" class="net.sf.ehcache.CacheManager">
              <constructor-arg index="0" type="java.net.URL" value="classpath:country-ehcache.xml"/>
         </bean>     
         -->
          <!--bean id="methodCacheInterceptor" -->
         <bean id="methodCachingAdvice"
              class="com.mkcl.sets.common.interceptor.MethodCacheInterceptor">
              <property name="cache">
                   <ref local="methodCache" />
              </property>
         </bean>
         <bean id="cacheManager"
              class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
              <property name="configLocation">
                   <value>WEB-INF/conf/other/ehcache.xml</value>
              </property>
         </bean>     
         <bean id="methodCache"
              class="org.springframework.cache.ehcache.EhCacheFactoryBean">
              <property name="cacheManager">
                   <ref local="cacheManager" />
              </property>
              <property name="cacheName">
                   <value>mkclSetsCache</value>
              </property>
         </bean>      
         <!--
         <bean id="methodCachingAdvice" class="interceptor.MethodCachingInterceptor"/>
          -->
         <aop:config>
              <aop:pointcut id="getCountriesPointCut" expression="execution(* com.mkcl.sets.dao.master.impl.LocationDAOImpl.getCountries())"/>          
              <!-- <aop:pointcut id="methodLogPointCut" expression="execution(* com.mkcl.sets.service.master.impl.CategoryServiceImpl.getAllCategories(..))"/> -->
              <aop:pointcut id="methodLogPointCutDao" expression="execution(* com.mkcl.sets.dao..*.*(..))"/>
              <aop:pointcut id="methodLogPointCutService" expression="execution(* com.mkcl.sets.service..*.*(..))"/>
              <aop:advisor id="methodCachingAdvisor" advice-ref="methodCachingAdvice" pointcut-ref="getCountriesPointCut"/>          
              <aop:advisor id="methodLoggingAdvisorDao" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutDao"/>
              <aop:advisor id="methodLoggingAdvisorService" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutService"/>
         </aop:config>
    </beans>Persistence.xml
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
        version="1.0">
         <persistence-unit name="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
              <!-- jta-data-source>mkclDS</jta-data-source-->
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <!-- properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
              </properties-->
         </persistence-unit>
    </persistence>Do I need to add some other configuration in the existing files or do I need to add some other configuration files ? Please help to deploy my application.
    Thanks a lot in advance.
    With Best Regards,
    Ishaan
    null

    Did you ever find a solution to this Ishaan?
    I imagine you ended up having to upgrade 10gR2 to 10gR3 at least. Correct?

  • Career in Oracle PL-SQL (+ETL) or in Oracle Product like RMS(Retek management System)

    Hi All,
    I am having 4 Years of Experience in Oracle. Out of which 3.5 years in PL-SQL and 6 months in Oracle product RMS.
    Currently working as a PL-SQL developer in ETL Project. I am getting opportunity to go ahead with Oracle RMS as I am having 6 Months of experience in it.
    So I am getting confused to go ahead with it or not, as Oracle-RMS will give me an Domain Experience but Oracle PL-SQL with ETL give me growth in technical Field.
    So I just want to know what would be the future in both the technology or which path should I chose with respect Career as well as Financial growth.

    Require your help

  • Integrating any database (oracle or sql) for user repository of EP6.0

    Hi all,
         We have a EP6.0 SP9 installation.
         <b>Has one tried integrating any db like oracle or sql with EP6.0?</b>
         Suppose, I have a user table in some xyz database (like Oracle or SQL) with all user main information as the fields like fname, lname, ***, age etc and then try connecting your SAP EP to this database for user management. Like if any user want to login to SAP EP the user id and password should be matched against this DB .. and if I create a new user it should be created in this DB.
         I think we need to change one xml file called "<b>dataSourceConfiguration_database_only.xml</b>". Is this the right data Source Configuration file? I don't know what/how to change in it to make point to my ORACLE or SQL database.
         What else should i do? Any ideas?
    Please help regarding this.
    Thanks in advance,
    <b>Regards,
    Sai Krishna.</b>

    Hi All,
      Any idea??? Any solutions???
    Please help me..
    <b>Regards,
    Sai Krishna.</b>

  • Parsing errors with CDATA tags using oracle xml parser v2

    I'm using the oracle.xml.parser.v2 parser to combine a
    generated xml document from a database with a static
    xsl file to produce html. Within the xml document, there
    are fairly large CDATA sections (500 lines) which happen
    to contain javaScript.
    Occasionally, I'm getting xml tags in the final html
    document! It seems that the oracle parser pukes
    on a certain type of data within a CDATA tag, and then
    replaces an angle bracket (<) of a tag with a #60. This
    can cause html tags being viewed in the document. At
    first, I thought the amount of JavaScript within the
    CDATA tag was too large for the parser to handle,
    because when I split it up into 2 or more parts the errors
    went away. But, re-arranging the JavaScript (String in the CDATA tag)
    can make the errors disappear. And, if I
    use the Saxon parser to manually combine the xsl with
    the xml, the output is fine. If anyone knows that this is
    a confirmed bug by Oracle, or any other relevant info on
    this, please let me know.

    Hi,
    Your lucky, i've just finished a project that used the oracle parser extensively.
    I think the problem may stem from your xsl. Although your cdata tags may be well formed, in the xsl you might need to escape the text again, this may mean that the xsl needs to print a further cdata tag around the data. This is because the parser (well the version I was using) strips the cdata tags before the transformation happens.
    This is the probably the cause of the nasty html output.

  • Convert Informix "with resume" feature in stored procedures to Oracle PL/SQL

    I am trying to convert an Informix stored procedure with the "return value with resume"
    feature into Oracle PL/SQL.
    So far, all I have gathered is that I need to use packages and reference cursors.
    What is hazy is that how and when does this value get returned? Is it on the execution of the FETCH statement or do I need to specify a RETURN statement.
    If anybody has any ideas or better yet any
    concrete examples, please email me.
    Thank you.

    This is a small example of the use of ref cursor , for further details see the Oracle documentation
    PL/SQL User's Guide and Reference
    Release 8.1.6
    A77069-01 . The stored procedure converter for informix (downloadable from Oracle Technology Network) does not unfortunately cover this situation.
    Turloch
    create or replace PACKAGE BYROYALTYPkg AS
    TYPE RT1 IS RECORD (
    val MTG_VERSION.VERSION%TYPE
    TYPE RCT1 IS REF CURSOR RETURN RT1;
    PROCEDURE byroyalty(
    RC1 IN OUT BYROYALTYPkg.RCT1);
    END;
    create or replace PACKAGE BODY BYROYALTYPkg AS
    PROCEDURE byroyalty(
    RC1 IN OUT BYROYALTYPkg.RCT1)
    AS
    BEGIN
    OPEN RC1 FOR
    SELECT VERSION FROM MTG_VERSION;
    END byroyalty;
    END;

  • Can anybody send me ebook for 'oracle 10g programming with pl/sql'

    Hi
    can any one send me ebook for oracle's 'oracle 10g programming with pl/sql', 'java'
    My mail id is: [email protected]
    Thanking in advance.

    I hope it can guide you to get ebooks for your request.
    http://www.oracle.com/technology/tech/pl_sql/index.html
    Cheers
    Vigneswaran

  • Generate ANSI SQL with Oracle IKM

    Is it possible for ODI to generate ANSI SQL with the Oracle IKM?
    I have used ANSI joins in a filter in an interface, now when I run the interface I get the error: ORA-25156: old style outer join (+) cannot be used with ANSI joins.
    I would prefer to use ANSI joins in my filters instead of the old style (+) syntax. Is this possible?

    Sure,
    Go to topology, edit your Oracle technology , on SQL tab change it over to ordered joins - clause location - From , you can specify the keywords left join, right join, full outer join etc to get rid of your '(+)'

  • Connect Oracle Forms 6i with Sql server

    Plz tell how to connect oracle Developer 6i with Microsoft Sql Server 2005.
    thanks

    Ghulam Yassen wrote:
    Plz tell how to connect oracle Developer 6i with Microsoft Sql Server 2005.
    thanksOracle Forms is best used against an Oracle database... so why on Earth would you want to use it against SQL Server?
    Aside from that, Oracle Forms is old technology... you'd be better using Oracle Application Express (Apex) for producing web based apps.
    If you must do things against an SQL Server database, you would need to set up heterogenous services connectivity (HS) and treat the SQL Server database as an external database.
    http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts001.htm#ADMIN12079

  • Oracle PL/SQL & HTML developers with Oracle Portal experience for UK

    Dear Oracle Portal Developer ,
    This is Rajesh Krishnan from Athreya Consulting Services. My
    firm is into executive search and recruitment targetted at
    Ebusiness and IT Consulting firms . One of my clients which is a
    53 million US$ company ( projected at 85 mn US $ for 2001) is
    currently recruiting for following positions based at UK :
    Oracle Portal Developers for UK : 3- 6 months contract at UK
    (extendable) for Oracle Portal developers with 3-4 years
    experience on PL/SQL & HTML & hands-on experience on Oracle
    Portal. After completion of the assignment at UK , developers
    (holding Indian citizenship) will have the option of joining the
    development centers in India at Mumbai / Bangalore.
    Brief profile :
    Consistent delivery on their commitment to providing the best
    value has been key to their explosive growth since incorporation
    in June 1996. They received awards for the fastest growing
    private company in Pittsburgh, at the Pittsburgh Business Times -
    1999 Pittsburgh 100 Awards, and for the Fastest growing
    technology company in Western Pennsylvania ($ 10-25 M category),
    at the Pittsburgh Technology Council's 1999 Pittsburgh
    Technology 50 Awards. Their headcount as on December 2000 stood
    at 1050 .They have been growing at a scorching pace; doubling
    their turnover consistently for the past three years.
    Interested members may send their resumes across at
    [email protected]
    Warm Regards,
    Rajesh Krishnan,
    Athreya Consulting Services.
    Email: [email protected]

    Please do not use this forum for advertising employment or
    anything else. There are other vehicles that are more
    appropriate for this purpose.
    Thanks,
    Jerry

  • What are the advanteges and disadvanteges of using pl/sql over hibernate

    i knwo that pl/sql are well structure and provide a lot of functionalities with oracle databse , but my question is the hibernate might give some advnateges of scalability over pl/sql.
    so what are the advanteges and disadvanteges of using pl/sql over hibernate?
    and does oracle recommend using hibernate for connecting JSP with oracle 11i , or it is better to connect the JSP pages with oracle databse using pl/sql ?

    812643 wrote:
    but if i search for the diferencess then there are a lot of opinions about this ..., specially when they say that with hibernate you can integrate with any DB , and it provides object printed architecture, etc.All databases are not equal. This is a basic and fundamental fact. SQL-Server is not Oracle. Oracle is not SQL-Server. As it is the case with Sybase, Ingres, DB2 and other database products. They are all different. And there are some very core differences between them.
    So how would a product like Hibernate treat these database products with their differences? By using the lowest common denominator. Which means your expensive database product is dumbed down - and even MS Access will likely have better and more features.
    You also need to decide what is the "permanent" part in your architecture. What is going to the core? What is the expensive part? The app server (with Hibernate)? Or the database server?
    What are you likely to change next year? The app server server? Or the database server?
    In the vast majority of cases, the core is the database server. That is your biggest expense and investment. As it should be - as it holds that which is most precious to business, data. You want to ensure the integrity of that data. The accuracy of that data. Make sure that it can be easily backed up and recovered. Is flexible to use. Etc. Etc.
    The database server is the core - and that is where you need to realise your return on investment. By using the database server to its full extent.
    Hibernate does not do that. And in that respect, it is junk.
    Why does it not do that? Because many Java developers are totally and fully clueless about what database servers are and how to use them. And want to use them as little plug-in black boxes - bit buckets that are only there to provide a data persistence layer. Instead of using the database server to its full extent, they instead use Hibernate, and try to do their own "+database thing+" in the app layer - and do it poorly and with utter lack of any scalability. (and no, only ignorant Java heads think that scalability means throwing more money and h/w at it)
    My largest database processes billions of rows per day, every day, 356 days a year (between 350 to 450 million new inserts into a single table per day). And have been for several years now. It does so using PL/SQL. Using Oracle to its full extent. Then there are Java heads that cannot even design and code an app that effectively process 1% of this volume... and grasp at straws like Hibernate and other Java cr@p to "fix" this - when the actual problem is their total lack of ignorance in how to use and scale the database server.
    Hibernate is trash - and a symptom of Java developers's ignorance of database technology.

  • Oracle.xml.sql.OracleXMLSQLException: Expected name instead of .

    Hi,
    I'm using XDK in Tomcat to execute queries and get the XML result in the browser. I have written many queries but now I'm having problems in one of them.
    The error output that I see in my browser is this one:
    <ROOT>
    <ERROR>
    oracle.xml.sql.OracleXMLSQLException: Expected name instead of <.
    </ERROR>
    </ROOT>:
    This error message is known as XML-20126 but it's not documented in the XML Developer's Kit Programmer's Guide, so I don't know what to do.
    My XSQL query is the following:
    <ROOT connection="xxxx_read" xmlns:xsql="urn:oracle-xsql">
    <xsql:query>
    SELECT XMLAGG(XMLELEMENT("NODE",
    XMLELEMENT("name", b.nodename),
    (SELECT XMLAGG(XMLELEMENT("SERVICE",
    XMLATTRIBUTES(a.serviceabbr AS "type")
    ORDER BY a.serviceabbr
    FROM service a, serviceinstance c
    WHERE c.isdeleted='N'
    AND a.serviceid=c.serviceid
    AND c.nodeid=b.nodeid
    ORDER BY b.nodename
    ) AS "NODES"
    FROM node b
    WHERE b.isdeleted='N'
    </xsql:query>
    </ROOT>
    That query executes fine in sqlplus, where I can see the XML result.
    I think my problem could be related to the size of the XML output. In sqlplus, the output has around 38000 bytes size, which is nothing, so I don't really know why that should be a problem. Do you have any idea?
    Thanks for your help,
    David

    So it seems there is a problem in fact:
    XDB FUNCTION RESULTS ARE TRUNCATED WHEN USING XSQL
    *** 02/25/04 08:28 am ***
    Problem Description
    There appears to be a limit on the content or characters that XSQL pages
    handle when being passed data from XDB functions such as XMLAGG() and
    XMLELEMENT().
    If you have a xsql page of the form
    < ?xml version="1.0"?>
    < xsql:query xmlns:xsql="urn:oracle-xsql" connection="demo" >
    select XMLAgg(XMLElement("Test", XMLAttributes(i.id as "Id_van_de_test",
    i.name as "Name_van_de_test"))) as "Tests" from problem_xml i
    < /xsql:query>
    If the number of rows (or amount of data) in the table is low, the result
    appears okay. However, if the data returned is large the data appears to
    truncate giving xml parsing errors as if the xml returned is not well formed.
    In the testcase provided, the error is as follows :-
    Results from 10.1.0.2
    < Line 2, Column 16354>: XML-20126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16366>: XML-20190: (Fatal Error) Whitespace required.
    < Line 2, Column 16366>: XML-20201: (Fatal Error) Expected name instead of 4.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    Results from 9.2.0.6
    < Line 2, Column 16354>: XML-0126: (Fatal Error) '< ' cannot appear in attribute value.
    < Line 2, Column 16368>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16368>: XML-0201: (Fatal Error) Expected name instead of 3.
    < Line 2, Column 16371>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16391>: XML-0190: (Fatal Error) Whitespace required.
    < Line 2, Column 16396>: XML-0122: (Fatal Error) '=' missing in attribute.
    < Line 2, Column 16397>: XML-0125: (Fatal Error) Attribute value should start with quote.
    < ?xml version = '1.0'?>
    value.< /ERROR>
    And the workaround:
    ======================================================
    The only workaround we have is to get the Document generated using
    DBMS_XMLQUERY [with expanded entities].
    _==Start===
    create or replace procedure Query2XML(QueryString varchar2 default
    'select col1 from xml_tab where r_id = ?') IS
    XMLCtx number;
    myXML clob;
    myXMLLength number;
    BEGIN
    XMLCtx := DBMS_XMLQUERY.NEWCONTEXT(QueryString);
    myXML := DBMS_XMLQUERY.GETXML(XMLCtx);
    myXMLLength := DBMS_LOB.GETLENGTH(myXML);
    DBMS_XMLQUERY.CLOSECONTEXT(XMLCtx);
    END Query2XMLFile;
    _==Start===
    Currently, XDB uses a DOM based model for XSLT evaluation. It is not
    possible to support disable-output-escaping constructs through this
    evaluation. This might be supported in a future release when a different
    model is implemented.
    =============================================================

  • Failed to parse SQL query by one user

    Hi all,
    in my app i have a text-item with a submit button. In this item i type a name and a report after the item-region show me the result(s). this works for all my users (>2000) perfectly, but one of this users become an error in the report-region:
    failed to parse SQL query:
    ORA-01403: no data found
    We try this with the same searchstring on the same computer/browser. If i logged in the result is ok, if the user logged in, the error message shows. If i try this on the computer from the user with me logged in, result ok. If the user try this on an other pc, results error.
    I have an productive and a developer workspace. In the developer workspace the user can try this perfectly without errors. Only in the productive workspace the error shows.
    The SQL-Select in the reprirt ist verry simple:
    select id
    , name
    , raum
    from table
    where instr(upper(name), upper(:P60_SEARCH))>0
    However all users can use this search-field with report perfectly, only this one user has the error. It is no restrictions on this item or report.
    Can anybody help me?

    Carsten,
    user preferences do not have anything to do with the fact where the user resides (apex built in, LDAP, whatever). User Preferences are saved for a named user and they are loaded next time the same user loggs in. For example, if you sort your report on a column x, apex will save this as a setting and next time you call the same report, this report will be sorted the same way. Since you don't have a permission to edit services, you should check your adminstrative permissions and conntact the real administrator of the workspace to do that "purge prefference" for you. I could bet this is the reason you are getting that strange error message.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Oracle.xml.sql.query.OracleXMLQuery   GetXML -withDTD

    I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
    Thanks

    [from XmlRpc-Java]
    As a result, my XML
    is contained in a String instead of an InputStream.
    It is possible to convert a String to an InputStream using
    StringBufferInputStream, but this class is deprecated in favor of
    StringReader (as StringBufferInputStream does not properly convert
    characters into bytes).
    For the default HTTP transport, an InputStreamReader could be used to
    wrap the InputStream before calling parse().
    Ultimately, the InputStream is converted to an InputSource for use by
    the SAX parser. InputSource will accept a Reader as well.
    [from XmlRpc-Java]
    There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
    null

Maybe you are looking for

  • To_numer function return error in pl/sql

    Hello, I don't have a prob when running select to_number('1234.56') from dual, the numer contains digit decimal But this stm return error Invalid number in procedure unless I use to_number('1234.56','9999999.99') Please help me out. Do I have to set

  • JCO_COMMUNICATION_FAILURE

    Can anybody explain the cause of this error and how to fix it? <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">   <SAP:Category>XIServer</SAP:Category>   <SAP:Code

  • Error in Inbound Queue (Tx. SMQ2) / Error "CMW_PIF_PROTOCOL"

    Hello everybody, I have got a queue which appears time by time. It is called "ISP_I_000000000000017" in my Inbound Queue. Below further information about that. Information from Tx. "SE16" about this Error. Client             010 Site-Typ-ID         

  • Page Not Found

    FYI, On page: http://otn.oracle.com/sample_code/tech/java/codesnippet/j2ee/index.html When clickin Link at right side: EJB Developers Guide Returns Page not found. best regards

  • Scripts In Different Languages

    Hi , In One Interview I was Asked that If you want to Print Script in More than How can You Handle ? How can you the Language ? I thought By Using the use login Language.. Can Any one expalin it .... ?