Compiler error for single line if

Hi all,
I found an interesting quirk, recently. I've condensed the problem into the following simple test class.
public class Main {
    public static void main(String[] args) {
        final boolean myBoolean = args.length > 1;
        if (myBoolean) {
            final double result = doIt();
    public static double doIt() {
        return System.currentTimeMillis();
}Turns out that the variable declaration on line 9 (it doesn't have to be calling a method), will not compile if I remove the scoping around the if statement. See below:
public class Main {
    public static void main(String[] args) {
        final boolean myBoolean = args.length > 1;
        if (myBoolean)
            final double result = doIt();
    public static double doIt() {
        return System.currentTimeMillis();
}This fails to compile with the message:
Main.java:8: illegal start of expression
final double result = doIt();
Since the code is perfectly valid (as far as I'm aware), I was hoping someone might have an explanation for this strange behaviour. Oh, it fails to compile on 1.4 and 1.5 compilers.
The only thing I can think of is that the compiler is being clever and knows the declaration is stupid since the variable is never used. However, this doesn't explain why adding the scoping around the statement allows the code to compile. FYI, this is not limited to if statements. Also happens with for loops. Must be the single line scoping issue.
Thanks in advance,
Adam

Thank you so much for your insightful and considered suggestion. I hope I don't shock you too much by telling you that I have in fact tried it without the final keyword. Regardless of whether or not this gets around the compilation issue (it doesn't - did you even try it?), the question in my original post was fairly clearly along the lines of "Does anyone know why this compiles with the braces, and doesn't compile without them?"
Does anyone have anything useful to contribute?

Similar Messages

  • Compilation Error for import classes not found in generated Proxy Class

    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

    Hi,
    I resolved the other errors by changing all references from com.bea.jcom.Variant
    etc to com.linar.jintegra.class name..all were present under the com.linar.jintegra
    package.
    Thank you all anyways,
    Regards,
    rahul
    "Rahul Srivastava" <[email protected]> wrote:
    >
    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling
    the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch
    class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used
    by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found
    inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface
    with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch
    to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the
    COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

  • [svn:fx-trunk] 5353: * Added compiler error for Halo Navigators containing non-Containers

    Revision: 5353
    Author: [email protected]
    Date: 2009-03-17 12:59:06 -0700 (Tue, 17 Mar 2009)
    Log Message:
    * Added compiler error for Halo Navigators containing non-Containers
    as their first level child.
    tests Passed: checkintests
    Needs QA: YES
    Needs DOC: NO
    Bug fixes: SDK-19317
    API Change: NO
    Reviewer: Pete F.
    Code-level description of changes:
    compiler/mxml/lang/StandardDefs.java
    Added getContainerPackage(), isHaloNavigator(), CLASS_VIEWSTACK,
    CLASS_ACCORDION, and PACKAGE_MX_CONTAINERS.
    compiler/mxml/builder/ComponentBuilder.java
    Modified
    ComponentBuilder.ComponentAttributeHandler.nestedDeclaration() to
    report an error if a non-container is declared as a child of a
    Halo navigator.
    compiler_en.properties
    Added HaloNavigatorsRequireHaloContainerChildren message.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19317
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties

  • Java compile error for removed API

    Hi,
    What are the Java compile errors for API that has been removed?
    As I understand it, API elements are deprecated and not removed from the API immediately, but will be removed in future releases or after so many years.
    When Java code is compliled in a higher Java version, and the API has finally been removed - what are the errors that will be ouput in the log?
    Thank you for your time.

    WalterLaan wrote:
    And if you recompile one with a method removed that the other use and then run the other you would get a NoSuchMethodError (or more generally just an error sub class of LinkageError).
    Not that you should be catching those unless you accept classes from the user (as plugins).Presumably you mean he should not be catching them?
    @OP: In general, you should not catch unchecked exceptions. These are RuntimeException, Error, and their descendants. There are exceptions, such as at "layer boundaries," or when you don't want errors in one module/application/plugin/etc. to affect or prevent processing in others.

  • [svn:fx-trunk] 10766: Re-commit compiler errors for other theme' s styles feature.

    Revision: 10766
    Author:   [email protected]
    Date:     2009-09-30 15:55:55 -0700 (Wed, 30 Sep 2009)
    Log Message:
    Re-commit compiler errors for other theme's styles feature. If Style metadata has a "themes" attribute, the style is only valid if that theme is applied.
    The Spark theme is applied by default. The halo theme can be specified as a compiler argument or by selecting the "MX Only" component set in Builder.
    All other themes need to be applied using theme+= instead of theme=. If you use theme= you will get warnings about styles used in CSS selectors, and errors if you use any theme-specific style as an attribute on an MXML tag.
    By default, styles that aren't valid for the current theme are errors. These can be changed to warnings with the report-invalid-styles-as-warnings compiler option.
    QE notes: Expect test breakage
    Doc notes: The new policy for themes needs to be documented.
    Bugs: none yet, but I'm sure there will be some...
    Reviewer: Ryan
    Tests run: checkintests, cyclone
    Is noteworthy for integration: Yes
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/defaults.css
        flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPan el.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as
        flex/sdk/trunk/frameworks/projects/halo/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin .mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as
        flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.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/MxmlConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/DeclarationHandler.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties
        flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java
    Added Paths:
        flex/sdk/trunk/frameworks/themes/Spark/spark.css
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ApplicationBackground.as

    Revision: 10766
    Author:   [email protected]
    Date:     2009-09-30 15:55:55 -0700 (Wed, 30 Sep 2009)
    Log Message:
    Re-commit compiler errors for other theme's styles feature. If Style metadata has a "themes" attribute, the style is only valid if that theme is applied.
    The Spark theme is applied by default. The halo theme can be specified as a compiler argument or by selecting the "MX Only" component set in Builder.
    All other themes need to be applied using theme+= instead of theme=. If you use theme= you will get warnings about styles used in CSS selectors, and errors if you use any theme-specific style as an attribute on an MXML tag.
    By default, styles that aren't valid for the current theme are errors. These can be changed to warnings with the report-invalid-styles-as-warnings compiler option.
    QE notes: Expect test breakage
    Doc notes: The new policy for themes needs to be documented.
    Bugs: none yet, but I'm sure there will be some...
    Reviewer: Ryan
    Tests run: checkintests, cyclone
    Is noteworthy for integration: Yes
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/defaults.css
        flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Button.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToolTip.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPan el.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ScrollControlBase.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManager.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.as
        flex/sdk/trunk/frameworks/projects/halo/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/SkinnableDataContainerSkin .mxml
        flex/sdk/trunk/frameworks/projects/sparkskins/src/SparkSkinsClasses.as
        flex/sdk/trunk/frameworks/tests/basicTests/BasicTests.css
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/DefaultsConfigurator.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FXGCompiler.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/MxmlConfiguration.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/DeclarationHandler.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/MxmlDocument.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties
        flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java
    Added Paths:
        flex/sdk/trunk/frameworks/themes/Spark/spark.css
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/sparkskins/src/mx/skins/spark/ApplicationBackground.as

  • Unable to release planned order for single line from MRP workbench

    Hi
    We are unable to release planned order for single line from MRP Planner workbench,but Select All For Release is working for all the lines for the item
    User want to release a specific line but no new requisition is generated
    It is highly appreciable if anyone could help to resolve this issue
    Appreciate the Help
    Regards
    VKPK

    It sounds like the release goes through in the workbench but the requisition does not show up in source - is this correct? If so I would check item attributes / flags for purchasing and buy. also have found some items require a purchase price to be populated in master and org

  • Why does plsql give compilation error for select statement?

    When I run following plsql program, it gives compilation error. Could somebody please point me out what could be wrong here? I am running it from system user.
    create or replace procedure drop_user_proc (iname in varchar2) is
    uname varchar2(100);
    begin
    select username into uname from dba_users where username = upper(iname);
    end drop_user_proc;
    select username from dba_users where username = upper('newuser');
    When I run it, I get following error. dba_users is there that is the reason it works outside plsql block, but it doesn't from inside block.
    SQL> @t4
    Warning: Procedure created with compilation errors.
    USERNAME
    NEWUSER
    SQL> show err
    Errors for PROCEDURE DROP_USER_PROC:
    LINE/COL ERROR
    4/3 PL/SQL: SQL Statement ignored
    4/35 PL/SQL: ORA-00942: table or view does not exist

    Role based grants are not available within the stored procedures.
    Only explicit grants are recognized when compiling stored code.
    You need to grant select on that table to the user where you are creating this procedure.

  • Compilation Error for userdisp.aspx page

    Any ideas what would cause this?
    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
    Compiler Error Message: CS1069: The type name 'UserProfileManager' could not be found in the namespace 'Microsoft.Office.Server.UserProfiles'. This type has been forwarded to assembly 'Microsoft.Office.Server.UserProfiles, Version=15.0.0.0,
    Culture=neutral, PublicKeyToken=71e9bce111e9429c' Consider adding a reference to that assembly.
    Source Error:
    Line 18: {
    Line 19: Microsoft.Office.Server.ServerContext cntx = Microsoft.Office.Server.ServerContext.GetContext(HttpContext.Current);
    Line 20: Microsoft.Office.Server.UserProfiles.UserProfileManager profileManager = new Microsoft.Office.Server.UserProfiles.UserProfileManager(cntx);
    Line 21: bool userExists = profileManager.UserExists(this.UserListForm.Item["Account"].ToString());
    Line 22:
    Paul Riker

    Hi Paul,
    Glad that you resolved the issue and thanks for sharing, this would be helpful to others who have the similar issue in the future.
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Daniel Yang
    TechNet Community Support

  • Compilation Error for prvtbkrs.plb execution

    I tried to solve the issue for RMAN connection and i run this script
    prvtbkrs.plb
    Warning: Package Body created with compilation errors.
    SQL> show err
    Errors for PACKAGE BODY DBMS_BACKUP_RESTORE:
    LINE/COL ERROR
    3975/7 PL/SQL: SQL Statement ignored
    3976/31 PL/SQL: ORA-00942: table or view does not exist
    4054/6 PL/SQL: SQL Statement ignored
    4054/35 PL/SQL: ORA-00942: table or view does not exist
    4072/6 PL/SQL: Statement ignored
    4072/6 PLS-00201: identifier 'SYS.DBMS_SYS_ERROR' must be declared
    5457/11 PL/SQL: SQL Statement ignored
    5459/18 PL/SQL: ORA-00942: table or view does not exist
    I cant connect using RMAN...Please help me with this issue.
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    ORA-04063: package body "SPS.DBMS_BACKUP_RESTORE" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SPS.DBMS_BACKUP_RESTORE"
    RMAN-04015: error setting target database character set to WE8MSWIN1252

    I run the script and
    SQL> @C:\app\Administrator\product\11.1.0\SPS\RDBMS\ADMIN\utlrp.sql
    SELECT dbms_registry_sys.time_stamp('utlrp_bgn') as timestamp from dual
    ERROR at line 1:
    ORA-00904: "DBMS_REGISTRY_SYS"."TIME_STAMP": invalid identifier
    DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid
    DOC> objects in the database. Recompilation time is proportional to the
    DOC> number of invalid objects in the database, so this command may take
    DOC> a long time to execute on a database with a large number of invalid
    DOC> objects.
    DOC>
    DOC> Use the following queries to track recompilation progress:
    DOC>
    DOC> 1. Query returning the number of invalid objects remaining. This
    DOC> number should decrease with time.
    DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
    DOC>
    DOC> 2. Query returning the number of objects compiled so far. This number
    DOC> should increase with time.
    DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
    DOC>
    DOC> This script automatically chooses serial or parallel recompilation
    DOC> based on the number of CPUs available (parameter cpu_count) multiplied
    DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).
    DOC> On RAC, this number is added across all RAC nodes.
    DOC>
    DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
    DOC> recompilation. Jobs are created without instance affinity so that they
    DOC> can migrate across RAC nodes. Use the following queries to verify
    DOC> whether UTL_RECOMP jobs are being created and run correctly:
    DOC>
    DOC> 1. Query showing jobs created by UTL_RECOMP
    DOC> SELECT job_name FROM dba_scheduler_jobs
    DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
    DOC>
    DOC> 2. Query showing UTL_RECOMP jobs that are running
    DOC> SELECT job_name FROM dba_scheduler_running_jobs
    DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';
    DOC>#
    utl_recomp.recomp_parallel(threads);
    ERROR at line 4:
    ORA-06550: line 4, column 4:
    PLS-00201: identifier 'UTL_RECOMP.RECOMP_PARALLEL' must be declared
    ORA-06550: line 4, column 4:
    PL/SQL: Statement ignored
    SELECT dbms_registry_sys.time_stamp('utlrp_end') as timestamp from dual
    ERROR at line 1:
    ORA-00904: "DBMS_REGISTRY_SYS"."TIME_STAMP": invalid identifier
    PL/SQL procedure successfully completed.
    DOC> The following query reports the number of objects that have compiled
    DOC> with errors (objects that compile with errors have status set to 3 in
    DOC> obj$). If the number is higher than expected, please examine the error
    DOC> messages reported with each object (using SHOW ERRORS) to see if they
    DOC> point to system misconfiguration or resource constraints that must be
    DOC> fixed before attempting to recompile these objects.
    DOC>#
    select COUNT(*) "OBJECTS WITH ERRORS" from obj$ where status = 3
    ERROR at line 1:
    ORA-00942: table or view does not exist
    DOC> The following query reports the number of errors caught during
    DOC> recompilation. If this number is non-zero, please query the error
    DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
    DOC> are due to misconfiguration or resource constraints that must be
    DOC> fixed before objects can compile successfully.
    DOC>#
    select COUNT(*) "ERRORS DURING RECOMPILATION" from utl_recomp_errors
    ERROR at line 1:
    ORA-00942: table or view does not exist
    PL/SQL procedure successfully completed.
    ERROR:
    ORA-04067: not executed, package body "SPS.DBMS_OUTPUT" does not exist
    ORA-06508: PL/SQL: could not find program unit being called: "SPS.DBMS_OUTPUT"
    ORA-06512: at line 1
    BEGIN dbms_registry_sys.validate_components; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_REGISTRY_SYS.VALIDATE_COMPONENTS' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ERROR:
    ORA-04067: not executed, package body "SPS.DBMS_OUTPUT" does not exist
    ORA-06508: PL/SQL: could not find program unit being called: "SPS.DBMS_OUTPUT"
    ORA-06512: at line 1
    SQL>

  • Pls906 compiler error for on_logon trigger

    Hello,
    I wrote a PL/SQL program for on_logon trigger. But it has compiler error(no message file, ora-06540 error and pls906 error). The program is as follow:
    DECLARE un VARCHAR2(80);
    pw VARCHAR2(80);
    cn VARCHAR2(80);
    BEGIN
    /* ** Bring up the logon screen */
    Logon_Screen;
    /*** Get the username, password and connect string. */
    un=Get_application_property(username);
    pw=Get_application_property(password);
    cn=get_application_property(connect_string);
    /*** Log the user onto the database */
    IF cn IS NOT NULL THEN
    LOGON(un,pw&#0124; &#0124;'@'&#0124; &#0124;cn);
    ELSE
    LOGON(un,pw);
    END IF;
    END;
    Any help is appreciated
    null

    I tried following
    ================================================================
    SQL> create or replace trigger after_logon_audit
    2 AFTER LOGON ON DATABASE
    3 WHEN (USER not in ('SYS','SYSTEM')
    4 BEGIN
    5 INSERT INTO LOGON_AUDIT
    6 (log_time,log_user,LOG_IPADDR,LOG_TERMINAL,LOG_MACHINE,LOG_SESSIONID,LOG_OSUSER)
    7 ( select SYSDATE, USER, SYS_CONTEXT('USERENV','IP_ADDRESS'), SYS_CONTEXT('USERENV','TERMINAL'),
    8 a.machine, SYS_CONTEXT('USERENV','SESSIONID'), a.OSUSER
    9 from V$SESSION a, dual
    10 where
    11 SYS_CONTEXT('USERENV','SESSIONID') = a.AUDSID
    12 and SYS_CONTEXT('USERENV','SESSION_USERID') = USER#);
    13 COMMIT;
    14 RAISE_APPLICATION_ERROR(-20002,'The DB is unavailable');
    15 END;
    16
    17 /
    ===============================================================
    but got the following error message.
    ========================
    AFTER LOGON ON DATABASE
    ERROR at line 2:
    ORA-04072: invalid trigger type
    ========================
    Problem still persists. :(

  • Posting multiple tax codes for single line order in MIRO

    Hi all ,
    I have received a request from my business colleagues to investigate the possibility of posting multiple tax codes against a single line order in MIRO.
    This apparently can be a possibility for such things as training.
    I have searched a number of forums and tried and tested different ways in my develoment client but am unable to find a solution. admittedly I am no real expert in this area and would be gratefu;lt of any ideas / assistance  / etc..

    HI,  There is a possible solution for this scenario.
    1. Create 2 tax codes for VAT and SERVICE Tax at 12.5% and 12.36% respectively
    2. While posting the Invoice (TRX - FB60) following steps need to be followed.
    3. Amount has to be split into two line items
    4. Ist Line Item should have the Vat amount + 70000/- and select relevant tax code that was
        created for 12.5%
    5. Similarly 2nd Line Item should have Service Tax amount + 30000/- and select relevant tax code that    
        was created for 12.36%.
    Hope this would meet your requirement. If the solution is okay, kindly indicate the points.
    Regards
    K.Sanjai Babu

  • GREP search for single line paragraphs, CS3

    I need to find all single line paragraphs, apply a paragraph style to them and apply that style's "next style" to the next paragraph.
    Is there any way to do this using GREP?
    Thanks

    This script will do what you ask. Just change the name of the head paragraph to whatever yours is in line 11:
    //DESCRIPTION: Apply Head Style to single-line paras with Next Style in Selected Story
    (function() {
      if (app.documents.length > 0 &&
            app.selection.length == 1 &&
              app.selection[0].hasOwnProperty("baseline")) {
      var myStory = app.selection[0].parent;
      var myParas = myStory.paragraphs;
      for (var j = myParas.length - 1; j >= 0; j--) {
        if (myParas[j].lines.length == 1) {
          myParas[j].appliedParagraphStyle = "H1";
          try {
            myParas[j+1].appliedParagraphStyle = myParas[j].appliedParagraphStyle.nextStyle;
          } catch(e) {} // last para has one line, so ignore
    } else {
       // No document open
       alert("Please select some text and try again.");
    To use the script, copy it from here into an ExtendScript Toolkit document (you'll find that in the Adobe Utilities folder). Save the document into an appropriate folder and run the script from the Scripts panel with a live insertion point in the story.
    To work out where to save the script, open the Scripts panel and then use Reveal in Explorer to find the User Scripts Panel folder.
    If your heading style isn't at the top level in your Styles panel, temporarily move it there.
    Dave

  • Compile error for DragManager.acceptDragDrop(event.target)

    This line
    DragManager.acceptDragDrop(event.target);
    seems to be giving me the following compile error:
    Implicit coercion of a value with static type Object to a
    possibly unrelated type mx.core:IUIComponent.
    (There is an arrow pointing to "target", I guess indicating
    that that is the Object causing the problem.)
    I'm not sure why this is giving me an error since the
    official Adobe document describing how to migrate applications from
    Flex 1.5 to Flex 2 says that
    DragManager.acceptDragDrop(event.target) is what's supposed to
    replace event.handled=true.

    Hi.
    The problem is that DragManager.acceptDragDrop expects a
    UIComponent but Event.target is typed as Object. You need to cast
    the target as a UIComponent. Try this:
    DragManager.acceptDragDrop(UIComponent(event.target));

  • Compile error for 2.6.16.9

    I"m trying to compile my custom kernel 2.6.16.9 and I'm getting the following comile error:
    CC kernel/sched.o
    kernel/sched.c: In function 'sched_init':
    kernel/sched.c:6034: error: 'array' undeclared (first use in this function)
    kernel/sched.c:6034: error: (Each undeclared identifier is reported only once
    kernel/sched.c:6034: error: for each function it appears in.)
    kernel/sched.c:6034: error: 'struct runqueue' has no member named 'arrays'
    kernel/sched.c:6035: error: 'k' undeclared (first use in this function)
    make[1]: *** [kernel/sched.o] Error 1
    make: *** [kernel] Error 2
    I'm using the latest con kolivas patch with the kernel.  Any suggestions as to how to fix this?

    bostoniman wrote:Ok, I sort of feel like an idiot, but I cant seem to find 2.6.16 base on kernel.org.  It's been a while since I made my custom kernel, so am I ooking in the wrong place?  It  should just be on kernel.org, right?
    You were so close, it was just a few clicks away 
    It's in here: http://www.kernel.org/pub/linux/kernel/v2.6/

  • Compile Error for Import com.sun.javadoc.*;

    I need to write some simple doclets and found some beginner code on the Sun website. The first line of the sample app is:
    import com.sun.javadoc.*;However, I get a compile error:
    C:\JavaDoc\Doclet\ListClass.java:1: package com.sun.javadoc does not exist
    import com.sun.javadoc.*;I found the com.sun.javadoc package in the tools.jar file in the lib directory of my sdk. So I added the following to my classpath:
    C:\j2sdk1.4.2_08\lib;Then I recompiled but received the same error. What have I done wrong? I'm on Windows XP.
    TIA.

    > C:\j2sdk1.4.2_08\lib;
    C:\j2sdk1.4.2_08\lib\tools.jar;

Maybe you are looking for