Get the compilation error

How can i get the object error in after create trigger???
To get the source code i use ora_sql_text funcion, but to compilation error i don't know...
Thanks,
Renato Rodrigues

It too has some limitation. It cannot trap anonymous block's error.
Here is one way ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE    10.2.0.3.0      Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:00.58
satyaki>
satyaki>
satyaki>select * from user_errors;
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                              
P                              PROCEDURE             1          1          1 PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted                    
P                              PROCEDURE             2          0          0 PL/SQL: Compilation unit analysis terminated                                                      
NUM_ARRAY_REC                  TYPE                  1          1         23 PLS-00355: use of pl/sql table not allowed in this context                                        
NUM_ARRAY_REC                  TYPE                  2          0          0 PL/SQL: Compilation unit analysis terminated                                                      
SPLIT                          FUNCTION              2         45          1 PLS-00103: Encountered the symbol "SELECT"                                                        
LOGID_TRIGGER                  TRIGGER               1          2         23 PLS-00357: Table,View Or Sequence reference 'LOGID.NEXTVAL' not allowed in this context           
TEST_VV                        PROCEDURE             1          1         19 PLS-00230: OUT and IN OUT formal parameters may not have default expressions                      
CLOB_OBJ                       TYPE                  1          3         18 PLS-00103: Encountered the symbol ";" when expecting one of the following:                        
                                                                                := . ( ) , @ % not null range default external character
                                                                             The symbol ";" was ignored.
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                              
LOGID_TRIGGER                  TRIGGER               2          2          2 PL/SQL: Statement ignored                                                                         
EMPLOYEE                       TYPE BODY             1          1         11 PLS-00201: identifier 'EMPLOYEE' must be declared                                                 
TEST_PRIVS                     PROCEDURE             1          6         10 PL/SQL: ORA-00942: table or view does not exist                                                   
EMPLOYEE                       TYPE BODY             2          1         11 PLS-00304: cannot compile body of 'EMPLOYEE' without its specification                            
EMPLOYEES_VIEW                 VIEW                  1          0          0 ORA-01730: invalid number of column names specified                                               
EMPLOYEE                       TYPE BODY             3          0          0 PL/SQL: Compilation unit analysis terminated                                                      
SPLIT                          FUNCTION              1         28          1 PLS-00103: Encountered the symbol "DECLARE"                                                       
TEST_PRIVS                     PROCEDURE             2          5          5 PL/SQL: SQL Statement ignored                                                                     
TEST_PRIVS                     PROCEDURE             3          3         10 PLS-00341: declaration of cursor 'C1' is incomplete or malformed                                  
TEST_PRIVS                     PROCEDURE             4          9          6 PL/SQL: Item ignored                                                                              
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                              
TEST_PRIVS                     PROCEDURE             5         13         42 PLS-00364: loop index variable 'R1' use is invalid                                                
TEST_PRIVS                     PROCEDURE             6         13          5 PL/SQL: Statement ignored                                                                         
20 rows selected.
Elapsed: 00:00:00.30
satyaki>
satyaki>
satyaki>
satyaki>declare
  2       str varchar2;
  3     begin
  4      nul;
  5     end;
  6  /
     str varchar2;
ERROR at line 2:
ORA-06550: line 2, column 10:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 4, column 5:
PLS-00201: identifier 'NUL' must be declared
ORA-06550: line 4, column 5:
PL/SQL: Statement ignored
Elapsed: 00:00:00.42
satyaki>
satyaki>
satyaki>select * from user_errors;
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                      
P                              PROCEDURE             1          1          1 PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted            
P                              PROCEDURE             2          0          0 PL/SQL: Compilation unit analysis terminated                                              
NUM_ARRAY_REC                  TYPE                  1          1         23 PLS-00355: use of pl/sql table not allowed in this context                                
NUM_ARRAY_REC                  TYPE                  2          0          0 PL/SQL: Compilation unit analysis terminated                                              
SPLIT                          FUNCTION              2         45          1 PLS-00103: Encountered the symbol "SELECT"                                                
LOGID_TRIGGER                  TRIGGER               1          2         23 PLS-00357: Table,View Or Sequence reference 'LOGID.NEXTVAL' not allowed in this context   
TEST_VV                        PROCEDURE             1          1         19 PLS-00230: OUT and IN OUT formal parameters may not have default expressions              
CLOB_OBJ                       TYPE                  1          3         18 PLS-00103: Encountered the symbol ";" when expecting one of the following:                
                                                                                := . ( ) , @ % not null range default external character
                                                                             The symbol ";" was ignored.
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                      
LOGID_TRIGGER                  TRIGGER               2          2          2 PL/SQL: Statement ignored                                                                 
EMPLOYEE                       TYPE BODY             1          1         11 PLS-00201: identifier 'EMPLOYEE' must be declared                                         
TEST_PRIVS                     PROCEDURE             1          6         10 PL/SQL: ORA-00942: table or view does not exist                                           
EMPLOYEE                       TYPE BODY             2          1         11 PLS-00304: cannot compile body of 'EMPLOYEE' without its specification                    
EMPLOYEES_VIEW                 VIEW                  1          0          0 ORA-01730: invalid number of column names specified                                       
EMPLOYEE                       TYPE BODY             3          0          0 PL/SQL: Compilation unit analysis terminated                                              
SPLIT                          FUNCTION              1         28          1 PLS-00103: Encountered the symbol "DECLARE"                                               
TEST_PRIVS                     PROCEDURE             2          5          5 PL/SQL: SQL Statement ignored                                                             
TEST_PRIVS                     PROCEDURE             3          3         10 PLS-00341: declaration of cursor 'C1' is incomplete or malformed                          
TEST_PRIVS                     PROCEDURE             4          9          6 PL/SQL: Item ignored                                                                      
NAME                           TYPE           SEQUENCE       LINE   POSITION TEXT                                                                                      
TEST_PRIVS                     PROCEDURE             5         13         42 PLS-00364: loop index variable 'R1' use is invalid                                        
TEST_PRIVS                     PROCEDURE             6         13          5 PL/SQL: Statement ignored                                                                 
20 rows selected.
Elapsed: 00:00:00.45
satyaki>Regards.
Satyaki De.

