Exception on basis of Acknowledgement

Hi
It seems that your CC has default setting and Adpater engine will process message 3 times with time interval 5 minutes. Change those settings using this blog
Did you Know?  - 'Delivery Attempts' customizable per communication channel
or in your NWA.
Regards
Maciej

Solved it myself.so closing the thread

Similar Messages

  • ATP Check on the basis of Acknowledged PO

    Hi Friends,
    I have a requirement where My client want the ATP check should be done on the basis of followings;
    1. Saftey Stocks.
    2. Acknowledged Purchase Order
    3. Lead Time.
    Safety Stock and Lead time is in SAP standard. My problem is Acknowledged Purchase Order..........earlier client was doing on the basis of PO issued. but not client wants to include the PO only when it'll be Acknowleded by the Vendor specifying the estimated date in the acknowledgement.
    Share your expertise with me to fix this issue.
    Thanks,
    NR

    Hi,
    You can include Shipping notifications in the ATP and exclude the PO. But Order Acknowledgements are not available under the standard scope settings for Availability check.
    Regards,
    Kathir

  • Exception handling of Transport acknowledgement in asynchronous send in BPM

    HI,
    A silly question, but your help would be greatly appreciated..
    - I have a asynch send step in a BPM for sending data to the target system through RFC
    - It has acknoweledgement property of this send step is set to transport acknowledgement
    - The exception property of this send step is set to throw a 'RFCException'
    - This send step is inside a block
    - This block also has an Exception branch which catches this 'RFCException'
    - now my RFC channel failed for some known reason, but the flow never went into the Exception branch
    IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
    What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception branch ??

    - now my RFC channel failed for some known reason, but the flow never went into the Exception branch
    IS this behaviour of the 'transport acknowledgement' property of an asynch send step in BPM expected ?
    What should I take care so that if my RFC receiver channel throws an exception, the flow of my BPM goes to the exception
    branch ??
    When an exception is caught by the Transport Acknowledgement it will trigger the Exception branch (if the send step is defined inside a Block with an Exception Branch)
    I think you have not defined (and then assigned) a proper Exception Handler for the Block.
    Click on the Block and define an Exception Handler......click on the Exception Branch and then select the Exception Handler from the dropdown......if this is not done then the Exception Branch wont be executed.....perform a check on your BPM in IR (using F7) you may get some warnings.
    Regards,
    Abhishek.

  • RT Tab In Timeline - Everything Grey Except Play Base Layer?

    For some reason, which will probably turn out to be glaringly obvious, all the options in the Timeline RT Tab are greyed out except for "Play Base Layer Only".
    Ian.

    SORRY! Answered my own question (thanks to Tom's book!)
    I had View>Video Out set to FW.
    OK once I returned it to Canvas Playback.
    Ian.

  • While deploying ear in home instance ORACLE10G EM console Base Exception

    while deploying ear in home instance through ORACLE10G EM console.
    i am getting this exception
    Deployment failed: Nested exception
    Resolution:
    Base Exception:
    com.evermind.server.rmi.OrionRemoteException
    Disconnected: Connection reset. Disconnected: Connection reset

    Have you tried to logout and login to EM?
    EM has known bugs that I also faced during application deployment.
    Have you tried to deploy from JDeveloper?

  • SAP ALL profile except BASIS

    Hi all,
    I need to found a standard SAP ALL profile who has all autorithations except the basis (workbench, etc).
    Anyone knows the name for assing it?
    Thanks in advance, regards

    Hi Fredrico,
    Check if the profile Z_ANWEND helps your cause. .
    Z_ANWEND: All user authorizations (excluding BC system). You can directly assign the profile to the users.
    If you want to go for role option then create a role. The under authorization tab select EXpert mode for profile generation. Then from menu bar choose
    Edit->Insert Authorization->From profile.
    The generate the profile of this role and assign it to users.
    and give the profile Z_ANWEND. Then generate the profile for this role and assign it to the users. Personally I would prefer the role option.
    Please award points if the answer was useful.
    Regards.
    Ruchit.

  • Missing file name while receiving AS2 MDN acknowledgement

    We are using BizTalk 2010.
    We send one AS2 package to our TP and our TP send us back 4 Acknowledgement files.
    Most of the acknowledgement files that we receive from the TP contains the ReceivedFileName property which contains the file name, except for the 1st acknowledgement or the MDN, which doesnt contain the file name.
    Our TP has informed us that they do send us the MDN with a file name.
    In our BizTalk 2010 system :
    - We have a One-way receive port, which monitors all the content received from TP.
    - We have defined a CustomPipeline for all inbound AS2 packages (AS2Receive pipeline). In this custom pipeline, in the Execute method, I had looked at all the properties from the base message context. I was not able to find ReceivedFileName, PreservedFileName,
    AS2PayloadContentType properties. I also looked at the InBoundHttpHeaders and couldnt find the file name in there. 
    I heard that BizTalk 2010 has fixed this issue. Where can I find what was fixed? I had looked at the following links, but it didnt help: 
    http://geekswithblogs.net/VishnuTiwariBlog/archive/2010/10/14/as2-integration-between-seeburger-bis-6.0-and-biztalk-server-2009.aspx
    http://www.postseek.com/meta/60dd56c855adc621edd20d64f0b106d5
    Is there any other place, I could look for the file name?
    And what could be reason that, the system is able to retain the file name for all the other acknowledgement, but for Ack1/MDN?
    Or is there a way to look at the raw content with the header send by my TP? (tried using Fiddler / Wireshark)
    Or is there a way to prove, that I indeed not receive any file name?
    Thanks for your help.
    Thanks and Regards, Vikram

    Hi VNSuvarna,
    >>I heard that BizTalk 2010 has fixed this issue. Where can I find what was fixed?
    Here are a series of cumulative update package 6 for BizTalk Server 2010, please check which is available for you. Check out https://support.microsoft.com/en-us/kb/2855367?wa=wsignin1.0 for further information.
    >> Or is there a way to look at the raw content with the header send by my TP? (tried using Fiddler / Wireshark)
    You can also use Fiddler, it captures HTTP(S) traffic and logs it for the user to review.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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.

  • Checked Exception and Anonymous classes

    Hi I am refering to java certification book that says : If a checked exception is thrown during the execution of initializer expression, then it has to be caught and handled. This restriction does not apply to instance initializer expressions in anonymous classes.
    I have codes for the above statement but failed to get the correct result. Is there some problem with the code :
    class RoomOccupancyTooHighException extends RuntimeException {} // (1) Unchecked Exception
    class TooManyHotelsException extends Exception {}           // (2) Checked Exception
    class base
         public void fun()
              System.out.println("base");
    class derived
         public static base funtion()
              return new base()
                                       int a = fu();
                                       int fu()
                                            if(a==1)
                                            throw new TooManyHotelsException();
                                            return 100;
                                       public void fun()
                                            System.out.println("derived");
         public static void main(String str[])
              base b = funtion();
              b.fun();
    }

    In anonynous class initialisation you don't need to declare the exception but you still need to handle it in the calling code.
    The code you provided does not compile for that reason.

  • Back to base install?

    hi, is there a possibility to delete everything installed except the base install? so that a bloated test sys shrinks back to a sys like fresh installed, without reinstall?
    mfg chief

    The following should remove all packages except those in the base group.  100% untested; use with caution.
    pacman -R $(echo "$(pacman -Sgq base)\n$(pacman -Qq)" | sort | uniq -u)
    Last edited by chpln (2009-09-30 12:42:29)

  • Exception yet no exception?

    Ello,
    I've been trying to make a little program which uses multicasting to send various things over the network using the way as described in the tutorial. However, whenever I try to write my own implementation with multicasting, it always complains about unhandled exceptions. So after I add some exception handling, it all works... Except there is no sign of any exception actually being thrown at all, for example:
            try
                Address_DST = InetAddress.getByName( "230.0.0.1" );
            catch( UnknownHostException e )
                System.out.println("Caught Exception: " + e.getMessage());
            }The code snippet above prints out absolutely nothing, as if nothing had been caught at all. Yet if I remove both the try and catch blocks, it freaks out about an unhandles UnknownHostException. I suppose it would make sense, sine InetAddress.getByName() does check the IP and I don't think 230.0.0.1 doesn't resolve to anything, because it's in the multicast range... Then again, I don't know how clever the whole method itself is...
    Anyways, I got it to work but I don't understand WHY it works... Which is quite annoying... Can anyone help me with this one?

    The unhandled exception message comes from the
    compiler. Your program's not running yet, but
    the compiler knows that getByName can throw
    UnknownHostExceptionAnd Java has rules that you have to account for every checked exception that could come your way--either by catching it or by declaring that you throw it.
    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.

  • Satellite A10: 'base system device' after HDD reinstallation

    I have formatted my laptop's hard drive (Toshiba Satellite A10) and downloaded the necessary drivers from Toshiba Europe web site. Everything worked out fine. Then I decided to upgrade my network adapter driver (wrong decision) and it slowed down considerably the system.
    Believing that I was holding the solution in my hands I formatted again HDD and when it came to reinstalling the drivers everything loaded ok except one:
    BASE SYSTEM DEVICE
    Please let me know how to resolve this issue.

    Did you install the chipset utility?
    If not, do that firstly before installing any further Toshiba tools and drivers.
    i recommend you to use the Toshiba Recovery CD.
    Please check also this useful Intel article:
    http://www.intel.com/support/motherboards/server/S5000VSA/sb/CS-022703.htm

  • Regarding Overriden method Exception----very urgent

    if we override a method , Is this method can throw a super class exception of overridden method...
    i.e
    class Base
    public void show() throws Exception1
    class Derived extends Base
    public void show() throws Exception2
    Is Exception 2 should be the subclass of Exceptio 1 or not.........is there any contraint...............bcz some conditions are working some are not working....
    if question is not clear....let me know i will explain clearly

    Information collected from the site:
    The Overridden Method can throw either Same Exception or Subclass of that Exception defined the base class method.
    Even if the base class method is throwing an Exception, it is not mandatory that the overridden method should throw any Exception (We can override that method without throwing any Exception)
    Irrespecive of the Exception throws in the Base class method, Overridden method can throw any RuntimeException.
    Reference: http://javalive.com/modules/articles/article.php?id=19
    Case 1: this code giving compilation error ( as per the rule i.e overridden method exception should be subclass of base class method exception)
    class Base
    Public void test() throws NullPointerException
         System.out.println(�hello�);
    Class Derived extends Base
         Public void test() throws Exception
         System.out.println(�hello�);
    Case 2: this code is compiling properly, but it should give compile time error as per the rule�.Why.?
    class Base
    Public void test() throws NullPointerException
         System.out.println(�hello�);
    Class Derived extends Base
         Public void test() throws RuntimeException
         System.out.println(�hello�);
    }

  • PS3 can't see new Airport Extreme base station

    I replaced my old airport extreme with the latest one, but now my PS3, which is on another floor, cannot see the base station, and the new base station has a lot less range than the old one. With my old one I could sit out in the back yard with my laptop, and the PS3 picked it up right away over our wireless network, but now, nothing. My laptop connects okay, just can't go very far. Nothing has changed except the base station itself. Please help.

    Hello Uri. Welcome to the Apple Discussions!
    A few things I would suggest that you try to see if either or both help with the PS3's connectivity to the 802.11n AirPort Extreme Base Station (AEBSn):
    o If currently enabled, disable the Guest Network.
    o Use a separate Network Name for the 5 GHz radio. Make sure that the PS3 connects to the 2.4 GHz radio's wireless network.

  • Simple questions about exceptions

    why use try catch with new File("filename") but not with x??

    ArrayIndexOutOfBoundsException is unchecked.
    IOException is checked.
    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.

