Compiling packages in linux

Hi I have been struggling with this for the last three days. I have tried multiple searches in the forums but cannot make head nor tail of setting the classpath in linux when compiling a package.
in the following directory "/home/tamtam/Java/Course/Unit4/act4_1"
I have two classes Greeting.java and Main.java
Greeting.java compiles successfully and creates Greeting.class
I cannot compile Main.java which uses the class Greeting.
Both have package act4_1 as the first line in the code.
I know I need to set the classpath but have been unable to do so. Where is the starting directory.
I havenot got a clue where to start.
I get error message
Main.java:15: cannot resolve symbol
symbol : class Greeter
location: class act4_1.Main
Greeter greeter = new Greeter();
Any help would be greatfully appreciated.
tamtam

I am completely new to Linux and just started with Java.
Does anyone know a link to a step by step guide.
in C++ say I had two files in the same directory "Greetings.cpp" and "Main.cpp" and there coresponding header files. Main.cpp uses an instance of the class Greeting. I would use include "Greeting.cpp" in Main.cpp so that the class Greeting would be available.
In Java I have two files, Greeting.java and Main.java. Both have package act4_1 at the top of the file.
Main.java
package act4_1;
     Activity 4.1
     Main.java
     Runs Greeting.java
import java.io.*;
public class Main
     public static void main(String[] args) throws IOException
          Greeter greeter = new Greeter();
          greeter.Run();
}Greeting.java
package act4_1;
     Activity 4.1
     Greeter.java.
import java.io.*;
public class Greeter {
     public void Run() throws IOException
          System.out.println("Hello from TamTam");
}How exactly do I get Main.java to accept the class Greeter.
The path is as above.

