Help Modifying run_report_object to work in Oracle 11g

I need help with my code.  I'm running the Weblogic 10.3.6 and Oracle 11gR2 Forms/Reports.  My original Forms/Reports was working in Oracle 10g Forms/Reports, but now i can't figure out how to modify the code to run in 11g with "in-process" report server.  I know you can omit the server name in the web.show_document, but not sure how to modify this code. Help Please...
Procedure ReportXXX is
     ro_report_id                    REPORT_OBJECT;
     str_report_server_job     varchar2(100);
     str_job_id                         varchar2(100);
     str_url                              varchar2(100);
     PL_ID                              PARAMLIST;
Begin
     PL_ID := Get_parameter_list('TEMPDATA');
if not ID_NULL(PL_ID) then
     DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
RO_Report_ID := FIND_REPORT_OBJECT('NAME OF REPORT IN OBJECT NAVIGATOR');
ADD_PARAMETER(PL_ID, 'V_PROJ_CD', TEXT_PARAMETER, 'C7I');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'actual location of the report to run');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_OTHER, 'paramform=no;);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'REP1');  --with Oracle 11g using "in-process" so how to reference?
Str_Report_Server_Job := RUN_REPORT_OBJECT (RO_Report_ID, PL_ID);
Str_Job_ID := substr(str_report_server_job, length('REP1') + 2, length(str_report_server_job));
str_URL  := '/reports/rwservlet/getjobid' || str_job_id || '?server=REP1';
WEB.SHOW_DOCUMENT(STR_URL, '_SELF');
DESTROY_PARAMETER_LIST(PL_ID);
end;
thank you,
steven

If we want to execute form in A server to run report that reside in B server, we can use web.show_document with B server host name / port and report servlet parameter.
But is it possible if we use run_report_object ? (No share admin , no cluster)
Yes.
We have your same configuration (two independent FMW Linux machines), and we use run_report_object to run all our reports. Some time ago, for reasons that I don't detail here, we had to stop one of the reports servers, and we used the other one, with no problems at all.
The reports server name is unique within the network, and you can use any reports server that is visible by
rwdiag.sh -findAll

