Question

Wrapped package would not compile while unwrapped compiles fine

Asked by: geotiger

I have a cc_clients_pkg which can be compiled without error but it will give me the following error after I wrapped it using Oracle wrap utility:

Errors for PACKAGE BODY CC_CLIENTS_PKG:

LINE/COL ERROR                                                                  
-------- -----------------------------------------------------------------      
364/6    PLS-00103: Encountered the symbol "" when expecting one of the        
         following:                                                            
         begin case declare exit for goto if loop mod null pragma              
         raise return select update while with <an identifier>                  
         <a double-quoted delimited-identifier> <a bind variable> <<            
         close current delete fetch lock insert open rollback                  
         savepoint set sql execute commit forall merge pipe                    
         The symbol "" was ignored.                                            
                                                       

Here I am going to compile it without wrapping and to show you the codes around the error line:

cc_dev@OWB1> @cmdr/v2_5c/all_sqls/cc6004_clients_pkg.sql

Sequence dropped.

Elapsed: 00:00:00.08

Sequence created.

Elapsed: 00:00:00.05

Package created.

Elapsed: 00:00:00.35
No errors.

Package body created.

Elapsed: 00:00:00.33
No errors.
cc_dev@OWB1> @lst_src2 CC_CL 350 380
old   3: where name like '&1%'
new   3: where name like 'CC_CL%'
old   4: and line > &2 and line < &3
new   4: and line > 350 and line < 380

 LINE TEXT
----- --------------------------------------------------------------------------
  351 PROCEDURE p_sel (
  352   p_key        IN     cc_clients.CLIENT_ID%TYPE DEFAULT NULL,
  353   p_whr        IN     VARCHAR2 DEFAULT NULL,
  354   p_out_num       OUT NUMBER,    -- out status number
  355   p_out_msg       OUT VARCHAR2,  -- out message
  356   p_rec           OUT rst_refcur,
  357   p_lck        IN     NUMBER DEFAULT 0 -- lock record: 0(no) 1(yes)
  358 ) IS
  359   v_prg VARCHAR2(100) := g_pkg||'.p_sel';
  360   v_sta VARCHAR2(10)  := 'OK';
  361   v_whr VARCHAR2(1000);
  362   v_msg VARCHAR2(200) := '';
  363   v_sql VARCHAR2(2000);
  364 BEGIN
  365   echo(' - '||v_prg, 1);
  366   p_out_num := 0;
  367   p_out_msg := 'OK';
  368   -- check input variables
  369   IF p_key IS NULL AND p_whr IS NULL THEN
  370     v_msg := 'ERR('||v_prg||'): no input for p_key or p_whr';
  371     raise_application_error(-20001,v_msg);
  372   END IF;
  373
  374   IF p_key IS NULL THEN
  375     v_whr := ' WHERE '||p_whr;
  376   ELSE
  377     v_whr := ' WHERE client_id = '||p_key;
  378   END IF;
  379   -- check record existence

29 rows selected.



This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-05-05 at 06:58:15ID23376391
Tags

Oracle

,

Oracle database server

,

10.2.0.3

,

wrapped package

,

PL/SQL

Topics

PL / SQL

,

Oracle 10.x

Participating Experts
2
Points
0
Comments
8

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ProC Compiler does not recognize VARCHAR2 type
    How can I declare a VARCHAR2 variable using the ProC compiler? I tried the ProC examples but it did not help. P.S. the ProC compiler recognize VARCHAR variable.
  2. varchar2
    what is the history of varchar2.I mean why it is varchar2 rather varchar.
  3. varchar2 to long
    Hi Oracle Gurus, I have the following problem. I have a table ( 500000 rows) in which one of the columns being varchar2(4000). Users wanted to accomodate more than 4000. I thought of changing that column to long. Can you please suggest me what is the best & fastest meth...
  4. Multiple Case statements in Select generates an error when…
    oracle 8.1.7 database using oracle 9.2.0.4 client. (eventually I will use this in vb.net with odp.net 9.2.0.4.1, very similar error by the way.) The select statement works very good in sqlplus just the way it is. (The schema's have been changed to protect the innocent.) One...
  5. Datasource pkg
    I have two tables dbcontacts Name Null? Type ----------------------------------------- -------- ---------------- CONTACTID NOT NULL NUMBER TAXID NOT NULL VARCHA...
  6. Oracle Forms Compile
    Does anybody know a way of setting up a batch job to compile Oracle Forms. My idea is to write a scrpot that allows to 1) compile the latest release version from PVCS VM and 2) copy to production built. thanks

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: sdstuberPosted on 2008-05-05 at 07:45:41ID: 21500394

I "shouldn't" matter, but try initializing v_msg  to NULL instead of ''

Functionally it'll be the same thing, but if the parser is complaining about it then try circumventing it.

 

by: geotigerPosted on 2008-05-06 at 14:32:05ID: 21511264

I changed it, and it still complains about it.

Here is another example:

cc_dev@DIS1> @cmdr/v2_5c/wrapped/cc6014_jobs_pkg.plb

Sequence dropped.

Elapsed: 00:00:00.01

Sequence created.

Elapsed: 00:00:00.00

Warning: Package created with compilation errors.

Elapsed: 00:00:00.03
Errors for PACKAGE CC_JOBS_PKG:

LINE/COL ERROR
-------- -----------------------------------------------------------------
80/70    PLS-00103: Encountered the symbol "" when expecting one of the
         following:
         <an identifier> <a double-quoted delimited-identifier>
         current
         The symbol "" was ignored.


Warning: Package Body created with compilation errors.

