Why doesn't throw my function an exception??

Ive written following function which converts dates into numbers represeting weekdays.
I want the function to throw an exception if a wrong value is given but whatever I try instead of an exception the only output by a wrong input is:
SQL> select day_calc('bla') from dual;
select day_calc('bla') from dual
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
Anybody who knows why??
thx

If you want the function to accept the parameter and handle the exception, then you need to make your a_date varchar2.
You are missing "when others" after exception.
Your line "zahl := 3/0;" will always raise an exception. I assume that was added to try to force an exception for testing.
Please see the example below.
scott@ORA92> CREATE OR REPLACE FUNCTION day_calc
  2    (a_date     VARCHAR2)
  3    RETURN     NUMBER
  4  IS
  5    ergebnis NUMBER;
  6  BEGIN
  7    ergebnis := TO_NUMBER (TO_CHAR (TO_DATE (a_date, 'DD.MM.RRRR'), 'D')) - 1;
  8  --  zahl := 3/0;
  9    RETURN ergebnis;
10  EXCEPTION
11    WHEN OTHERS THEN RETURN -1;
12  END day_calc;
13  /
Function created.
scott@ORA92> SELECT day_calc ('bla') FROM DUAL
  2  /
DAY_CALC('BLA')
             -1
scott@ORA92> SELECT day_calc ('20.11.2004') FROM DUAL
  2  /
DAY_CALC('20.11.2004')
                     6
scott@ORA92>

