XQuery Modify cannot be compiled

Hi Gurus. Oracle EE 11.2 running on Linux. SQL Dev 3.2.30.09.
I am fairly decent with XPath and XSLT but am new to XQuery. I've implemented a few simple FLOWRs but I am getting a bit more complex. I have an XQuery where I am trying to replace some data inline. I have pared the actual XML and the code down to a very simple example that still returns the same error.
The error:
ORA-19112: error raised during evaluation: XQuery Update connot be compiled
19112. 00000 -  "error raised during evaluation: %s"
*Cause:    The error function was called during evaluation of the XQuery expression.
*Action:   Check the detailed error message for the possible causes.
Error at Line: 7 Column: 14
My Xquery:
SELECT XMLQuery(
  'copy $tmp := $xmldata
       modify (replace value of node $tmp/MSG_CNTNT_XML/Message/msgHdr/Source/Format/text() with "abc")
     return $tmp'
     PASSING msg_cntnt_xml as "xmldata"
     RETURNING CONTENT ) xmlmct
FROM (SELECT xmltype('<Message>
   <msgHdr>
      <Source>
         <Format>CTS</Format>
      </Source>
   </msgHdr>
</Message>') msg_cntnt_xml
       FROM DUAL)
Any general tips for XQuery and modify is cool but what I am really looking for is why am I getting the "Update connot be compiled". (BTW, notice the spelling error, connot - I'm not judging).
Any tips for debugging or being able to display intermediate results would be awesome also.
Thanks.
LewisC

Hi Lewis,
What's your exact database version?
You're trying to use XQuery Update Facility (a small extension to XQuery 1.0) which is only available from 11.2.0.3 and onwards.
On previous versions, you can use updateXML() function :
SQL> SELECT updateXML(
  2           msg_cntnt_xml
  3         , '/Message/msgHdr/Source/Format/text()'
  4         , 'abc'
  5         ) xmlmct
  6  FROM (SELECT xmltype('<Message>
  7     <msgHdr>
  8        <Source>
  9           <Format>CTS</Format>
10        </Source>
11     </msgHdr>
12  </Message>') msg_cntnt_xml
13         FROM DUAL)
14  ;
XMLMCT
<Message><msgHdr><Source><Format>abc</Format></Source></msgHdr></Message>

Similar Messages

  • AES filing error - Idoc Outbound Processing: EDI number cannot be compiled

    Hi Gurus,
    We are configuring the AES filing.
    we've done the EDI  configI and initally we got the error that EDI partner is not maintained. As per the suggestions from this Forum we've added the cusoms office details in geography tab.
    Now when we are trying to process the same, we are getting the error "Idoc Outbound Processing: EDI number cannot be compiled"
    All suggestions are welcome.........
    Thanks in Advance.

    Hi Shiva,
    Here goes the solution: you need to maintain the Number of the Number Ranges starting with "10" and this applies only to GTS system as this is HARD-CODED in the Program, apart from 10 any number of the number range will result in an "EDI Number Range compilation" error.
    Cheers
    Harsha

  • ALSB XQuery resource cannot be found

    Hi!
    I have a problem, that for no apparent reason, my ALSB environment "crash".
    All of a sudden the Xquery resource cannot be found. You cannot export jar from resource and
    you cant do a XT transformation, because of the resources cannot be found. The typed show empty.
    This have occurred before, and I solved it by deleting my workspace and starting a new from scratch. But
    i feel that this is not the right way to solve it every time it appears. I have tried doing a clean, build and everything.
    Have some one ever got this problem, or have I missed something?
    Using Eclipse based BEA Workshop Studio version: 1.1 (build: 1090602)
    Edited by: user12665375 on 2010-feb-23 13:21

    Hi!
    Thanks for the fast reply.
    We are using the Eclipse based BEA Workshop Studio , version 1.1 (build: 10900602)
    Regards
    Afram
    Edited by: user12665375 on 2010-feb-23 13:18

  • Getting error message "invalid formaula that cannot be compiled"

    Hi,
    I have installed SAP Crystal Report Viewer 2008, when tries to open output file that has RPT extension, getting error message "this report contains invalid Crystal Reports formulas that cannot be compile".
    It seems it requires some DLL files that we already have but we dont know where to place it on SAP Crystal Report Viewer program files folder.
    Please help me in resolving this error.
    Thank you in advance.
    Regards,
    Manish Gupta

    Manish,
    If the report contains formulae that reference UFLs then it will Not work in the CR Viewer.
    Following are the kind of reports that don't work with the free (standalone) CR Viewer per this SAP Note:
    1.  Reports that have no saved data, unless they are being accessed online from BusinessObjects Enterprise and you have the appropriate rights.
    2.  Reports that use Business Views as a data source.
    3.  Reports that use universes as a data source. (Static instances of reports that use universes will open if these reports are downloaded from BusinessObjects Enterprise.)
    4.  Reports that use Crystal Dictionaries as a data source.
    5.  Reports that use Crystal Queries as a data source.
    6.  Reports that depend on UFLs
    7.  Reports that are successfully using "Perform Grouping on Server". (That is, the generated report SQL contains a "group by" clause.)
    If you want UFLs to work with the Viewer, please have a look at the 3rd-party Crystal report viewers listed at: http://www.kenhamady.com/bookmarks.html
    -Abhilash

  • Aqualogic WebLogic Workshop: XQuery resource cannot be found

    Hi
    I created a Proxy Service with WebLogic Workshop. I tested it without problems. After I shutdown the laptop and restarted it the references between the Proxy Service and the XQuery resources are lost. If I try to reference them WebLogic Workshop cannot find the resource even if they appear on the project.
    Any ideas?
    Regards,
    Néstor Boscán

    Hi Nestor,
    In Workshop, try to clean all the projects (Projects -> Clean all)
    Regards,
    Fabio Douek

  • Cannot execute compiled binary

    Hi.
    Executing compiled binary(C/C++) from within the IDE gives me:
    java.io.IOException: spawn failed: 'ERROR exec failed -- No such file or directory'
         at com.sun.tools.swdev.common.base.UnixProcessFactory.figure_pid(UnixProcessFactory.java:156)
         at com.sun.tools.swdev.common.base.UnixProcessFactory.spawn(UnixProcessFactory.java:239)
         at com.sun.tools.swdev.sunstudio.execution.TerminalProcess.terminalProcess(TerminalProcess.java:140)
         at com.sun.tools.swdev.sunstudio.execution.TerminalExecutor.run(TerminalExecutor.java:77)
    [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
    java.lang.NullPointerException
         at com.sun.tools.swdev.sunstudio.execution.TerminalExecutor.run(TerminalExecutor.java:88)
    [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)I can execute it from a terminal though.
    I am using sun-jdk-1.4.2.10
    Thank you for any help.

    There are no obvious reasons why this should fail. We'll need more
    information before we can be of much help. Can you tell me:
    What platform you're on:
    What version of Sun Studio (looks like ss11, but please verify):
    When you run from the command line, are you directly exec'ing
    the executable or going through a symlink?
    Output of "find <your-executable>" command)
    Output of "ls /etc/*release*"
    Hopefully this will give us enough information to at least get some
    idea of what the problem is.
    Gordon

  • Cannot connect compile server

    I am trying to load the tutorial FPGA VI on to my cRIO 9004 unit, and get this error while compiling
    The compile server does not have any workers available that can do a Xilinx 10.1 compilation.
    * You may not have the correct compilation tools installed.
    * The local compile worker may be configured for a different compile server.
    * The local compile worker may be in an error state.
    Details
    Error -123002 occurred at niFpgaCompileFarm_OpenJob.vi
    Possible reason(s):
    NI-Farm:  No worker has registered the given capability name.
    Complete call chain:
         niFpgaCompileFarm_OpenJob.vi
         niFpgaCompileWorker_OpenJob.vi
         niFpgaCompile_Worker.vi:1
    Start Time: 17:50:14
    End Time: 17:51:07
    Total Time: 00:00:54
    And i try to manually acess the compile worker .exe file, and  it says the xilinx tool installation needs to be checked. and that it could not load a file.(SEE ATTACHMENT)
    I am not trying to connect to any remote computer. its local server. these are teh details of my computer
    WIN 7 32-bit
    LV 2010 full dev
    LV fpga, Real time all latest
    xilinx 10.1 (my chassis is crio 9104 which uses a virtex-II gateway)
    I read that xilinx has no full support for WIN 7 yet. and saw that on their website too. But i do see other ppl with some problems on compile server with WIN 7 OS, but seem to have solved the problem(although not similar to mine). WHich means that they have made it work somehow. (also xilinx website says that it has LIMITED support for win 7)
    I am really stuck here. I am still in my learning phase and (just trying to compile the tutorial VI!!) and i dont want to lose time . I am feeling really stuck here. any help would be great!
    Thanks!
    Rajesh
    Solved!
    Go to Solution.
    Attachments:
    error.JPG ‏42 KB

    I am working with the same system and I get the same error-message.The only difference is I have to do a Xilinx 11.5 compilation because of the cRIO-9074.
    The Compile Worker status is connected to server and in the jobs field is written "Registered Capabilities: ('Xilinx 10.1'  'Xilinx 11.5')".
    But in in the worker log is a warning: This Capability failed to register with the server: ... (See Attachment)
    Thank you very much!
    Best Regards
    Michael
    Attachments:
    workerLog.txt ‏458 KB

  • Cannot even compile-PLS HELP

    when i try to compile my code using the " javac FileName.java" command i get the following error: "'javac' is not recognized as an internal or external command,
    operable program or batch file."
    Can anyone help me?

    Go here: http://java.sun.com/docs/books/tutorial/index.html and click on Getting Started.

  • PDE-PDS001 cannot compile pu against 10g database

    Error occurs when compiling form/library 10as/10g db
    database version 10.1.0.2
    forms version 9.0.4.0.19 also forms6i patch15
    library that can be succesfully compiled against ver 8.1.7.3 and 9.2.0.3 cannot be compiled against 10g database
    PDE-PDS001 Could not resolve reference to <Unknown Program Unit> while loading Procedure Body
    I've got a procedure in a library which reference database package record type
    error 905 object package <name> is invalid - but Database package is valid !
    Searching metalink I came across similar issues with earlier versions of database/tool combinations - Has this error surfaced again ?
    Database package specification includes (in additions to procs/functions) the following:
    TYPE suppress_tabtype IS TABLE OF VARCHAR2 (15) INDEX BY BINARY_INTEGER;
    -- public program units
    TYPE message_rectype IS RECORD
    ( msg_code VARCHAR2(15)
    , severity VARCHAR2(1)
    , severity_desc VARCHAR2(100) -- Translated description of severity
    , suppr_wrng_ind VARCHAR2(1)
    , suppr_always_ind VARCHAR2(1)
    , logging_ind VARCHAR2(1)
    , msg_text VARCHAR2(2000)
    , help_text VARCHAR2(2000)
    , lang_code VARCHAR2(3)
    , raise_error BOOLEAN
    , message_found BOOLEAN);
    TYPE message_tabtype IS TABLE OF message_rectype INDEX BY BINARY_INTEGER;
    Does a patch exist ?
    TIA
    Pete

    Hi Pete
    I encountered the same problem in Oracle Forms 10g (9.0.4.0.19) with an Oracle 10g database. My error was caused by default values in the form of a function call in one of the procedures functions
    f.e.
    package my_package
    function my_function
    ( par1 varchar2
    , par2 varchar2 default my_function_in_another_package
    ) return varchar2;
    end;
    Remove the default value in the function parameter par2 and everything works fine
    Hope this helps,
    Matthieu

  • Cannot Compile CHM -- Message says to close all HTML Help windows

    Running TCS 1.3 with latest patches.
    Single source project - output to HTML Help (.chm).
    When I try to compile, I receive the following message:
    "Cannot create compiled file. It may be open in another window. Please close all HTML Help windows and try again."
    I don't have any HTML Help windows open. Shutting down RH and restarting does not resolve the problem. I have to shut down the computer, which is a serious hassle, before I can compile again. I do work from a network directory, which may be causing it, but I'd like to know if there is a process I can kill from the Windows Task Manager that would allow me to compile without having to restart my computer. I don't see any process that identifies itself as something I can kill to resolve this issue.
    Anyone?

    Hi there
    That message normally indicates you have launched the .CHM file that you are trying to create. The first step of the process is to destroy the existing .CHM in preparation for building the new one. Just as you would need to destroy a house on a lot where you wish to build a new one.
    If your .CHM is on a network drive, another user may have it open. (yet another good reason for working locally)
    If your .CHM is on your local drive, RoboHelp believes you have it open. If you press Alt+Tab, you may see a blue up arrow. That will indicate the running CHM file.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Unable to modify a XML node which is a SimpleType using a Typed XML field.

    Hello,
    I have an XSD schema that uses SimpleTypes.  When I attempt to modify a node in an Schema typed XML field, which has a schema using simpletypes, I receive the error:  XQuery [modify()]: The value is of type "xs:string", which is not a
    subtype of the expected type "<anonymous>"
    To reproduce the problem use the following information:
    SCHEMA:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:ns1="http://testschema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://testschema" elementFormDefault="qualified" attributeFormDefault="unqualified" vc:minVersion="1.1">
    <xs:element name="Test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="SAPCode">
    <xs:annotation>
    <xs:documentation>Customer Number for Delivery Organization</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="OrganizationName">
    <xs:annotation>
    <xs:documentation>Name of Organization</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="AttentionTo" minOccurs="0">
    <xs:annotation>
    <xs:documentation>Attention to Recepient for the delivery</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150" fixed="false"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Address1">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Address2" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Address3" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="City">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="StateProvince">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PostalCode">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Country">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="2"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Phone" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="50"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmailAddress" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="200"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    The T-SQL That produces the error:
    DECLARE
    @vx_Test xml (CONTENT [dbo].[Test]),
    @vs_ShipToAttentionTo NVARCHAR(50)
    SET
    @vx_Test = N'<ns0:Test xmlns:ns0="http://testschema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ns0:SAPCode>1234567890</ns0:SAPCode>
    <ns0:OrganizationName>Test Org</ns0:OrganizationName>
    <ns0:AttentionTo>Test Person</ns0:AttentionTo>
    <ns0:Address1>123 Main Street</ns0:Address1>
    <ns0:City>Test City</ns0:City>
    <ns0:StateProvince>IL</ns0:StateProvince>
    <ns0:PostalCode>12345</ns0:PostalCode>
    <ns0:Country>US</ns0:Country>
    </ns0:Test>'
    SET
    @vs_ShipToAttentionTo = 'New Attention To'
    SET @vx_Test.modify('declare namespace ns0="http://testschema";
    replace value of (/ns0:Test[1]/ns0:AttentionTo) with sql:variable("@vs_ShipToAttentionTo")');
    -- This would be how I would reference it if I was modifiying the XML in a typed XML column in a table.
    WITH XMLNAMESPACES('http://testschema' AS ns0)
    UPDATE TestItems
    SET TestXML.modify('replace value of (/ns0:Test[1]/ns0:AttentionTo) with sql:variable("@vs_ShipToAttentionTo")')
    SELECT @vx_Test
    How can I make this work.  In this example I am using a typed XML variable, but I really want to do this in a table update.
    Thanks,
    Kent

    Try the change below.  What I did was to create a named simple type for the AttentionTo node.  Here is my understanding (based on this working).  Because you have a simpleType the node cannot accept just any string, it has to be a string of
    the type in the simpleType.  That simpleType has no name (thus anonymous). 
    What I did was to create a named simpleType and used that simpleType as the type for the AttentionTo element.  Then in my XQuery, I cast the value to the name of that type (AttentionToType in my example).
    CREATE xml schema collection Test as '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:ns1="http://testschema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" targetNamespace="http://testschema" elementFormDefault="qualified" attributeFormDefault="unqualified" vc:minVersion="1.1">
    <xs:element name="Test">
    <xs:annotation>
    <xs:documentation>Comment describing your root element</xs:documentation>
    </xs:annotation>
    <xs:complexType>
    <xs:sequence>
    <xs:element name="SAPCode">
    <xs:annotation>
    <xs:documentation>Customer Number for Delivery Organization</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="OrganizationName">
    <xs:annotation>
    <xs:documentation>Name of Organization</xs:documentation>
    </xs:annotation>
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="AttentionTo" minOccurs="0" type="ns1:AttentionToType">
    <xs:annotation>
    <xs:documentation>Attention to Recepient for the delivery</xs:documentation>
    </xs:annotation>
    </xs:element>
    <xs:element name="Address1">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Address2" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Address3" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="150"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="City">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="StateProvince">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PostalCode">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Country">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="2"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="Phone" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="50"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmailAddress" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="200"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:simpleType name="AttentionToType">
    <xs:restriction base="xs:string">
    <xs:maxLength value="150" fixed="false"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>';
    go
    DECLARE
    @vx_Test xml (CONTENT dbo.Test),
    @vs_ShipToAttentionTo nvarchar(50)
    SET
    @vx_Test = N'<ns0:Test xmlns:ns0="http://testschema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ns0:SAPCode>1234567890</ns0:SAPCode>
    <ns0:OrganizationName>Test Org</ns0:OrganizationName>
    <ns0:AttentionTo>Test Person</ns0:AttentionTo>
    <ns0:Address1>123 Main Street</ns0:Address1>
    <ns0:City>Test City</ns0:City>
    <ns0:StateProvince>IL</ns0:StateProvince>
    <ns0:PostalCode>12345</ns0:PostalCode>
    <ns0:Country>US</ns0:Country>
    </ns0:Test>'
    SET
    @vs_ShipToAttentionTo = 'New Attention To'
    SET @vx_Test.modify('declare namespace ns0="http://testschema";
    replace value of (/ns0:Test[1]/ns0:AttentionTo) with sql:variable("@vs_ShipToAttentionTo") cast as ns0:AttentionToType?');
    -- This would be how I would reference it if I was modifiying the XML in a typed XML column in a table.
    WITH XMLNAMESPACES('http://testschema' AS ns0)
    UPDATE TestItems
    SET TestXML.modify('replace value of (/ns0:Test[1]/ns0:AttentionTo)
    with sql:variable("@vs_ShipToAttentionTo")')
    SELECT @vx_Test
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Access modifiers ignored !?!

    Hi
    please, have a look at the code below and let me know your opinions
    // ------------- source file 1 ------------------------
    package pckg1;
    public class Dog {
         final public static void main (String[] args) {
              pckg2.Puppy puppy = new pckg2.Puppy("Spot");
              System.out.println(puppy.getName());
    // ------------- source file 2 --------------------
    package pckg2;
    class Puppy {
         String name;
         public Puppy(String name) {
              this.name = name;
         String getName() {return name;}
    Each class belongs to a different package. Obviously if you compile Puppy first and attempt compiling Dog the compiler will complain about several things (class Puppy not being public, method getName() not being public, etc...).
    Now,
    if you change the Puppy class so that the necessary bits are public, re-compile Puppy and then Dog it will work.
    When you subsequently go back to Puppy and remove the added public access modifiers and re-compile JUST the Puppy class and try running Dog IT WILL STILL WORK AS IF EVERYTHING IN THE PUPPY CLASS WERE PUBLIC.
    I don't thing this is right. If the access modifiers cannot be relied on then the whole system is flawed.
    PS: Running on W2K, the behaviour observed on JRE 1.2.2_007, 1.3.0_02 as well as on 1.4.0-beta-b65.
    Cheers
    Ales Krestan

    Thanks for the response, but I hold different views on the matter. Although performance surely is of a great importance, it should not come at the expense of consistency.
    A few more thoughts on the same:
    1/ my understanding is that it is responsibility of the class loader to decide what to do in such cases during the resolution case. Apparently the application class loader of SUN's JVM ignores it and so does the extension class loader of the same JVM.
    2/ surprisingly (or rather expectedly) when attempting to load both classes (with the dodged version of Puppy) using the system class loader the JVM throws java.lang.IllegalAccessError.
    3) the same trick cannot be done with an interface. If you try to dodge an interface using the same principle and try to load it using the application class loader JVM will refuse to run (or load) the class that uses the dodged interface.
    4/ the class loader DOES other things, so why not to check the access modifiers as well. It should check if the class can be instantiated, for example. See the section 2.17.3 Linking: Verification, Preparation, and Resolution of the JVM specification.

  • Tutorial for Eclipse/Flex Compiler Development?

    Hello,
    I cannot find any reliable information on setting up Eclipse with all the right plugins to modify the Flex Compiler.  http://www.darronschall.com/weblog/2005/08/setting-up-eclipse-for-flex.cfm  is too old, and the others are just unclear.
    If anyone could give me a hand that would be great.
    - Eclipse version Flex SDK Developers are using.
    - Required plugins (I'm on a Mac 10.5)
    - How to run a sample Flex SDK Compiler project, or debug it or something, or at least just load it.
    I have everything set up (eclipse installed, the flex source installed and ready according to the developer documentation).  But this last step is missing.  Thanks!
    Lance

    I wouldn't switch if you want to do .NET / SQL Server
    development. Most people on Macs who do SQL Server development
    either use a remote server or run it in a Windows Virtual Machine.
    Important programs are available for both OSes, but without
    knowing which ones you use it's hard to say whether you just need
    to install the "mac version" or whether you'd need to install a
    brand new one.

  • Access Modifier private

    Hi
    1.
    EX Code in java:
    private class SS{  }
    There is any way i can save a file as SS.java and i need to compile this without error like - private might not allowed
    2. How to replace a String value?
    Ex String x="abc";
    Is there any way to replace this string without using any other string methods plz tell the answer.

    vijay_raga wrote:
    private class SS{  }
    There is any way i can save a file as SS.java and i need to compile this without error like - private might not allowed
    // private
    class SS {}Satisfied ? BTW ,private modifier cannot be applied to class.But I guess this would not answer your question !!!
    >
    2. How to replace a String value?
    Ex String x="abc";
    Is there any way to replace this string without using any other string methods plz tell the answer.Replace with what ?
    And what revolution do you wish to make by doing these things ?
    Thanks.

  • Applet.java file which used to compile, now does not

    I cannot re-compile a java file which I used to compile many times.
    It keeps saying:
    error: cannot read PopupNavigatorApplet.java
    1 error
    I extracted the original from the archive - the same result
    What might be wrong?

    Perhaps you don't have the rights to access the file in the filesystem? Are you working on *nix or Windoze (or any other)? Is your classpath set properly (including the current working directory '.')?
    So many questions and no answers.. ;o)
    cheers,
    kelysar

Maybe you are looking for

  • Safari 5.1.2 in 10.6.8 won't start

    I ran software update on an iMac last Sunday and there was a Security Update along with a couple other updates that I don't remember. Ever since then Safari will not open and gets a crash report every time.  I just ran Repair Permission and that didn

  • Query on Aggregate

    Hi Gurus, I am into archiving, and my question is we have an infocube with some aggregates, So i want to know how queries are created for the aggregates and how it is accessible, as per my knowledge, the query defined to the infocube for which aggreg

  • Very Poor Final Cut Performance

    We just upgraded to a Final Cut system from an older Avid system, but it seems to be performing well below expectations. If anyone could make suggestions, they would be greatly appreciated. Syptoms: - Dropping frames on virtually every application, f

  • Senha administrador

    Comprei um MacBook Pro fazem 05 dias e para instalação de novos programas pede uma senha de administrador a qual eu não lembro. Como faço para criar uma nova senha. att. Sergio Tizo

  • Recording Audio Playback offset/delayed

    As a loyal Logic member since version 7, I recently started having a problem when playing back audio tracks.  The audio seems to playback behind the beat.  Is there a recording playback offset or delay option perhaps I accidently switch on or altered