Similar Messages

  • New To Oracle.. Needs Help:: Conversion from SQL Server to Oracle 11g

    I am new to Oracle 11g and badly need the conversion of SQL Server Functions to Oracle.. Sample Pasted Code not working .. end with error.. pls help
    Create Table TempT (ID1 Varchar (10),
    ID2 Varchar (10)
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    TRANCOUNT INTEGER := 0;
    IDENTITY INTEGER;
    END;
    CREATE OR REPLACE FUNCTION fTempT
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT TT.*
    FROM TempT TT
    WHERE (fTempT.i = ''
    OR TT.ID1 = fTempT.i)
    RETURN REFCURSOR;
    END;
    CREATE OR REPLACE FUNCTION fTempTF
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT *
    FROM TABLE(fTempT(i))
    RETURN REFCURSOR;
    END;
    LAST FUNCTION ENDs WITH ERROR
    Error(13,7): PL/SQL: ORA-22905: cannot access rows from a non-nested table item

    2. The major purpose is to get a simplest way to create a parameterized function who can return a table like output. 2nd function has no use instead i was testing the result of First Function like thisIf you just want to select from a select, you should use a view not a function.
    1. which program is more help ful for writing and executing queries bcoz after using Query Analyzer of Microsoft It seems difficult to work on SQL Developer.
    sqlplus? If you are having difficulty learning new tools because of an old one you used, probably best to forget the old one and concentrate on learning the new one because it will be different. This goes for the database itself also.
    2. Can DMLs be used within a Function.Yes, you just can't execute the function in another SQL statement if it modifies data and this is a good thing.
    3. Can temporary tables be used within a function.Unfortunately yes, but they shouldn't be unless you are in a slowest application competition.
    5. Each Function which is a Table Function must be accompanied with Type Definitions?? its a bit longer way of doing the things than SQL ServerThat is why it is better to use views instead, is there any reason you want a select that you can select from inside a function?
    SQL Server for last 9 years thats why i refer this toolThat is not in itself a problem, if you try and do what you did in SQLServer in Oracle, that will be a problem though.

  • Can OBIEE 10.1.3.4 work with Oracle 11g 64bit?

    I Installed Oracle 11 g 64bit with JDK 64bit on my windows 7 Home Premium 64bit machine . After this i installed OBIEE 10.1.3.4 .
    Now OBIEE needs 32 bit JDK.
    How do i solve this?
    Can OBIEE 10.1.3.4 be used with oracle 11g 64 bit edition??

    First i installed Oracle 10g on my windows 7 home premium 64 bit .
    Then i installed OBIEE 10.1.3.4 on my machine
    But then there were some problems cropping up and i wasn't able to use OBIEE 10.1.3.4 with windows 7home premium 64 bit machine.
    I then removed both oracle 10g and OBIEE 10.1.3.4 from my machine.
    Then i installed oracle 11g 64bit and then OBIEE 10.1.3.4 . But again it dint work
    Can anyone help?

  • Can I use oracle client 10g express to work on oracle 11g database

    I have installed an oracle DB 11g, I also installed oracle client 10g express edition to create users and tables. I noticed that the users I created can't connect to db with error message "Error java.sql.SQLException: ORA-01017: invalid username/password; logon denied" and tables I created can't access from my program. I get error message "Error java.sql.SQLException: ORA-00942: table or view does not exist". I start to suspect that client 10g express edition can't use with oracle 11g. Please help.
    any suggestion is appreciated.
    Thanks,
    -- Allen --

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\temp>cd \oracle\app\oracle\product\10.2.0\server\BIN
    C:\oracle\app\oracle\product\10.2.0\server\BIN>
    C:\oracle\app\oracle\product\10.2.0\server\BIN>cd \temp
    C:\Temp>set ORACLE_HOME=C:\oracle\app\oracle\product\10.2.0\server
    C:\Temp>set ORACLE_SID=XE
    C:\Temp>set PATH=%ORACLE_HOME%\bin;%PATH%
    C:\Temp>type C:\oracle\app\oracle\product\10.2.0\server\NETWORK\ADMIN\tnsnames.o
    ra
    XE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = FCC003L)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
    TEST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = FCC003L)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = TEST)
    ORA11B =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = LAB2)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ORA11B.example.com)
    EXTPROC_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
        (CONNECT_DATA =
          (SID = PLSExtProc)
          (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
        (CONNECT_DATA =
          (SID = CLRExtProc)
          (PRESENTATION = RO)
    C:\Temp>sqlplus system/oracle@ora11b
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 3 18:26:14 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - ProductionWith the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Pr
    oduction
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    C:\Temp>

  • Help me ! can't install oracle 11g on ubuntu

    Hello i'm student,i'm studing oracle database 11g but i met some bug such as
    http://nguy-hiem.co.cc/12.png
    i try to fix it and i was run fixup.sh but
    root@hieukenpro-virtual-machine:/tmp/CVU_11.2.0.1.0_oracle# ./runfixup.sh
    Response file being used is :./fixup.response
    Enable file being used is :./fixup.enable
    Log file location: ./orarun.log
    *./fixup.response: line 11: unexpected EOF while looking for matching `"'*
    *./fixup.response: line 12: syntax error: unexpected end of file*
    *./fixup.response: line 12: warning: syntax errors in . or eval will cause future versions of the shell to abort as Posix requires*
    *Setting Kernel Parameters...*
    *uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)*
    *oracle hard nproc 16383*
    *Could not find MAX_PROCESSES_HARDLIMIT from /etc/security/limits.conf or response file.*
    *oracle hard nofile 65535*
    *Could not find FILE_OPEN_MAX_HARDLIMIT from /etc/security/limits.conf or response file.*
    *oracle soft nofile 1023*
    *Could not find FILE_OPEN_MAX_SOFTLIMIT from /etc/security/limits.conf or response file.*
    so what should i do ?
    THANK!
    Edited by: 837251 on 05:14 16-02-2011
    Edited by: 837251 on 05:17 16-02-2011

    Oracle 11g does not support Ubuntu. It can be installed, but requires word-around:
    Re: Installing Oracle 11g R2 on Ubuntu 10 Howto

  • Please help Installed apex 4.1 on Oracle 11g Xe can't create web services

    I went to Shared Components > Web Service references to create a web services reference using wsdl.
    My webservices are local to my network.
    I do not use proxy. Not using UDDI.
    I enter my WSDL URL but error message is returned
    The WSDL document was unretrievable because either the URL you supplied was invalid, your environment requires a valid proxy server address for HTTP requests and you have not defined one for this application, or a wallet needs to be configured for this instance of Application Express for HTTPS requests
    All I see are
    Amazon Web Services 3.0
    Google API Beta
    Q1. How can I register my wsdl url?
    Q2. How were amazon and google registered?
    Edited by: Oracle Primavera on Oct 4, 2011 5:29 PM

    Ensure that you can ping the web services server.
    Then check whether there is a valid/appropriate acl for the apex_040100 user;
    select * from dba_network_acl_privileges where principal like 'APEX%';
    Refer to Enable Network Services in Oracle Database 11g in the install manual.
    ~t

  • Entity Frame work for Oracle 11g -how to build a database from Model

    Hi ,
    I m trying to build a data access layer for using both Sql Server and Oracle(not at the same time). I used Model-first approach for creating the entities and then generate Databse from it.
    I came to know from different blogs that oracle and Sql Server generation workflow and DDL generation template are different. Right now my application is supporting for Sql Server, I need to support it for Oracle too.
    http://www.oracle.com/technetwork/issue-archive/2011/11-sep/o51odt-453447.html i m unable to get the Oracle DDl generation template and workflow.
    please Let me know,if i missed some thing and what are the changes I need to follow and exact procedure that is reuqired to support Oracle.
    Thanks,
    ilyas.

    Try the Model-First walkthrough in the Oracle EF OBE:
    http://download.oracle.com/oll/obe/EntityFrameworkOBE/EntityFrameworkOBE.htm#t4
    It provides a more detailed step by step tutorial in generating Oracle DDL from EF.
    If you're still having problems, provide a detailed description on what errors you see and what steps you executed. Right now, it's hard to diagnose what the problem could be with so little detail.

  • Help linking oracle 11g and joomla 1.6

    Hello
    I am currently working on a project which uses Joomla 1.6 and MySQL 5.15. We now need to migrate the DB from MySQL to Oracle 11g R2 and I would like some help in finding a driver between Oracle 11g and Joomla 1.6. If anybody has worked with and successfully connected these two could you please help me out.
    Could really do with the help as I need to complete the project soon.
    Thanks
    Bharat
    Edited by: 842910 on Mar 8, 2011 11:10 PM

    Hey there...
    Well.... It sort of all depends on how Joomla is connecting to the database. Are they using a pre-built framework like PDO or Zend ?
    If they are it should be a a relatively easy task to move it to Oracle. If not then you will have to alter their DB layer and replace a lot of the mySQL calls with Oracle calls and add a few. For example MySQL does not parse a statement prior to execution but Oracle does eg:
    $oraDB = oci_connect([parms]);
    $query = oci_parse($OraDB,'select 'a' from dual');
    // If you are binding variables it would go between the parse and execute areas and it is mostly the same as doing
    // it with MySQL
    oci_execute($query);
    $data = oci_fetch_assoc($query);The instant client and the full client do things very differently and connections to the DB server are done differently so you will need to understand those differences and code accordingly.
    The OCI_8 php libraries are well established and documented. They must be installed on the server on which Joomla is running.
    If your machine is setup correctly this is as simple as:
    %pecl install oci8
    pecl will take care of pretty much everything including dealing with 32 -v- 64 bit and all you need do is make an entry in the php extension section letting it know the OCI libraries are installed. If not it is a bit more complicated.
    The software along with the instructions ca be found here: http://pecl.php.net/package/oci8
    You must have either the instant client or the regular Oracle client installed on the server on which Joomla is running.
    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
    After you accept the license agreement click on "See All" and you will see both the instant client and the full client for the version you require.
    It is extremely un-wise to attempt to run any version of oracle on the machine running joomla / Apache. If you do so, then you stand a better then even chance of failure as Oracle does not like to share resources.
    Make sure you read the install instructions for the oracle client and pay very close attention to things like environment settings and permissions issues on the php server as these are some of the most common problems. Once the client is installed and the oci libraries are installed things should run very smoothly. The whole php to Oracle chain is very fast and the fact that the db server is remote from the web server will not be an issue as long as the links are fast.
    If you have problems get back to us and we will do the best we can to help you sort things out.
    - FG

  • Create Type as Object not working in linux oracle 11g

    Pleae refer to the following simple create type as object statement.
    CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER)
    It is working in oracle 11g and windows server 2008 environment.
    But it is not working in oracle 11g with linux environment.
    I am executing this statement as dynamic sql as follows
    CREATE OR REPLACE PROCEDURE TEMP_SP
    AS
    BEGIN
    DECLARE vcType VARCHAR2(30);
    BEGIN
    SELECT OBJECT_TYPE into vcType FROM USER_OBJECTS
    WHERE OBJECT_NAME='EC_VIEWABLETYPES' AND OBJECT_TYPE='TYPE';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER) ';
    COMMIT;
    RETURN;
    END;
    END;
    exec TEMP_SP
    please let me know what i am missing ?

    And error is:ORA-00600: internal error code, arguments: [kothc_uc_md5:lxerr], [], [], [], [], [], [], [], [], [], [], []
    ORA-06512: at "ATIPAGENT.TEMP_SP", line 10
    ORA-01403: no data found
    ORA-06512: at line 1
    ..Query:exec TEMP_SP...Previous Query:CREATE OR REPLACE PROCEDURE TEMP_SP AS BEGIN DECLARE vcType VARCHAR2(30); BEGIN
    SELECT OBJECT_TYPE into vcType FROM USER_OBJECTS
    WHERE OBJECT_NAME='EC_VIEWABLETYPES' AND OBJECT_TYPE='TYPE'; EXCEPTION WHEN NO_DATA_FOUND THEN
    EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE EC_VIEWABLETYPES as object ( CASE_TYPE_ID NUMBER) ';
    COMMIT;
    RETURN;
    END;
    END;

  • Oracle 11g B2B commandline utilities to manage trading partners, agreements

    Hi,
    I am working on Oracle 11g b2b server configured with ebMS messaging protocol. My host trading partner is having more number of remote trading partners and hence more agreements. I am exploring the possible means of automating the creation and deployment of trading partners, creation and deployment of agreements and updating some of the trading partners configuration through commanline utilities. Are there any commandline utilities available to do these activities as a self-service in Oracle 11g b2b server? I couldn't find the details in b2b user guide document. Hence I need help to identify this facility.
    Regards,
    Bps

    Hello Bps,
    In section 18 - B2B Command Line Tools, of Oracle B2B 11g user guide, it is mentioned that -
    Self-service APIs are not available in this release.and as far as I know these API's are still not released. Please contact Oracle Support to get formal confirmation about the date when it may be released. You may also ask for any workaround available.
    Please refer below link for all command line tools available -
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10229/scrpt_imp_exp_dep.htm#BABEACGI
    In 11g, all the commandline utilities are listed in single ant script, which is located at $SOA_HOME/bin/ant-b2b-util.xml file.
    Regards,
    Anuj

  • Starting BPEL when email received - Oracle 11g

    I'm trying to start a BPEL Process with the reception of an email.
    - I'm working with Oracle 11g
    - Usermessagingserver is installed and configured to the correct server and it's working, at least it shows received emails and it's able to send emails from a BPEL process
    In the BPEL that has been done to start with the reception of an email I have the following:
    <partnerLink myRole="Consume_Message_role" name="Inbound" partnerLinkType="ns1:Consume_Message_plt"/>
    Inbound_jms.jca has the following configuration:
    <adapter-config name="Inbound" adapter="Jms Adapter" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/wls/Queue" UIConnectionName="soa-server" UIJmsProvider="WLSJMS" adapterRef=""/>
    <endpoint-activation portType="Consume_Message_ptt" operation="Consume_Message">
    <activation-spec className="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec">
    <property name="DestinationName" value="OraSDPM/Queues/OraSDPMEngineRcvQ1"/>
    <property name="UseMessageListener" value="true"/>
    <property name="PayloadType" value="BytesMessage"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    When usermessagingserver receives an email message, the BPEL doesn’t start and I get this message in the log:
    PM oracle.sdpinternal.messaging.EngineReceivingCoreBean processMessageCommon
    WARNING: There is no application that has registered this address as an access point. Message will not be delivered.
    I have no idea how to configure an access point, I've only found how to De-register from Messaging Client Applications in the usermessagingserver.
    Found this documentation about registering access points, from an sample application of usermessaingserver in [http://download.oracle.com/docs/cd/E12839_01/doc.1111/e13807/ns_java_api.htm|http://download.oracle.com/docs/cd/E12839_01/doc.1111/e13807/ns_java_api.htm]
    but I cannot find where to download the example from the documentation.
    Any help appreciated.

    Does anyone has some input on this issue?
    I want to do the same thing, but I don't know how to...
    Thanks

  • Oracle 11G fusion middleware weblogic server

    Can anyone help me to know all about oracle 11G fusion middleware weblogic server.
    Please provide me soft stdy material links.
    prompt reply really appriciated.
    Regards
    Piku

    http://download.oracle.com/docs/cd/E17904_01/index.htm

  • ORACLE 11g win64 installation on Windows 7

    Hello,
    Could anyone help me in knowing whether the ORACLE 11G win64 is the right version to install on Windows 7?

    Hello,
    I need help with the installation of ORACLE 11g for installation on Windows 7 Win64. After I was almost finished with the installation, I got an error message saying that the following application (see below) can't be found in the folder:
    C:\Oracle\product\11.2.0\dbhome_1\owb\external\oc4j_applications\applications\WFMLRSVCApp.ear
    Does anyone know where to find this file? I am a student starting my class next week and trying to have everything ready before.
    Thanks so much for any help.
    Edited by: 855887 on May 1, 2011 3:55 PM

  • Install Oracle 11g RAC on Solaris 10

    Hello,
    I'm new joined DBA in my organization.
    There is a requirement from a client to install Oracle 11g RAC on Solaris 10 env.
    Can anybody please guide me with some doc or pdf for the steps.
    Till now, i've install Oracle 11g DB on Solaris, but i'm pretty new to RAC env.
    Note:
    I've to do installation via commands, No GUI.
    Thanks for your help.
    Regards,
    Gags

    Hi,
    Q) Can Oracle 11g Release 2 RAC be installed on Solaris (x86)??yes, you can Install it on Solaris X86
    Q) Can the links of Oracle RAC installation over Unix and Linux be taken as base?? As i haven't seen any doc for installing 11g RAC on Solaris, where as it was provided in Oracle 10g.yes, you need to consider Oracle RAC installation over Unix and Linux be taken as base as base document.
    http://download.oracle.com/docs/cd/E11882_01/install.112/e17214/toc.htm
    In addition Refer:
    http://www.oraclemasters.in/?p=963
    thanks,
    X A H E E R

  • The java error which i meet in the oracle 11g when i using jdm

    I have finish a java data mining program,it can work in oracle 10g.But now ,i  have to apply this program in oracle 11g.
    What should i do to make it still work in oracle 11g?
    The jar have been replaced with 11g's jar.But when i debug the program,the BuildTask's m_ programName is still "dmsys.build_program" and it should be "sys.build_program".
    Then when run to the executeTask,the Error occurred.
    **************the  error**********************************
    19:19:55,734 DEBUG AprioriExecuteUtil:248 - ---------------------------------------------------
    19:19:55,734 DEBUG AprioriExecuteUtil:249 - --- Build Model                                 ---
    19:19:55,734 DEBUG AprioriExecuteUtil:250 - ---------------------------------------------------
    19:21:52,328 ERROR AprioriExecuteUtil:114 - executeError:
    java.lang.ArrayIndexOutOfBoundsException: 0
      at oracle.dmt.jdm.task.OraBuildTask.mapJobArgs(OraBuildTask.java:410)
      at oracle.dmt.jdm.base.OraTask.retrieveObjectFromDatabase(OraTask.java:535)
      at oracle.dmt.jdm.base.OraTask.removeTaskContents(OraTask.java:229)
      at oracle.dmt.jdm.base.OraTask.removeObjectFromDatabase(OraTask.java:214)
      at oracle.dmt.jdm.resource.OraPersistanceManagerImpl.removeObject(OraPersistanceManagerImpl.java:297)
      at oracle.dmt.jdm.resource.OraConnection.removeObject(OraConnection.java:389)
      at oracle.dmt.jdm.OraMiningObject.saveObjectInDatabase(OraMiningObject.java:150)
      at oracle.dmt.jdm.resource.OraPersistanceManagerImpl.saveObject(OraPersistanceManagerImpl.java:245)
      at oracle.dmt.jdm.resource.OraConnection.saveObject(OraConnection.java:383)
      at com.hollycrm.hollysp.datanalysis.datamining.util.AprioriExecuteUtil.executeTask(AprioriExecuteUtil.java:324)
      at com.hollycrm.hollysp.datanalysis.datamining.util.AprioriExecuteUtil.buildModel(AprioriExecuteUtil.java:303)
      at com.hollycrm.hollysp.datanalysis.datamining.util.AprioriExecuteUtil.execute(AprioriExecuteUtil.java:108)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    So,if there someone know the reason,please tell me how to solve this error.Thank you!!!!

    Thanks for your response!
    The JDK version is 1.6.0_02.
    DB version is 11.2.0.1.0.
    This is the code.
    public class AprioriExecuteUtil {
      private static Logger logger=Logger.getLogger(AprioriExecuteUtil.class);
      * 连接数据库对象
      private static Connection m_dmeConn;
      private static ConnectionFactory m_dmeConnFactory;
      * 在进程中使用的工厂对象
      private static PhysicalDataSetFactory m_pdsFactory;
      private static PhysicalAttributeFactory m_paFactory;
      private static AssociationSettingsFactory m_assoFactory;
      private static RulesFilterFactory m_filterFactory;
      private static BuildTaskFactory m_buildFactory;
      * 全局常量
      private static DecimalFormat m_df = new DecimalFormat("##.####");
      * modelId:数据挖掘模型Id
      private String modelId = "";
      *<p>Title: execute</p>
      *<p>Description:执行数据挖掘,响应页面上的执行按钮</p>
      * @param @return 设定文件
      * @return  String 返回类型
      * @throws
      public String execute(){
      try{
      dataminingManager().updateModelById(modelId, "schedule", "10");
      dataminingManager().updateModelById(modelId, "startTime", DateUtil.getNow());
      dataminingManager().updateModelById(modelId, "endTime", "");
      dataminingManager().deleteModelRules(modelId,"TblSpModelRulesAr");
      m_dmeConnFactory = new OraConnectionFactory();
      ConnectionSpec connSpec = m_dmeConnFactory.getConnectionSpec();
      connSpec.setURI("jdbc:oracle:thin:@"+SystemParamUtil.getSystemParameValue("数据挖掘.数据库.地址"));
      connSpec.setName(SystemParamUtil.getSystemParameValue("数据挖掘.数据库.用户名"));
      connSpec.setPassword(SystemParamUtil.getSystemParameValue("数据挖掘.数据库.密码"));
      m_dmeConn = m_dmeConnFactory.getConnection(connSpec);
      clean();
      initFactories();
      prepareData();
      dataminingManager().updateModelById(modelId, "schedule","20");
      buildModel();
      dataminingManager().updateModelById(modelId, "schedule","100");
             dataminingManager().updateModelById(modelId, "endTime", DateUtil.getNow());
             clean();
      return null;
      }catch(Exception e) {
      logger.error("executeError:",e);
      return "error";
      finally {
      try {
      m_dmeConn.close();
      } catch(Exception e) {
      logger.error("closeConnectError:",e);
      return "error";
      *<p>Title: clean</p>
      *<p>Description:清理所有之前构造的临时表</p>
      * @param  设定文件
      * @return  void 返回类型
      * @throws
      public void clean(){
      java.sql.Connection dbConn = ((OraConnection)m_dmeConn).getDatabaseConnection();
         Statement stmt = null;
         try{
          stmt = dbConn.createStatement();
          StringBuffer sql = new StringBuffer("select object_name from dba_objects where object_type in('TABLE','VIEW') and object_name like '%DM$%' ");
          sql.append("and owner = '").append(SystemParamUtil.getSystemParameValue("数据挖掘.数据库.用户名")).append("'");
          logger.info(sql.toString());
          ResultSet rs = stmt.executeQuery(sql.toString());
          while(rs.next()){
          try{
          stmt.executeUpdate("DROP VIEW "+rs.getString("object_name"));
          }catch(SQLException e){}
         try{
          stmt.executeUpdate("DROP VIEW SALES_TRANS_CUST_V");
         } catch(SQLException e) {}
         try{
          stmt.executeUpdate("DROP VIEW SALES_TRANS_CUST_AR_V");
         } catch(SQLException e) {}
         try {
          m_dmeConn.removeObject("arModel_jdm", NamedObject.model );
         }catch(JDMException e) {}
         try {
          m_dmeConn.removeObject("arSettings_jdm", NamedObject.buildSettings );
         }catch(JDMException e) {}
         try {
          m_dmeConn.removeObject("arBuildData_jdm", NamedObject.physicalDataSet );
         }catch(JDMException e) {}
         try {
          m_dmeConn.removeObject("arBuildTask_jdm", NamedObject.task );
         }catch(JDMException e) {}
         }catch(SQLException e) {
          logger.error("cleanViewError:",e);
         }finally{
          try {
          stmt.close();
          }catch(Exception e){
          logger.error("closeConnectError:",e);
      *<p>Title: initFactories</p>
      *<p>Description:初始化挖掘使用的工厂</p>
      * @param @throws JDMException 设定文件
      * @return  void 返回类型
      * @throws
      public void initFactories() throws JDMException{
         m_pdsFactory = (PhysicalDataSetFactory)m_dmeConn.getFactory("javax.datamining.data.PhysicalDataSet");
         m_paFactory = (PhysicalAttributeFactory)m_dmeConn.getFactory("javax.datamining.data.PhysicalAttribute");
         m_assoFactory = (AssociationSettingsFactory)m_dmeConn.getFactory("javax.datamining.association.AssociationSettings");
         m_buildFactory = (BuildTaskFactory)m_dmeConn.getFactory("javax.datamining.task.BuildTask");
         m_filterFactory = (RulesFilterFactory)m_dmeConn.getFactory("javax.datamining.association.RulesFilter");
      *<p>Title: prepareData</p>
      *<p>Description:准备数据</p>
      * @param @throws Exception 设定文件
      * @return  void 返回类型
      * @throws
      public void prepareData() throws Exception{
      logger.debug("---------------------------------------------------");
      logger.debug("--- Prepare Data                                ---");
      logger.debug("---------------------------------------------------");
      this.createBuildData();
      this.executeColumnFormatTransformation();
      *<p>Title: createBuildData</p>
      *<p>Description:用之前选择的产品构造视图</p>
      * @param @throws Exception 设定文件
      * @return  void 返回类型
      * @throws
      public void createBuildData() throws Exception{
      logger.debug("Create build data view...");
      java.sql.Connection dbConn = ((OraConnection)m_dmeConn).getDatabaseConnection();
      PreparedStatement pStmt = null;
      String custProductTableName= SystemParamUtil.getSystemParameValue("数据挖掘.订购关系表.表名");
      TblSpDataMiningModel dataMiningmodel = dataminingManager().getDataMiningModel(modelId);
      StringBuffer createView = new StringBuffer("CREATE VIEW SALES_TRANS_CUST_V AS SELECT cp.user_no as USER_NO, cp.product_id as PRODUCT_ID, 1 has_it ");
      createView.append(" from ").append(custProductTableName).append(" cp ");
      createView.append(" where cp.area_code = '").append(dataMiningmodel.getArea()).append("' GROUP BY USER_NO, PRODUCT_ID");
      logger.debug(createView.toString());
      pStmt = dbConn.prepareStatement(createView.toString());
      pStmt.execute();
      public void executeColumnFormatTransformation() throws Exception{
      logger.debug("Execute column format transformation...");
      StringBuffer createNestedColumn = new StringBuffer("CREATE VIEW SALES_TRANS_CUST_AR_V as ");
      createNestedColumn.append(" SELECT D.USER_NO,CAST(MULTISET(SELECT DM_Nested_Numerical(C.PRODUCT_ID, has_it) FROM SALES_TRANS_CUST_V C ");
      createNestedColumn.append(" WHERE C.USER_NO = D.USER_NO) AS DM_Nested_Numericals) CUSTPRODS FROM SALES_TRANS_CUST_V D group by D.USER_NO");
      java.sql.Connection dbConn = ((OraConnection)m_dmeConn).getDatabaseConnection();
      PreparedStatement pStmt = null;
      logger.debug(createNestedColumn.toString());
      pStmt = dbConn.prepareStatement(createNestedColumn.toString());
      pStmt.execute();
      *<p>Title: buildModel</p>
      *<p>Description:建立模型</p>
      * @param @throws JDMException 设定文件
      * @return  void 返回类型
      * @throws
      public void buildModel() throws Exception{
      logger.debug("---------------------------------------------------");
      logger.debug("--- Build Model                                 ---");
      logger.debug("---------------------------------------------------");
      PhysicalDataSet buildData = m_pdsFactory.create( "SALES_TRANS_CUST_AR_V", false );
      PhysicalAttribute pa = m_paFactory.create("USER_NO", AttributeDataType.integerType, PhysicalAttributeRole.caseId );
      buildData.addAttribute(pa);
      m_dmeConn.saveObject("arBuildData_jdm", buildData, false );
      AssociationSettings buildSettings = m_assoFactory.create();
      //计算支持度和可信度以及最多分析多少个产品
      /*java.sql.Connection dbConn = ((OraConnection)m_dmeConn).getDatabaseConnection();
      PreparedStatement pStmt = null;
      String custProductTableName= SystemParamUtil.getSystemParameValue("数据挖掘.订购关系表.表名");
      TblSpDataMiningModel dataMiningModel = dataminingManager().getDataMiningModel(modelId);
      StringBuffer sql = new StringBuffer("select (trunc((count(*) /(count(distinct user_no) * count(distinct product_id))) * 50,2.2)) as destiny ");
      sql.append(" from ").append(custProductTableName).append(" cp ");
      sql.append(" where cp.area_desc = '").append(dataMiningModel.getArea()).append("'");
      logger.debug(sql.toString());
      pStmt = dbConn.prepareStatement(sql.toString());
      ResultSet res = pStmt.executeQuery();
      Float density = 0F;
      while(res.next()){
      density = res.getFloat("destiny");
      if(density!=0){
      buildSettings.setMinSupport(density);
      buildSettings.setMinConfidence(density);
      logger.debug("density = "+density);
      }else{
      buildSettings.setMinSupport(10f);
      buildSettings.setMinConfidence(10f);
      sql = new StringBuffer("select round(avg(COUNT(product_id))) as maxLength ");
      sql.append(" from ").append(custProductTableName).append(" cp ");
      sql.append(" where cp.area_desc = '").append(dataMiningModel.getArea()).append("' group by user_no ");
      logger.debug(sql.toString());
      pStmt = dbConn.prepareStatement(sql.toString());
      res = pStmt.executeQuery();
      int maxProductLength = 0;
      while(res.next()){
      maxProductLength = res.getInt("maxLength");
      if(maxProductLength != 0 && maxProductLength >= 2){
      buildSettings.setMaxRuleLength(maxProductLength);
      logger.debug("maxProductLength = "+maxProductLength);
      }else{
      buildSettings.setMaxRuleLength(3);
      logger.debug("maxProductLength = "+maxProductLength+" change to 3");
      buildSettings.setMinSupport(1);
      buildSettings.setMinConfidence(10);
      buildSettings.setMaxRuleLength(3);
      m_dmeConn.saveObject("arSettings_jdm", buildSettings, true );
      BuildTask buildTask = m_buildFactory.create("arBuildData_jdm","arSettings_jdm","arModel_jdm");
      buildTask.setDescription("arBuildTask_jdm" );
      executeTask(buildTask,"arBuildTask_jdm");
      AssociationModel model = (AssociationModel)m_dmeConn.retrieveObject("arModel_jdm", NamedObject.model);
      if(buildSettings == null){
      throw new Exception("Failure to restore build settings.");
      }else{
      displayAssociationRules( model );
      *<p>Title: executeTask</p>
      *<p>Description:执行任务</p>
      * @param @param taskObj
      * @param @param taskName
      * @param @return
      * @param @throws JDMException 设定文件
      * @return  boolean 返回类型
      * @throws
      public boolean executeTask(Task taskObj, String taskName) throws JDMException {
      boolean isTaskSuccess = false;
      m_dmeConn.saveObject(taskName, taskObj, true);
      ExecutionHandle execHandle = m_dmeConn.execute(taskName);
      logger.debug(taskName + " is started, please wait. ");
      ExecutionStatus status = execHandle.waitForCompletion(Integer.MAX_VALUE);   
      isTaskSuccess = status.getState().equals(ExecutionState.success);
      if( isTaskSuccess ) {
      logger.debug(taskName + " is successful.");
      } else {
      logger.debug(taskName + " is failed.\nFailure Description: " +
      status.getDescription() );
      return isTaskSuccess;
    247*******************the buildTask's m_programName is “dmsys.build_program” but it should be "sys.build_program" when i contact the 11g.I have tried many ways to compile the program,but it still can't be changed.
    270*******************m_dmeConn.saveObject(taskName, taskObj, true);
                                 the error:java.lang.ArrayIndexOutOfBoundsException: 0                                  
    If you  need the data table
    These are the sql :
    -- Create table
    create table TBL_MINING_CUST_HB
      mobile_tele_no        VARCHAR2(40),
      area                  VARCHAR2(4),
      user_dinner           VARCHAR2(200),
      re_flag               VARCHAR2(2),
      re_type               VARCHAR2(40),
      is_3gzd               VARCHAR2(2),
      arpu                  NUMBER,
      net_on_duration       NUMBER,
      if_ring               VARCHAR2(2),
      if_gprs               VARCHAR2(2),
      gprs_fee              NUMBER,
      if_gprs_free          VARCHAR2(2),
      if_gprs_pkg           VARCHAR2(2),
      sms_fee               NUMBER,
      if_sms_free           VARCHAR2(2),
      if_sms_pkg            VARCHAR2(2),
      mms_fee               NUMBER,
      if_mms_pkg            VARCHAR2(2),
      if_mms_free           VARCHAR2(2),
      sen_fee               NUMBER,
      sen_in_fee            NUMBER,
      sen_out_fee           NUMBER,
      sen_free              NUMBER,
      sen_fact              NUMBER,
      one_cnt_10010         NUMBER,
      three_cnt_10010       NUMBER,
      one_cancel_business   VARCHAR2(4000),
      three_cancel_business VARCHAR2(4000),
      sp                    VARCHAR2(4000)
    tablespace CSS_APP
      pctfree 10
      initrans 1
      maxtrans 255
      storage
        initial 64
        next 1
        minextents 1
        maxextents unlimited
    -- Add comments to the columns
    comment on column TBL_MINING_CUST_HB.mobile_tele_no
      is '电话号码';
    comment on column TBL_MINING_CUST_HB.area
      is '地市';
    comment on column TBL_MINING_CUST_HB.user_dinner
      is '用户套餐';
    comment on column TBL_MINING_CUST_HB.re_flag
      is '是否融合业务;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.re_type
      is '套餐类别;2G后付费、2GOCS、3G后付费、3GOCS';
    comment on column TBL_MINING_CUST_HB.is_3gzd
      is '是否为3G终端(1-是,0非)';
    comment on column TBL_MINING_CUST_HB.arpu
      is 'ARPU;单位:元';
    comment on column TBL_MINING_CUST_HB.net_on_duration
      is '在网时长;单位:月';
    comment on column TBL_MINING_CUST_HB.if_ring
      is '是否开通炫铃功能,1-是;0-否';
    comment on column TBL_MINING_CUST_HB.if_gprs
      is '是否开通GPRS功能,1-是;0-否';
    comment on column TBL_MINING_CUST_HB.gprs_fee
      is 'GPRS流量使用情况;单位: M';
    comment on column TBL_MINING_CUST_HB.if_gprs_free
      is '套餐内是否自带优惠或赠送流量;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.if_gprs_pkg
      is '是否定制优惠流量包;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.sms_fee
      is '短信使用情况;单位:条';
    comment on column TBL_MINING_CUST_HB.if_sms_free
      is '套餐内是否自带优惠或赠送短信;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.if_sms_pkg
      is '是否定制优惠短信包;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.mms_fee
      is '彩信使用情况;单位:条';
    comment on column TBL_MINING_CUST_HB.if_mms_pkg
      is '是否定制优惠彩信包;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.if_mms_free
      is '套餐内是否自带优惠或赠送彩信;1-是;0-否';
    comment on column TBL_MINING_CUST_HB.sen_fee
      is '本地长途合计分钟数;单位:分钟';
    comment on column TBL_MINING_CUST_HB.sen_in_fee
      is '本地长途省内长途;单位:分钟';
    comment on column TBL_MINING_CUST_HB.sen_out_fee
      is '本地长途省际长途;单位:分钟';
    comment on column TBL_MINING_CUST_HB.sen_free
      is '本地通话时长本地优惠分钟数;单位:分钟';
    comment on column TBL_MINING_CUST_HB.sen_fact
      is '本地通话时长实际使用分钟数:单位:分钟';
    comment on column TBL_MINING_CUST_HB.one_cnt_10010
      is '1月内拨打10010次数';
    comment on column TBL_MINING_CUST_HB.three_cnt_10010
      is '3月内拨打10010次数';
    comment on column TBL_MINING_CUST_HB.one_cancel_business
      is '1月内取消的增值业务';
    comment on column TBL_MINING_CUST_HB.three_cancel_business
      is '3月内取消的增值业务名称';
    comment on column TBL_MINING_CUST_HB.sp
      is '已开通的增值业务名称';
    -- Create table
    create table TBL_MINING_CUST_PRODUCT_HB
      product_name VARCHAR2(1000),
      product_id   VARCHAR2(40),
      user_no      NUMBER,
      area_code    VARCHAR2(8)
    tablespace CSS_APP
      pctfree 10
      initrans 1
      maxtrans 255
      storage
        initial 16
        next 1
        minextents 1
        maxextents unlimited
    -- Create/Recreate indexes
    create bitmap index IDX_PRODUCT_ID on TBL_MINING_CUST_PRODUCT_HB (PRODUCT_ID)
      tablespace CSS_APP
      pctfree 10
      initrans 2
      maxtrans 255
      storage
        initial 64K
        next 1M
        minextents 1
        maxextents unlimited
    create bitmap index IDX_USER_NO on TBL_MINING_CUST_PRODUCT_HB (USER_NO)
      tablespace CSS_APP
      pctfree 10
      initrans 2
      maxtrans 255
      storage
        initial 64K
        next 1M
        minextents 1
        maxextents unlimited
    -- Create table
    create table TBL_MINING_PRODUCT_HB
      product_name  VARCHAR2(1000),
      product_id    VARCHAR2(30) not null,
      coverage_rate NUMBER
    tablespace CSS_APP
      pctfree 10
      initrans 1
      maxtrans 255
      storage
        initial 16
        next 1
        minextents 1
        maxextents unlimited
    -- Add comments to the columns
    comment on column TBL_MINING_PRODUCT_HB.product_name
      is '产品名称';
    comment on column TBL_MINING_PRODUCT_HB.product_id
      is '产品ID';
    comment on column TBL_MINING_PRODUCT_HB.coverage_rate
      is '产品覆盖率=某一个产品的购买总数/所有产品的购买总数';
    -- Create/Recreate primary, unique and foreign key constraints
    alter table TBL_MINING_PRODUCT_HB
      add constraint PK_PRODUCT_ID primary key (PRODUCT_ID)
      using index
      tablespace CSS_APP
      pctfree 10
      initrans 2
      maxtrans 255
      storage
        initial 64K
        next 1M
        minextents 1
        maxextents unlimited
    Thanks!

Maybe you are looking for

  • How do I set the window size of a course in SumTotal (LMS)

    I recently created an AICC course using Captivate 5.5 for a client using SumTotal as their LMS. When the client loads the course, the course launchs in a window that is smaller than the course itself; the user then has to adjust the window size to vi

  • UPDATE of column in parent only UPDATEs first row in DENORMALIZED child table

    In the Repositiry in Designer 6i, I denormalized DESC1 column to pull the value of DESC1 in the parent table. The child table has four (4) records with matching foreign keys. When I go into my Form and update DESC1 in the parent, only the first of th

  • BP search for General and Company Code roles

    Hi On the modify Money Market Transactions (TM_52) (and some similar to it for other products TS02, TM32, TO02), if i go to the Partner Assignment Tab and I try to assign a bp for the General or the Company Code roles, the bp search program give me n

  • Create Userexit for MD01for particular material group

    Dear all, My requirement is : To execute MRP run for particular Material Group only. I create new userexit key by using OMIX  like  500. after that  in EXIT_SAPMM61X_001 -  double click in zxm61u01 and create object and write code, but it is not fire

  • SOAP_CHANNEL_NOT_ACTIVATED in Message Monitoring

    I am getting SOAP_CHANNEL_NOT_ACTIVATED error while i am doing in Message monitoring of RWB .Let me know the proper solution for the same