Elapsed: 00:00:00.03
Errors for PACKAGE BODY CC_JOBS_PKG:

LINE/COL ERROR
-------- -----------------------------------------------------------------
273/20   PLS-00103: Encountered the symbol "" when expecting one of the
         following:
         begin case declare else elsif end exit for goto if loop mod
         null pragma raise return select update while with
         <an identifier> <a double-quoted delimited-identifier>
         <a bind variable> << close current delete fetch lock insert
         open rollback savepoint set sql execute commit forall merge
         pipe
         The symbol "" was ignored.
cc_dev@DIS1> @cmdr/v2_5c/all_sqls/cc6014_jobs_pkg.sql

Sequence dropped.

Elapsed: 00:00:00.01

Sequence created.

Elapsed: 00:00:00.00

Package created.

Elapsed: 00:00:00.06
No errors.

Package body created.

cc_dev@DIS1> @lst_src2 CC_JOBS_PKG 70 90
old   3: where name like '&1%'
new   3: where name like 'CC_JOBS_PKG%'
old   4: and line > &2 and line < &3
new   4: and line > 70 and line < 90

 LINE TEXT
----- --------------------------------------------------------------------------

   71     p_prj_id                        NUMBER              DEFAULT NULL,
   72     p_client_id                     NUMBER              DEFAULT NULL,
   73     p_job_name                      VARCHAR2            DEFAULT NULL,
   74     p_job_desc                      VARCHAR2            DEFAULT NULL,
   75     p_job_args                      VARCHAR2            DEFAULT NULL,
   76     p_job_submittedby               VARCHAR2            DEFAULT NULL,
   77     p_job_action                    VARCHAR2            DEFAULT NULL,
   78     p_job_inpath                    VARCHAR2            DEFAULT NULL,
   79     p_job_outpath                   VARCHAR2            DEFAULT NULL,
   80     p_job_status                    VARCHAR2            DEFAULT NULL,
   81     p_job_remark                    VARCHAR2            DEFAULT NULL,
   82     p_studyid                       VARCHAR2            DEFAULT NULL,
   83     p_domain                        VARCHAR2            DEFAULT NULL,
   84     p_schema                        VARCHAR2            DEFAULT NULL,
   85     p_start_time                    DATE                DEFAULT NULL,
   86     p_end_time                      DATE                DEFAULT NULL,
   87     p_run_count                     NUMBER              DEFAULT NULL,
   88     p_db_user                       VARCHAR2            DEFAULT USER,
   89     p_os_user                       VARCHAR2            DEFAULT sys_contex

      t('USERENV','OS_USER'),

   71       CLIENT_ID,
   72       JOB_NAME,
   73       JOB_DESC,
   74       JOB_ARGS,
   75       JOB_SUBMITTEDBY,
   76       JOB_ACTION,
   77       JOB_INPATH,
   78       JOB_OUTPATH,
   79       JOB_STATUS,
   80       JOB_REMARK,
   81       STUDYID,

 LINE TEXT
----- --------------------------------------------------------------------------

   82       DOMAIN,
   83       SCHEMA,
   84       START_TIME,
   85       END_TIME,
   86       RUN_COUNT,
   87       DB_USER,
   88       OS_USER
   89     ) VALUES (

38 rows selected.

cc_dev@DIS1> @lst_src2 CC_JOBS_PKG 270 290
old   3: where name like '&1%'
new   3: where name like 'CC_JOBS_PKG%'
old   4: and line > &2 and line < &3
new   4: and line > 270 and line < 290

 LINE TEXT
----- --------------------------------------------------------------------------

  271   EXECUTE IMMEDIATE v_sql INTO g_num USING p_job_id;
  272   IF g_num <> 1 THEN
  273     v_sta := 'ERR';
  274     v_msg := 'ERR('||v_prg||'): '||TO_CHAR(g_num)||' record for key ';
  275     v_msg := v_msg||p_job_id;
  276     echo(v_msg, 1);
  277     GOTO pupd_fail;
  278   END IF;
  279
  280   -- only update if the variable is not null
  281   OPEN c1 FOR
  282   SELECT * FROM cc_jobs WHERE JOB_ID = p_job_id;
  283   LOOP
  284     FETCH c1 INTO r1;
  285     EXIT WHEN c1%NOTFOUND;
  286   END LOOP;
  287   CLOSE c1;
  288   -- 0: if input is not null, we use input;
  289   --    if null, then we do not update

19 rows selected.

 

by: geotigerPosted on 2008-08-18 at 08:20:21ID: 22252691

It seems that experts have given up on this question.

Here is update. I found out a solution by accident - adding additional space in the end of the lines with error message will solve the problem. You may run multiple iteration of the following actions to  to get all the "problem" lines

1) wrap and load wrapped codes;
2) load unwrapped codes;
3) list problem lines;
4) add spaces in the end of the lines;
5) repeat step 1)

It is a painful process!

 

by: geotigerPosted on 2008-08-18 at 08:21:19ID: 22252700

Please refund and close this question.

 

by: sdstuberPosted on 2008-08-18 at 08:24:11ID: 22252721

sorry, I must have missed your response.  Glad you found your answer though.  If adding white space to the end of a line fixed it, I suggest filing a bug report with Oracle.

And then accept your own answer on this question and get a refund as you didn't need any help from me or others.

 

by: sdstuberPosted on 2008-08-18 at 08:25:03ID: 22252736

you the "request attention" link above to accept your own answer and get a refund.

 

by: Computer101Posted on 2008-09-10 at 20:19:01ID: 22445817

PAQed with points refunded (500)

Computer101
EE Admin

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...