Similar Messages

  • Why Doesn't the XIRR function work?

    In Excel if you have 5 records from a1:b5 then XIRR looks like this:
    XIRR(A1:A5, B1:B5) you get a nice neat answer like .35
    Here is a version that works in Crystal that would require manual entry of any new quarters numbers and dates-- and if you plug this into Crystal it works:
    (XIRR([1000000,-100000,-100000,-100000,-100000,10277.49,-100000], [DateValue(1999,2,1),DateValue(1999,3,1),DateValue(1999,6,1), DateValue(1999,12,1),DateValue(2000,3,1),DateValue(2000,6,1),DateValue(2000,9,1)]))*.100
    You do get a nice answer of something like .035.  But this is all done manually and I need it to function automatically when the report is refreshed.
    So you have a range for the currency and a range for the date fields. I need to simulate this in crystal. Crystal has an XIRR function, and with the arrays, I should be able to fill in the range, but am having difficulty getting it to work.
    After building the arrays, I made another formula to combine the arrays in the XIRR formula.
    I am down to this error now after getting this formula this far  --
    "Numerical method did not converge; try another value for guess."
    Here's where I am with the formula, although they don't want to use the guess part of the XIRR function - they just want to use the XIRR(number/currency, date).  Maybe you could pass this on too?:
    /{@Reset} for the group header (NOT using a repeated group header):
    whileprintingrecords;
    numbervar array x := 0;
    datevar array y := date(0,0,0);
    numbervar i := 0;
    numbervar j := 0;
    //{@accum} for the detail section:
    whileprintingrecords;
    numbervar array x;
    datevar array y;
    numbervar i := i + 1;
    numbervar j := count({table.groupfield},{table.groupfield});
    if i <= j then (
    redim preserve x[j];
    redim preserve y[j];
    x<i> := tonumber({table.currency});
    y<i> := datevalue({table.datetime})
    //{@xirr calc} to be placed in the group footer:
    whileprintingrecords;
    numbervar array x;
    datevar array y;
    xirr(x,y)
    The array works correctly.  So why do I get that error and why doesn't the XIRR formula work like they say it should?  Has anyone used this successfully in Crystal--maybe you could shed some light?
    Thanks!

    Hi,
    I am receiving that same error when the last item in the array is 0, otherwise all works perfectly.
    When I run the same group of numbers and dates in Excel it returns without issue.
    -265500.00,-690000.00,-570000.00,16814.25,-855000.00,-619500.00,55293.46,30411.40,15183.76,  0.00
    01-25-2007,03-06-2007,05-02-2007,06-29-2007,08-01-2007,08-24-2007,09-17-2007,03-14-2008,05-28-2008,03-31-2010
    =XIRR(A2:J2,A1:J1,-0.1)
    Is there a known bug in Crystal's XIRR function when the last value is 0? 
    Or a hot-fix that will repair this?
    Thanks in advance,
    Gary
    PS. I am using Crystal XI Product Version: 11.0.0.2495

  • Why doesn't my XMLTable function work?

    Hi,
    I'm trying to read through my XML document using a XMLTable function, because a repetition of elements might occur. I wrote a SQL-script to test this function, but it does not give me the desired output. This is my script. I use a dummy table PETER_XML to pass the value to the XMLTable function. I would rather have done this directly with a PL/SQL variable, but that did not work.
    CREATE TABLE PETER_XML (AVY XMLTYPE);
    set serveroutput on size 100000
    set echo on
    set feedback on
    declare
    cursor c_avy is
    SELECT XMLRESPONSE."DepartureStation" DEPARTURE,
           XMLRESPONSE."FlightNumber"     FLIGHTNR
    FROM   PETER_XML,
           XMLTABLE(XMLNameSpaces('http://schemas.navitaire.com/WebServices' as "web",
                                  'http://schemas.xmlsoap.org/soap/envelope/' as "soapenv",
                                  'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "book",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "book1",
                                  'http://schemas.microsoft.com/2003/10/Serialization/Arrays' as "arr",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations' as "enum",
                                  'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "ns0",
                                  'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "ns1" ),
                    '//GetAvailabilityRequest/TripAvailabilityRequest/AvailabilityRequests/AvailabilityRequest'
                    PASSING PETER_XML.AVY
                    COLUMNS
                      "DepartureStation" varchar2(3) PATH 'DepartureStation',
                      "FlightNumber"     varchar2(4) PATH 'FlightNumber'
                   ) XMLRESPONSE;
    l_response clob := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://schemas.navitaire.com/WebServices" xmlns:book="http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService" xmlns:book1="http://schemas.navitaire.com/WebServices/DataContracts/Booking" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:enum="http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">
       <soapenv:Header>
          <web:Signature>bnuOiHCVb3k=|Gx+eTRcZ5ABozAy8MosBFwagyUw7zrRXf1iprmw9Q4W17wt8SDpjYV2HwZRGIHYtE46UFBJw/aFyKVqjToEAfSTfh7cePm4r9JJwcIveDc75NuxnzoY14pKC+WLYDzE0MaALra4i/tI=</web:Signature>
          <web:ContractVersion>340</web:ContractVersion>
       </soapenv:Header>
       <soapenv:Body>
              <ns0:GetAvailabilityRequest xmlns:ns0 = "http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService">
                       <ns1:TripAvailabilityRequest xmlns:ns1 = "http://schemas.navitaire.com/WebServices/DataContracts/Booking">
                                 <ns1:AvailabilityRequests>
                                          <ns1:AvailabilityRequest>
                                                    <ns1:DepartureStation>AMS</ns1:DepartureStation>
                                                    <ns1:ArrivalStation>CTA</ns1:ArrivalStation>
                                                    <ns1:BeginDate>2013-07-13T00:00:00</ns1:BeginDate>
                                                    <ns1:EndDate>2013-07-13T00:00:00</ns1:EndDate>
                                                    <ns1:CarrierCode>HV</ns1:CarrierCode>
                                                    <ns1:FlightNumber> 547</ns1:FlightNumber>
                                                    <ns1:FlightType>All</ns1:FlightType>
                                                    <ns1:PaxCount>1</ns1:PaxCount>
                                                    <ns1:Dow>Daily</ns1:Dow>
                                                    <ns1:CurrencyCode>EUR</ns1:CurrencyCode>
                                                    <ns1:DisplayCurrencyCode>EUR</ns1:DisplayCurrencyCode>
                                                    <!--ns1:SourceOrganization>COO</ns1:SourceOrganization-->
                                                    <ns1:MaximumConnectingFlights>0</ns1:MaximumConnectingFlights>
                                                    <ns1:AvailabilityFilter>Default</ns1:AvailabilityFilter>
                                                    <ns1:ProductClassCode>NG</ns1:ProductClassCode>
                                                    <ns1:SSRCollectionsMode>None</ns1:SSRCollectionsMode>
                                                    <ns1:InboundOutbound>Both</ns1:InboundOutbound>
                                                    <ns1:NightsStay>0</ns1:NightsStay>
                                                    <ns1:IncludeAllotments>true</ns1:IncludeAllotments>
                                                    <ns1:FareTypes>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">T</ns2:string>
                                                    </ns1:FareTypes>
                                                    <ns1:PaxPriceTypes>
                                                              <ns1:PaxPriceType>
                                                                       <ns1:PaxType>ADT</ns1:PaxType>
                                                              </ns1:PaxPriceType>
                                                    </ns1:PaxPriceTypes>
                                                    <ns1:JourneySortKeys>
                                                              <ns2:JourneySortKey xmlns:ns2 = "http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">EarliestDeparture</ns2:JourneySortKey>
                                                    </ns1:JourneySortKeys>
                                                    <ns1:IncludeTaxesAndFees>false</ns1:IncludeTaxesAndFees>
                                                    <ns1:FareRuleFilter>Default</ns1:FareRuleFilter>
                                                    <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                                                    <ns1:TravelClassCodeList>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">Y</ns2:string>
                                                    </ns1:TravelClassCodeList>
                                          </ns1:AvailabilityRequest>
                                 </ns1:AvailabilityRequests>
                                 <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                       </ns1:TripAvailabilityRequest>
              </ns0:GetAvailabilityRequest>
       </soapenv:Body>
    </soapenv:Envelope>';
    begin
    dbms_output.put_line ('Start');
    insert into peter_xml (avy) values ( XMLTYPE(l_response) );
    dbms_output.put_line ('Insert processed ' || to_char(sql%rowcount) || ' rows.' );
    for r_avy in c_avy loop
       dbms_output.put_line ( 'Departure ' || r_avy.departure || ' Flightno. ' || r_avy.flightnr );
    end loop;
    end;
    rollback;
    The script runs fine, but the problem is that I do not get any output form the cursor for-loop. When I address the elements using 'ns1:etc' I get an error, which suggests that the function is actually reading the XML. Since it gave no output, I started including all these XMLNameSpaces.
    Can anyone let me know what I'm missing?
    And if I can pass the value with a PL/SQL variable, it would save me the use of a dummy table. That would be nice.
    Thanks in advance.
    Peter

    Hi Peter,
    Since it gave no output, I started including all these XMLNameSpaces.
    All these namespaces have meaning, don't include them blindly, but if you do, use them.
    The main XQuery expression doesn't reference any of the necessary namespaces.
    Here's a simplified version that gives the expected output.
    Please note that I only use the namespaces I need to resolve the XQuery :
    declare
      cursor c_avy (p_xmlresponse in xmltype) is
        select x.DEPARTURE
             , x.FLIGHTNR
        from xmltable(
               xmlnamespaces(
                 'http://schemas.xmlsoap.org/soap/envelope/' as "soap"
               , 'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as "ns0"
               , 'http://schemas.navitaire.com/WebServices/DataContracts/Booking' as "ns1"
             , '/soap:Envelope/soap:Body/ns0:GetAvailabilityRequest/ns1:TripAvailabilityRequest/ns1:AvailabilityRequests/ns1:AvailabilityRequest'
               passing p_xmlresponse
               columns
                 DEPARTURE varchar2(3) path 'ns1:DepartureStation'
               , FLIGHTNR  varchar2(4) path 'ns1:FlightNumber'
             ) x ;
      l_response clob := '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://schemas.navitaire.com/WebServices" xmlns:book="http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService" xmlns:book1="http://schemas.navitaire.com/WebServices/DataContracts/Booking" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:enum="http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">
       <soapenv:Header>
          <web:Signature>bnuOiHCVb3k=|Gx+eTRcZ5ABozAy8MosBFwagyUw7zrRXf1iprmw9Q4W17wt8SDpjYV2HwZRGIHYtE46UFBJw/aFyKVqjToEAfSTfh7cePm4r9JJwcIveDc75NuxnzoY14pKC+WLYDzE0MaALra4i/tI=</web:Signature>
          <web:ContractVersion>340</web:ContractVersion>
       </soapenv:Header>
       <soapenv:Body>
              <ns0:GetAvailabilityRequest xmlns:ns0 = "http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService">
                       <ns1:TripAvailabilityRequest xmlns:ns1 = "http://schemas.navitaire.com/WebServices/DataContracts/Booking">
                                 <ns1:AvailabilityRequests>
                                          <ns1:AvailabilityRequest>
                                                    <ns1:DepartureStation>AMS</ns1:DepartureStation>
                                                    <ns1:ArrivalStation>CTA</ns1:ArrivalStation>
                                                    <ns1:BeginDate>2013-07-13T00:00:00</ns1:BeginDate>
                                                    <ns1:EndDate>2013-07-13T00:00:00</ns1:EndDate>
                                                    <ns1:CarrierCode>HV</ns1:CarrierCode>
                                                    <ns1:FlightNumber> 547</ns1:FlightNumber>
                                                    <ns1:FlightType>All</ns1:FlightType>
                                                    <ns1:PaxCount>1</ns1:PaxCount>
                                                    <ns1:Dow>Daily</ns1:Dow>
                                                    <ns1:CurrencyCode>EUR</ns1:CurrencyCode>
                                                    <ns1:DisplayCurrencyCode>EUR</ns1:DisplayCurrencyCode>
                                                    <!--ns1:SourceOrganization>COO</ns1:SourceOrganization-->
                                                    <ns1:MaximumConnectingFlights>0</ns1:MaximumConnectingFlights>
                                                    <ns1:AvailabilityFilter>Default</ns1:AvailabilityFilter>
                                                    <ns1:ProductClassCode>NG</ns1:ProductClassCode>
                                                    <ns1:SSRCollectionsMode>None</ns1:SSRCollectionsMode>
                                                    <ns1:InboundOutbound>Both</ns1:InboundOutbound>
                                                    <ns1:NightsStay>0</ns1:NightsStay>
                                                    <ns1:IncludeAllotments>true</ns1:IncludeAllotments>
                                                    <ns1:FareTypes>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">T</ns2:string>
                                                    </ns1:FareTypes>
                                                    <ns1:PaxPriceTypes>
                                                              <ns1:PaxPriceType>
                                                                       <ns1:PaxType>ADT</ns1:PaxType>
                                                              </ns1:PaxPriceType>
                                                    </ns1:PaxPriceTypes>
                                                    <ns1:JourneySortKeys>
                                                              <ns2:JourneySortKey xmlns:ns2 = "http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">EarliestDeparture</ns2:JourneySortKey>
                                                    </ns1:JourneySortKeys>
                                                    <ns1:IncludeTaxesAndFees>false</ns1:IncludeTaxesAndFees>
                                                    <ns1:FareRuleFilter>Default</ns1:FareRuleFilter>
                                                    <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                                                    <ns1:TravelClassCodeList>
                                                              <ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays">Y</ns2:string>
                                                    </ns1:TravelClassCodeList>
                                          </ns1:AvailabilityRequest>
                                 </ns1:AvailabilityRequests>
                                 <ns1:LoyaltyFilter>MonetaryOnly</ns1:LoyaltyFilter>
                       </ns1:TripAvailabilityRequest>
              </ns0:GetAvailabilityRequest>
       </soapenv:Body>
    </soapenv:Envelope>';
    begin
      for r_avy in c_avy (xmltype(l_response)) loop
        dbms_output.put_line ( 'Departure ' || r_avy.departure || ' Flightno. ' || r_avy.flightnr );
      end loop;
    end;
    Indeed, you don't need an intermediate table for this requirement. However, and depending on your db version, storing the XML in a binary XMLType table may improve performance dramatically.
    For small contents, you probably won't see a difference between the two approaches, but just so you know in case you have to deal with big XMLs in the future.

  • HT202213 Why doesn't home sharing function?

    I have a Mac and an iPad mini w/ the same Apple ID, but h.s. does not show up in my iTunes sidebar.  I tried turning it off and on again, but it still doesn't show up.  I have no idea what I'm missing, and the support pages didn't give me any clues.

    If the Home Sharing icon is not visible, choose File > Devices > Turn On Home Sharing from the menu bar. (You can disable or enable Home Sharing for your computer using the File menu.)
    Note: After enabling Home Sharing and clicking Done, Home Sharing is no longer visible until it detects another computer with Home Sharing enabled.
    Copied from here ..... http://support.apple.com/kb/HT4620

  • Why Doesn't "find" work in VBS?

    I'm trying to write a VBS module that will
    detect when the data in a channel crosses
    some threshold. As an example, I include
    a line to check when channel 56 becomes
    greater than 5.0
    Here is the VBS line that checks for this:
    FirstValue = find( Ch(56) > 5.0, 1 )
    When ever I execute this script, DIAdem displays
    an error dialog with this message:
    Error in (Row:52, Column:9):
    Error message from DIAdem OCMD-interface:
    Invalid return value of the DIAdem kernel !
    What does this mean? Why doesn't the "find" function
    work? What other means can I use to do this operation?

    Hi jbrandim,
    The first parameter in the find() function is a string, so when you use this function with VBS syntax, you need to enclose it in double quotes:
    FirstValue = find("Ch(56) > 5.0", 1)
    Additionally, you can also call this function as a Formula Calculator function, since it is in fact a DIAdem function and not a VBS function:
    Call FormulaCalc("L1:= find(Ch(56) > 5.0, 1)")
    FirstValue = L1
    The cryptic error message is an artifact of the translation process between VBScript and the DIAdem find function. DIAdem automatically maps the return value of the find function, which is an integer, to the variant variable "FirstValue", as well as the input parameters. The mapping process from Variant to string in the first find() parameter failed, and
    that led to the error message you received.

  • Why socket doesn't throw an exception

    Hello,
    I am using following code
    client:
          InetAddress addr = InetAddress.getByName("localhost");
          sock = new Socket(addr, 5551);
          in = new BufferedReader(
            new InputStreamReader(
              sock.getInputStream()));
          out = new PrintWriter(
            new BufferedWriter(
              new OutputStreamWriter(
                sock.getOutputStream())), true);server
    try{
      ServerSocket server = new ServerSocket(port);
      Socket socket = server.accept();
      BufferedReader in = new BufferedReader(
         new InputStreamReader(
           socket.getInputStream()));
      PrintWriter out = new PrintWriter(
        new BufferedWriter(
          new OutputStreamWriter(
           socket.getOutputStream())), true);
      while (true){
         String msg = in.readLine();
         System.out.println(msg);
    catch (SocketException  se){
      System.out.print(se.toString());
    catch (IOException e){
      System.out.print(e.toString());
    catch (Exception ex) {
      System.out.print(ex.toString());
    }When I close client, server is constantly writing null (msg is null). Why doesn't it throw an exception?
    Thank you.

    The moral of the story is avoid using Readers and Writers with Sockets. They swallow exceptionsThat's not so. It is PrintWriters and PrintStreams that swallow exceptions.
    @OP: there is no reason for your code to throw an exception. It keeps reading the socket and encountering EOF, signalled by the null return, at which point any sensible code should exit the loop and close the socket. However as you don't do that, you just read the socket and get the EOF again ...
    You would only get an exception, specifically an EOFException, if you were calling one of the readXXX methods that is specified to throw it. readLine() isn't one of those.

  • Can't figure out why it's throwing this exception

    Can anyone see a problem with this method? I have checked over everything and can't figure out why it's giving me an exception. All of the get methods are retrieving data and the db table and all the fields are correct.
        // add a Reservation to the database
        public static void addReservation(Reservation aReservation)throws Exception
         try
             String query = "INSERT INTO Reservations (Number, ContactAlias, SPOC, SRNumber, StartDate, EndDate) " +
                           "VALUES ('" + aReservation.getNumber() + "', " +
                           "'" + aReservation.getContact() + "', " +
                           "'" + aReservation.getSPOC() + "', " +
                           "'" + aReservation.getSRNumber() + "', " +
                           "'" + aReservation.getStartDate() + "', " +
                           "'" + aReservation.getEndDate() + "')";
            reservationList.removeAll();
              reservationUIList.removeAll();
              Statement statement = connection.createStatement();
            statement.executeUpdate(query);
              open();
              if( reservationRS !=null)
            while( reservationRS.next() )
                   aNumber = reservationRS.getString(1);
                   reservationList.add(aNumber);
                   reservationUIList.add(aNumber);
              statement.close();
            close();
         catch (Exception e)
                System.out.println("Caught exception in addReservation of DM.");   
                throw e;
         }And the exception:java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
         at ReservationDM.addReservation(ReservationDM.java:149)
         at Reservation.addReservation(Reservation.java:268)
         at ReservationUI.invokeAdd(ReservationUI.java:552)
         at ReservationUI.actionPerformed(ReservationUI.java:285)
         at java.awt.Button.processActionEvent(Button.java:324)
         at java.awt.Button.processEvent(Button.java:297)
         at java.awt.Component.dispatchEventImpl(Component.java:2588)
         at java.awt.Component.dispatchEvent(Component.java:2492)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)Thanks,
    Shawn

    Well, one extreme that I eventually had to go to was inserting a new row with only the primary keys, which were numerical columns, while just setting the strings to empty values.
    INSERT INTO Courses VALUES(?,?,?,1,0,?,'','','','','','','','','')
    Access finally seemed to handle this without barfing.
    Then, I updated each string column ...if you can believe it ...one at a time in a for loop from a custom 'RowUpdateSet' object. This actually worked well because eventually I also used it to update the row when necessary, and to only update columns whose values had changed. One teeny weeny snippet from a great deal of code looked like this...
      for ( int i=1; i<length; i++ ) {
        if ( updateSet.getUpdateColumn( i ) ) {
          synchronized ( updateSet ) {
            scrollResults.updateObject(i,(String)updateSet.getUpdateValue(i));
            scrollResults.updateRow();
      }I guess I will likely get flamed for participating in this whole discussion, because it all does become quite irrational. I can see why peoples initial response is likely ..."what, couldn't you even debug your own sql string bozo?" All I know is, there seems to be insert statements that Access just mysteriously refuses to perform ...and it has nothing to do with terminated strings or syntax errors. How you choose to perservere and 'get the job done' is probably as unique to each individual as is the whole mysterious error in the first place. I just got tired of staring at what appeared to be a totally disfunctional environment and decided to go around the problem and get done with the project ...which eventually worked like a charm.
    This is exactly what I meant when I said don't look too closely or you might wind up distrusting this technology you are working with on a day to day basis. Frankly, the more I work with technology the more I realize that I, for example, will never use my credit card over the web (particularly with .NET in the picture). I am sure you can find another way to get to the results you want if you think about it creatively. I got my project done. I just didn't get there in the way I had expected I would. Maybe that's not even a bad thing, even though it can be extremely frustrating at times. When we look at all the disclaimers that come with software these days, or look at faster and faster computers that just run slower and slower, maybe we shouldn't expect so much from technology. At least Java allows you to write your own logic and often work around these impediments ...which is still alot better than being stuck with .COM libraries that force you to abandon a project half way through when you find out the library fails to live up to its claims in the reference manual.
    Sorry your project is on hold at the moment. If no one else answers, start a new thread that asks your question again, and I will butt out. Maybe there is someone who has found out what causes this issue. After all, I can only speak from my own experiences ...and I am far from being an authority on any issue surrounding technology. Good luck, and don't give up. I am sure there is a way to get where you want to go.
    After saying all that, I realize kev wrote a response while I was composing this one. As he implores, yes ...do be certain you have eliminated all the obvious possibilities before you adventure into any painfull work-arounds. Really, I wish you all the best of luck.

  • 1. Why doesn't the "Show Duplicates" function ever work?  It's always grayed out.

    1. Why doesn't the "Show Duplicates" function ever work?  It's always grayed out.

    do you have the current itunes? the option is under view "show duplicate items. Maybe you just dont have any duplicates.

  • Maintaining Macs--Why doesn't Apple tell you more?

    This is not a problem that I need to solve but just something I've been wondering about. Why doesn't Apple tell people the routines they need to use to maintain their Macs?
    If you do a search on "maintenance" in Support the fourth item is Mac Maintenance Quick Assist:
    http://docs.info.apple.com/article.html?artnum=303602
    The things they tell you to do are:
    1) Keep Things Up to Date; 2) Put Your Files Away; 3) Name Your Files; 4) Prune Through Your Files; 5) Back Up Your Files; 6) Check for Viruses; 7) Clean the Outside
    Where is anything about running the maintenance scripts, checking permissions, checking your preferences, updating the databases, cleaning caches, or anything else that software programs like Onyx, Cocktail, etc make their purpose? Why don't they mention getting a program like Disc Warrior and running it periodically?
    The first item on their list is Keep Things Up to Date, meaning download system and application updates. Well after looking at these forums for a while I would have to say that is the worst thing you could do, as so many posts start, " Help! I updated my software and now things don't work...." Even if you look at this article about updating your software...
    http://docs.info.apple.com/article.html?artnum=106704
    ...nowhere does it mention repairing your permissions! Yet everywhere on this forum that is mentioned as one of the first things to do...unfortunately AFTER people are crazy with problems.
    I don't get it. Even in the manuals that come with the computers none of this stuff is mentioned (last time I looked) except in the troubleshooting section. Would you buy a car where the owner's manual had "change the oil regularly" listed in a section on what to do after you've blown your engine?
    Granted, a lot of people on this forum know all these things and do them regularly, but I have several friends with Macs who never do any regular maintenance because they've never been told to. One just called me last week because his iMac auto-updated and he had all sorts of problems.
    So why is this? Why isn't basic Mac maintenance explained to people better? Going back to the car analogy, people have been taught they have to give their cars tune-ups or face an eventual breakdown. Why not with Macs?
    I have been using Macs for years and enjoy looking into this geeky stuff. And I rarely have any serious problems. I would think it has a lot to do with the fact that I don't automatically update without checking MacFixit first and seeing what problems people are having and running a few simple maintenance routines periodically, plus backing up for good measure. Why isn't Apple more upfront with people about maintaining their Macs? Am I off-base here?
    ibook G3, imac G5   Mac OS X (10.4.9)  

    I'll provide you with several references you will find interesting reading:
    http://www.macfixit.com/article.php?story=20060413075624652
    http://www.macworld.com/2006/08/secrets/repairpermissions/index.php
    http://www.macworld.com/2006/03/secrets/tcopermissions/index.php
    http://www.atomicbird.com/node/view/29
    The document to which you referred is an old one that dates back a ways when permissions repairs were often still needed because many installers improperly changed permissions or caused permissions to change through other improper operations. In reality the only thing permissions repair affects are the permissions on OS X installed software for which there are receipts in the /Library/Receipts/ folder and third-party software that install a receipt that includes information on resetting permissions for that software. The vast majority of third-party applications provide no such information and repairing permissions has no impact on them.
    As for maintenance scripts they are now supposed to be run automatically regardless of whether the computer is turned on in the early AM, but this is an implementation with Tiger because Tiger introduced a new method of task launching. It's not 100 percent effective but it's better than it was. However, it's an easy problem to solve because there are some excellent utilities that solve the problem: Macaroni, Anacron, and Pseudo Anacron - VersionTracker or MacUpdate. I use Macaroni on all my Macs.
    Kappy's Personal Suggestions for OS X Maintenance
    For disk repairs use Disk Utility. For situations DU cannot handle the best third-party utilities are: Disk Warrior; DW only fixes problems with the disk directory, but most disk problems are caused by directory corruption; Disk Warrior 4.0 is now Intel Mac compatible. TechTool Pro provides additional repair options including file repair and recovery, system diagnostics, and disk defragmentation. TechTool Pro 4.5.2 is Intel Mac compatible; Drive Genius is similar to TechTool Pro in terms of the various repair services provided. The current version, 1.5.1, is Intel Mac compatible.
    OS X performs certain maintenance functions that are scheduled to occur on a daily, weekly, or monthly period. The maintenance scripts run in the early AM only if the computer is turned on 24/7 (no sleep.) If this isn't the case, then an excellent solution is to download and install a shareware utility such as Macaroni, JAW PseudoAnacron, or Anacron that will automate the maintenance activity regardless of whether the computer is turned off or asleep.
    OS X automatically defrags files less than 20 MBs in size, so unless you have a disk full of very large files there's little need for defragmenting the hard drive. As for virus protection there are few if any such animals affecting OS X. You can protect the computer easily using the freeware Open Source virus protection software ClamXAV. Personally I would avoid most commercial anti-virus software because of their potential for causing problems.
    I would also recommend downloading the shareware utility TinkerTool System that you can use for periodic maintenance such as removing old logfiles and archives, clearing caches, etc.
    For emergency repairs install the freeware utility Applejack. If you cannot start up in OS X, you may be able to start in single-user mode from which you can run Applejack to do a whole set of repair and maintenance routines from the commandline.
    When you install any new system software or updates be sure to repair the hard drive and permissions beforehand. I also recommend booting into safe mode before doing system software updates.
    Get an external Firewire drive at least equal in size to the internal hard drive and make (and maintain) a bootable clone/backup. You can make a bootable clone using the Restore option of Disk Utility. You can also make and maintain clones with good backup software. My personal recommendations are (order is not significant):
    1. Retrospect Desktop (Commercial - not yet universal binary)
    2. Synchronize! Pro X (Commercial)
    3. Synk (Backup, Standard, or Pro)
    4. Deja Vu (Shareware)
    5. PsynchX 2.1.1 and RsyncX 2.1 (Freeware)
    6. Carbon Copy Cloner (Freeware - 3.0 is a Universal Binary)
    7. SuperDuper! (Commercial)
    The following utilities can also be used for backup, but cannot create bootable clones:
    1. Backup (requires a .Mac account with Apple both to get the software and to use it.)
    2. Toast
    3. Impression
    4. arRSync
    Apple's Backup is a full backup tool capable of also backing up across multiple media such as CD/DVD. However, it cannot create bootable backups. It is primarily an "archiving" utility as are the other two.
    Impression and Toast are disk image based backups, only. Particularly useful if you need to backup to CD/DVD across multiple media.
    Visit The XLab FAQs and read the FAQs on maintenance, optimization, virus protection, and backup and restore.
    Additional suggestions will be found in Mac Maintenance Quick Assist.
    Referenced software can be found at www.versiontracker.com and www.macupdate.com.
    I know that Joe Average has no clue, but it's not Apple's responsibility to provide Joe Average with clues on how to use a computer. No more than it's not GM's responsibility to teach you how be an automotive mechanic or how to drive. Some things you have to take responsibility for yourself. It's just that Joe Average is too lazy to read the User Guide, buy a book, or in any other way learn about computers before buying one.
    As you can tell I am somewhat heavy handed about personal responsibility. Computers are essentially toys that aren't dangerous, but the person playing with them is. What really scares the crap out of me is that same Joe Average has a driver's license and may be old enough to drink liquor. When it comes to driving or drinking and driving Joe Average is no more competent.

  • Why it is throwing null at last  whenever i am running this program

    public static void main(String args[])
              String str;                    
              try     
              FileReader fis = new FileReader(C:\\src\\vinaysingh\\xmlreq.xml");
              BufferedReader br= new BufferedReader(fis);
              do
                   str=br.readLine();
                   System.out.println(str);
              while(!str.equals(null));
    why it is throwing null on last if i am reading any xml file

    get the value of string as the value which u
    had collected from the string instead of nullWhat? That just doesn't make any sense. At all.
    I presume what you're asking is:
    How do I read lines from a text file, ignoring empty lines. Especially how do I know when I've reached the end of the file so that I can stop trying to read more lines.
    this might help some ...
    package krc.utilz.io;
    import java.util.Collection;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.io.File;
    import java.io.Reader;
    import java.io.FileReader;
    import java.io.BufferedReader;
    import java.io.FileWriter;
    import java.io.PrintWriter;
    import java.io.InputStream;
    import java.io.FileInputStream;
    import java.io.Closeable;
    import java.io.IOException;
    import java.io.FileNotFoundException;
    * @class: krc.utilz.io.Filez
    * A collection of static "file handling" helper methods.
    public abstract class Filez
      public static final int BFRSIZE = 4096;
       * reads the given file into one big string.<p>
       * Warning: don't use this on big files. It uses too much RAM!
       * @param String filename - the name of the file to read
       * @return the contents filename
      public static String read(String filename)
        throws FileNotFoundException
        return Filez.read(new FileReader(filename));
       * Reads the contents of the given reader into one big string, and closes
       * the reader.
       * Warning: don't use this on big files. It uses too much RAM!
       * @param java.io.Reader reader - a subclass of Reader to read from.
       * @return the whole contents of the given reader.
      public static String read(Reader in)
        try {
          StringBuffer out = new StringBuffer();
          try {
            char[] bfr = new char[BFRSIZE];
            int n = 0;
            while( (n=in.read(bfr,0,BFRSIZE)) > 0 ) {
              out.append(bfr,0,n);
          } finally {
            if(in!=null)in.close();
          return out.toString();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * (re)writes the given content to the given filename
       * @param String content - the new contents of the fil
       * @param String filename - the name of the file to write.
      public static void write(String content, String filename) {
        try {
          PrintWriter out = null;
          try {
            out = new PrintWriter(new FileWriter(filename));
            out.write(content);
          } finally {
            if(out!=null)out.close();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * Appends the given content to the given filename.
       * @param String content - the string to write to the file.
       * @param String filename - the name of the file to write to.
      public static void append(String content, String filename) {
        try {
          PrintWriter out = null;
          try {
            out = new PrintWriter(new FileWriter(filename, true)); //true=append
            out.write(content);
          } finally {
            if(out!=null)out.close();
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * reads each line of the given file into an array of strings.
       * @param String filename - the name of the file to read
       * @return a fixed length array of strings containing file contents.
      public  static String[] readArray(String filename)
        throws FileNotFoundException
        return readList(filename).toArray(new String[0]);
       * reads each line of the given file into an ArrayList of strings.
       * @param String filename - the name of the file to read
       * @return an ArrayList of strings containing file contents.
      public static ArrayList<String> readArrayList(String filename)
        throws FileNotFoundException
        return (ArrayList<String>)readList(filename);
       * reads each line of the given file into a List of strings.
       * @param String filename - the name of the file to read
       * @return an List handle ArrayList of strings containing file contents.
      public static List<String> readList(String filename)
        throws FileNotFoundException
        try {
          BufferedReader in = null;
          List<String> out = new ArrayList<String>();
          try {
            in = new BufferedReader(new FileReader(filename));
            String line = null;
            while ( (line = in.readLine()) != null ) {
              out.add(line);
          } finally {
            if(in!=null)in.close();
          return out;
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * reads the whole of the given file into an array of bytes.
       * @param String filename - the name of the file to read
       * @return an array of bytes containing the file contents.
      public static byte[] readBytes(String filename)
        throws FileNotFoundException
        return( readBytes(new File(filename)) );
       * reads the whole of the given file into an array of bytes.
       * @param File file - the file to read
       * @return an array of bytes containing the file contents.
      public static byte[] readBytes(File file)
        throws FileNotFoundException
        try {
          byte[] out = null;
          InputStream in = null;
          try {
            in = new FileInputStream(file);
            out = new byte[(int)file.length()];
            int size = in.read(out);
          } finally {
            if(in!=null)in.close();
          return out;
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * do files A & B have the same contents
       * @param String filenameA - the first file to compare
       * @param String filenameA - the second file to compare
       * @return boolean do-these-two-files-have-the-same-contents?
      public static boolean isSame(String filenameA, String filenameB)
        throws FileNotFoundException
        try {
          File fileA = new File(filenameA);
          File fileB = new File(filenameB);
          //check for same physical file
          if( fileA.equals(fileB) ) return(true);
          //compare sizes
          if( fileA.length() != fileB.length() ) return(false);
          //compare contents (buffer by buffer)
          boolean same=true;
          InputStream inA = null;
          InputStream inB = null;
          try {
            inA = new FileInputStream(fileA);
            inB = new FileInputStream(fileB);
            byte[] bfrA = new byte[BFRSIZE];
            byte[] bfrB = new byte[BFRSIZE];
            int sizeA=0, sizeB=0;
            do {
              sizeA = inA.read(bfrA);
              sizeB = inA.read(bfrB);
              if ( sizeA != sizeB ) {
                same = false;
              } else if ( sizeA == 0 ) {
                //do nothing
              } else if ( !Arrays.equals(bfrA,bfrB) ) {
                same = false;
            } while (same && sizeA != -1);
          } finally {
            Clozer.close(inA, inB);
          return(same);
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * checks the given filename exists and is readable
       * @param String filename = the name of the file to "open".
       * @param OPTIONAL String type = a short name for the file used to identify
       *  the file in any exception messages.
       *  For example: "input", "input data", "DTD", "XML", or whatever.
       * @return a File object for the given filename.
       * @throw FileNotFoundException if the given file does not exist.
       * @throw IOException if the given file is unreadable (usually permits).
      public static File open(String filename)
        throws FileNotFoundException
        return(open(filename,"input"));
      public static File open(String filename, String type)
        throws FileNotFoundException
        try {
          File file = new File(filename);
          String fullname = file.getCanonicalPath();
          if(!file.exists()) throw new FileNotFoundException(type+" file does not exist: "+fullname);
          if(!file.canRead()) throw new RuntimeIOException(type+" file is not readable: "+fullname);
          return(file);
        } catch (IOException e) {
          throw new RuntimeIOException(e.getMessage(), e);
       * gets the filename-only portion of a canonical-filename, with or without
       * the extension.
       * @param String path - the full name of the file.
       * OPTIONAL @param boolean cutExtension - if true then remove any .ext
       * @return String the filename-only (with or without extension)
      public static String basename(String path) {
        return(basename(path,false));
      public static String basename(String path, boolean cutExtension)
        String fname = (new File(path)).getName();
        if (cutExtension) {
          int i = fname.lastIndexOf(".");
          if(i>0) fname = fname.substring(0,i);
        return(fname);
    }You'll probably want to remove all references to RuntimeIOException... just throw the standard checked IOException instead.

  • Why doesn't reflection reveal the clone() method in arrays?

    I was surprised to discover that the following code does not reveal the method "clone()", even though you can call "clone()" on an Object[]. Can anyone explain why this is? I was hoping to use the Reflect API to clone an arbitrary object if it was Cloneable, and to throw an Exception otherwise. How can I do this?
    import java.lang.reflect.Method;
    public class Test {
         public static void main(String[] args) throws Exception {
              Object x;
              //pick a class
              x = new Object[] {};
              //is it Cloneable?
              System.out.print("The class " + x.getClass().getCanonicalName() + " is ");
              if(!(x instanceof Cloneable)) System.out.print("NOT ");
              System.out.println("Cloneable");
              System.out.println("-------");
              //what methods are available?
              Method[] meths = x.getClass().getMethods();
              for(Method m : meths) {
                   System.out.println(m.getName());
              System.out.println("-------");
    }

    Just to clarify. I know that clone() is protected in Object, but it is certainly a public method in array objects such as int[], float[], Object[] etc. Test: call clone() on any of these objects! Also, I realize that Cloneable does not itself guarantee the method clone(). Nevertheless, if you take a regular Cloneable object, such as a String, then typically, if you ran myObject.getClass().getMethods() on that object, you'd find the method clone() in the resulting list. i.e., that Class has overwritten Object's protected clone() method with a public clone() method. So since int[], float[] and all the rest have a clearly public clone() method, then why doesn't myFloatArray.getClass().getMethods() show me a method called "clone"? I guess it would have to have something to do with the fact that arrays are funny kinds of classes that are not properly handled by the Reflection API, but is it on purpose that clone() isn't available?

  • Adding a new UDF throws a null pointer exception and modifying user.xml

    Hello,
    I have a two part question.
    i. I am trying to add a UDF (using Advanced>User Configuration..Attributes) to a fully configured OIM i.e. oim with reconciliation and provisioning from and to resources but it throws a null pointer exception. Look at the log, I see
    ===============Excerpt form the log file==========
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [[
    ---Stack Trace Begins[[This is not an exception. For debugging purposes]]---
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.doCheckAccess(OESAuthzServiceImpl.java:210)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:188)
    oracle.iam.platform.authz.impl.OESAuthzServiceImpl.hasAccess(OESAuthzServiceImpl.java:180)
    oracle.iam.platform.authz.impl.AuthorizationServiceImpl.hasAccess(AuthorizationServiceImpl.java:173)
    oracle.iam.configservice.impl.ConfigManagerImpl.checkAuthorization(ConfigManagerImpl.java:1899)
    oracle.iam.configservice.impl.ConfigManagerImpl.addAttribute(ConfigManagerImpl.java:177)
    oracle.iam.configservice.api.ConfigManagerEJB.addAttributex(Unknown Source)
    ... 21 lines skipped..
    oracle.iam.configservice.api.ConfigManager_5u0nrx_ConfigManagerRemoteImpl.addAttributex(ConfigManager_5u0nrx_ConfigManagerRemoteImpl.java:864)
    ... 13 lines skipped..
    oracle.iam.configservice.api.ConfigManagerDelegate.addAttribute(Unknown Source)
    oracle.iam.configservice.agentry.config.CreateAttributeActor.perform(CreateAttributeActor.java:266)
    oracle.iam.consoles.faces.mvc.canonic.Model.perform(Model.java:547)
    oracle.iam.consoles.faces.mvc.admin.Model.perform(Model.java:324)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doPerform(Controller.java:255)
    oracle.iam.consoles.faces.mvc.canonic.Controller.doSelectAction(Controller.java:178)
    oracle.iam.consoles.faces.event.NavigationListener.processAction(NavigationListener.java:97)
    ... 24 lines skipped..
    oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:115)
    ... weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:100)
    ... 15 lines skipped..
    weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ---Stack Tracefor this call Ends---
    [2012-01-26T11:28:14.447-05:00] [oim_server1] [NOTIFICATION] [IAM-1010010] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: 1] [arg: null] [arg: USER_MANAGEMENT_CONFIG] [arg: CREATE_ATTRIBUTE] ********** Entering the Authorization Segment with parameters:: LoggedInUserId = 1, target resourceID = null, Feature = USER_MANAGEMENT_CONFIG, Action = CREATE_ATTRIBUTE **********
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010021] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]] Validating the Internal Obligations: [InternalObligation: name: noop, values: [true], convertToObligation: false, InternalObligation: name: noop, values: [true], convertToObligation: false]
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010022] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] ---------- The list of Internal Obligation is satisfied, returning TRUE ----------
    [2012-01-26T11:28:14.448-05:00] [oim_server1] [NOTIFICATION] [IAM-1010026] [oracle.iam.platform.authz.impl] [tid: [ACTIVE].ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 0000JKQq8vZ8dpC5nFk3yZ1Evvpt000LzY,0] [APP: oim#11.1.1.3.0] [dcid: c62f3a4b80d21e6f:ef93519:134587d39c4:-7ffd-0000000000022a3e] [arg: Decision :PERMIT\nObligations from policy: ] ********** Exiting the Authorization Segment with result Decision :PERMIT[[
    =============Excerpt ends==============
    Is there a reason why this is and how do I get by it.
    ii. Can I just add the field directly within the MDS>file/user.xml? Would there be an issue with changing an existing attribute metadata using the user.xml?

    Pradeep thank you for your response. it was helpful. However, I also found the responses to both my questions.
    i. The null pointer exception was due to using a complex query I was using in the LOV query. I tried a simple query and that worked fine.
    ii. For modifying the user defined attributes one can consult the following forum post:
    OIM 11g - Change UDF Field Type form String to LOV
    Thanks

  • Why do I need to catch this exception?

    Hello all
    This is a question about exception handling. I have to build a diary application that lets you save reminders on particular dates using xml. Just to make it a little tougher, I was not allowed to use the Calendar class. This is the code I wrote:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.text.*; 
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;     
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;                                                                                                                                                                                                                         
    import static java.lang.Math.*;
    public class CalendarAssignment extends JFrame implements ActionListener
         int MonthLength [] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
         public JButton [] days = new JButton[43];
         private JLabel lbl, reminderlbl;
         private JPanel top, grid, remindercenter, reminderbottom;
         private JFrame reminderframe;
         private JTextField year1, reminderinput, dayno;
         private JComboBox months;
         private Container container;
         private JButton fetch, save, cancel;
         private Document doc;
         private File file;
         private Node node;
         private String year, month, day;
              public static void main( String[] args ) {
                   CalendarAssignment c = new CalendarAssignment( );
                   c.setSize( 400, 300 );
                   c.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                   c.show( );
              public CalendarAssignment( ) {
                   int CurrentYear, CurrentMonth;
                   String YearString, MonthString, Now;
                   Date today;
                   container = getContentPane( );
                   container.setLayout( new BorderLayout( ) );
                   SimpleDateFormat DateFormatter;
                   DateFormatter = new SimpleDateFormat( "MM.yyyy" );
                   today = new Date( );
                   Now = DateFormatter.format( today );
                   MonthString = Now.substring( 0,2 );
                   YearString = Now.substring( 3,7 );
                   CurrentMonth = Integer.valueOf( MonthString );
                   CurrentYear = Integer.valueOf( YearString );
                   top = new JPanel( );
                        String [] items = { "January", "February", "March", "April", "May", "June",
                                      "July", "August", "September", "October", "November",
                                      "December" };
                        months = new JComboBox( items );
                        months.setEditable( false );
                        months.setSelectedIndex( CurrentMonth - 1 );          
                        year1 = new JTextField( );
                        year1.setText( YearString );
                        year1.setEditable( true );
                        year1.setHorizontalAlignment( year1.CENTER );
                        fetch = new JButton( "Fetch Month" );
                        fetch.addActionListener( this );
                        top.setLayout( new GridLayout( 1, 3, 20, 0 ) );
                        top.add( months );
                        top.add( year1 );
                        top.add( fetch );
                   grid = new JPanel( );
                        grid.setLayout( new GridLayout( 7, 7, 0, 0 ) );
                        String [] week = { "Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun" };
                        for ( int a = 0; a < 7; a ++ ) {
                                  JLabel lbl = new JLabel( week[a], JLabel.CENTER );
                                  grid.add( lbl );
                        for ( int i = 0; i < 42; i ++ ) {
                                  days[i] = new JButton( );
                                  grid.add( days[i] );
                                  days.addActionListener( this );
                        DrawCalendar( CurrentMonth, CurrentYear );
                        container.add( top, BorderLayout.NORTH );
                        container.add( grid, BorderLayout.CENTER );
              private void DrawCalendar( int SelectMonth, int SelectYear ) {
                        int DisplayMonthLength, Buttons;
                        String ButtonID = "";
                        int OffSet = MonthStart( SelectMonth, SelectYear );
                        DisplayMonthLength = MonthLength [SelectMonth - 1];
                        if ( SelectMonth == 2 )
                             DisplayMonthLength += LeapYear( SelectYear );
                        for ( Buttons = 1; Buttons < 43; Buttons ++ ) {
                             if ( ( Buttons <= OffSet ) || ( Buttons > ( DisplayMonthLength + OffSet ) ) ) {
                                  ButtonID = "";
                                  days[Buttons-1].setEnabled( false );
                             else {
                                  ButtonID = Integer.toString( Buttons - OffSet );
                                  days[Buttons-1].setEnabled( true );
                        days[Buttons-1].setLabel( ButtonID );
                        grid.add( days[Buttons-1] );
              private int LeapYear( int year ) {
                        int FourHundred, OneHundred, Fourth;
                        FourHundred = year % 400;
                        OneHundred = year % 100;
                        Fourth = year % 4;
                        if( ( ( FourHundred == 0 ) ) || ( ( OneHundred != 0 ) && ( Fourth == 0 ) ) )
                             return ( 1 );
                        else
                             return ( 0 );
              private int MonthStart( int Month, int Year ) {
                        int OffSet, LastMonths, BeforeOrAfter, Years;
                        int AllDays = 0;
                        int YearDays = 365;
                        int YearMonths = 12;
                        BeforeOrAfter = Year - 2006;
                        Years = abs( BeforeOrAfter );
                        if( BeforeOrAfter != 0 )
                             BeforeOrAfter = BeforeOrAfter / Years;
                        switch( BeforeOrAfter ) {
                             case 1:
                                  for( int a = 2006; a < Year; a ++ ) {
                                       AllDays += YearDays + LeapYear( a );
                                  AllDays += LastMonthsCalc( Month, Year );
                             break;
                             case -1:
                                  for( int a = 2005; a > Year; a -- ) {
                                       AllDays += YearDays + LeapYear( a );
                                  for( LastMonths = YearMonths; LastMonths >= Month; LastMonths -- ) {
                                       AllDays += MonthLength[LastMonths - 1];
                                       if( LastMonths == 2 )
                                            AllDays += LeapYear( Year );
                             break;
                             default:
                                  if( Month > 1 )
                                       AllDays += ( LastMonthsCalc( Month, Year ) );
                        OffSet = AllDays % 7;
                        if( BeforeOrAfter ==( -1 ) )
                             return( 6 - OffSet );
                        else if( OffSet > 0 )
                             return( OffSet - 1 );
                        else
                             return( 6 );
              private int LastMonthsCalc( int Month, int Year ) {
                        int Counter;
                        int days = 0;
                        for( Counter = 1; Counter < Month; Counter ++ ) {
                             days += MonthLength[Counter - 1];
                             if( Counter == 2 )
                                  days += LeapYear( Year );
                        return( days );
              public void CreateReminder( String buttonID, String yearID, String monthID ) {
                        reminderframe = new JFrame( );
                        reminderlbl = new JLabel( );
                        reminderframe.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                        remindercenter = new JPanel( );
                             reminderlbl = new JLabel( "Please type in reminder to be saved for " + buttonID + " " + monthID + " " + yearID + ":", JLabel.CENTER );
                             reminderinput = new JTextField( 30 );
                             reminderinput.setHorizontalAlignment( reminderinput.CENTER );
                             reminderinput.setEditable( true );
                             remindercenter.setLayout( new GridLayout( 2, 1, 0, 0 ) );
                             remindercenter.add( reminderlbl );
                             remindercenter.add( reminderinput );
                        reminderbottom = new JPanel( );
                             save = new JButton( "Save" );
                             save.addActionListener( this );
                             cancel = new JButton( "Cancel" );
                             cancel.addActionListener( this );
                             dayno = new JTextField( buttonID );
                             dayno.setEditable( false );
                             dayno.setEnabled( false );
                             dayno.show( false );
                             reminderbottom.setLayout( new FlowLayout( ) );
                             reminderbottom.add( save );
                             reminderbottom.add( cancel );
                             reminderbottom.add( dayno );
                        reminderframe.setSize( 500, 75 );
                        reminderframe.add( remindercenter );
                        reminderframe.add( reminderbottom );
                        reminderframe.pack( );
                        reminderframe.show( );
              public void SaveReminder( String dayID, String yearID, String monthID ) throws Exception {
                        file = new File( "Diary.xml" );
                        doc = DocumentBuilderFactory.newInstance( ).newDocumentBuilder( ).parse( file.toURL( ).toString( ) );
                        String year = yearID;
                        String month = monthID;
                        String day = dayID;
                        //System.out.println( year );
                        //System.out.println( month );
                        //System.out.println( day );
                        CreateEntry( doc.getDocumentElement( ) );
                        writeXmlFile( );
              public boolean CreateEntry( Node node ) {
                        Node searchNode;
                        searchNode = getYear( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Year" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", year );
                        node = searchNode;
                        searchNode = getMonth( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Month" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", month );
                        node = searchNode;
                        searchNode = getDay( node );
                        if( searchNode == null ) {
                             Element newNode = doc.createElement( "Day" );
                             searchNode = node.appendChild( newNode );
                             newNode.setAttribute( "Id", day );
                        node = searchNode;
                        String entry = reminderinput.getText( );
                        Node textNode = doc.createTextNode( entry );
                        node.appendChild( textNode );
                        return true;
              private Node getYear( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if(node.getNodeName( ).equals( "Year" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == year )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getMonth( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Month" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == month )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private Node getDay( Node node ) {
                        node = node.getFirstChild( );
                        while( node != null ) {
                             if( node.getNodeName( ).equals( "Day" ) && String.valueOf( node.getAttributes( ).item( 0 ).getNodeValue( ) ) == day )
                                  return node;
                                  node = node.getNextSibling( );                    
                        return null;
              private void writeXmlFile( ) throws Exception {
                   Source source = new DOMSource( doc );
                        Result result = new StreamResult( file );
                   Transformer xformer = TransformerFactory.newInstance( ).newTransformer( );
                   xformer.setOutputProperty( OutputKeys.INDENT,"yes" );
                   xformer.setOutputProperty( OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd" );
                   xformer.transform( source, result );
              public void actionPerformed( ActionEvent e ) {
                        String IDButton = e.getActionCommand( );
                        String IDYear = year1.getText( );
                        Object IDMonthObj = months.getSelectedItem( );
                        if( e.getSource( ) == fetch ) {
                             String YearText = year1.getText( );
                             int YearNumber = Integer.valueOf( YearText );
                             int MonthsIndex = months.getSelectedIndex( ) + 1;
                             DrawCalendar( MonthsIndex, YearNumber );
                        else if( e.getSource( ) == cancel ) {
                             reminderframe.hide( );
                        else if( e.getSource( ) == save ) {
                             String IDDay = dayno.getText( );
                             String IDMonth = String.valueOf( IDMonthObj );
                             SaveReminder( IDDay, IDYear, IDMonth );
                        else {
                             String IDMonth = String.valueOf( IDMonthObj );
                             Toolkit.getDefaultToolkit( ).beep( );
                             int n = JOptionPane.showConfirmDialog( null, "Set reminder on this date?", "Question", JOptionPane.YES_NO_OPTION );
                             if( n == JOptionPane.YES_OPTION ) {
                                  CreateReminder( IDButton, IDYear, IDMonth );
    If you compile it, you will realise that I get an error about exception handling. My lecturer gave me an example code of how to do the same thing without using a GUI:
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class CallDOM
         Document doc;
         File file;
         Scanner input;
         int year, month, day;
         String currentYear, currentMonth;
         public static void main(String args[]) throws Exception
              CallDOM cd=new CallDOM();          
         CallDOM() throws Exception
              file=new File("Diary.xml");
              //create DOM from file
              doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(file.toURL().toString());
              input=new Scanner(System.in);
              System.out.println("1) Create entry");
              System.out.println("2) Read entry");
              System.out.println("3) Show Diary");
              System.out.println("4) Quit");
              int choice=input.nextInt();
              while(choice!=4)
                   switch(choice)
                        case 1: GetDate();CreateEntry(doc.getDocumentElement());break;
                        case 2: GetDate();ReadEntry(doc.getDocumentElement());break;
                        case 3: ShowDiary(doc.getDocumentElement());
                   System.out.println("1) Create entry");
                   System.out.println("2) Read entry");
                   System.out.println("3) Show Diary");
                   System.out.println("4) Quit");
                   choice=input.nextInt();
              writeXmlFile();
         public void GetDate()
              System.out.println("Enter date (dd mm yyyy)");
              day=input.nextInt();
              month=input.nextInt();
              year=input.nextInt();
         public boolean ReadEntry(Node node)
              node = getYear(node);
              if(node==null) return false;
              node = getMonth(node);
              if(node==null) return false;
              node = getDay(node);
              if(node==null) return false;
              node = node.getFirstChild();
              while(node!=null)
                   System.out.println(node.getNodeValue().trim());     
                   node=node.getNextSibling();
              return true;               
         public boolean CreateEntry(Node node)
              Node searchNode;
              searchNode = getYear(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Year");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(year));
              node = searchNode;
              searchNode = getMonth(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Month");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(month));
              node = searchNode;
              searchNode = getDay(node);
              if(searchNode==null)
                   Element newNode = doc.createElement("Day");
                   searchNode = node.appendChild(newNode);
                   newNode.setAttribute("Id",Integer.toString(day));
              node = searchNode;
              System.out.println("Enter Text");
              String entry=input.next();
              entry+=input.nextLine();
              Node textNode = doc.createTextNode(entry);
              node.appendChild(textNode);
              return true;               
         public void ShowDiary(Node node)
              Stack<Node> stack=new Stack<Node>();
              Node child;
              stack.push(node);
              while(!stack.empty())
                   node = stack.pop();
                   if(ProcessNode(node))
                        child = node.getLastChild();
                        while(child!=null)
                             stack.push(child);
                             child = child.getPreviousSibling();
         private boolean ProcessNode(Node node)
              if(node.getNodeName().equals("Year"))
                   currentYear=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Month"))
                   currentMonth=node.getAttributes().item(0).getNodeValue();
              if(node.getNodeName().equals("Day"))
                   System.out.print(node.getAttributes().item(0).getNodeValue()+"/"+
                                            currentMonth+"/"+currentYear+": ");
                   node=node.getFirstChild();
                   while(node!=null)
                        System.out.println(node.getNodeValue().trim());
                        node=node.getNextSibling();
                   return false;
              return true;               
         private Node getYear(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Year")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==year)
                             return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getMonth(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Month")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==month)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private Node getDay(Node node)
              node=node.getFirstChild();
              while(node!=null)
                   if(node.getNodeName().equals("Day")
                        && Integer.valueOf(node.getAttributes().item(0).getNodeValue())==day)
                        return node;
                   node = node.getNextSibling();                    
              return null;
         private void writeXmlFile() throws Exception
            Source source = new DOMSource(doc);
            Result result = new StreamResult(file);
            Transformer xformer = TransformerFactory.newInstance().newTransformer();
            xformer.setOutputProperty(OutputKeys.INDENT,"yes");
            xformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"Diary.dtd");
            xformer.transform(source, result);
    }My question is, why does the exceptions in the example code not need to be caught? And why do I have to catch the exceptions in my code? Several exceptions are thrown in the example code, but there is no catch statement.
    Thanks for any advice!!

    Since your question didn't come with any relevant details, and since you have huge steaming piles of irrelevant code, all I can give is a general answer to "Why do I need to catch this exception?"
    [url http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html]Exception tutorial at http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
    Here's a quick overview of exceptions:
    The base class for all exceptions is Throwable. Java provides Exception and Error that extend Throwable. RuntimeException (and many others) extend Exception.
    RuntimeException and its descendants, and Error and its descendants, are called unchecked exceptions. Everything else is a checked exception.
    If your method, or any method it calls, can throw a checked exception, then your method must either catch that exception, or declare that your method throws that exception. This way, when I call your method, I know at compile time what can possibly go wrong and I can decide whether to handle it or just bubble it up to my caller. Catching a given exception also catches all that exception's descendants. Declaring that you throw a given exception means that you might throw that exception or any of its descendants.
    Unchecked exceptions (RuntimeException, Error, and their descendants) are not subject to those restrictions. Any method can throw any unchecked exception at any time without declaring it. This is because unchecked exceptions are either the sign of a coding error (RuntimeException), which is totally preventable and should be fixed rather than handled by the code that encounters it, or a problem in the VM, which in general can not be predicted or handled.

  • Why doesn't my front camera work

    Why doesn't my front camera work

    Camera
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.

  • Weblogic throwing "null SOAP element Exception" in multi-part SOAP response

    Hi All,
    I'm using weblogic 10. My application is a webservice client generated using '*clientgen*', which is running on weblogic, and
    is invoking a remotely hosted webservice ( Remotely hoseted webservice may not be running on weblogic).
    I've the wsdl file of remotely hosted webservice.
    Now the problem is with WSDL file (I suppose), have a look at this.
    *&lt;message name="m1"&gt;*
    *&lt;part name="body" element="tns:GetCompanyInfo"/&gt;*
    *&lt;/message&gt;*
    *&lt;message name="m2"&gt;*
    *&lt;part name="body" element="tns:GetCompanyInfoResult"/&gt;*
    *&lt;part name="docs" type="xsd:AnyComplexType"/&gt; ------&gt; assume all elements inside this complex type can be nil or minOccurs set to '0'*
    *&lt;part name="logo" type="xsd:AnyOtherComplexType"/&gt; ------&gt; assume all elements inside this complex type can be nil or minOccurs set to '0'*
    *&lt;/message&gt;*
    &lt;portType name="pt1"&gt;
    &lt;operation name="GetCompanyInfo"&gt;
    &lt;input message="m1"/&gt;
    *&lt;output message="m2"/&gt; -----&gt; multi part message.*
    &lt;/operation&gt;
    &lt;/portType&gt;
    Now here is sample message for the request(I've composed this message for this question):
    &lt;soap:Envelope&gt; MESSAGE1
    &lt;soap:header/&gt;
    &lt;soap:body&gt;
    &lt;tns:m2&gt;
    &lt;tns:GetCompanyInfoResult&gt;
    Blah Blah....
    &lt;/tns:GetCompanyInfoResult&gt;
    &lt;tns:docs&gt;
    Blah Blah....
    &lt;/tns:docs&gt; Assume no data for 'logo', so it's not returned. Since all its elements can be nillable.
    &lt;tns:m2&gt;
    &lt;/soap:body&gt;
    &lt;/soap:Envelope&gt;
    First of all, is this SOAP response is valid? I'm not sure about *'message' and 'parts' in SOAP*, but according to XML schema standards it's invalid.
    Because, according to *'message' m2, 'logo' is missing*, eventhough all it's elements are nillable in such case there should be *&lt;logo/&gt;* at the end.
    I mean valid message should be like below
    &lt;soap:Envelope&gt; '*MESSAGE2*'
    &lt;soap:header/&gt;
    &lt;soap:body&gt;
    &lt;tns:m2&gt;
    &lt;tns:GetCompanyInfoResult&gt;
    Blah Blah....
    &lt;/tns:GetCompanyInfoResult&gt;
    &lt;tns:docs&gt;
    Blah Blah....
    &lt;/tns:docs&gt;
    *&lt;tns:logo/&gt; ------------------&gt; here is the change compared to above message. empty element.*
    &lt;tns:m2&gt;
    &lt;/soap:body&gt;
    &lt;/soap:Envelope&gt;
    Now the concerns are :
    (1) Which is a valid response? Message1 or Message2
    (2) If message1 is valid then why is weblogic throwing an exception 'null SOAP element', I suppose this is due to missing 'logo' element.
    (To confirm this I've used tcpmonitor and found message1 as response but weblogic is still throwing 'null SOAP Element' exception,
    which confirms it needs 'logo' as well, I suppose &lt;logo/&gt; at least). Is there any workaround for this in weblogic for multi-part messages?
    (3) If message1 is invalid according to SOAP standards then You've answered my question. ---&gt; I need to talk to the webservice provider in this case.....
    Thanks in advance...

    Message 1 is not Basic Profile 1.1 compliant. It is specified by BP1.1 in section 4.4.1(http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#Bindings_and_Parts) that when a wsdl:part element is defined using the type attribute, the serialization of that part in a message is equivalent to an implicit (XML Schema) qualification of a minOccurs attribute with the value "1", a maxOccurs attribute with the value "1" and a nillable attribute with the value "false".

Maybe you are looking for

  • How to get all users from the server....?

    Hi all, in my application i want to get all possible users present in the PORTAL-EP Server and set them into the drop down. is there need to login in the portal as a admin or other user to get the all users present in the Server. Regards, Deepak

  • Direct link between planned/production order & Stock transport order

    Hello, We have the following situation. Plant A = ordering/receiving plant Plant B = producing/selling plant Material is stock material in plant A (reorder point planning). If required, plant A creates intercompany purchase order with plant B as vend

  • How to create a Backup of a BPC Application Set?

    Hello, I have been browsing the forum for a short while now but didn't find the answer that I needed, I work for a BPC Consutlancy and would like to know how an Application Set can be BACKED UP in the NetWeaver using the Data Warehousing Workbench in

  • Regarding Generic DataSource loading transaction data

    What I have done: Create a Generic DataSource  from a table, replicate it to BW. Create a standard DataStore object, and create InfoPackage, and DTP. Now I want to load data,  What's the steps I need to do? Start InfoPackage and execute DTP. But  I c

  • Favicon background appears black

    In Internet Explorer 11 the favicon background appears black. This problem do not exist in older IE versions or in other browsers (like, FF, Safari, Chrome, ...). You can see what I am talking in site www.e-grou.com What could be? Thanks & Regards, R