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

Similar Messages

  • Problema ao executar create package via C#

    Estou tentando executar create or replace packgae via C# através do command. Consigo executar normalmente, vou no oracle e o metadata se encontra atualizado. Porém quando executo a package via oracle ela está desatualizada. Alguém saberia dizer qual o motivo? E como posso resolver esse problema?

    Olá, boa tarde.
    É o mesmo usuário que você cria via C# e que você tenta executar via Oracle?
    Poderia enviar a chamada da execução da package de dentro do Oracle?
    Tentou executar a Package via C#?
    No aguardo, espero conseguir ajudar.
    Abraços
    capin

  • Problem importing packages via ICE??

    Hello,
    I am running Portal 6.0 on Windows Server. For one of the business package that is to be implemented in my Portal, i have to deploy two files as a pre-requisite that are associated with SAP Note 660777(https://service.sap.com/sap/support/notes/660777). I have imported the "com.sap.pct.crm.kmconfig40.par" file but having problems deploying "fullupdate_completeBP602.zip". I must admit that i haven't got much idea about importing packages via ICE as i have never used it before.
    I tried to import it via, Portal->System Administration->System Configuration. In there, Actions->Import. When i point to the "fullupdate_completeBP602.zip" file and say Preview, i get a error message saying "Enter a valid configuration archive name". Isn't this the right way to import this package? Please guide. Thanks.
    Regards,

    I suggest you also ask in the KM forum about ICE. There is also some information in the SAP help pages about ICE. For example an overview of it can be found
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/63/42aa17425c514f85ad5ecd45988509/frameset.htm">here</a>
    Cheers

  • Package Error when create package via Methods onTables

    Even though I am an APEX developer for 3 years, I just found out about Methods on Tables Utility in SQL Workshop from Dan McGhan's demo. I tried to create a package for about 7 tables in one package. When the package was created, it was invalid. I tried to compile it and it produced several errors. I noticed that the UPDATE table procedure was incomplete as it did not provide parameters even though the procedure uses them.
    I was able to replicate it in APEX.ORACLE.COM.
    WORKSPACE: RGWORK
    PACKAGE: CSRSR_DML
    USER : TESTER
    Password: test123
    Is this a bug? Is there a workaround? Did anyone else experience similar outcome?
    APEX 4.1
    Oracle 10g Rel 2
    Robert
    http://apexjscss.blogspot.com

    sect55 wrote:
    Come on APEX team and gurus, please help....As far as this "guru" is concerned, it's not something I'd ever use:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:672724700346558185
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:25405782527721
    Given Tom's well-known opposition to this approach, I was more than a little surprised when this appeared in APEX as he also appears to have close links to the APEX team. I'd really rather have seen development effort invested elsewhere.
    I'd definitely advocate building applications based on PL/SQL APIs, just not on table-centric, row-by-row ones...
    I tried to create a package for about 7 tables in one package.Why?
    One of the main purposes of packages is to modularize an application. Sticking methods for all of the entities in one package defeats this and makes development, testing and maintenance harder. If you must use the flawed TAPI concept, create a separate API for each table&mdash;at most only combine those where there exist mandatory dependencies, e.g. an <tt>order</tt> package with methods for <tt>orders</tt> and <tt>order_items</tt>.
    As to the immediate problem, it appears to be due to the lack of primary key definitions on some of your tables. This means the generator is unable to identify which columns to use as unique row identifiers.

  • 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();

  • Problems creating package...

    Hi..
    I've really gone bonkers breaking my head over this package related problem.. Wd greatly appreciate if someone can help me out.
    Here is the code:
    //Test1.java
    //location: c:\mydir\jawa\examples\fd
    package jawa.examples.fd;
    public class Test1
    Test1()
    System.out.println("Inside constructor..");
    void method1Test1()
    System.out.println("Inside method1Test1.");
    public static void main(String[] args)
    Test1 t1 = new Test1();
    t1.method1Test1();
    System.out.println("Inside main of Test1.");
    Quite simple, this code works fine as long as I introduce the package statement.. It compiles fine, but at runtime it throws a bunch of errors:
    C:\mydir\Jawa\Examples\Fd>javac Test1.java
    C:\mydir\Jawa\Examples\Fd>java Test1
    Exception in thread "main" java.lang.NoClassDefFoundError: Test1 (wrong name: jawa/examples/fd/Test1)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    C:\mydir\Jawa\Examples\Fd>java -classpath c:\mydir Test1
    Exception in thread "main" java.lang.NoClassDefFoundError: Test1
    Don't know why it fails to recognize Test1.class file sitting under c:\mydir\jawa\examples\fd..
    However, it does run fine from C:\mydir
    C:\mydir>java jawa.examples.fd.Test1
    Inside constructor..
    Inside method1Test1.
    Inside main of Test1.
    Any idea what's happening and why I'm facing this problem? I'm running jdk1.4.2, i also have Oracle9i installed, guess it has jdk1.3.1 bundled in it.. I don't see classpath in the list of environment variables..
    Thanks in advance!!

    Sorry, I tried to answer without reading all the way through.
    The JVM does recognize the class file. This command
    C:\mydir\Jawa\Examples\Fd>java Test1
    tries to run Test1.class and discovers that the package is wrong. The JVM gives you an error to that effect. This is the way packages work. Maybe I don't understand your question.

  • Problem creating Packages (QT).

    Well, i've installed ati-drivers. Now, it happens that ATI installs /usr/X11R6/lib/libGL.so.1
    I once had to remove the file to be able ot install ati-drivers, and actually didn't know how many problems this will cause.
    Now, when i compile any qt-package, it depends on ati-drivers, since QT seems to need this file.
    My question is now: Which package originally owns this file? Why can't i ever get any information about which file is owned by which package? (pacman -o?).
    I'd be glad about any help. It seems as if it's not mesa (since i havn't got mesa installed). I re-installed xorg, this also wasn't the originator of the file.
    Any suggestions?
    // STi

    Just make it depend on x-server, that one includes the opengl. If it's a QT app: don't mind adding it, QT already has it as dependency and namcap doesn't support virtual packages further down the dependency tree.

  • Problem creating package structure and where is my .class file??????

    Working on Tomcat I have my folder structure like this...
    webapps
    ->app_root
    ->WEB-INF
    ->classes
    ->src
    -> .java files
    ->META_INF
    In the command prompt i compile using this
    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java
    and in my java files I have the package structure mentioned as
    package com.acme;
    after compiling i expected this to happen for me.
    webapps
    ->app_root
    ->WEB-INF
    ->classes (in WEB-INF)
    ->com (in classes)
    ->acme (in com)
    -> .class files (in acme)
    ->src (in WEB-INF)
    -> .java files(In src)
    ->META_INF
    The funiest part for me started he when i compiled the file
    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\one.java
    It compiled successfully without giving me any error but no package structure was created and THERE IS NO one.class file anywhere in my system.....Then how did it compile my file and where is the .class file.
    I think am worng somewhere but unable to locate it.
    Can somebody pull me out of thiss stuf??? Need to do it fast.
    Thanx.

    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java
    The command you posted does not have a source file specification. You are telling the compiler to put the .class files in src\*.java but you are not specifying any .java files. It looks like your command should be javac -d . src\*.java

  • Problems creating packaged .h files with javah -jni

    I have all of my .java and .class files in package ClassLib.Satrack.
    My directory structure is C:/SatrackIIP/NavComponent/ClassLib/Satrack.
    I compiled all java files by calling javac ClassLib/Satrack/*.java from NavComponent directory. Then still from NavComponent directory, I call javah -jni ClassLib/Satrack/TrajectoryGenerator. However I am getting an error message:
    Error: Class ClassLib/Satrack/TrajectoryGenerator could not be found.
    Why am I getting this error?

    Fixed it. I should be calling javah -jni ClassLib.Satrack.TrajectoryGenerator and not using dashes in between.

  • Problem with oracle packages CREATE PACKAGE some packagename in MaxDB

    Hi All,
    I am having Problems in Creating Packages from MaxDB ..Does MaxDB supports the CREATE PACKAGE <some packagename>concept ? if so please help me how to achieve in creating packages ..
    My sample Oracle package Creation is as follows:
    CREATE OR REPLACE PACKAGE BODY acs
    AS
      FUNCTION add_user (
        user_id     IN users.user_id%TYPE DEFAULT NULL,
        object_type     IN acs_objects.object_type%TYPE DEFAULT 'user',
        creation_date   IN acs_objects.creation_date%TYPE DEFAULT sysdate,
        creation_user   IN acs_objects.creation_user%TYPE DEFAULT NULL,
        creation_ip     IN acs_objects.creation_ip%TYPE DEFAULT NULL,
      ) RETURN users.user_id%TYPE
      IS
        v_user_id       users.user_id%TYPE;
        v_rel_id        membership_rels.rel_id%TYPE;
      BEGIN
        v_user_id := acs_user.new (user_id, object_type, creation_date,
                    creation_user, creation_ip, email, ...
        RETURN v_user_id;
      END;
    END acs;
    show errors Can you Please Explain me how to write the same Package in MaxDB?
    Thanks & Regards,
    Shanmukh
    Edited by: shanmukh babu on May 16, 2008 10:11 AM

    Hi Shanmukh,
    MaxDB does not have packages like you'll find them in Oracle.
    But you can define your own functions and procedures.
    From the code-example you posted, I would say that a procedure will do it ...
    I suggest that you first read the documentation on procedures [CREATE DBPROC Statement|http://maxdb.sap.com/doc/7_6/a7/41ee11605911d3a98800a0c9449261/frameset.htm]
    There you'll also find an example in the Tutorial section.
    Be aware that the procedural capabilities of MaxDB are far less enlarged as in Oracle - but they do exist and work in their realm.
    So porting a full PL/SQL application layer to MaxDB procedures may turn out to be quite difficult and/or not the best choice at all.
    KR Lars

  • Problem creating Network ACL for a ROLE in Oracle 11gR2

    According to Oracle Documentation when you create a new Network ACL you can add privileges to a user or role.  I need to create a new ACL for the UTL_SMTP package for a specific role, but when I granted it the users who have that role are still getting the "ORA-24247: network access denied by access control list (ACL)" error when they try to send an email.  If I grant the ACL privilege to the same users directly it works fine.  Is there any step I'm missing?  This is the test I have made on my Solaris 10 - Oracle 11gR2 (11.2.0.3) Standard Edition server:
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 21 09:31:52 2013
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    SQL> CONNECT system/******@testdb
    Connected.
    SQL> SET LINES 1000
    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> COLUMN host FORMAT A20
    SQL> COLUMN lower_port FORMAT 99999
    SQL> COLUMN upper_port FORMAT 99999
    SQL> COLUMN acl FORMAT A40
    SQL> COLUMN acl FORMAT A40
    SQL> COLUMN principal FORMAT A15
    SQL> COLUMN privilege FORMAT A10
    SQL> COLUMN is_grant FORMAT A8
    SQL> COLUMN status FORMAT A10
    SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
    no rows selected
    SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
    no rows selected
    SQL> CREATE USER testacl IDENTIFIED BY testacl;
    User created.
    SQL> GRANT CONNECT TO testacl;
    Grant succeeded.
    SQL>
    SQL> BEGIN
      2     dbms_network_acl_admin.create_acl('test_smtp.xml','TEST SMTP ACL','TESTACL',true,'connect');
      3     dbms_network_acl_admin.assign_acl('test_smtp.xml','localhost',25);
      4     commit;
      5  END;
      6  /
    PL/SQL procedure successfully completed.
    SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
    HOST                 LOWER_PORT UPPER_PORT ACL
    localhost                    25         25 /sys/acls/test_smtp.xml
    SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
    ACL                                      PRINCIPAL       PRIVILEGE  IS_GRANT
    /sys/acls/test_smtp.xml                  TESTACL         connect    true
    After creating this ACL I test it like this:
    SQL> CONNECT testacl/testacl@testdb
    Connected.
    SQL> SELECT host, lower_port, upper_port, privilege, status FROM user_network_acl_privileges;
    HOST                 LOWER_PORT UPPER_PORT PRIVILEGE  STATUS
    localhost                    25         25 connect    GRANTED
    SQL> DECLARE
      2     c utl_smtp.connection;
      3  BEGIN
      4     c := utl_smtp.open_connection('localhost', 25); -- SMTP on port 25
      5     utl_smtp.helo(c, 'localhost');
      6     utl_smtp.mail(c, 'Oracle11.2');
      7     utl_smtp.rcpt(c, '[email protected]');
      8     utl_smtp.data(c,'From: Oracle'||utl_tcp.crlf||'To: [email protected]'||utl_tcp.crlf||'Subject: UTL_SMTP TEST'||utl_tcp.crlf||'');
      9     utl_smtp.quit(c);
    10  END;
    11  /
    PL/SQL procedure successfully completed.
    SQL>
    This works fine and I receive the email correctly.  Now if I try to do the same thing for a role:
    SQL> CONNECT system/******@testdb
    Connected.
    SQL> BEGIN
      2     dbms_network_acl_admin.drop_acl('test_smtp.xml');
      3     commit;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
    no rows selected
    SQL> CREATE ROLE testacl_role;
    Role created.
    SQL> GRANT testacl_role TO testacl;
    Grant succeeded.
    SQL> ALTER USER testacl DEFAULT ROLE ALL;
    User altered.
    SQL>
    SQL> BEGIN
      2     dbms_network_acl_admin.create_acl('test_smtp.xml','TEST SMTP ACL','TESTACL_ROLE',true,'connect');
      3     dbms_network_acl_admin.assign_acl('test_smtp.xml','localhost',25);
      4     commit;
      5  END;
      6  /
    PL/SQL procedure successfully completed.
    SQL> SELECT host, lower_port, upper_port, acl FROM dba_network_acls;
    HOST                 LOWER_PORT UPPER_PORT ACL
    localhost                    25         25 /sys/acls/test_smtp.xml
    SQL> SELECT acl,principal,privilege,is_grant FROM dba_network_acl_privileges;
    ACL                                      PRINCIPAL       PRIVILEGE  IS_GRANT
    /sys/acls/test_smtp.xml                  TESTACL_ROLE    connect    true
    SQL>
    And now I test it again with the same user:
    SQL> CONNECT testacl/testacl@testdb
    Connected.
    SQL>
    SQL> SELECT host, lower_port, upper_port, privilege, status FROM user_network_acl_privileges;
    no rows selected
    SQL> DECLARE
      2     c utl_smtp.connection;
      3  BEGIN
      4     c := utl_smtp.open_connection('localhost', 25); -- SMTP on port 25
      5     utl_smtp.helo(c, 'localhost');
      6     utl_smtp.mail(c, 'Oracle11.2');
      7     utl_smtp.rcpt(c, '[email protected]');
      8     utl_smtp.data(c,'From: Oracle'||utl_tcp.crlf||'To: [email protected]'||utl_tcp.crlf||'Subject: UTL_SMTP TEST'||utl_tcp.crlf||'');
      9     utl_smtp.quit(c);
    10  END;
    11  /
    DECLARE
    ERROR at line 1:
    ORA-24247: network access denied by access control list (ACL)
    ORA-06512: at "SYS.UTL_TCP", line 17
    ORA-06512: at "SYS.UTL_TCP", line 267
    ORA-06512: at "SYS.UTL_SMTP", line 161
    ORA-06512: at "SYS.UTL_SMTP", line 197
    ORA-06512: at line 4
    SQL>
    I'm aware that role privileges doesn't apply inside procedures, functions or packages by default, but this is an anonymous block so it should use the active roles for the user.  I also tried adding a "dbms_session.set_role('TESTACL_ROLE');" at the beggining of the anonymous PL/SQL block but I got the same access error.
    Thanks in advance for any help you can give to me on this question, it would be very hard to grant the ACL to all the individual users as they are more than 1000, and we create more regularly.

    Thanks for your quick reply... I don't have a problem creating the basic ACL with the privileges granted for a user.  The problem appears when I try to create an ACL with privileges for a ROLE.  You can see here http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_networkacl_adm.htm#BABIGEGG than the official Oracle documentation states that you can assign the ACL principal to be a user or role:
    Parameter
    Description
    acl
    Name of the ACL. Relative path will be relative to "/sys/acls".
    description
    Description attribute in the ACL
    principal
    Principal (database user or role) to whom the privilege is granted or denied. Case sensitive.
    My issue is that when I try to create the ACL for a role it doesn't work.
    Have you ever created an ACL for a role? if so please send me an example or let me know which step I might be missing.  Cheers.

  • Unexpected problem when creating package

    Hi Expert
    I have a big problem that just has been happened to me unexpectedly.
    I am tried to create package which contains inset into statement. Fields are composed of varchar2, objtype and nested ref obj.
    Before this, I was able to execute this statement through sqlplus from the win 98 client to linux server (oracle for linux is here).
    But now i cannot do it anymore, my linux server was shuted down automatically once I hit the enter key to execute the statement in sqlplus program.
    What 's a problem?
    ps: I am to execute a small statement such as create table or select statement.
    Pls suggest
    sasi

    Hi, Puce!
    I know that this solution can help.
    However it is unclear to me, how my component differs from standard JComboBox for security, as JComboBox doesn't require JAR signature.
    My question is: what should I do in order to make security allow my component, as it allows JComboBox.
    Thanks!

  • Creating Sap Crystal Report Through Oracle Stored Procedure Packages

    Hi,   
    1.How we can create crystal report through oracle stored
    procedure packages pls tell me the steps through adding command then
    tell me the syntax what should i write in command to call the stored
    procedure packages or if have some other option then also tell. 
    2.can
    we link stored procedure column to other table column that used in
    report.

    Hi Ganesh,
    As this error comes when you are trying to insert non-numeric value into a numeric column in db it seems that your field might be numeric and you are trying to send it as a string in database.
    Please check your Store Proc carefully..
    Reference Thread: Oracle/PLSQL: ORA-01722
    --Dhana

  • Problems with create package in Fireworks CS4

    I have two distinct folders that I'm trying to package and I'm not having any luck. Each has been created on one of my computers that is running Windows Vista. I'm trying to use both Windows 7 Beta (not surprised this wouldn't work) and Windows Server 2008. When I tell Fireworks which files to use, add my digital certificate, then choose Create Package, it seems everything is going well as I do not get an error message but when I look for the newly created package there is nothing. I am getting an XML file in the directory and the product is creating .txt files on my desktop with cryptic info. Anybody know what the issue is? Am I trying to do this on unsupported OS? I would think Win2k8 Server would work.

    "When using Select All, through the menu or the keyboard, the marching ants are off by one or two pixels to the right, meaning one or two pixels on the left appear not to be selected, and the right edge of the marching ants is off the keyboard canvas.
    Sorry, I meant to say that the marching ants on the right edge of the image are OFF THE CANVAS. The selection can easily be nudged into place with the left arrow."
    On my machine I have observed that the All selection is in fact correct...in that the entire image is indeed selected. The problem appears to be that the Window frame is short by 1 pixel when running Open GL. It looks like a Window resizing issue. I discovered that by drag/resizing the Window frame to the right, to expose a portion of the unused grey area border. The entire image could now be seen and showed that all of the image was selected.
    Nudging the original selection to the right will only result in deselecting a single pixel vertical strip on the left side of the image.

  • I have a problem when I create message via t-code notif_create.

    when I create message via 'notif_create',I can't fill the blank 'Component'.How can I get the 'Component'?

    Hi Liu,
    the F4 option is available for the component blank and we can select from them generally.ALso check the following SAP Notes...which may prove useful..Note 813075 - DSWP: Create Support Desk message missing category field
    Note 857793 - Determine system context for messages
    Note 853597 - Sorted display of F4 helps in NOTIF_CREATE
    Hope it helps.
    Br
    Sri
    Award points for helpful answers

Maybe you are looking for