Problems creating BC4J package in JDeveloper

I am using the JDeveloper Business Components Package Wizard with 9i Lite. I am trying to create a BC4J package for the DEPARTMENTS table in the HR schema. I get an error: "No primary key attributes and does not support ROWID." I have checked the DEPARTMENTS table & it does indeed have a primary key. I suspect 9i Lite is the problem. Any clues?

You might want to complete the BC4J Tutorial in the Developer's Guide for Web-to-Go, Chapter 6 before you try on a custom application. Yes, every base table must have a PK using 5.0.2 onwards.

Similar Messages

  • Creating BC4J Package in Jdev 10g ( EBS R12)

    According to the tutorial attached with Jdev 10g, In order to create BC4J package for Client (UI) Object, you have to right client and select New Business Components Package....from the contact menu. But in Jdev 10g, I do not see that option. How do I create the BC4J package for Client (UI) Object ?

    OA Framework Forum would be a better place to ask.
    At any rate, I know that the developer's guide for OA Framework hasn't really been updated for R12, and that a lot of the instructions are a bit difficult to follow due to the change from JDev 9i to 10g.
    But, try the OA Framework Forum.
    John

  • Problems creating Struts ActionForm in JDeveloper 9.0.3.3

    I am very new to JDeveloper, where recently i am learning on how to use the struts technology. The problem occurs when i right-click the project file at the navigator and i choose NEW then at the Web-Tier i choose Struts, and at the item columns i choose ActionForm. The thing is the dialog doesnt prompt and it goes back to the main Window. What's the problem? Any patches that i need to upgrade? I use JDeveloper 9.0.3.3 is because my company doesnt want to migrate to 10g for the time being. So, I have limitation in using 10g instead.
    Regards,
    RoLand
    Java Developer

    Hi Roland.
    Yes, you are right. This does not seem to be working in the 9.0.3.x code base. I checked the 9.0.3.4 release and all the available patches and I don't see it as being fixed.
    It is working in the 9.0.4.x release though and that is not 10g... Would that work for you?
    Alternatively, you can could the action form class manually. Check out the 9.0.4 release on OTN to see what is generating and replicate that your 9.0.3.x product.
    Hope that helps.
    Pete

  • Problem in generate Java  from PL SQL package in Jdeveloper

    Hi
    i have problem in create java class from PL SQL package in JDeveloper.
    I use Database navigator of jdeveloper and right click on a package and choose Generate Java then in Jpublisher window choose my view Controller and accept other default values.
    I call methods of generated class in the Action of a button in my JSP page, but when I click the button it  throw null pointer exception !!! i fund one of generated method return null and it lead to this exception.
    protected DefaultContext __tx = null;
    public DefaultContext getConnectionContext() throws SQLException  {
    if (__tx==null){
    __tx = (getConnection()==null) ? DefaultContext.getDefaultContext() : new DefaultContext(getConnection());
        return __tx;
      public Connection getConnection() throws SQLException
        if (__onn!=null) return __onn;
         else if (__tx!=null) return __tx.getConnection();
         else if (__dataSource!=null) __onn= __dataSource.getConnection();
         return __onn;
    i try to generate class in Model project and create DataControl for that and use method action but noting change and i get null pointer again!!
    Jdeveloper Versino = 11.1.1.7.0

    Let me ask you another question: Why do you generate java from the package at all?
    Where do you want to call the package?
    Back to your question: you should see code like
        public void setDataSourceLocation(String dataSourceLocation) throws SQLException {
            javax.sql.DataSource dataSource;
            try {
                Class cls = Class.forName("javax.naming.InitialContext");
                Object ctx = cls.newInstance();
                java.lang.reflect.Method meth = cls.getMethod("lookup", new Class[] { String.class });
                dataSource = (javax.sql.DataSource) meth.invoke(ctx, new Object[] { "java:comp/env/" + dataSourceLocation });
                setDataSource(dataSource);
            } catch (Exception e) {
                throw new java.sql.SQLException("Error initializing DataSource at " + dataSourceLocation + ": " + e.getMessage());
    in the generated code. This code look up a datasource (which you have defined e.g. on the Weblogic Server) by calling the method
    setDataSourceLocaltion("jdbc/HRConnDS");
    This look up the datasource nad stores it in the class variable.
    Timo

  • How to create the BC4J Package in JDev 10g (with OAF)?

    Hi everbody.
    in JDeveloper 10.1.3.1.0
    How to create the BC4J Package for Client Object or Server Object?
    In JDeveloper 9i Ext,
    1. select the Project in Navigator
    2. right-click and select "New Business Components Package... " from the context menu
    3. "Business Component Package Wizard" page appears.
    In JDeveloper 10, I cannot find "New Business Components Package..." from the context menu on the Project.

    Do you have the OA extension installed ?
    If not then please follow the thread Oracle JDev 10g with OAExt for Release 12 now on Metalink
    for more information in this regard.
    --Saroj                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Creating Web services using JDeveloper for Pl/SQL package having ref cursor

    Hi,
    I am trying to create web services for PL/SQL package in JDeveloper. When I am trying to create this web service, the functions in the package which is returning referential cursor or record cursor are not visible. When I highlight the function and click "Why Not?", it displays the message "The following types used by the program unit do not have an XML schema mapping and/or serializer Specified: REF CURSOR". Could you please let me know, how I can create this web service?
    I am getting similar error when I am trying to create web service for a package with overloaded functions also.
    Thanks,

    Ok so I played around with this some more. I created the same process in bpel using oracle bpel designer and here are the results.
    1. Against 10g database running a synch process data is retutned without error.
    2. Against 9i database running an asynch process data is retutned without error.
    3. Against 9i database running a synch process data is retutned with error.
    I'm definilty missing something.

  • How to Create Server BC4J Package in OAF 10.1.3.3.0.3

    Hi all,
    Can any one help me out in getting clear about creating Server BC4J package in OAF 10.1.3.3.0.3,
    as in 9i we right click onproject.jpr file & click on new business componant package.but in 10.1.3.3.0.3 version there no option kindly help me out

    Hi,
    Seems you are new to forums. Pls close the thread if your question is answered by mentioning which reply is helpful or correct.
    Refer http://forums.oracle.com/forums/ann.jspa?annID=914
    -Anand

  • Oracle: Problem creating package via CF

    G'day
    I've got a <cfquery> that creates a package header,
    another that creates
    the body, and then a <cfstoredproc> which calls one of
    the procedures in
    the package.
    I am getting this error, when my code comes to execute the
    procedure:
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1,
    column 7:
    PLS-00905: object myDB.myPkg is invalid ORA-06550: line 1,
    column 7:
    PL/SQL: Statement ignored
    However if I go into Oracle SQL Developer, and examine the
    package, it's
    all present and accounted for, and indeed works fine.
    If I manually recompile the package, I get no errors
    (right-click > compile
    on both the header and the body).
    If having manually recompiled the package, I re-execute my
    <cfstoredproc>
    call, it works fine.
    If I re-run the process, and the simply recompile the header
    before trying
    the <cfstoredproc>, I get this error:
    [Macromedia][Oracle JDBC Driver][Oracle]ORA-04068: existing
    state of
    packages has been discarded ORA-04063: package body
    "myDB.myPkg" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at
    line 1
    If I then recompile the body too, and then call my
    <cfstoredproc>, it all
    runs fine.
    I have added the following two addition <cfquery> calls
    after my first two:
    <cfquery name="qTemp" datasource="#dsn#">
    alter package pkg_tree compile package
    </cfquery>
    <cfquery name="qTemp" datasource="#dsn#">
    alter package pkg_tree compile body
    </cfquery>
    And they execute fine, but do not affect the results (ie: I
    still get the
    same erroing behaviour).
    If I copy and paste my <cfquery> code into Oracle SQL
    Developer and execute
    it, it all works fine.
    Anyone encountered this before, and know what I'm doing wrong
    (or what -
    additionally - I need to do to complete the job)?
    Cheers for any thoughts.
    Adam

    PS: The user I am using to connect to the DB is the same one
    whether via CF
    or Oracle SQL Developer, in both cases, and said user has
    full DBA
    priveleges.
    Adam

  • Wsdlc Ant Task - Problem creating java files in the correct package

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

  • Problem creating packages

    hi...
    i'm trying to create a package so that i can access the members of other classes. How ever after putting the package keyword on top of each file etc:
    package gui;
    i still can't access the other files. do i have to make it a jar file. if i don..how should i do it...thanks...

    no u dont need a jar file to have a package
    put all your package files into a folder called the name of the package
    then import them as you need with import packagename.*if you just want to use the classes without a package just do
    classname x = new classname();
    x.whatever_method_you_want();

  • Problem creating jar using JDeveloper

    I'm creating jar using JDeveloper..I need to keep two dll files in the jar. But if I create the jar in JDeveloper, it can't include the dll files. If the jar is created from command prompt, it can include the dll files. Can anyone tell me how can I include these dlls in my jar?

    Putting DLLs in your classes directory is dangerous (eg. Run->Clean Project.jpr will remove it). I use a different way to achieve that:
    When you double click on the deployment profile you'll see a dialog window containing a list of items. The one of interest is the one called File Groups. Select this item, click on the New button and add a new file group just for your DLLs.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can not see the menu of New Business Components Package in jdeveloper

    I am just follow the developer guide.
    and when I create the Business Components Package, the guide said that
    ========================================
    In the JDeveloper Navigator, select the OA Project where you want to create your package.
    From the main menu, choose File > New to open the New Object Gallery.
    In the Categories tree, expand the Business Tier node, and select Business Components (BC4J).
    In the Items list, select Business Components Package to open the Business Components Package Wizard. You can also right-click on the OA Project and select New Business Components Package to navigate directly to the Business Components Package Wizard.
    =====================================
    In fact I can not see the menu about Business Components (BC4J) in the File/new/buisness tier/Business Components (BC4J).
    I can only see the File/new/buisness tier/ADF Business Components.
    And can not find the "Business Components Package" under ADF Business Components either.
    I am using the JDev Extension for OA (p5856648_R12_GENERIC.zip) and EBS 12.0.0.
    And I create an OA Workspace and OA Project.
    can anyone help?

    James,
    Use search facility on forum. Chk thread Re: OAF Toolbox Tutorial Help - Search
    --Shiv                                                                                                                                                                                                                                                                       

  • Problem  with BC4J in 10g: incorrect Date formatting

    I have PL/SQL procedure, which is called from bc4j-struts-application like this:
    CallableStatement cs = getDBTransaction().createCallableStatement(FIND_USER_RESP_STMT,0);
    cs.execute();
    It return an exeption with this message:
    ORA-01403: no data found
    ORA-06512: at "CRN.CRN_UTIL", line 115
    ORA-06512: at "CRN.CRN_UTIL", line 323
    ORA-06512: at "CRN.CRN_RESPONSIBILITY", line 85
    ORA-01843: not a valid month
    ORA-06512: at line 1
    I don't send any data parameter for this procedure. When I try to call it from JDeveloper connections debug, it runs succesfully. I try to create bc4j entity to query:
    select to_char(sysdate, 'DD-MON-YYYY') X,
    to_char(sysdate, 'DD-MM-YYYY') Y from dual
    and it retrieves:
    27-¿¿¿-2004
    27-09-2004
    Date constant is used in PL/SQL procedure with format 'DD-MON_YYYY', but I can't change it, because it used by many other applications.
    My local setting is english, USA, and I have the second language on my PC - russian.
    JDeveloper 9.0.5.2. This code runs succesfully in JDeveloper 9.0.3.3.
    How can I send bc4j date setting in normal format to solve this problem? And where can I find bc4j local settings, which are sended by bc4j to server?
    Regards, Nikolay

    Hello,
    The problem is still available. Could anybody help?
    Regard

  • Urgent!!! problems deploying BC4J to Oracle 8i

    I have the following problem deploying BC4J to Oracle 8i as EJB :
    When I tried to deploy as an EJB following the guidelines in the following help page:
    Contents help--> Developing Business Components-->Deploying Business Components-->Creating Deployment Profiles and Deploying
    I get the following error :
    An exception occurred during code generation: Class not found: bc4jEjbtrial.common.ejb.DeptAppModHome.class
    *** Errors occurred while deploying the EJB to JServer ***
    Could someone please tell me where I am possibly going wrong?

    What version of jdev are you running? The Bc4jtrial package sounds suspicious.
    Thanks
    Blaise

  • PLS-00801: Internal Error - Compiling Package in JDeveloper

    I am trying to compile a package in JDeveloper so that I will be able to debug it. The issue is that the whenever I compile it I get a back an PLS-00801: Internal Error.
    What is really strange is that when I compile it using sqlplus - the package comes back fine without any problems.
    The package is approximately 5400 lines, contains UTF8 characters (I turned on UTF8 encoding in order to get the package to show correctly [found that one on this site - thank you]). It contains approx 15 methods, lost of cursors, ...
    I am using the following version of JDeveloper.
    Version 9.0.4.0 (Build 1419)
    Oracle IDE: 9.0.4.13.2
    UML Modelers Vers: 9.0.4.12.69
    JMIG Framework: 9.0.4.3.75
    SCM Support Version: 9.0.4.12.69
    Business Components: 9.0.4.13.79
    Java Version: 1.4.2_03
    Java Home: c:\Programs\JDev9i\jdk\jre
    Any help would be greatly appreciated - even pointing me in the direction of the logs to see if I can track down why I am getting this error.
    Thank you
    Marc Padberg

    Okay -
    I broke down the PL/SQL package and figured out what was causing the internal error - it was a parameter that was based on ROWTYPE of a cursor.
    Whenever I have a CURSOR%ROWTYPE as a parameter I get an internal error in JDeveloper.
    Any help to resolve this would be greatly appreciated.
    I wrote a small sample package using dual that simulates this.
    CREATE OR REPLACE PACKAGE sample_problem IS
    PROCEDURE call_internal_method;
    END sample_problem;
    CREATE OR REPLACE PACKAGE BODY sample_problem IS
    CURSOR get_data IS
    SELECT 'Test' as NAME FROM dual;
    -- I have to comment this method out
    -- in order to compile in JDeveloper
    PROCEDURE internal_method_with(p_rec get_data%ROWTYPE)
    IS
    BEGIN
    DBMS_OUTPUT.put_line(p_rec.NAME);
    END internal_method_with;
    PROCEDURE internal_method_without
    IS
    BEGIN
    DBMS_OUTPUT.put_line('No Rowtype Passed');
    END internal_method_without;
    PROCEDURE call_internal_method
    IS
    lrec_get_data get_data%ROWTYPE;
    BEGIN
    OPEN get_data;
    FETCH get_data INTO lrec_get_data;
    CLOSE get_data;
    -- I have to comment this method out
    -- in order to compile in JDeveloper
    internal_method_with(lrec_get_data);
    internal_method_without;
    END call_internal_method;
    END sample_problem;
    /

Maybe you are looking for