JPublisher + VARRAY+Descriptor

When we use JPublisher for generating java for VARRAY type.We can set easily
arrray in class which generated by jPublisher.The method we are using---->
setArray().But when we try to get this array by getArray() it throws exception-->
"fail to construct descriptor. "

I have the same problem. The only workaround is not to use getArray(), but getElement() and length() instead. You can create static method to create array from a specific table and element type. Or create a generic one using reflection...
Viliam

Similar Messages

  • Problems Accessing VARRAY from Java

    Hi,
    I am calling a stored procedure with IN parameters as VARRAYS from Java application.
    There are two schemas in the database. One main schema, say 'MAIN_SCHEMA' which contains all the table,VARRAYS,packages etc. There are public synonyms for all the database object including VARRAYS in this schema. The java application uses a connection pool created using another user say 'ADMIN'. This user has been granted priviliges for acccessing all the objects in the 'MAIN_SCHEMA'. For the VARRAYS we have created public synonyms and granted EXECUTE for ADMIN.
    However when I try to execute the stored procedure from java , I get an SQLException("invalid name pattern: ADMIN.UIDARRAY")
    I solved the problem temporarily by prefixing the main schema name to the name of the VARRAY. The sample code I have used is as below. but I am not sure if this is the correct way of doing it. I do not understand why we have to prefix the schema name if we have priviliges and public synonyms on the object.
    public void setPendingForfeituresUids(java.util.List pendingForfeituresUids) throws DAOException{
    try{
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor(
    "MAIN_SCHEMA.UIDARRAY", con);
    array = new ARRAY(descriptor, con, pendingForfeituresUids.toArray());
    if(array == null){
    stmt.setNull(3,java.sql.Types.ARRAY);
    }else{
    stmt.setArray(3, array);
    }catch(SQLException e){
    closeStatement();
    releaseLobWrappers();
    throw new DAOException(e);
    Database and Drivers used
    I am using Oracle 9.2.0.1.0, Weblogic 8.1, Oracle Jdbc thin driver for 9.2 that comes bundled with weblogic (ojdbc14.jar)
    Any help on this is welcome.
    Thanks,
    Sunil

    Hi Sunil,
    I was wondering if you had any solution to the problem you listed.
    We are also facing a similar problem and is reported to oracle. Its a Bug as per oracle.
    Any help in getting this resolved is appreciated.
    Thanks,
    Sandip
    [email protected]

  • VARRAY mapping issues using WLS spk2 connection pools

    We have an ongoing issue with VARRAY's and WLS Connection pools. The connection
    pool of WebLogic does not support certain data structures of Oracle such as VARRAY.
    To create array/struct object in java application, we have to register these
    objects through array/struct descriptor methods. These methods require Oracle.sql.Connection
    as a parameter. There is no way to get Oracle.sql.Connection from Weblogic Server
    Connection Pool because the Oracle.sql.Connection is not serializable.
    So, what is the recommended solution for a situation in which the application
    tends to need to use VARRAYs and can we instead pass tables?
    Any recommendations?

    More information on this issue.
    I'm using the method DriverManager.getConnection(URL) to get a connection to
    the database, passing in the name of the connection pool. This method is
    throwing the following SecurityException:
    java.lang.SecurityException: User "john" does not have Permission
    "reserve"
    based on ACL "weblogic.jdbc.connectionPool.ICOM_DEV2_A".
    When running under the LDAP realm:
    -calls to getConnection() from within a jsp fail
    -calls to getConnection() from within a Session Bean or Entity Bean work
    -calls to getConnection() from a non-EJB class fail if it is called directly
    from the jsp
    -calls to getConnection() from a non-EJB class work if it is called from a
    Session Bean
    When running under the RDBMS realm, all calls to getConnection() work,
    whether they are a jsp, non-EJB class or a Session Bean.
    Is there some security context that is only present inside the EJB
    container?

  • VArray,TypeDescriptor, Connection, TransactionManager - ClasscastException

    Hi,
    I have a problem with unit testing an object with a collection which is stored as a VArray in the database.
    I have a datasource with a JNDIConnector. When I use an externalTransactionController I am not able to save my object. The problem is that the connection (T4CConnection) is proxied ($Proxy0). This results in a ClassCastException in the following Oracle code:
    TypeDescriptor:
    public void setPhysicalConnectionOf(Connection connection) {
    m_conn = ((OracleConnection)connection).physicalConnectionWithin();
    Is there a workaround for this?
    With kind regards.

    This is the stacktrace:
    java.lang.ClassCastException: $Proxy0
    at oracle.sql.TypeDescriptor.setPhysicalConnectionOf(TypeDescriptor.java:264)
    at oracle.sql.TypeDescriptor.<init>(TypeDescriptor.java:79)
    at oracle.sql.ArrayDescriptor.<init>(ArrayDescriptor.java:133)
    at oracle.toplink.objectrelational.ObjectRelationalDescriptor.buildFieldValueFromDirectValues(ObjectRelationalDescriptor.java:77)
    at oracle.toplink.mappings.foundation.AbstractCompositeDirectCollectionMapping.writeFromObjectIntoRow(AbstractCompositeDirectCollectionMapping.java:709)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:753)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildRow(ObjectBuilder.java:742)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:401)
    at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:60)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:622)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:586)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:479)
    at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:110)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:259)
    at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:603)
    at oracle.toplink.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:519)
    at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:100)
    at oracle.toplink.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:72)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2532)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:981)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:938)
    at oracle.toplink.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:240)
    at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:161)
    at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3123)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1242)
    at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1330)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2799)
    at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2779)
    at oracle.toplink.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:96)
    at oracle.toplink.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:55)
    at oracle.toplink.internal.ejb.cmp3.transaction.base.TransactionImpl.commit(TransactionImpl.java:195)
    at oracle.toplink.internal.ejb.cmp3.transaction.base.TransactionManagerImpl.commit(TransactionManagerImpl.java:68)
    at nl.politie.isc.nlsis.domain.dao.varray.BootMotorVArrayTest.testSave(BootMotorVArrayTest.java:41)
    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:585)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:118)
    at junit.framework.TestSuite.runTest(TestSuite.java:208)
    at junit.framework.TestSuite.run(TestSuite.java:203)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

  • How do I find the number of file descriptors in use by the system?

    Hey folks,
    I am trying to figure out how many file descriptors my Leopard system has in use. On FreeBSD, this is exposed via sysctl at the OID kern.open_files (or something close to that, can't recall exactly what the name is). I do see that OS X has kern.maxfiles, which gives the maximum number of file descriptors the system can have open, but I don't see a sysctl that tells me how many of the 12288 descriptors the kernel thinks are in use.
    There's lsof, but is that really the only way? And, I'm not even sure if I can just equate the number of lines from lsof to the number of in use descriptors. I don't think it's that easy (perhaps it is and I'm just over complicating things).
    So, anyone know where this information is?
    Thanks for your time.

    glsmith wrote:
    There's lsof, but is that really the only way? And, I'm not even sure if I can just equate the number of lines from lsof to the number of in use descriptors.
    Can't think of anything other than lsof right now. However:
    Only root can list all open files, all other users see only their own
    There is significant duplication, and
    All types of file descriptor are listed, which you may not want, so you need to consider filtering.
    As an example, the following will count all regular files opened by all users:
    sudo lsof | awk '/REG/ { print $NF }' | sort -u | wc -lIf you run it without the sudo, you get just your own open files.

  • RFFOCA_T: DME with file descriptor in first line (RBC)

    Hi All,
    I've customized the automatic payment run for a company located at Canada - including generated DME- file by the report RFFOCA_T. The DME file looks good - but sadly the house bank (RBC, Royal Bank of Scotland) is expecting two things different:
    "Different formats now exist for the Royal Bank and CIBC from the default CPA-005 specification.
    u2022 Type 'A' and 'Cu2019 records have been modified to handle RBC and CIBC
    u2022 A parameter was added to job submission to request the bank type
    This process has been revised to include two headers as part of the tape_header code segment.
    u2022 The first header must be the first line in the file and appear in the following format: $$AAPDCPA1464[PROD]NL$$
    u2022 The second header (positions 36 to 1464) must be filled with blanks, not zeros"
    (taken from "SCT Banner, Finance, Release Guide - January 2005, Release 7.0")
    In our DME-file the second header (position 36 to 1464) is correct, but the first header is completely missing.
    RBC wrote me in an email:: "The first line of the file needs the file descriptor ($$AAPDCPA1464[PROD]NL$$). The date format and the client number is correct. When the $$ file descriptor has been added please upload the TEST file":
    I could not find any solution at SAP/ OSS - can anybody help, please?
    Thanks a lot!
    Sandra.

    Hi Revi,
    I'm not sure if I understand you in the right way.
    I do not have a problem only with the $$ at the beginning. The whole first expected line as the file descriptor is missing. As we saw in the report code, it's not considered. At least I hope, there is a simple solution - like an update or else - but maybe we need to enlarge the report itself by a programmer?
    Thanks,
    Sandra

  • .v2.XMLParseException:Can not find definition for element 'descriptor'

    I am getting the following error, while running 'empps.jsp' ...when executing the tutorial given at
    ERROR Details:
    500 Internal Server Error
    javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'employees' from bean of type jsftoplink.model.EmployeesClient: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.XMLMarshalExceptionException Description: An error occurred unmarshalling the documentInternal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.platform.xml.XMLPlatformExceptionException Description: An error occurred while parsing the document.Internal Exception: oracle.xml.parser.v2.XMLParseException: Can not find definition for element 'class-descriptor-type'     at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:501)     at emps.jspService(_emps.java:629)
    Pls help me in resolving this issue.

    I am still gettng the same error. The xml file is now
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="" ID="568945">
    <FIRSTNAME>Arnold</FIRSTNAME>
    <LASTNAME>McEriccson</LASTNAME>
    <ADDRESS>
    <LINE1>31, Nomadic Avevnue</LINE1>
    <LINE2>Pasadena Clove</LINE2>
    <CITY>WoolTown, MT</CITY>
    <ZIP>45263</ZIP>
    </ADDRESS>
    <BIRTHDATE>1967-08-13</BIRTHDATE>
    </CUSTOMER>
    The xsd file is:
    <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FIRSTNAME" type="xs:string"/> <xs:element name="LASTNAME" type="xs:string"/> <xs:element name="ADDRESS"> <xs:complexType>
    <xs:sequence>
    <xs:element name="LINE1" type="xs:string"/> <xs:element name="LINE2" type="xs:string"/> <xs:element name="CITY"/>
    <xs:element name="ZIP" type="xs:int"/> </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="BIRTHDATE" type="xs:date"/> </xs:sequence>
    <xs:attribute name="ID" type="xs:double"/> </xs:complexType>
    </xs:element>
    </xs:schema>
    There seems to be something fairly obvious that i am missing.

  • JPublisher error when using OracleAppsAdapter to coonect a SP in EBS12

    Hi
    I am trying to connect to a SP in EBS 12 from one BPEL process. JDeveloper I am using is 11.1.1.6.0 with SOA extension.
    I often get some JPublisher error in the step 5 in Adapter Configuration Wizard. The error popup says:
    "JPublisher error occured. An error occured when running JPublisher. An error occured when JPublisher was invoked: ERROR: missing method. Analyze the error and correct if possible. Contact oracle support if error is not fixable".
    My SP is quite simple one and it looks like the below:
    create or replace
    Package BPEL_INVOICE_SCANNING_EBS Is
         TYPE r_invoiceid IS RECORD (
              INVOICE_ID NUMBER
         TYPE t_invoice_table is TABLE of r_invoiceid index by BINARY_INTEGER;
         -- Get a list of invoices ids --
         FUNCTION getInvoiceIds(
              countOfInvoices IN NUMBER,
              countOfInvoiceLines IN NUMBER,
              p_holds out t_invoice_table
         ) RETURN NUMBER;
    End BPEL_INVOICE_SCANNING_EBS;
    create or replace
    Package Body BPEL_INVOICE_SCANNING_EBS As
    -- Get a list of invoices ids --
    FUNCTION getInvoiceIds(countOfInvoices IN NUMBER,countOfInvoiceLines IN NUMBER, p_holds OUT t_invoice_table)
    RETURN NUMBER
    IS
    BEGIN
    RETURN 4;
    END getInvoiceIds;
    End BPEL_INVOICE_SCANNING_EBS;
    Is there anyone who has encountered the same issue? Can any guru show some tips or solution?
    Many thanks!
    Regards,
    Mark

    Thanks again for your response here, James.
    It's for our own on-prem deployment; absolutely NOT for the store :-)
    This app is just one of a number we'll need to develop.  Whilst it's SharePoint Server on-prem, the platform is being managed by a 3rd party provider.  For that reason we're wanting to steer clear of full-trust farm solutions hence their preferred
    "app" approach (and our own "Architects" are wanting to mandate REST) - personally as a .NET developer - I just wanna dive in to code-behind .... but that's another argument!!
    Documentation is very limited and it seems that "SharePoint-Hosted" in particular appears to be limited to "demonstration scenarios" only.
    MS seem to pushing autohosted ... and specifically appear to want to get apps in their store and I've a feeling I'm close to hitting the limitations of what I'm trying to do in the app model.
    One of the key things we're trying to achieve is "centralised data" and so list provisioning in the app web isn't going to cut it here.... we're not looking to provide "widget apps" for users to install in their site ad-hoc; it's very
    much "managed data" ...
    Interestingly - back to my original question - all routes prior to my asking had led me here :-
    http://blogs.msdn.com/b/officeapps/archive/2012/11/29/solving-cross-domain-problems-in-apps-for-sharepoint.aspx
    (see last section : Cross Site-Collection Calls)
    Try as I might - I just could not get it to work and so your answer would go some way to confirming that what I had been trying to achieve was not possible.
    Cheers
    Steve

  • Oracle jpublisher bug or bug in Oracle database 10g ?

    Hello,
    i`m trying to call web service from pl/sql in oracle database 10g v10.1.0.2.0.
    I`ve used this tutorial:
    http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    used oracle as 10.1.3 web service callout pack for 10g v10.1
    and jpublisher 10.2, which has generated pl/sql wrapper package and proxy classes.
    I`ve imported with loadjava dbwsclientws.jar and dbwsclientdb101.jar into my user called wscallout.
    Also imported proxy classes.
    When i`ve tried to call pl/sql function, i`ve got this error:
    java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
         at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:47)
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPPart11.<init>(SOAPPart11.java:17)
         at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createSOAPPart(SOAPImplementation11.java:209)
         at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPPart(MessageImpl.java:415)
         at oracle.j2ee.ws.client.StreamingSender._writeRequest(StreamingSender.java:649)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:142)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
         at genproxy.runtime.ProductSynchroService_Stub.endProductConversation(ProductSynchroService_Stub:137)
         at genproxy.ProductSynchroServiceClient.endProductConversation(ProductSynchroServiceClient.java:64)
         at genproxy.ProductSynchroServiceClientJPub.endProductConversation(ProductSynchroServiceClientJPub.java:243)
    Error -29532: ORA-29532: volanie Java ukonèené nezachytenou výnimkou Java: java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
    14:27:34 Execution failed: ORA-29532: volanie Java ukonèené nezachytenou výnimkou Java: java.lang.VerifyError: (class: oracle/j2ee/ws/saaj/soap/SOAPDoc, method: getDocumentBuilder signature: ()Loracle/xml/parser/v2/DocumentBuilder;) Wrong return type in function
    14:27:34 ORA-06512: na line 10
    I haven`t found anything about this issue in oracle metalink, regarding to ORA-29532.

    dude if you are using jdeveloper 10.1.3.x for development of web service the library you have loadded into database dwwsclinet etc or sopa.jar or mail .jar will not work
    for getting the output for the web services developed on jdeveloper you need following file to upload on database
    wsclient_extended for 10.1.3.x.0 where x stands for your version
    wsclient_extended.jar which can be downloaded from
    http://download.oracle.com/otn/java/oc4j/1013x0/wsclient_extended_1013x0.zip the stands for subversion
    xstands for your version
    after downloading above file upload it
    open up the socket by command
    on SYS schema
    SQL>call dms_java.grant_permission('YOUR_SCHEMA','SYS:java.net.SocketPermission','<IPaddress ofcomputer>:<portnumber>(eg 10.8.11.98:8888)','connect,resolve');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.util.PropertyPermission','*','read,write');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','createClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','getClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setContextClassLoader','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setFactory','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','setIO','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','shutdownHooks','');
    SQL>call dms_java.grant_permission('YOUR-SCHEMA','SYS:java.lang.RuntimePermission','accessClassInPackage.sun.util.calender','');
    Now make a jar file which contain all your class files of proxy put that jar file on database an compile that jar file on database it should work than convert it into java stored procedure and invoke that procedure
    Vishal Rijhwani
    JAVA DEVELOPER
    Message was edited by:
    user635429

  • Urgent:JPublisher's default typemapping for PL/SQL Boolean not working

    I have a procedure that accepts a boolean.
    I have created this procedure on 2 oracle database installations. One is on Oracle8i and the other on Oracle9i.
    I invoke JPublisher with the following jpub.properties file:
    jpub.user=scott/tiger
    jpub.url=jdbc:oracle:thin:@database:1521:oracle
    jpub.dir=C:\Jpub
    jpub.package=BooleanMapping
    jpub.plsqlmap=always
    jpub.plsqlfile=C:\Jpub\BoolProc.sql
    jpub.plsqlpackage=BoolWrapper
    jpub.adddefaulttypemap=BOOLEAN:boolean:INTEGER:SYS.SQLJUTL.INT2BOOL:SYS.SQLJUTL.BOOL2INT
    This is the output of JPublisher from SCOTT schema in 8i and 9i databases respectively:
    Output from 8i:
    J2T-137, WARNING: mapping BOOLEAN:boolean was redefined to BOOLEAN:boolean.
    SCOTT.<top-level scope>
    Output from 9i:
    J2T-137, WARNING: mapping BOOLEAN:boolean was redefined to BOOLEAN:boolean.
    SCOTT.<top-level scope>
    J2T-138, NOTE: Wrote PL/SQL package BoolWrapper to file C:\Jpub\BoolProc.sql
    Why is the PL/SQL wrapper file not created in case of Oracle8i database?
    Is there a way to enable this?
    NB: I had to do a few workarounds to make this happen on 8i database.
    I copied over the .jar library files from sqlj folder from 9iHome to 8iHome. I also copied the jpub.exe from the bin folder. This is because the JPublisher in 8i does not accept addtypemap, defaulttypemap kind of arguments.

    Alex,
    For the predicate groups that are indexed/stored, the exact operator types (as in equality, inequality, like etc) that are indexed are specified while assigning the default index parameters. In the following example, exf$indexoper is used to specify the list of indexed operators.
    BEGIN
      DBMS_EXPFIL.DEFAULT_INDEX_PARAMETERS('Car4Sale',
        exf$attribute_list (
           exf$attribute (attr_name => 'HorsePower(Model, Year)',
                          attr_oper => exf$indexoper('=','<','>','>=','<='),
                          attr_indexed => 'FALSE')    --- stored predicate group
    END;
    /You can find more information about exf$indexoper at
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/t_expfilobj.htm#ARPLS153
    Could you confirm that you chose to index 'is null' and 'is not null' while assigning the default index parameters ? This information is available in OPERATOR_LIST column of the USER_EXPFIL_DEF_INDEX_PARAMS view.
    Hope this helps,
    -Aravind.

  • Unable to load descriptor .../web.xml - DescriptorException - Java EE6 war

    Deploying a simple Java EE 6 war into WebLogic 10.3.3 fails with <Unable to load descriptor /root/Oracle/Middleware/user_projects/domains/palis1/servers/AdminServer/upload/SimpleEE6App.war/WEB-INF/web.xml of module SimpleEE6App.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-enumeration-valid: string value '3.0' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/javaee:<null>
    The web app consists of one JSF 2 web dialog, one managed bean, one stateless session bean and one entity bean. In GlassFish v3 the app works fine. Then I installed the actual version of WebLogic server in order to check whether I can run EE6 apps there to. But deploying the war using WebLogic admin console fails with
    ... <AdminServer> <main> <<WLS Kernel>> <> <> <1273649525966> <BEA-000360> <Server started in RUNNING mode>
    ... <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <admin> <> <> <1273649790693> <BEA-160197> <Unable to load descriptor /root/Oracle/Middleware/user_projects/domains/palis1/servers/AdminServer/upload/SimpleEE6App.war/WEB-INF/web.xml of module SimpleEE6App.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-enumeration-valid: string value '3.0' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/javaee:<null>
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
    at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:141)
    at weblogic.servlet.utils.WarUtils.getWebAppBean(WarUtils.java:124)
    at weblogic.application.compiler.WARModule.processLibraries(WARModule.java:413)
    at weblogic.application.compiler.WARModule.merge(WARModule.java:455)
    at weblogic.application.compiler.flow.SingleModuleMergeFlow.proecessModule(SingleModuleMergeFlow.java:16)
    at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.ReadOnlyWarMerger.merge(ReadOnlyWarMerger.java:27)
    at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:88)
    at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:41)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:157)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.application.compiler.AppMerge.merge(AppMerge.java:169)
    at weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:88)
    at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:63)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:181)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createLazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:156)
    at weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:661)
    at com.bea.console.actions.app.install.Flow$2.execute(Flow.java:469)
    at com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.java:5000)
    at com.bea.console.actions.app.install.Flow.appSelected(Flow.java:467)
    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.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
    at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
    The web.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
    </web-app>
    After changing the version number I got the same error message with the differing number. I also tryed to deploy the web-app_3_0.xsd into the server. This also did not solve the problem.
    Any ideas?
    Thanks in advance
    Axel Burghof

    The web app consists of one JSF 2 web dialog, one managed bean, one stateless session bean and one entity bean. In GlassFish v3 the app works fine. Then I installed the actual version of WebLogic server in order to check whether I can run EE6 apps there to. But deploying the war using WebLogic admin console fails with ...
    Hey Axel -
    WLS 10.3.x does not implement Java EE 6 -- it's a Java EE 5 based server.
    While we have added support for a few independent Java EE 6 specifications where we can -- such as JSF 2.0 in WLS 10.3.3 and JPA 2.0/JAX-RS 1.1 with WLS 10.3.4 that is coming in the next patchset -- we don't support all of the Java EE 6 model and thus you can't use any of the EJB 3.1, Servlet 3.0 changes and you can't deploy EJBs (and JPA entities) inside of a WAR file. Our next major release will be a Java EE 6 implementation, where this will be possible.
    -steve-

  • "application descriptor not found" when trying to create .ane file

    I have been trying to create a very simple native extention for the better part of a week now and I just can't seem to figure it out.
    Using tutorials and guides from the following sources:
    http://www.adobe.com/devnet/air/articles/extending-air.html
    http://www.adobe.com/content/dam/Adobe/en/devnet/devices/pdfs/DevelopingActionScriptExtens ionsForAdobeAIR.pdf
    http://custardbelly.com/blog/2011/09/21/air-native-extension-example-ibattery-for-ios/
    I managed to get up to the point where I need to create the ane file, but I am getting "application descriptor not found".
    So, here is the detailed explanation of everything I have done to date. Can someone tell me where I have gone wrong?
    1. On the mac, I created an xcode project, using the iBattery example code from the link above, I managed to create static library .a file. I am not going to discount the possiblity that there are many errors still in this file, but I am going to assume for the moment that my current problem is not related to any issues in this static library.
    2. Copied the static library "DaveExtention.a" to my PC where I have flash CS5.5 installed (yes, I know there is a typo in the name)
    3. In my app folder, I created a lib folder that now contains the following files:
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\DaveExtension.fla
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\DaveExtension-app.xml
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\com\extensions\DaveExtension\DaveExtension.as
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\com\extensions\DaveExtension\BatteryStateEnum.as
    I set my project to compile an swc into the build folder and simply put the following code into my project:
    import com.extensions.DaveExtension.BatteryStateEnum;
    import com.extensions.DaveExtension.DaveExtension;
    var ext:DaveExtension = new DaveExtension;
    var batterystate:BatteryStateEnum;
    stop();
    I then publish the swc.
    4. Once the swc is created in the build folder, I copy the libDaveExtention.a to the build folder and create the extension.xml file, which looks like this:
    <extension xmlns="http://ns.adobe.com/air/extension/2.5">
      <id>com.extensions.DaveExtension</id>
      <versionNumber>1</versionNumber>
      <platforms>
        <platform name="iPhone-ARM">
            <applicationDeployment>
                <nativeLibrary>libDaveExtention.a</nativeLibrary>
                <initializer>ExtInitializer</initializer>
                <finalizer>ExtFinalizer</finalizer>
            </applicationDeployment>
        </platform>
      </platforms>
    </extension>
    5. I make a copy of the swc file and rename it to .zip... I then extract library.swf from it and delete the zip. My build folder now looks like this:
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\DaveExtension.swc
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\extension.xml
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\libDaveExtention.a
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build\library.swf
    6. I downloaded the flex 4.5.1.21328 sdk and the Air 3.0 sdk, which I copied into the flex sdk folder (which is located in "D:\SDKs\flex_sdk_4.5.1.21328")
    7. In my build folder, I create a simple batch file called buildane.bat with the following command:
    D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
    8. I then open a command prompt to my build folder and run buildane.bat and this is my output:
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>buildane.bat
    D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
    application descriptor not found
    No matter what I try, I can't get passed this.
    Can anyone tell me what I am doing wrong?

    >>D:\GoldSun\Source Code\Flash\ExtentionTest\lib\Build>D:\SDKs\flex_sdk_4.5.1.21328\bin\adl -package -target ane DaveExtension.ane extension.xml -swc DaveExtension.swc -platform iPhone-ARM library.swf libDaveExtention.a
    Either its a typo or by mistake you wrote adl in yout bat file. Change it to adt since that is the file that will package your ane. adl is just used for debugging/running on Desktop.
    Hope this helps. let me know how it goes.
    Thanks,
    Meet

  • Bug:4705928 PLSQL: Memory leak using small varrays

    We have Oracle version 10.2.0.1.0
    We have a problem with a procedure.
    In our scenario we make use of VARRAY in the procedure to pass some filter parameters to a select distinct querying a view made on three tables.
    Unfotunately not always execution it is successful.
    Sometimes it returns wrong value (0 for the count parameter), sometimes (rarely) the server stops working.
    We suspect that this is caused by a bug fixed in versione 10.2.0.3.0
    Bug:4705928 PLSQL: Memory leak using small varrays when trimming the whole collection and inserting into it in a loop
    We suspect this becasue we made two procedure the first (spProductCount) uses a function (fnProductFilter) to calculate the values of a varray and passes them into the select,
    while in the second procedure (spProductCount2) parameters are passed directly into the statement without varray
    and there are failures only in the first procedure.
    On the other hand on another server 10.2.0.1.0 we never have this problem.
    The instance manifesting the bug runs under shared mode, while the other is under dedicated mode.
    Turning the first one to dedicated mode makes the bugs disapear.
    Unfortunately this is not a solution.
    In the sample there are the three table with all constraints, the view, tha varray custom type, the function and the two procedures.
    Is there someone that may examine our sample and tell us if the pl/sql code corresponds to the bug desciption.
    We also want to know if it's possibile that the same server running under different mode (SHARED/DEDICATED) doesn't behave the same way.
    The tables:
    --Products
    CREATE TABLE "Products" (
         "Image" BLOB
         , "CatalogId" RAW(16)
         , "ProductId" RAW(16)
         , "MnemonicId" NVARCHAR2(50) DEFAULT ''
         , "ProductParentId" RAW(16)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M04" CHECK ("CatalogId" IS NOT NULL)
    ALTER TABLE "Products"
         ADD CONSTRAINT "NN_Products_M05" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "Products"
    ADD CONSTRAINT "PK_Products"
    PRIMARY KEY ("ProductId")
    CREATE INDEX "IX_Products"
    ON "Products" ("CatalogId", "MnemonicId")
    CREATE UNIQUE INDEX "UK_Products"
    ON "Products" (DECODE("MnemonicId", NULL, NULL, RAWTOHEX("CatalogId") || "MnemonicId"))
    --Languages
    CREATE TABLE "Languages" (
         "Description" NVARCHAR2(250)
         , "IsStandard" NUMBER(1)
         , "LanguageId" RAW(16)
         , "MnemonicId" NVARCHAR2(12)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "Languages"
         ADD CONSTRAINT "NN_Languages_M05" CHECK ("MnemonicId" IS NOT NULL)
    ALTER TABLE "Languages"
    ADD CONSTRAINT "PK_Languages"
    PRIMARY KEY ("LanguageId")
    ALTER TABLE "Languages"
    ADD CONSTRAINT "UK_Languages"
    UNIQUE ("MnemonicId")
    --ProductDesc
    CREATE TABLE "ProductDesc" (
         "Comment" NCLOB
         , "PlainComment" NCLOB
         , "Description" NVARCHAR2(250)
         , "DescriptionText" NCLOB
         , "PlainDescriptionText" NCLOB
         , "LanguageId" NVARCHAR2(12)
         , "ProductId" RAW(16)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM01" CHECK ("LanguageId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
         ADD CONSTRAINT "NN_ProductDescM02" CHECK ("ProductId" IS NOT NULL)
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "PK_ProductDesc"
    PRIMARY KEY ("ProductId", "LanguageId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc1"
    FOREIGN KEY("ProductId") REFERENCES "Products" ("ProductId")
    ALTER TABLE "ProductDesc"
    ADD CONSTRAINT "FK_ProductDesc2"
    FOREIGN KEY("LanguageId") REFERENCES "Languages" ("MnemonicId")
    /The view:
    --ProductView
    CREATE OR REPLACE VIEW "vwProducts"
    AS
         SELECT
               "Products"."CatalogId"
              , "ProductDesc"."Comment"
              , "ProductDesc"."PlainComment"
              , "ProductDesc"."Description"
              , "ProductDesc"."DescriptionText"
              , "ProductDesc"."PlainDescriptionText"
              , "Products"."Image"
              , "Languages"."MnemonicId" "LanguageId"
              , "Products"."MnemonicId"
              , "Products"."ProductId"
              , "Products"."ProductParentId"
              , TRIM(NVL("ProductDesc"."Description" || ' ', '') || NVL("ParentDescriptions"."Description", '')) "FullDescription"
         FROM "Products"
         CROSS JOIN "Languages"
         LEFT OUTER JOIN "ProductDesc"
         ON "Products"."ProductId" = "ProductDesc"."ProductId"
         AND "ProductDesc"."LanguageId" = "Languages"."MnemonicId"
         LEFT OUTER JOIN "ProductDesc" "ParentDescriptions"
         ON "Products"."ProductParentId" = "ParentDescriptions"."ProductId"
         AND ("ParentDescriptions"."LanguageId" = "Languages"."MnemonicId")
    /The varray:
    --CustomType VARRAY
    CREATE OR REPLACE TYPE Varray_Params IS VARRAY(100) OF NVARCHAR2(1000);
    /The function:
    --FilterFunction
    CREATE OR REPLACE FUNCTION "fnProductFilter" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId                    NVARCHAR2 := N'it-IT',
         parFilterValues                    OUT Varray_Params
    RETURN INTEGER
    AS
         varSqlCondition                    VARCHAR2(32000);
         varSqlConditionValues          NVARCHAR2(32000);
         varSql                              NVARCHAR2(32000);
         varDbmsCursor                    INTEGER;
         varDbmsResult                    INTEGER;
         varSeparator                    VARCHAR2(2);
         varFilterValue                    NVARCHAR2(1000);
         varCount                         INTEGER;
    BEGIN
         varSqlCondition := '(T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId )';
         varSqlConditionValues := CHR(39) || TO_CHAR(parCatalogId) || CHR(39) || N', ' || CHR(39 USING NCHAR_CS) || parLanguageId || CHR(39 USING NCHAR_CS);
         parFilterValues := Varray_Params();
         varSql := N'SELECT FilterValues.column_value FilterValue FROM TABLE(Varray_Params(' || varSqlConditionValues || N')) FilterValues';
         BEGIN
              varDbmsCursor := dbms_sql.open_cursor;
              dbms_sql.parse(varDbmsCursor, varSql, dbms_sql.native);
              dbms_sql.define_column(varDbmsCursor, 1, varFilterValue, 1000);
              varDbmsResult := dbms_sql.execute(varDbmsCursor);
              varCount := 0;
              LOOP
                   IF (dbms_sql.fetch_rows(varDbmsCursor) > 0) THEN
                        varCount := varCount + 1;
                        dbms_sql.column_value(varDbmsCursor, 1, varFilterValue);
                        parFilterValues.extend(1);
                        parFilterValues(varCount) := varFilterValue;
                   ELSE
                        -- No more rows to copy
                        EXIT;
                   END IF;
              END LOOP;
              dbms_sql.close_cursor(varDbmsCursor);
         EXCEPTION WHEN OTHERS THEN
              dbms_sql.close_cursor(varDbmsCursor);
              RETURN 0;
         END;
         FOR i in parFilterValues.first .. parFilterValues.last LOOP
              varSeparator := ', ';
         END LOOP;
         RETURN 1;
    END;
    /The procedures:
    --Procedure presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varResult := "fnProductFilter"(parCatalogId, parLanguageId, varFilterValues);
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, varFilterValues(1), varFilterValues(2);
    END;
    --Procedure NOT presenting anomaly\bug
    CREATE OR REPLACE PROCEDURE "spProductCount2" (
         parCatalogId "Products"."CatalogId"%TYPE,
         parLanguageId NVARCHAR2 := N'it-IT',
         parRecords OUT NUMBER
    AS
         varFilterValues Varray_Params;
         varResult INTEGER;
         varSqlTotal VARCHAR2(32000);
    BEGIN
         parRecords := 0;
         varSqlTotal := 'BEGIN
         SELECT count(DISTINCT T_Product."ProductId") INTO :parCount FROM "vwProducts" T_Product
              WHERE ((T_Product."CatalogId" = HEXTORAW(:parentId)) AND (T_Product."LanguageId" = :languageId ));
    END;';
         EXECUTE IMMEDIATE varSqlTotal USING OUT parRecords, parCatalogId, parLanguageId;
    END;Edited by: 835125 on 2011-2-9 1:31

    835125 wrote:
    Using VARRAY was the only way I found to transform comma seprated text values (e.g. "'abc', 'def', '123'") in a collection of strings.A varray is just a functionally crippled version of a nested table collection type, with a defined limit you probably don't need. (Why 100 specifically?) Instead of
    CREATE OR REPLACE TYPE varray_params AS VARRAY(100) OF NVARCHAR2(1000);try
    CREATE OR REPLACE TYPE array_params AS TABLE OF NVARCHAR2(1000);I don't know whether that will solve the problem but at least it'll be a slightly more useful type.
    What makes you think it's a memory leak specifically? Do you observe session PGA memory use going up more than it should?
    btw good luck with all those quoted column names. I wouldn't like to have to work with those, although they do make the forum more colourful.
    Edited by: William Robertson on Feb 11, 2011 7:54 AM

  • How can I display the descriptor column from a view in my BR message

    I have a table, Memberships, that contains a column for staff id. The staff data is on a remote database and I have created a view to access the required data. I have set the descriptor sequence for the name column of the staff view but the BR still displays the id.
    I'm assuming that because staff is a view and has no capi of its own, the membership capi cannot call the staff capi function display_label.
    I still would like to display the name of the staff member instaid of the ID. Can anyone suggest a workaround to force the display but without having to customize the membership capi after it has been created by headstart?

    Hi,
    try altering the code to create the capi.
    I modified this code allready quite a lot to achieve my goals.
    I also had that problem, and solved it by altering the code that generates the display_label. For each display_label funtion, I add a call to a package- function 'APPPA_LABEL.display_label' with parameters the tablename and the pk of the record. In the packagefunction, you can write your own definition of the display-label.
    The Productivity Boosters look a bit difficult in the beginning, but when you get to know them, you can achieve some good results.
    Greetings,
    Kristof

  • Creating and displaying Varrays in Apex 4.1

    Hi,
    I am creating quite a sophisticated database, which has to support relations between different tables. In order to implement that, I've decided to use user-defined datatype - a varray which consists of 100 integers (and only of that) that will contain ID's to different rows in different tables. Since it is a user-defined datatype I have problems with using it in Application Express :)
    First question: Is there any way to make this simple datatype 'readable' for Apex? In each application I create it shows that it is 'an unsupported datatype'. Maybe I should define something more than just varray construction - the way Apex should read and edit it etc ?
    Second question: How can I implement a function that will read the IDs in the varray and transform them into names to which that IDs correspond? I would like an application to show full name of an organization (ex. "ABC Corporation") instead of its ID. I tried to put some part of code that takes up the name of an organisation in a row with given ID into +"Source"+ form in the +"Edit page item"+, however Apex doesn't seem to get the fact that the data is in different table. Any ideas? :)
    I will be grateful for any help since it is an urgent case :]

    KamilGorski wrote:
    I would happily do that if only I had more time to study SQL and learn it properly :) Unfortunately, our start-up company has no time and money at the moment to allow me to do so.Then isn't using technologies that no one knows rather a strange decision?
    But coming back to your solution - it still works only if user inputs only one product quality. Let's say that user has chosen 3 qualities and the 'SELECTED_QUALITIES' collection looks like that:
    n001 = 1,
    n002 = 3,
    n003 = 5
    And since the SELECT query you have created compares pq.quality_id only to n001, it returns all the products that have the quality no 1 - not all the products that have all three selected qualities - 1, 3 and 5. Of course, we can change the 'EXISTS' condition and add more 'OR' conditions like that:
    where pq.quality_id = q.n001
    or pq.quality_id = q.n002
    or pq.quality_id = q.n003But it has few flaws - first we assume that we know the number of qualities user has selected - 3 (and we don't know that), You've misunderstood. SQL is row based. To handle multiple values, we create more rows, not additional columns. In your preferred terms, the result of any query is an <i>m</i>&times;<i>n</i> array of columns and rows, where the number of columns <i>m</i> is fixed, and the number of rows <i>n</i> varies according to the query predicates.
    It is not necessary to know the number of selected qualities, simply create a row in the collection for each selected quality to give a set of selected qualities.
    The SELECTED_QUALITIES collection should look like:
    N001
       1
       3
       5
    secondly the query will return all the products that have one of the three selected qualities (and we want products that have all three qualities). That wasn't really clear from the information previously given, but it's certainly possible. With <tt>product_qualities(product_id, quality_id)</tt> as a primary/unique key, and with no duplicates in the selected qualities, a solution is the set of all products with the selected qualities, where the number of qualities matched for each product equals the number of qualities selected, as in this example:
    SQL> create table products (
      2      product_id    integer       primary key
      3    , product_name  varchar2(30)  not null);
    Table created.
    SQL> create table qualities (
      2      quality_id    integer       primary key
      3    , quality_name  varchar2(30)  not null);
    Table created.
    SQL> create table product_qualities (
      2        product_id  integer   not null references products
      3      , quality_id  integer   not null references qualities,
      4      constraint product_qualities_pk primary key (
      5            product_id
      6          , quality_id))
      7    organization index;
    Table created.
    SQL> create index product_qualities_ix2 on product_qualities (
      2      quality_id
      3    , product_id);
    Index created.
    SQL> insert all
      2    into products (product_id, product_name) values (1, 'widget')
      3    into products (product_id, product_name) values (2, 'thingummy')
      4    into products (product_id, product_name) values (3, 'whatsit')
      5    into products (product_id, product_name) values (4, 'gizmo')
      6    into products (product_id, product_name) values (5, 'gadget')
      7    into products (product_id, product_name) values (6, 'contraption')
      8  select * from dual;
    6 rows created.
    SQL> insert all
      2    into qualities (quality_id, quality_name) values (1, 'green')
      3    into qualities (quality_id, quality_name) values (2, 'silver')
      4    into qualities (quality_id, quality_name) values (3, 'shiny')
      5    into qualities (quality_id, quality_name) values (4, 'furry')
      6    into qualities (quality_id, quality_name) values (5, 'digital')
      7    into qualities (quality_id, quality_name) values (6, 'hd')
      8    into qualities (quality_id, quality_name) values (7, 'wireless')
      9  select * from dual;
    7 rows created.
    SQL> insert all
      2    into product_qualities (product_id, quality_id) values (1, 1)
      3    into product_qualities (product_id, quality_id) values (1, 3)
      4    into product_qualities (product_id, quality_id) values (2, 2)
      5    into product_qualities (product_id, quality_id) values (2, 4)
      6    into product_qualities (product_id, quality_id) values (3, 1)
      7    into product_qualities (product_id, quality_id) values (3, 3)
      8    into product_qualities (product_id, quality_id) values (3, 5)
      9    into product_qualities (product_id, quality_id) values (4, 2)
    10    into product_qualities (product_id, quality_id) values (4, 4)
    11    into product_qualities (product_id, quality_id) values (4, 6)
    12    into product_qualities (product_id, quality_id) values (5, 2)
    13    into product_qualities (product_id, quality_id) values (5, 3)
    14    into product_qualities (product_id, quality_id) values (5, 5)
    15    into product_qualities (product_id, quality_id) values (6, 1)
    16    into product_qualities (product_id, quality_id) values (6, 3)
    17    into product_qualities (product_id, quality_id) values (6, 5)
    18    into product_qualities (product_id, quality_id) values (6, 7)
    19  select * from dual;
    17 rows created.
    SQL> commit;
    Commit complete.For the purposes of creating a quick and simple example outside of APEX, I'm using a temporary table instead of the SELECTED_QUALITIES APEX collection. For various reasons collections work better in APEX than GTTs and are the preferred approach for temporary storage.
    SQL> create global temporary table selected_qualities (
      2    n001 integer)
      3  on commit delete rows;
    Table created.With one quality selected, we get all the products having that quality:
    SQL> insert into selected_qualities (n001) values (1);
    1 row created.
    SQL> insert into selected_qualities (n001) values (1);
    1 row created.
    SQL> select
      2            p.product_id
      3          , p.product_name
      4  from
      5            products p
      6           join product_qualities pq
      7             on p.product_id = pq.product_id
      8           join selected_qualities sq
      9             on pq.quality_id = sq.n001
    10  group by
    11            p.product_id
    12          , p.product_name
    13  having
    14             count(*) = (select count(*) from selected_qualities);
    PRODUCT_ID PRODUCT_NAME
          1 widget
          6 contraption
          3 whatsitThese products all have the next quality added, so continue to be returned:
    SQL> insert into selected_qualities (n001) values (3);
    1 row created.
    SQL> select
      2            p.product_id
      3          , p.product_name
      4  from
      5            products p
      6           join product_qualities pq
      7             on p.product_id = pq.product_id
      8           join selected_qualities sq
      9             on pq.quality_id = sq.n001
    10  group by
    11            p.product_id
    12          , p.product_name
    13  having
    14             count(*) = (select count(*) from selected_qualities);
    PRODUCT_ID PRODUCT_NAME
          1 widget
          6 contraption
          3 whatsitThen as additional qualities are selected, the result set is progressively reduced:
    SQL> insert into selected_qualities (n001) values (5);
    1 row created.
    SQL> select
      2            p.product_id
      3          , p.product_name
      4  from
      5            products p
      6           join product_qualities pq
      7             on p.product_id = pq.product_id
      8           join selected_qualities sq
      9             on pq.quality_id = sq.n001
    10  group by
    11            p.product_id
    12          , p.product_name
    13  having
    14             count(*) = (select count(*) from selected_qualities);
    PRODUCT_ID PRODUCT_NAME
          6 contraption
          3 whatsit
    SQL> insert into selected_qualities (n001) values (7);
    1 row created.
    SQL> select
      2            p.product_id
      3          , p.product_name
      4  from
      5            products p
      6           join product_qualities pq
      7             on p.product_id = pq.product_id
      8           join selected_qualities sq
      9             on pq.quality_id = sq.n001
    10  group by
    11            p.product_id
    12          , p.product_name
    13  having
    14             count(*) = (select count(*) from selected_qualities);
    PRODUCT_ID PRODUCT_NAME
          6 contraption

Maybe you are looking for

  • How to export videos from the ipad on a SD card?

    i Want to put some videos from my Ipad on a SDCard to give them to a friend, how should i do? Thank you.

  • I cannot use my new iPhone 5 which I got from Vodafone UK

    The iPhone was Unlocked by Vodafone and I was able to use O2 UK nano sim card. But now neither Vodafone nor O2 sim cards get signal on my iPhone. Can any one help me out please? I tried factory reset which does not help much. I was able to use my iPh

  • Multiple Plants for Material and customer

    Hi, I have downloaded the Plants from the R/3 to CRM using DNL_PLANT object. The BP with Role 'PLANT' are created. we  have multiples plants for the same material, I have downloaded the material master data, but in COMMPR01, the field DELIVERING LOC.

  • Zooming in and then zooming out in AS2 (Without scaling the image)

    Basically I want to know if there is a way to go from a zoomed in version of something, and then seeing the whole image in another frame. (By pressing a button) Let's say there's a tree, I would bascially like (upon pressing a button which I can do)

  • EXIT_SAPLQAAT_002

    Hi forum, could anyone please tell me where / when the user exit EXIT_SAPLQAAT_002 is called? We were not able to find it... Thanks a lot! Kind regards Christian Harms