Similar Messages

  • Compiling an old linux code on a new mac

    Hello,
    I am trying to compile an old Linux program on my new macbook pro (Intel + 10.6). The program uses a mix of fortran and c source codes. On the Linux environment where it works I have gcc(f77) 3.2.3 installed.
    The only external library called for in the Makefile is libg2c, which as far as I can tell comes with gcc 3 but not any longer in gcc 4. This means that the original Makefile, which works on a Linux environment with gcc 3.2.3 does not work on my Mac.
    For sure I need some g2c-like library because the system is mixing Fortran and C code, and doesn't compile if I just remove -lg2c from the Makefile, the compiling crashes.
    I have tried to install libf2c from Fink but it doesn't seem compatible with gfortran created code.
    Now I'm a bit lost. Can someone offer some help?

    atticus_pf wrote:
    You keep saying gcc4.4 is bad.
    There is nothing inherently wrong with gcc4.4. I just don't trust anything that comes from the Mac "ports" packages. Why would I need to "port" something to MacOS X if it build fine from a tarball? More importantly, why would I use a version newer than what Apple ships with the OS? MacOS X is not Linux. Those newer versions have not been tested and MacOS X and MacOS X is fundamentally different from any OS that those versions have been tested on. If you want to test new software on Mac OS X, that's great. Just get the original code and build it yourself instead of going through a 3rd party who may or may not know what they are doing. Every time I see a problem here in Apple Discussions with someone who can't build an open-source software package on MacOS X, some "ports" package has been installed. Every Time.
    What is the best version to use? I have gcc in /usr/bin which is gcc 4.2.1 - I think this is the apple version. ... I just want to use what is best and most reliable.
    That would be the one Apple build the OS with. Even then, gcc 4.2.1 is still a bit flaky on MacOS X. Apple may never use gcc 4.4. It is moving towards Clang for future development.
    gcc -framework Carbon -arch i386 -m64 -g -I/Users/jpfaendt/Modeling/parest/ddasac/software/include -O2 -o parest ./model.o jacobian.o bsub.o -L/Users/jpfaendt/Modeling/parest/ddasac/software -L/Users/jpfaendt/Modeling/parest/ddasac/software/myUtil -L/Users/jpfaendt/Modeling/parest/ddasac/software/lib -L/sw/lib/gcc4.4/lib -lm -lliqparest -ldassl -lgregpack -lgfortran -lUtil -L/sw/lib/gcc4.4/lib/
    Undefined symbols:
    "_Delete", referenced from:
    _ModelODEs in model.o
    sorry for the messy paste, it's an ugly makefile (although it works in linux). You can see I'm including libraries that I myself compiled (libliqparest, libdassl, libgregpack, libUtil are all compiled in this code).
    But what is that "-m64" doing there? That is not a good flag to use even in the best of times. It really isn't appropriate with "-arch i386". Add to that the fact that Carbon isn't 32-bit and you've got a mess-o-problems.
    The first function that has a problem above (_Delete) is defined in a c program that is compiled as part of libUtil.a. This library just has a bunch of house-made functions for vector handling, etc. The code could be probably be overhauled to not need this anymore but I don't have the energy to do it.
    I really think these are old relics of a MacOS port back when you needed such "ports" because MacOS (note the absence of "X") didn't have such things as open(), malloc(), and free().
    You have the source to libUtil.a, so it would be worthwhile to look at it and see if my hypothesis is correct. You may be able to fix it with just a compiler flag and have it use the POSIX code instead of the MacOS Carbon routines. Then, hopefully, you can get rid of Carbon altogether and build a true 64-bit executable.
    In any case, I'm now suspecting my compiler configuration, etc for causing the problems. What is the best solution for having the fink gcc-4 installed and apples gcc installed? I guess I have to reconcile this somehow with the gfortran that is in /sw/bin.
    You could also download a better version of gfortran that installs into /usr/local, where it is supposed to be.

  • While compiling package '±' change to '?'

    Hi,
    I try to compile a package with special character set '±' inside the package. The package is taken in windows platform. While I try to compile this package in Linux environment; the character '±' change to '?'.
    Pls help how to resolve the problem.
    Subir

    Try setting NLS_LANG environment variable :
    $ sqlplus test/test
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Mar 27 09:43:14 2008
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    TEST@db102 > select '±' from dual;
    TEST@db102 > exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15
    $ sqlplus test/test
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu Mar 27 09:43:26 2008
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    TEST@db102 > select '±' from dual;
    ±
    TEST@db102 >

  • [SOLVED] Strange error while compiling packages via AUR

    I've been facing this error while compiling packages via AUR. I'm also posting the output of my /etc/makepkg.conf
    Error
    ==> Starting build()...
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether cc supports -O2... yes
    checking for g++... g++
    checking whether the C++ compiler works... yes
    checking for C++ compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking for style of include used by make... GNU
    checking dependency style of g++... gcc3
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking dependency style of gcc... gcc3
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for GSTREAMER... yes
    checking for GSTREAMER_GTK... yes
    checking for XOpenDisplay in -lX11... yes
    checking for ncursesw5-config... /usr/bin/ncursesw5-config
    checking for initscr in -lncurses... yes
    checking whether gcc supports -Wall... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating docs/Makefile
    config.status: creating config.h
    config.status: executing depfiles commands
    fatal: Not a git repository (or any of the parent directories): .git
    CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /tmp/yaourt-tmp-hellknight/aur-gst123/src/gst123-0.2.0/build-aux/missing --run aclocal-1.11 -Wno-portability
    sh: autom4te: command not found
    aclocal-1.11: autom4te failed with exit status: 127
    make: *** [aclocal.m4] Error 1
    ==> ERROR: A failure occurred in build().
    Aborting...
    ==> ERROR: Makepkg was unable to build gst123.
    ==> Restart building gst123 ? [y/N]
    ==> -------------------------------
    ==>
    /etc/makepkg.conf
    # /etc/makepkg.conf
    # SOURCE ACQUISITION
    #-- The download utilities that makepkg should use to acquire sources
    # Format: 'protocol::agent'
    DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
    'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
    'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
    'rsync::/usr/bin/rsync -z %u %o'
    'scp::/usr/bin/scp -C %u %o')
    # Other common tools:
    # /usr/bin/snarf
    # /usr/bin/lftpget -c
    # /usr/bin/curl
    # ARCHITECTURE, COMPILE FLAGS
    CARCH="x86_64"
    CHOST="x86_64-unknown-linux-gnu"
    #-- Exclusive: will only run on x86_64
    # -march (or -mcpu) builds exclusively for an architecture
    # -mtune optimizes for an architecture, but builds for whole processor family
    CFLAGS="-march=amdfam10 -mtune=generic -O2 -pipe"
    CXXFLAGS="${CFLAGS}"
    LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
    #-- Make Flags: change this for DistCC/SMP systems
    MAKEFLAGS="-j8"
    # BUILD ENVIRONMENT
    # Defaults: BUILDENV=(fakeroot !distcc color !ccache)
    # A negated environment option will do the opposite of the comments below.
    #-- fakeroot: Allow building packages as a non-root user
    #-- distcc: Use the Distributed C/C++/ObjC compiler
    #-- color: Colorize output messages
    #-- ccache: Use ccache to cache compilation
    BUILDENV=(fakeroot !distcc color !ccache)
    #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
    #-- specify a space-delimited list of hosts running in the DistCC cluster.
    #DISTCC_HOSTS=""
    # GLOBAL PACKAGE OPTIONS
    # These are default values for the options=() settings
    # Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
    # A negated option will do the opposite of the comments below.
    #-- strip: Strip symbols from binaries/libraries in STRIP_DIRS
    #-- docs: Save doc directories specified by DOC_DIRS
    #-- libtool: Leave libtool (.la) files in packages
    #-- emptydirs: Leave empty directories in packages
    #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
    #-- purge: Remove files specified by PURGE_TARGETS
    OPTIONS=(strip docs libtool emptydirs zipman purge)
    #-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
    INTEGRITY_CHECK=(md5)
    #-- Options to be used when stripping binaries. See `man strip' for details.
    STRIP_BINARIES="--strip-all"
    #-- Options to be used when stripping shared libraries. See `man strip' for details.
    STRIP_SHARED="--strip-unneeded"
    #-- Options to be used when stripping static libraries. See `man strip' for details.
    STRIP_STATIC="--strip-debug"
    #-- Manual (man and info) directories to compress (if zipman is specified)
    MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
    #-- Doc directories to remove (if !docs is specified)
    DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
    #-- Directories to be searched for the strip option (if strip is specified)
    STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
    #-- Files to be removed from all packages (if purge is specified)
    PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
    # PACKAGE OUTPUT
    # Default: put built package and cached source in build directory
    #-- Destination: specify a fixed directory where all packages will be placed
    #PKGDEST=/home/packages
    #-- Source cache: specify a fixed directory where source files will be cached
    #SRCDEST=/home/sources
    #-- Source packages: specify a fixed directory where all src packages will be placed
    #SRCPKGDEST=/home/srcpackages
    #-- Packager: name/email of the person or organization building packages
    #PACKAGER="John Doe <[email protected]>"
    # EXTENSION DEFAULTS
    # WARNING: Do NOT modify these variables unless you know what you are
    # doing.
    PKGEXT='.pkg.tar.xz'
    SRCEXT='.src.tar.gz'
    # vim: set ft=sh ts=2 sw=2 et:
    Last edited by tarun.hellknight (2011-04-12 15:45:26)

    That's strange... it wasn't installed.. although I had never,ever faced a problem while compiling packages via AUR.. maybe, I should be careful when uninstalling orphans.. thanks for the help..

  • Execution of Immediate SQL in compiled package in two versions of SQL*PLUS

    A peculiar problem has risen in our database.
    Execution of Immediate SQL in compiled package in two versions of SQLPLUS gives different results
    We have a compiled package with two procedures that contain immediate SQL statements, and these are:
    +PROC_DELETE_ROWS+
    +     -- This immediate sql deletes unreferenced Document Types from the DOC_REF_TYPE table+
    +     delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)+
       +     and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)+
       +     and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)+
       +     and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)+
    +PROC_ADD_NEW_ROWS+
    +     -- Drop the temporary table+
    +     drop table TMP_PROARC_DOC_REF_TYPE+
    +     -- Create a temporary table+
    +     create table tmp_PROARC_DOC_REF_TYPE as+
    +     select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC+
    +     from PROARC_DOC_REF_TYPE_VW+
    +     -- Insert document types that do not exist in the DOC_REF_TYPE table+
    +     insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)+
            +     select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s+
            +     where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)+
    I am using the following test script:
    +Exec mypackage.proc_delete_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+
    +Exec mypackage.proc_add_new_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+We have a Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    I am using SQL*Plus: Release 8.1.7.0.0
    The test script is working as expected.
    Count after delete =155
    Count after insert = 511
    but when I use another computer with SQL*Plus: Release 10.x
    The Test script returns the following
    Count after delete =155
    Count after insert =155
    The same is happening when I am running the scripts as a scheduled job.
    QUESTION:
    I believe I have found a fix for the problem though. By changing tmp_PROARC_DOC_REF_TYPE in the insert statement to all upper case, the script is running in both environments apparently. But how is this possible? I am executing a compiled package in the database. The session shell should have no impact on the behaveour of the procedure I am calling. What causes this?
    Edited by: Reon on Jun 16, 2011 4:44 AM

    1) I am using the same user (PANDORA)
    2) (PANDORA) for both
    3) I am actually not handling any errors. Just skipping any error altogether. I'll check to see what exceptions are raised, and come back.
    I have also noticed that SQL/PLUS is not the culprit here. If I use SQLTools 1.5 to run the script, the same thing happens. So it has to do something with the connection or session environment that is inheritet to both clients.
    The CODEZ:_
      procedure add_doc_types IS
      sqlstr     VARCHAR2(2000);
      begin
      BEGIN
           sqlstr := 'drop table TMP_PROARC_DOC_REF_TYPE';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      BEGIN
           sqlstr := 'create table tmp_PROARC_DOC_REF_TYPE as select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC from PROARC_DOC_REF_TYPE_VW';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
        BEGIN
            sqlstr := 'insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)
                    select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from TMP_PROARC_DOC_REF_TYPE s
                    where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
            sqlstr := 'update doc_ref_type t set DOC_REF_TYPE_DESC = (
                    select DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s
                    where t.doc_ref_type = s.doc_ref_type)
                    where exists (select 1 from tmp_PROARC_DOC_REF_TYPE s where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      end add_doc_types;
      procedure delete_doc_types IS
      sqlstr     VARCHAR2(2000);
       BEGIN
            sqlstr := 'delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)
            and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)
            and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)
            and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)';
          EXECUTE IMMEDIATE sqlstr;
         EXCEPTION
           WHEN OTHERS THEN
             null;
      end delete_doc_types;Edited by: Reon on Jun 16, 2011 2:01 AM

  • Compiling packages

    Hi all,
    I have problem on compiling packages.
    Here is the structure of the directory
    1:path is c:\java
    2:Created a directory inside java folder called test1 as parent directory,then I created a new folder calledd test2 inside the test1.(c:\java\test1\test2).
    3. I have created java class called House.java in which I have declared a package
    package  test1.test2;4.I have created the main class HouseMain.java with
    code]package test1.test2;
    5.I have copied all the java class in the folder test2.
    I cant get it compiled even after setting the classpath.
    Can anyone help me please how to compile ?.
    Thank you

    Hi all,
    I have problem on compiling packages.
    Here is the structure of the directory
    1:path is c:\java
    2:Created a directory inside java folder called
    test1 as parent directory,then I created a new
    folder calledd test2 inside the
    test1.(c:\java\test1\test2).
    . I have created java class called House.java in
    which I have declared a package
    package  test1.test2;4.I have created the main class HouseMain.java with
    code]package test1.test2;I have copied all the java class in the folder
    test2.
    I cant get it compiled even after setting the classpath.
    Can anyone help me please how to compile ?.
    Thank youTry this:
    Navigate to c:\java and type exactly this:
    javac -classpath . -d . test1\test2\*.javaNote the "dot" after both -classpath and -d. Read the javac docs to make sure you understand what those mean.
    You should see all the .class files in the same directory as your .java files. (Not the best idea, but easy for now.)
    To run, type this:
    java -classpath . test1.test2.HouseMain%

  • Compiling packages or procedures

    Hello,
    I am compiling a package , procedures etc. The query comes back with invalids. I have show error. How do I retrieve more detail information about why the package/procedure/view are invalid?
    DECLARE
                    v_status       VARCHAR2(10);
                    v_cmd          VARCHAR2(150);
                    Cursor rw_objects
                     IS
                      Select object_name,object_type,status,owner
                      From dba_objects
              WHERE UPPER(object_type) IN ('VIEW','PROCEDURE','FUNCTION','PACKAGE', 'PACKAGE BODY','TRIGGER','SYNONYM')
              AND owner = UPPER('&&DW_SCHEMA')
                      AND status = 'INVALID';
             BEGIN
                 FOR  t IN rw_objects
                           LOOP
                                  IF  t.object_type ; IN ('SYNONYM','VIEW','TRIGGER','PROCEDURE','FUNCTION') THEN
                                      v_cmd  := 'ALTER ' || t.object_type || ' ' || t.owner||'.'||t.object_name || ' COMPILE ';  
                                     execute immediate v_cmd;
                         ELSIF
                                     t.object_type ; = ('PACKAGE') THEN                                 
                                     v_cmd  := 'ALTER  PACKAGE ' || ' ' || t.owner||'.'||t.object_name || ' COMPILE PACKAGE';  
                                     execute immediate v_cmd;  
                                  ELSIF                               
                                      t.object_type ; = ('PACKAGE BODY') THEN                                 
                                      v_cmd  := 'ALTER PACKAGE ' || ' ' || t.owner||'.'||t.object_name || ' COMPILE BODY';  
                                     execute immediate v_cmd;  
                                    dbms_output.put_line( rpad( t.object_type || ' ' || t.object_name, 50, ' ' ) || ' VALID ');
                                  END IF;
                    END LOOP;
    END;
    SELECT   object_name, object_type, status                    
                   FROM  dba_objects
                   WHERE STATUS = 'INVALID'     
                   AND UPPER(object_type) IN ('VIEW','PROCEDURE','FUNCTION','PACKAGE', 'PACKAGE BODY','TRIGGER','SYNONYM')
                   AND owner = UPPER('&&DW_SCHEMA')
               ORDER by object_type;
    show errors; Here are the results.
    OBJECT_NAME                                                                OBJECT_TYPE         STATUS                            
    PM206                                                                           PACKAGE BODY        INVALID
    DW_BE_DFACT_TB_REFRESH_HANDLER                            PACKAGE BODY        INVALID
    DW_BE_DFACT_TB_INITIAL_HANDLER                               PACKAGE BODY        INVALID
    CHART_HANDLER                                                            PACKAGE BODY        INVALID
    DW_CRS_HANDLER                                                          PACKAGE BODY        INVALID
    DELETE_UPDATE_PROC                                                   PROCEDURE           INVALID
    DW_CBS_PROC                                                              PROCEDURE           INVALID
    DW_GL_DFACT_VW                                                           VIEW                INVALID
    8 rows selected.
    No errors.

    too bad COPY & PASTE are broken for you!
      1  DECLARE
      2                  v_status       VARCHAR2(10);
      3                  v_cmd          VARCHAR2(150);
      4                  Cursor rw_objects
      5                   IS
      6                    Select object_name,object_type,status,owner
      7                    From dba_objects
      8            WHERE UPPER(object_type) IN ('VIEW','PROCEDURE','FUNCTION','PACKAGE', 'PACKAGE BODY','TRIGGER','SYNONYM')
      9            AND owner = UPPER('&&DW_SCHEMA')
    10                    AND status = 'INVALID';
    11           BEGIN
    12               FOR  t IN rw_objects
    13                         LOOP
    14                                IF  t.object_type ; IN ('SYNONYM','VIEW','TRIGGER','PROCEDURE','FUNCTION') THEN
    15                                    v_cmd  := 'ALTER ' || t.object_type || ' ' || t.owner||'.'||t.object_name || ' COMPILE ';
    16                                   execute immediate v_cmd;
    17                       ELSIF
    18                                   t.object_type ; = ('PACKAGE') THEN
    19                                   v_cmd  := 'ALTER  PACKAGE ' || ' ' || t.owner||'.'||t.object_name || ' COMPILE PACKAGE';
    20                                   execute immediate v_cmd;
    21                                ELSIF
    22                                    t.object_type ; = ('PACKAGE BODY') THEN
    23                                    v_cmd  := 'ALTER PACKAGE ' || ' ' || t.owner||'.'||t.object_name || ' COMPILE BODY';
    24                                   execute immediate v_cmd;
    25                                  dbms_output.put_line( rpad( t.object_type || ' ' || t.object_name, 50, ' ' ) || ' VALID ');
    26                                END IF;
    27                  END LOOP;
    28* END;
    29  /
    old   9:           AND owner = UPPER('&&DW_SCHEMA')
    new   9:           AND owner = UPPER(' USER1')
                                  IF  t.object_type ; IN ('SYNONYM','VIEW','TRIGGER','PROCEDURE','FUNCTION') THEN
    ERROR at line 14:
    ORA-06550: line 14, column 49:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( * @ % & = - + < / > at in is mod remainder not rem then
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset member submultiset
    The symbol ";" was ignored.
    ORA-06550: line 18, column 48:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( * @ % & = - + < / > at in is mod remainder not rem then
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset
    ORA-06550: line 22, column 49:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
    . ( * @ % & = - + < / > at in is mod remainder not rem then
    <an exponent (**)> <> or != or ~= >= <= <> and or like like2
    like4 likec between || multiset
    SQL>

  • Error when Compiling package header and body - how change pkb file associat

    Hi everyone,
    it has already been noticed elsewhere (in the thread "Compiling package header and body" of Jan 12, 2010) that the compilation of package scripts sometimes fails (apparently because of a sqldeveloper bug) when the script contains the terminating slash /.
    Is this bug still open?
    Next question: In the above mentioned thread it is recommended as workaround to change the corresponding file type association from pl/sql to sql. I would like to do that; I know the place in the preferences dialog, but most of the associations there seem to be hard coded and cannot be changed.
    I would appreciate any ideas!
    Thanks in advance,
    user8632123.

    For the workaround: you'd have to change the file's extension, not the association (to e.g. .sql).
    Have fun,
    K.

  • How to compile form in linux server

    Hi All:
    Any one can say how to compile form in linux server using form builder fmb.

    If you are talking about forms 10g then here is the method
    1) run x windows interface on your machine
    2) login to linux server
    $ export DISPLAY=<IP address of machine>:0.0
    $ frmcmp.sh module_type=form module=myform.fmb userid=user/password@connectstring compile_all=yes
    Regards
    Anuj

  • How do i get error after compiling package

    Hi ,
    i am compiling some packages by sys schema of hr schema as
    alter package hr.example compile package
    but it shows compiled with error
    how can i see that errors as i dont know the password of hr schema ..
    Thanks in advance

    First of all you should not be using SYS to compile anything ... create a DBA account.
    Second there is not need to be HR to see the errors ... type "SHO ERR" and you should see the errors and if that does not work there is always the simple
    SELECT * FROM dba_errors;In the future please do not post questions without full version number and, when possible, screen scrapes (cut and paste) so we can see what you are doing.

  • [svn] 1091: compiler: class renaming in the compiler package

    Revision: 1091
    Author: [email protected]
    Date: 2008-04-03 13:32:09 -0700 (Thu, 03 Apr 2008)
    Log Message:
    compiler: class renaming in the compiler package
    * flex2.compiler:Context to CompilerContext
    * flex2.compiler.util:Console to ConsoleLogger
    Bugs: n/a
    QA: No
    Doc: No
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/API.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilationUnit.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerSwcContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/PersistenceStore.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Source.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/SymbolTable.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/abc/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/StyleExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/SyntaxTreeEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingExtension. java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/DataBindingFirstPassE valuator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/TypeAnalyzer.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEv aluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ASDocExtension.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/i18n/Compiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/AbstractDocumentBuil der.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConsole.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerContext.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/ConsoleLogger.java
    Removed Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/Context.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/Console.java

    Out of curiosity, do you have a directory called WEB-INF inside of
    MyPortal\portalApp\portlets\WFWeb? If so, can you try removing/renaming it?
    "Gavin" <[email protected]> wrote in message
    news:40581f2e$[email protected]..
    >
    I create a Application naming "MyPortal" in WorkShop.
    And create a Project naming "portalApp".
    In folder "portalApp", I create a folder "portlets"
    And create a PageFlow in folder "portlets", so I get a jpf naming"WFWebController.jpf"
    >
    >
    W:\bea\user_projects\applications\MyPortal\portalApp\portlets\WFWeb\WFWebCon
    troller.jpf
    >
    But I add some java code in the method of WFWebController.jpf
    when I run the WFWebController.jpf from workshop
    the compiler throws a ERROR message "A PageFlowController at the root ofthe web
    application must be in the default package."
    Have any solution about this ERROR ?
    Thanks,
    Gavin.

  • New programmer- how do i compile package members?

    im learning java using sams teach yourself java in 21 days. its really good compared to other ive tried but i was having a problem on day 6. i couldnt compile package members successfully. i didnt undestand the book instruction so instead of compiling this way:
    C:\noam\java> c:\java\jdk1.5.0_06\bin\javac classname.java
    i did it this way:
    C:\java\noam\org\cadenhead\ecommerce> c:\java\jdk1.5.0_06\bin\javac classname.java
    this worked but other classes inside the package could not recognize this class, though classes outside the package could.
    how do i compile package members?
    thnx!

    I solved the problem...! I have no idea how but it worked this time!
    thnx anyway for everybody who tried to help!

  • 30EA1: PLS-00172 when compiling package body

    Hi there,
    I'm having a strange bug when compiling a package body in SQL Developer 3.0 EA1, while the same package body compiles well in production version (2.1).
    The error code returned is Error: ORA-06550: line 1, column 64: PLS-00172: string literal too long
    Does anyone have the same problems?

    yes: SQL*Developer 3EA1 - Not Compiling package Body
    Hope that helps,
    K.

  • Compile PACKAGE

    Hi ,
    begin
    Execute immediate 'ALTER  PACKAGE OU_TERRITORY_LOOKUP  Compile PACKAGE ' ;
    end;-24344     ORA-24344: success with compilation error
    -24344     ORA-24344: success with compilation error
    wht is ti mean ? how it can be success if it's errors ???
    thanks in advance
    Raj

    infant_raj wrote:
    -24344     ORA-24344: success with compilation error
    wht is ti mean ? how it can be success if it's errors ???The compile command was accepted (it was successful in initiating a compilation of the requested object). However, the object itself failed to compile - that part was unsuccessful.
    24344, 00000, "success with compilation error"
    // *Cause:  A sql/plsql compilation error occurred.
    // *Action: Return OCI_SUCCESS_WITH_INFO along with the error code
    //Example. The package has a function that refers to an object that the package does not have select access to. The package is created in the example and then compiled (again) using PL/SQL and dynamic SQL. The USER_ERRORS view is then used to determine what errors there are in the package.
    SQL> create or replace package FooTest as
      2          function version return varchar2;
      3  end;                                    
      4  /                                       
    Package created.
    SQL>
    SQL> create or replace package body FooTest as
      2          function version return varchar2 is
      3                  ver     varchar2(20);     
      4          begin                             
      5                  select i.version into ver from v$instance i;
      6                  return( ver );
      7          end;
      8  end;
      9  /
    Warning: Package Body created with compilation errors.
    SQL>
    SQL>
    SQL> begin
      2          execute immediate 'alter package FooTest compile';
      3  exception when OTHERS then
      4          dbms_output.put_line( 'package FooTest failed to compile successfully' );
      5          raise;
      6  end;
      7  /
    package FooTest failed to compile successfully
    ERROR:
    ORA-24344: success with compilation error
    ORA-06512: at line 5
    Warning: PL/SQL compilation errors.
    SQL>
    SQL> select
      2          e.name, e.type, e.line, e.text
      3  from       user_errors e
      4  where      e.name = 'FOOTEST' order by 1,2,3;
    NAME       TYPE            LINE TEXT
    FOOTEST    PACKAGE BODY       5 PL/SQL: SQL Statement ignored
    FOOTEST    PACKAGE BODY       5 PL/SQL: ORA-00942: table or view does not exist
    SQL>

  • Timeout when I trying to compile Package

    Hi
    When I tried to compile package show me error:
    timeout ocurred while waiting to lock Schema.Mypackage

    1. Verify whether the package is locked by another user:
    SELECT * FROM v$access WHERE object = '<package>';
    If there a row is returned, the package is still locked.
    2. Use the SID which is returned and check in v$session which session is
    locking this package.
    SELECT SID, SERIAL#, OSUSER, USERNAME FROM V$SESSION WHERE sid = '<SID>
    3. If the session still is shown, use:
    ALTER SYSTEM KILL SESSION '<sid>, <serial#>';
    check the above work out.

Maybe you are looking for

  • Hide bookmarks toolbar while surfing. My screen is little and I want space to read

    I would like the tolbar to act like the chrome one. Where is it noly available when opening a new tab. Is there a way to do this? Hide the toolbar, temporary hide it or something. I was using one addon but it made the close and maximize buttons all g

  • PO warning

    Hi I have created a new material and vendor. In material master MAP is maintained as 500 AED and  price unit is 1.No order unit is also maintaine .In the vendor master,order currency is USD.While creating  PO for this material and vendor,I give a 100

  • Error Handling on LSMW

    Hi Experts, Now I want to use a batch input recording to implement LSMW.We all konw that we can get return message if we use call transaction like below.  CALL TRANSACTION     CALL TRANSACTION 'VA01'                USING  V_IT_BDCDATA              OP

  • Why shall we go for views?

    What are the situations where we can go for views instead of joins and why? Regards, MD.

  • Power & volume buttons dont work

    I purchased a used Ipod touch 4th gen for my stepson. I was told the top button doesnt work & I was thinking that was ok so I still took it. Went to set everything up for my stepson last night & the volume buttons dont work either. Can someone please