Similar Messages

  • JAR file needed to solve the compilation error

    Hi ,
       I am getting the compilation error when i tried to access the "<b>com.sapportals.wcm.service.scheduler.ISchedulerTask</b>" interface.
    Where can i find the corresponding JAR file ?
    can anyone send this JAR to my mail iD ?
    [email protected]
    Thanks and Regards,
    Saravanan

    Hi Saravanan,
    Try this weblog <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2951">Using JAR Class Finder</a>.
    Regards,
    Abhishek.

  • I am getting the following error at Import ABAP phase ...

    Dear All,
    I am getting the following error at Import ABAP phase when performing the system copy function (Import) via ./sapinst  ( OS - LINUX and DATABASE-ORACLE 10g)...
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    /usr/sap/RXT/SYS/exe/run/R3load: START OF LOG: 20090102154030
    /usr/sap/RXT/SYS/exe/run/R3load: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#6 $ SAP
    /usr/sap/RXT/SYS/exe/run/R3load: version R7.00/V1.4 [UNICODE]
    Compiled Apr  1 2006 00:08:29
    /usr/sap/RXT/SYS/exe/run/R3load -testconnect
    DbSl Trace: OCI-call 'OCIServerAttach' failed: rc = 12541
    DbSl Trace: CONNECT failed with sql error '12541'
    DbSl Trace: OCI-call 'OCIServerAttach' failed: rc = 12541
    DbSl Trace: CONNECT failed with sql error '12541'
    (DB) ERROR: db_connect rc = 256
    DbSl Trace: OCI-call 'OCIServerAttach' failed: rc = 12541
    DbSl Trace: CONNECT failed with sql error '12541'
    DbSl Trace: OCI-call 'OCIServerAttach' failed: rc = 12541
    DbSl Trace: CONNECT failed with sql error '12541'
    (DB) ERROR: DbSlErrorMsg rc = 99
    /usr/sap/RXT/SYS/exe/run/R3load: job finished with 1 error(s)
    /usr/sap/RXT/SYS/exe/run/R3load: END OF LOG: 20090102154030
    Thanx,
    Amit

    Dear Juan,
    Trans.log is ;
    isrxi:rxtadm 7> cat trans.log
    4 ETW000 R3trans version 6.13 (release 700 - 20.02.06 - 16:15:00).
    4 ETW000 unicode enabled version
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 02.01.2009 - 16:45:09
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: R3trans -d
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [dev trc     ,00000]  Fri Jan  2 16:45:09 2009                              62  0.000062
    4 ETW000  [dev trc     ,00000]  db_con_init called                                    13  0.000075
    4 ETW000  [dev trc     ,00000]  create_con (con_name=R/3)                             21  0.000096
    4 ETW000  [dev trc     ,00000]  Loading DB library '/usr/sap/RXT/SYS/exe/run/dboraslib.so' ...
    4 ETW000                                                                              26  0.000122
    4 ETW000  [dev trc     ,00000]  load shared library (/usr/sap/RXT/SYS/exe/run/dboraslib.so), hdl 0
    4 ETW000                                                                            9099  0.009221
    4 ETW000  [dev trc     ,00000]  Library '/usr/sap/RXT/SYS/exe/run/dboraslib.so' loaded
    4 ETW000                                                                              16  0.009237
    4 ETW000  [dev trc     ,00000]  function DbSlExpFuns loaded from library /usr/sap/RXT/SYS/exe/run/dboraslib.so
    4 ETW000                                                                              30  0.009267
    4 ETW000  [dev trc     ,00000]  Version of '/usr/sap/RXT/SYS/exe/run/dboraslib.so' is "700.08", patchlevel (0.46)
    4 ETW000                                                                              42  0.009309
    4 ETW000  [dev trc     ,00000]  function dsql_db_init loaded from library /usr/sap/RXT/SYS/exe/run/dboraslib.so
    4 ETW000                                                                              21  0.009330
    4 ETW000  [dev trc     ,00000]  function dbdd_exp_funs loaded from library /usr/sap/RXT/SYS/exe/run/dboraslib.so
    4 ETW000                                                                              25  0.009355
    4 ETW000  [dev trc     ,00000]  New connection 0 created                              16  0.009371
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = -000000001 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              21  0.009392
    4 ETW000  [dev trc     ,00000]  db_con_connect (con_name=R/3)                         17  0.009409
    4 ETW000  [dev trc     ,00000]  find_con_by_name found the following connection for reuse:
    4 ETW000                                                                              15  0.009424
    4 ETW000  [dev trc     ,00000]  0: name = R/3, con_id = 000000000 state = DISCONNECTED, perm = YES, reco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO
    4 ETW000                                                                              16  0.009440
    4 ETW000  [dev trc     ,00000]  -->oci_initialize (con_hdl=0)                        195  0.009635
    4 ETW000  [dev trc     ,00000]  Client NLS settings: AMERICAN_AMERICA.UTF8          1567  0.011202
    4 ETW000  [dev trc     ,00000]  Logon as OPS$-user to get SAPSR3's password           14  0.011216
    4 ETW000  [dev trc     ,00000]  Connecting as /@RXT on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    4 ETW000                                                                              15  0.011231
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              17  0.011248
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1  0x9342150  0x9349ba0  0x935a298
    4 ETW000                                                                              16  0.011264
    4 ETW000  [dev trc     ,00000]  Allocating service context handle for con_hdl=0       15  0.011279
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      11  0.011290
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server RXT (con_hdl=0,svchp=0x935a1c8,svrhp=0x935c4a8)
    4 ETW000                                                                              63  0.011353
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCIServerAttach' failed: rc = 12541
    4 ETW000                                                                            1787  0.013140
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '12541'
    4 ETW000                                                                              16  0.013156
    4 ETW000  [dev trc     ,00000]  Try to connect with default password                  46  0.013202
    4 ETW000  [dev trc     ,00000]  Connecting as SAPSR3/<pwd>@RXT on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    4 ETW000                                                                              15  0.013217
    4 ETW000  [dev trc     ,00000]  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    4 ETW000                                                                              16  0.013233
    4 ETW000  [dev trc     ,00000]    0 UTF8                                                      1  0x9342150  0x9349ba0  0x935a298
    4 ETW000                                                                              15  0.013248
    4 ETW000  [dev trc     ,00000]  server_detach(con_hdl=0,stale=0,svrhp=0x935c4a8)
    4 ETW000                                                                              14  0.013262
    4 ETW000  [dev trc     ,00000]  Detaching from DB Server (con_hdl=0,svchp=0x935a1c8,srvhp=0x935c4a8)
    4 ETW000                                                                              13  0.013275
    4 ETW000  [dev trc     ,00000]  Deallocating server context handle 0x935c4a8          20  0.013295
    4 ETW000  [dev trc     ,00000]  Allocating server context handle                      20  0.013315
    4 ETW000  [dev trc     ,00000]  Attaching to DB Server RXT (con_hdl=0,svchp=0x935a1c8,svrhp=0x935c4a8)
    4 ETW000                                                                              25  0.013340
    4 ETW000  [dboci.c     ,00000]  *** ERROR => OCI-call 'OCIServerAttach' failed: rc = 12541
    4 ETW000                                                                             430  0.013770
    4 ETW000  [dbsloci.    ,00000]  *** ERROR => CONNECT failed with sql error '12541'
    4 ETW000                                                                              16  0.013786
    4 ETW000  [dblink      ,00431]  ***LOG BY2=>sql error 12541  performing CON [dblink#3 @ 431]
    4 ETW000                                                                              85  0.013871
    4 ETW000  [dblink      ,00431]  ***LOG BY0=>ORA-12541: TNS:no listener [dblink#3 @ 431]
    4 ETW000                                                                              15  0.013886
    2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'RXT'"
    isrxi:rxtadm 8>
    Regards,
    Amit

  • Getting the below error when running the Baseline.grf for the first time

    I am getting the below error when running the Baseline.grf for the first time.
    Appreciate your support in resolving it.
    Error below:
    INFO [main] - *** CloverETL framework/transformation graph, (c) 2002-2012 Javlin a.s, released under GNU Lesser General Public License ***
    INFO [main] - Running with CloverETL library version 3.2.1 build#63 compiled 04/01/2012 12:53:21
    INFO [main] - Running on 4 CPU(s), OS Windows 7, architecture amd64, Java version 1.6.0_20, max available memory for JVM 901120 KB
    INFO [main] - Loading default properties from: defaultProperties
    INFO [main] - Graph definition file: graph/Baseline.grf
    INFO [main] - Graph revision: 1.114 Modified by: mkressirer Modified: Thu Apr 12 13:27:18 EDT 2012
    INFO [main] - Checking graph configuration...
    INFO [main] - Graph configuration is valid.
    INFO [main] - Graph initialization (Baseline)
    INFO [main] - [Clover] Initializing phase: 0
    INFO [main] - [Clover] phase: 0 initialized successfully.
    INFO [main] - register MBean with name:org.jetel.graph.runtime:type=CLOVERJMX_1306871483270_0
    INFO [WatchDog] - Starting up all nodes in phase [0]
    INFO [WatchDog] - Successfully started all nodes in phase!
    INFO [RUN_GRAPH1_0] - Running graph ./graph/InitDataStore.grf in the same instance.
    INFO [RUN_GRAPH1_0] - Checking graph configuration...
    INFO [RUN_GRAPH1_0] - Graph configuration is valid.
    INFO [RUN_GRAPH1_0] - Graph initialization (InitDataStore)
    INFO [RUN_GRAPH1_0] - [Clover] Initializing phase: 0
    WARN [RUN_GRAPH1_0] - WS messenger cleanup failed.
    java.lang.NullPointerException
         at org.apache.axis2.client.Stub.cleanup(Stub.java:134)
         at com.opensys.cloveretl.component.WebServiceClient.free(Unknown Source)
         at org.jetel.graph.Phase.free(Phase.java:487)
         at org.jetel.graph.TransformationGraph.freeResources(TransformationGraph.java:681)
         at org.jetel.graph.TransformationGraph.free(TransformationGraph.java:955)
         at org.jetel.graph.runtime.PrimitiveAuthorityProxy.executeGraph(PrimitiveAuthorityProxy.java:149)
         at org.jetel.component.RunGraph.runGraphThisInstance(RunGraph.java:511)
         at org.jetel.component.RunGraph.runSingleGraph(RunGraph.java:409)
         at org.jetel.component.RunGraph.execute(RunGraph.java:302)
         at org.jetel.graph.Node.run(Node.java:414)
         at java.lang.Thread.run(Thread.java:619)
    WARN [RUN_GRAPH1_0] - Some graphs wasn't executed (because graph "./graph/InitDataStore.grf" finished with error).
    WARN [RUN_GRAPH1_0] - Some graph(s) finished with error.
    ERROR [WatchDog] - Graph execution finished with error
    ERROR [WatchDog] - Node RUN_GRAPH1 finished with status: ERROR caused by: Graph './graph/InitDataStore.grf' failed!
    ERROR [WatchDog] - Node RUN_GRAPH1 error details:
    org.jetel.exception.JetelException: Graph './graph/InitDataStore.grf' failed!
         at org.jetel.component.RunGraph.execute(RunGraph.java:324)
         at org.jetel.graph.Node.run(Node.java:414)
         at java.lang.Thread.run(Thread.java:619)
    INFO [WatchDog] - [Clover] Post-execute phase finalization: 0
    INFO [WatchDog] - [Clover] phase: 0 post-execute finalization successfully.
    INFO [WatchDog] - Execution of phase [0] finished with error - elapsed time(sec): 2
    ERROR [WatchDog] - !!! Phase finished with error - stopping graph run !!!
    INFO [WatchDog] - -----------------------** Summary of Phases execution **---------------------
    INFO [WatchDog] - Phase# Finished Status RunTime(sec) MemoryAllocation(KB)
    INFO [WatchDog] - 0 ERROR 2 20132
    INFO [WatchDog] - ------------------------------** End of Summary **---------------------------
    WARN [exNode_0_1306871483270_RUN_GRAPH1] - Attempt to unregister non-registered thread in the ContextProvider.
    ./graph/InitDataStore.grf: Execution of graph failed! Error during graph initialization: Phase 0 can't be initilized.
    INFO [WatchDog] - WatchDog thread finished - total execution time: 2 (sec)
    INFO [main] - Freeing graph resources.
    ERROR [main] - Execution of graph failed !

    It can't find an Endeca specific class when running via the clover command line utility. Thus, the classpath being set in that shell script is not incorporating the .jar files where the endeca-specific classes are packaged. I would start by adding an line to see what your classpath is set to. There are actually already some lines of shell script in clover that you can uncomment to see what .jars are getting loaded:
    #echo $CLOVER_LIB/*
    for i in $CLOVER_LIB/*.jar $CLOVER_LIB/*.zip; do
         LOCAL_CLASSPATH="$LOCAL_CLASSPATH:$i"
    done;
    #for i in `ls $CLOVER_LIB/*.jar`; do
    #echo $i
    #done;
    You could also echo LOCAL_CLASSPATH to see what is getting set there. At the end of the day, you will need the endeca-specific jars to load which can be found here: /Endeca/Discovery/2.3.0/Integrator/plugins/com.endeca.latitude_1.0.0/*
    HTH,
    Dan
    http://branchbird.com

  • How do I add an included jsp to my project and not get a compile error?

    Hi,
    I have a project with some included jsp's however if I add them to the project, when I build I get a compile error as the jsp uses variables from the calling jsp.
    Any ideas on how to get round this.
    Thanks
    DM

    There are two main ways that I deal with this problem (yeah, it sucks, but it sort of makes sense that it happens...) (I presume you're talking static include here...)
    #1 - name the included file with an extension that JDev will not try to compile (.jspf - for JSP Fragment - is common) Then it will be compiled in with the including page, but won't gag the project compilation. Advantage - it works, and you find out at compile time if you hosed up the variable reference. Disadvantage: JDev tries really, really, really hard to keep you from naming a JSP file with an extension of .jspf I normally create the .jsp file in JDev, remove it from the project, rename the file outside of JDeveloper, then add it back to the project - pain in the butt, but it works (and you probably aren't building scads of these included files...)
    #2 - add the variable to be referenced to the pageContext implicit object as an attribute in your including page (ex, <% pageContext.setAttribute("myVar", myVar); %>), then reference that attribute in your included JSP (ex, <%= pageContext.getAttribute("myVar") %>) . It will compile fine (as the compiler has no way of knowing if the pageContext attribute actually exists, it just sees that the syntax is good and motors along merrily. Advantage: don't have to have differently named JSP files (which isn't actually a big deal). Disadvantage: You hvae to add the variable to the pageContext (and you have to always add Object derivatives, as primitives won't go into a hash) and you don't find out if you screwed the variable up until runtime (when it tries the getAttribute, which could return null if you didn't properly set it to start with) vs at compile-time w/ the direct reference.
    HTH!
    Jim

  • Getting a compilation error. Says ; is missing in line 34

    // A program to demonstrate the use of JList's
    //Import Statements
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ListTest extends JFrame{
         //Class Declarations
         JList list;
         String[] colorNames = {"black", "blue", "green", "red"};
         Color[] colors  = {Color.BLACK, Color.BLUE, Color.GREEN, Color.RED };
         //Main Program that starts Execution
         public static void main(String[] args) {
              ListTest test =  new ListTest();
              test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Constructor
         public ListTest()
              super("List Test Demo");
              Container container  = getContentPane();
              container.setLayout(new FlowLayout());
              list = new JList(colorNames);
              list.setVisibleRowCount(3);
              list.setSelectedIndex(0);
              //Anonymous Inner Class
              list.addListSelectionListener() {
                   new ListSelectionListener(){
                   public void valueChanged( ListSelectionEvent e)
                        container.setBackground(colors[colorlist.getSelectedIndex()]);
              container.add(list);
              pack();
              setVisible(true);
    }// End of Class ListTestGetting the following compilatioN Error
    Getting a compilation error. Says ; is missing in line 34

    // A program to demonstrate the use of JList's
    //Import Statements
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class ListTest extends JFrame{
         //Class Declarations
         JList list;
         String[] colorNames = {"black", "blue", "green", "red"};
         Color[] colors  = {Color.BLACK, Color.BLUE, Color.GREEN, Color.RED };
         //Main Program that starts Execution
         public static void main(String[] args) {
              ListTest test =  new ListTest();
              test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Constructor
         public ListTest()
              super("List Test Demo");
              Container container  = getContentPane();
              container.setLayout(new FlowLayout());
              list = new JList(colorNames);
              list.setVisibleRowCount(3);
              list.setSelectedIndex(0);
              //Anonymous Inner Class
              list.addListSelectionListener (
                   new ListSelectionListener() {
                   public void valueChanged( ListSelectionEvent e)
                        container.setBackground(colors[colorlist.getSelectedIndex()]);
              container.add(list);
              pack();
              setVisible(true);
    }// End of Class ListTestCannot resolve symbol ListSelectionListener [LINE 36]

  • Why dont we get a compilation error for converting a collection into array?

    Why don't we get a compilation error but get a runtime error while explicit casting of Object[] into a String[]?
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Map;
    public class SampleMap {
      public static void main(String[] args) {
        Map<Integer, String> temp = new HashMap<Integer, String>();
        temp.put(new Integer(1), "cat");
        temp.put(new Integer(2), "rat");
        Collection coll = temp.values();
        String[] arr = (String[]) coll.toArray();
        System.out.println(arr.length);
    } Thanks,
    Harish Srinivasan

    Infiniti wrote:
    Why don't we get a compilation error but get a runtime error while explicit casting of Object[] into a String[]?
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.Map;
    public class SampleMap {
    public static void main(String[] args) {
    Map<Integer, String> temp = new HashMap<Integer, String>();
    temp.put(new Integer(1), "cat");
    temp.put(new Integer(2), "rat");
    Collection coll = temp.values();
    String[] arr = (String[]) coll.toArray();
    System.out.println(arr.length);
    } Thanks,
    Harish SrinivasanAn explicit cast's job is to tell the compiler that even though it cannot guarantee that the conversion will work, allow the code anyway and let the runtime handle an error if it occurs.

  • Fixing the "compile error in hidden module: DistMon"

    Our computer images are WinXP SP2, with Office XP SP3. Some people have Acrobat 8.12 Pro installed, and 2 of them were getting the above error.
    I found some help in the forums about exporting a registry key, etc. On the 1st person, I did all of that and the error was still there. I went into the VBE and saw a PDFMaker.xla module that could not be deleted. So I went to %user profile%\Application Data\Microsoft\Excel\XLSTART\ and deleted the PDFMaker.xla. No more error.
    I tested on the 2nd person by just deleting that file, and no more error. They still have the Acrobat toolbar, so it didn't disable that.
    I wanted to share this easy fix in case it works for anyone else.
    E Powell
    Austin, TX

    re: Install error PDFX1aSet_PSR_ gravure
    Greetings,
    My installation of Acrobat Pro 6.0 hangs when it can't find the file PDFX1aSet_PSR_ gravure.pdf. Any ideas about how to fix?
    Context clues:
    - Acrobat was running fine (as would have the install CD, I believe) until I removed Acrobat due to an unrelated issue using the Windows Install Cleanup program.
    - I've uninstalled and reinstalled Reader 8.0; no effect
    - The error is also temporally related to getting the following error when opening and closing Excel: "..compile error.. autoexecnew," then "distmon," respectively. I attempted this solution, but failed:
    http://www.adobeforums.com/cgi-bin/webx/.3bc307c7
    http://support.microsoft.com/?id=307410
    - I've uninstalled and reinstalled Office 2003; run repair w/in Excel; no effect
    - In Internet Explorer, I can open a PDF successfully, but the following error also appears: "One or more Adobe PDF extensions are disabled. This may impact how PDFs are displayed... enable add-ons [in IE]." However, all the Adobe add-ons are already enabled in IE.
    Thanks very much for your ideas.

  • Getting a compiler error

    Hello All:<br /><br />   I have some code provided to me by Adobe for building a selection suite. In the .FR I have this:<br /><br />     AddIn<br />     {<br />           kIntegratorSuiteBoss,<br />           kInvalidClass,<br />           {<br />              IID_IMYSELECTIONSUITE, kMySelectionSuiteASBImpl,<br />           }<br />     },<br /><br />     AddIn<br />     {<br />           kLayoutSuiteBoss,<br />         kInvalidClass,<br />         {<br />           IID_IMYSELECTIONSUITE, kMySelectionSuiteCSBImpl,<br />         }<br />     },<br /><br />Please assume that all definitions and declarations and PMIDs, etc., have been declared in the appropriate auxiliary files.<br /><br />I copied the files implementing the above verbatim into the project.<br /><br />This is how I instantiate the interface in the code:<br /><br />   ISelectionManager* iSelMgr = ActiveContext -> GetContextSelection();<br /><br />   InterfacePtr<IMySelectionSuite> mySelectionSuite(iSelMgr, UseDefaultIID());<br /><br />The problem is that when I compile the module, I get the following error message:<br /><br />C:\Program Files\Adobe\InDesignCSAndInCopyCSSDK\source\sdksamples\codesnippets\SnpTestSelectionSuite .cpp(178): error C2664: 'InterfacePtr<IFace>::InterfacePtr(const IPMUnknown *,PMIID)' : cannot convert parameter 1 from 'ISelectionManager *' to 'const IPMUnknown *'<br />        with<br />        [<br />            IFace=IMySelectionSuite<br />        ]<br /><br />I can make this disappear by casting iSelMgr to type IPMUnknown, but somehow that doesn't feel right.<br /><br />As far as I can tell, I have the right headers included in the file.  Anyone have any suggestions about how to resolve this error message without the ambiguity of using IPMUnknown?

    Strizh:
    That was a bonehead problem wasn't it? Sigh. Thanks for your solution.
    R,
    John

  • Tomcat and Jrun and get the same error.

    Hello freinds,
    iam facing problem with this.
    It cant able to find Enumeration although it finds Vector which is in the same package as Enumeration. but i tried its running this on both tomcat and Jrun and get the same error.
    <HTML>
    <HEAD><TITLE> Example use of Vectors </TITLE></HEAD>
    <BODY>
    <%! String name = new String("Jonh Doe");
    Integer ssn = new Integer(111223333);
    Double salary = new Double(65432.10);
    Vector employee = new Vector();
    String[] infoTitles = {"Name", "SSN", "Salary"};
    %>
    <% employee.addElement(name);
    employee.addElement(ssn);
    employee.addElement(salary);
    int i = 0;
    Enumeration employeeInfo = employee.elements();
    //while(employeeInfo.hasMoreElements()){ %>
    <P> Employee <%//= infoTitles[i++] %>: <%//= (Object)employeeInfo.nextElement() %>
    <% // } %>
    </BODY>
    </HTML>
    org.apache.jasper.JasperException: Unable to compile class for JSPC:\Tomcat\Binary\work\localhost_8080%2Fexamples\_0002fjsp_0002fmyJSPs_0002fhour_00037_0002fusingEnumerations_0002ejspusingEnumerations_jsp_18.java:75: Class
    jsp.myJSPs.hour_00037.Enumeration not found.
    Enumeration employeeInfo = employee.elements();
    can any body help me
    todd

    Hi toddyj,
    problem in the code is you havent imported the package
    here iam giving below you my tested code..
    <HTML>
    <HEAD><TITLE> Example use of Vectors </TITLE></HEAD>
    <BODY>
    <%@ page language="java" import="packagename.*" %>
    <%! String name = new String("Jonh Doe");
    Integer ssn = new Integer(111223333);
    Double salary = new Double(65432.10);
    Vector employee = new Vector();
    String[] infoTitles = {"Name", "SSN", "Salary"};
    %>
    <% employee.addElement(name);
    employee.addElement(ssn);
    employee.addElement(salary);
    int i = 0;
    Enumeration employeeInfo = employee.elements();
    //while(employeeInfo.hasMoreElements()){ %>
    <P> Employee <%//= infoTitles[i++] %>: <%//= (Object)employeeInfo.nextElement() %>
    <% // } %>
    </BODY>
    </HTML>
    I hope by this import reason your not able to find Enumeration
    Regards,
    TirumalaRao
    Developer Technical support,
    Sun MicroSystem, India.

  • I get the following errors with CVI 2010. "sal.h"(17​06,15) Redefiniti​on of macro '__null'.

    A project which was working with CVI 9.0 on XP does not compile with CVI 2010.
     I get the following errors with CVI 2010. "sal.h"(1706,15)   Redefinition of macro '__null'.  
    doesnt work with CVI 2010 on on win 7 too.  
    Could some one provide some insight into this please?  
    Thanks
    performance

    You wild guess is correct.
    The version of the Microsoft SDK that shipped with CVI 9.0 included a definition of __null that matched the definition that is in sal.h. You can find this definition in line 448 of CVI90\sdk\include\specstrings.h.
    The version of the Microsoft SDK that shipped with CVI 2010 included a definition of __null that no longer matches the definition that is in sal.h. You can find this definition in line 575 of CVI2010\sdk\include\spectstrings_strict.h. This is why the CVI compiler complains when it finds the sal.h definition.
    The SDK that ships with CVI has been customized to make sure that it works with the CVI compiler. But this does not include making sure that it also works with VC headers. In general, there's no way to guarantee that VC headers can be compiled in CVI, since these headers don't ship with CVI and cannot be customized.
    In this particular case, you might get it work if you include sal.h before you include windows.h. But there are no guarantees.
    Luis

  • I just tried to install the 11.4 update (or whichever one is the most recent update as of 1/26/2014) and when it failed i tried to install manually and now whenever i try to use it, i get the following error: the application has failed to start because MS

    i just tried to install the 11.4 update (or whichever one is the most recent update as of 1/26/2014) and when it failed i tried to install manually and now whenever i try to use it, i get the following error: "The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." Right after i click ok i then get this error: "Itunes was not installed correctly. Please reinstall Itunes. Error 7 (Windows error 126)." I tried to uninstall Itunes and then reinstall the 11.03 version but that didnt work either. I want to know if i copy all of the music in my itunes folder to an external without consolidating can i still transfer all my itunes music from my current windows xp pc to a brand new one and have my current itunes library in my new pc? Basically i just want to know 3 things: What exactly does consolidating the itunes library do? Can i copy, paste, and transfer my itunes library to an external and from there to a new pc? Will i be able to transfer my itunes library without consolidating the files?

    I have found a temporary solution, allowing the previous version of iTunes (v. 11.1.3 (x64) in my case) to be re-installed.  It will allow you to re-establish use of iTunes until the Apple software engineers fix the most recent disasterous upgrade (v. 11.1.4).  Please see and follow the procedure in the following article:http://smallbusiness.chron.com/reverting-previous-version-itunes-32590.html   The previous version works beautifully.

  • Getting the following error while parsing the values usng xml parser

    Hi
    I am getting the following error while parsing the values using the code in r12 instance on linux
    declare
    XML_PARSER XMLPARSER.PARSER;
    DOC XMLDOM.DOMDOCUMENT;
    DOCELEMENT DBMS_XMLDOM.DOMELEMENT;
    BEGIN
    -- NEW PARSER
    XML_PARSER := XMLPARSER.NEWPARSER;
    -- SET SOME CHARACTERISTICS
    XMLPARSER.SETVALIDATIONMODE(XML_PARSER, FALSE);
         IF P_DIR IS NOT NULL AND P_FILENAME IS NOT NULL
         THEN
         FND_FILE.PUT_LINE(FND_FILE.LOG,'DIRECTORY FOUND'||'-'||P_DIR);
         XMLPARSER.SETBASEDIR(XML_PARSER, P_DIR);     
         -- PARSE INPUT FILE
         FND_FILE.PUT_LINE(FND_FILE.LOG,'FILE FOUND'||'-'||P_FILENAME);
         XMLPARSER.PARSE(XML_PARSER, P_DIR || '/' || P_FILENAME);     
         -- GET DOCUMENT
         DOC := XMLPARSER.GETDOCUMENT(XML_PARSER);
         LOAD_SUPP(doc);
         ELSE
         DBMS_OUTPUT.PUT_LINE('DIRACTORY/FILENAME CANNOT BE NULL');
         END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('DATA NOTINSERTED'||sqlerrm);
         ROLLBACK;
    END
    I am getting the following error
    DIRACTORYL-/home/appldevORA-0000: normal, successful completion
    FILE NAME-suppliersample_data.xmlORA-0000: normal, successful completion
    DATA NOTINSERTEDORA-31001: Invalid resource handle or path name "/home/appldev/suppliersample_data.xml"
    ORA-06512: at "SYS.XDBURITYPE", line 11
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 142
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    It could be great if some one could give a suggestion/solution.
    Thanks
    Ajesh

    Besides this is not the correct forum try to google the error message first before posting:
    http://ora-29280.ora-code.com/
    cheers

  • I am using a 2003 eMac and am running on Mac OSX  vs 10.4.11. iTunes is not recognizing music I have purchased and when I try to connect when it request me to I get the following error message:  Cannot complete i Tunes Store request. A required iTunes com

    I am using a 2003 eMac and am running on Mac OSX  vs 10.4.11. I amrunning iTunes 8.2.1 (6) and not able to upgrade iTunes on this computer. iTunes is not recognizing music I have purchased and when I try to connect when it request me to I get the following error message:
    Cannot complete  iTunes Store request. A required iTunes component is not installed (-42404)
    Please help.

    Is this music purchased back in DRM days? I don't actually have any iTunes music so I can't test with my iTunes 7.5, but I know that without iTunes 10 you cannot even connect to the store anymore.  I wouldn't think that would require an active connection to the store all the time, otherwise how could you play music on a computer in the middle of nowhere?  Did you do something to trigger iTunes suddenly wanting to connect and check on machine authorization?

  • I am trying to update ITunes from 10.4 to 10.5 I have tried from both the program, and from a download on Apple's website. Regardless, I get the following error messages: (1) Installation package for iTunes cannot be found. Try installing to find the inst

    I am trying to update ITunes from 10.4 to 10.5 I have tried from both the program, and from a download on Apple's website. Regardless, I get the following error messages: (1) Installation package for iTunes cannot be found. Try installing to find the installation package 'iTunes.msi' in a folder from which you can install iTunes.  I can't find this folder. I have tried to completely unistall iTunes through the Control Panel, but it wouldn't let me: I tried going directly to the files themselves, but cannot uninstall. Any help would be greatly appreciated. System OS: Win XP SP 3.

    Set the permissions for Everyone in the folder in which CCPackager created, to "Read/Write" enabled. This is strange since there is only an administrator account on the Mac (and that account already has read/write), but it seems to resolve the issue.

Maybe you are looking for