Maybe you are looking for

  • Issue with the BI 7.0 Workbooks in Portal

    Hello folks, I am experiencing some difficuties in launching BI 7.0 workbooks via the portal. here is what we did ... -- Created workbooks using the new Bex Analyzer and saved them to a role. -- Imported the role on to the portal. -- When logged into

  • Are there any iphone 4s that work with GSM and CDMA and other carriers?where can i buy it?are apple going to produce it?

    Need to buy this kind of iphone 4s that can work with all the carriers exist

  • Pivot point in Photoshop CS 4

    Hello I seem to have an issue using 3D layers in Photoshop CS 4 ext. You see I have a layer which I convert to a 3D layer and I want to rotate the element however I would like to move the pivot point which it rotates from. I am unable to do this. I c

  • MX and 8

    hey can someone help - ive bought a book on flash_"how to wow with flash by c.smith" , seems cool but im trying to load the tutorial files into flash MX ....they seem to be flash 8 ...can i get around this ...its an fla file ...but MX says " unexpect

  • OIM: What is Precompiled folder used for?

    Hi. I've just wanted to ask - why copies of OIM application files (such as xlWebApp.war and Nexaweb.war) are duplicated in the OIM_HOME\xellerate\webapp\precompiled folder? When I want to change the appearance of the OIM web-console, I replace the xl