Infinite recursive loop in Ruleframe generated CAPI-function (display_label)

On our project we want to inforce a business rule that enforces that a row won't reference itself in a table like the following:
create table ear as
( id number (10) primary key
parent_id number (10) references ear (id)
;so
insert into ear
(id, parent_id)
values
(42, 42)
/generates an error.
In order to reach this end we defined a BR (a RER), transformed it, using the headstart business rule design transformer, and entered some code like this:
if p_parent_id is not null
then
l_rule_ok := p_parent_id <> p_id;
end if;This works, however, if we enter the abovementioned insert-statement and the capi tries to process the rule violation (using qms_transaction_mgt.process_rule_violation), it tries generating a display-label using the display_label CAPI function, which contains (between useful code) a non-terminating recursive loop:
function display_label ( ... parameters ...) is
-- ...usefull code
if substr(l_mask, 2, 1) = '1'
and l_ear_row.parent_id is not null
then
l_display_label :=
l_display_label
&#0124; &#0124;', '
&#0124; &#0124;app_ear_capi.display_label
( p_id => l_ear_row.parent_id
end if; -- substr(l_mask, 2, 1) = '1'
-- more usefull code ...
end display_label;Which behaves very unpleasant when p_id = p_parent_id ...
An (greatly unsatisfying) idea we have to circumvent this behavior is making a manual hack in the generated code that either removes the recursive call or enters some stop-condition-like behaviour ( adding the parameter p_mask with the value '10', so the parent-id won't be processed a seccond time round).
Any good options around?
P.S.
We are using HSU_CAPI 6.5.1.0; db 8.1.7 enterprise (on a VAX); des6i(6.5.46.1)
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Headstart Team:
My best guess is that when you look at your table definition in Designer, and go to the foreign key column (parent_id), the "Descriptor Sequence" property is set. Kind regards,
Peter<HR></BLOCKQUOTE>
Alas, the Descriptor Sequence property for the parent_id is empty. The only other thing "out of the ordinary" is the presence of the tags <EXISTS_ROW><AGGREGATE_VALUE> in the notes-field (which, however, is exactly as it shoud be according to the User Guide)
Kind regards,
Sander
([email protected])
null

Similar Messages

  • AS2.0 : Infinite recursion loop error when launching debugger

    I want to debug a project:
    When I run it from Flash, it doesn't work as expected but it
    doesn't display
    any compiling nor runtime error.
    But when I want to debug it and press the Play button of the
    debugger, it
    displays an infinite recursion loop error.
    I get this error even when I set a breakpoint at the first
    line of the
    script.
    How can I debug the debugger? lol!
    If you know Flash debugger's internal behavior, can you tell
    me how it can
    display an infinite recursion loop while a classic preview
    does not.
    Thanks.
    Henri

    What you are trying to do is not supported on Windows.
    You mention a thin client.  This has nothing to do with thin clients.  Thin clients are just dumb monitors that run a remote RDP session.
    If you are connecting to a terminal server there is a configuration in GP or in the terminal server configuration that let you specify an alternate shell.  If you are running this as a remote to a workstation then you need to specify the shell in the
    user profile.  THis can be done through group policy or via a registry edit.
    You cannot use a script for this and you cannot use an Office program without Explorer.  Office requires Explorer to run which is why you are getting that error.
    Redirecting userinit for the whole machine will likely create many bad side effects as it is a fundamental process.  It is called multiple times during logon.  Replacing it with a batch file will cause you script to be executed multiple times. 
    Usually userinit is called at least three times.  In a domain with Group Policy it can be called a dozen times.  I am pretty sure the only reason for it being in the registry is to allow for debugging.
    Another this folder.ng to knowis that userinit has to complete before many things in Office will work correctly dependin on you implementation.
    You can load the powerpoint viewer and directly launch that with the file name from the
    "startup"  .  You can also try and set the powerpoint viewer as the alternate shell.  It just might work because it is designed to run completely stand alone with no Office and is used in kiosks which generally run without Explorer. 
    You can also try to use IE to launch the ppt as it can host this with the viewer installed.  It can be set to fullscreen and it will re-launch  when exited just like Explorer does,
    ¯\_(ツ)_/¯

  • Infinite recursion detected. The loop of dependencies is x - x

    Hello,
    We have some order bucket sizes hard coded in our data warehouse, this logic was created long time ago.
    I have created a shell dimension(Order Amount) that I want to use in order to define all buckets on one place, and also define some new bucket intervals based on the others.
    It works perfect if I just assign one bucket value to the scope statement, but when I define several buckets into one I get the folowing message: "Infinite recursion detected. The loop of dependencies is x -> x"
    How can I solve this? I don't want to use "CREATE Member" because we have some drill through actions defined.
    scope
       ([Order Amount].[Order Amount].[Order Amount].&[22], --Order amount 0-10,
             [Measures].[Orders Received]) ;
    this =  aggregate({[Order].[Order Amount].[Order Amount].&[<5], [Order].[Order Amount].[Order Amount].&[5 - 10]})
    Thanks in advance
    BR.
    AL

    You would have to post an example of how you are trying to assign to multiple members in the one statement. Off the top of my head I can't think how this would be possible.
    http://darren.gosbell.com - please mark correct answers

  • How to out from infinite while loop in sub VI

    Dear Sir,
    how to out from infinite while loop in sub VI from main VI
    attached photo for solution but I can't understand it and i can't find the function in photo 
    please help
    Attachments:
    stop_subVI_frm_main.JPG ‏36 KB

    Asking how to get out of an infinite loop is like asking how to find the end of a circle. I'm not trying to be sarcastic but by definition, if there is a way out of the loop, then it is not infinite. I think what you are asking is how to avoid creating an infinite loop. Is there something about the suggestions you have been given that you do not like? My favorite suggestion is the notifier but maybe you just need an example. Turn on context help and read about the notifier functions in the code below.
    This is your top level VI
    And this is your subVI
    If this seems too complex then a global variable will work too. But what seems simpler can cause much more complex bugs. You can code fast and spend lots of time debugging or you can code slow and spend less time debugging. Personally I perfer writing productive code than looking for bugs any time.
    =====================
    LabVIEW 2012

  • What is the non-recursive stack based equivalent of this function?

    what is the non-recursive stack based equivalent of this function?
         static void _try (int n)
              int i; if (n==4) print(); else for (i=0; i<4; i++) if (is_free(i,n)) {
                   x[n] = i;
                   _try(n+1);
         }

    It goes infinite no output. Thanks though.
    public class CopyOfDamen { // x[i] = x coordinate of queen in row i.
         static int N = 4; static Stack stack = new Stack(); static int [] x = new int[8]; public static void main(String [] par) { _try(); }
         // prints field
         static void print ()
              int i,j;
              System.out.print ("+----------------+\n");
              for (i=0; i<8; i++) {
                   System.out.print ("|");
                   for (j=0; j<8; j++)
                        if (j==x) System.out.print ("<>"); else System.out.print (" ");
                   System.out.print ("|\n");
              System.out.print ("+----------------+\n\n");
         // tests, whether (ix, iy) is beaten by queens 0...(iy-1)
         static boolean is_free (int ix, int iy)
              int i;
              for (i=0; i<iy; i++)
                   if ((x[i]==ix) || (Math.abs(x[i]-ix)==Math.abs(i-iy))) return false;
              return true;
         // tries to place queen n on row n
         static void _try () {
              int i = 0, n = 0;
    call:
              for(;;) { // forever
                   if (n == N) {
                        print();
                   } else {
                        for (;i < N; i++) {
                             if (is_free(i,n)) {
                                  x[n] = i;
                                  System.out.print(x[n] + " ");
                                  n++;
                                  stack.push(i);
                                  i = 0;
                                  continue call; // call _try (but first save state and initiate new state)
                        } System.out.println();
                   // _try returns (check termination criterion and restore state)
                   n--;
                   if (n < 0) break; // terminate
                   i = stack.pop();
    } class Stack {
         int StackSize = 32, top = 0; int [] stack = new int[StackSize]; public Stack() {} void push(int x) { if (top < StackSize) stack[top++] = x; } int pop() { if (top >= 1) return stack[--top]; return -1; }

  • UI flickrs continously jdk1.7.25 EventdispatchThread's pumpEventsForFilter goes to infinite while loop

    I am migrating a project from Java 1.3 to Java 1.7 update 25 and there is one search button functionality in which search is performed correctly but the UI flickers continuously because EventdispatchThread's pumpEventsForFilter goes to infinite while loop.
    This same code works correctly in java 1.3.
    Below is the part of the code related to searchbutton. Can you please suggest regarding this because the issue is within java api and not sure how to solve this.
    SearchButton.java:
    private JButton searchButton; 
    private String textsearchButton = 
          search.util.Language.getString("buttonStartSearch"); 
    searchButton = new JButton(textsearchButton); 
    buttonPanel.add(searchButton); 
    searchButton.addActionListener(this); 
    searchButton.addActionListener(actionListener); 
    actionListener.actionPerformed( 
                   new ActionEvent( 
                      searchButton, 
                      ActionEvent.ACTION_PERFORMED, 
                      "toFront")); 
                actionListener.actionPerformed( 
                   new ActionEvent( 
                      searchButton, 
                      ActionEvent.ACTION_PERFORMED, 
                      "searchComplete")); 
    setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); 
        if (hasSearch) { 
                actionListener.actionPerformed( 
                   new ActionEvent( 
                      searchButton, 
                      ActionEvent.ACTION_PERFORMED, 
                      "searchComplete")); 
             else { 
                actionListener.actionPerformed( 
                   new ActionEvent( 
                      searchButton, 
                      ActionEvent.ACTION_PERFORMED, 
                      "search")); 
    searchButton.setEnabled(!hasSearch && hasCriterions()); 
    public void actionPerformed(ActionEvent ae) { 
          Object source = ae.getSource(); 
          else if (source == searchButton) 
             startSearch(); 
          else if (source == exportButton) 
             exportSearch(); 
          else { // ActionEvents from the panels occur 
             changesOccured(); 
    EventDispatchThread:
    void pumpEventsForFilter(int id, Conditional cond, EventFilter filter) { 
            addEventFilter(filter); 
            doDispatch = true; 
    //This while goes to infinite loop 
           [b] [color=red]while (doDispatch && !isInterrupted() && cond.evaluate()) { 
                pumpOneEventForFilters(id); 
            }[/color][/b] 
            removeEventFilter(filter); 

    Please provide your code example as SSCCE . I'm not going to spent time guessing what your application code (other than shown) meigt do or not do.
    bye
    TPD

  • StackOverflowError (due to infinite recursion) in XMLEncoder

    I try to save an Object (XmlEncoder.writeObject) which has a non default constructor (to restore the Object) and only public getter methods via XMLEncoder.
    Basically I'd like to save only the stuff needed in the extended constructor so I can restore the object with just one call to this constructor and not expose a lot of (unconvenient) setters (after all the XMLEncoder/Decoder would be the only one to use them). So I added:
    encoder.setPersistenceDelegate
         Session.class,
         new DefaultPersistentDelegate(new String[]{"board", "robberPosition", "players", "active"})
    );The class looks like:
    public class Session
         public Session();
         public Session(Board board, LandscapePosition robberPosition, Iterable<Player> players, Player active);
         public Session(Board board, LandscapePosition robberPosition, Iterable<Player> players, Session active);
         @Override
         public boolean equals(Object obj);
         public Object getActive();
         public LandscapePosition getRobberPosition();
         public Costs getCosts();
         public Board getBoard();
         public Collection<Player> getPlayers();
         public Player getActivePlayer();
    }What happens is my equals is called - but the parameter is null. So I assume there is some hidden policy in the XMLEncoder programming (did I mention that the docs are horrible?) I didn't get. I tried debugging through the code but there are several oddities I don't get (why is there a Statement generated for writeObject?, why is there no recursion checking mechanism?, why is mutatesTo described differently than it's implemented?, ...).
    Would be great if someone could shed some light into this dark alley.
    BTW the exception is:
    Exception in thread "main" java.lang.StackOverflowError
      at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262)
      at java.beans.DefaultPersistenceDelegate.instantiate(DefaultPersistenceDelegate.java:158)
      at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:113)
      at java.beans.Encoder.writeObject(Encoder.java:74)
      at java.beans.XMLEncoder.writeObject(XMLEncoder.java:274)
      at java.beans.Encoder.writeObject1(Encoder.java:231)
      at java.beans.Encoder.cloneStatement(Encoder.java:244)
      at java.beans.Encoder.writeExpression(Encoder.java:303)
      at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:389)
      at java.beans.PersistenceDelegate.writeObject(PersistenceDelegate.java:113)
      at java.beans.Encoder.writeObject(Encoder.java:74)
      at java.beans.XMLEncoder.writeObject(XMLEncoder.java:274)
      at java.beans.Encoder.writeObject1(Encoder.java:231)
      at java.beans.Encoder.cloneStatement(Encoder.java:244)
      at java.beans.Encoder.writeExpression(Encoder.java:303)
      at java.beans.XMLEncoder.writeExpression(XMLEncoder.java:389)Edited by: LCID_Fire on May 23, 2010 8:44 AM

    Finally after some prodding and debugging through the writeObject code I have it working.
    ejp wrote:
         public boolean equals(Object obj);What's in here?I overrode all equals to be deep comparisons of the objects. One particular problem why these recursions happened were some wrong equals which returned false in the wrong situations. If there's just one equals in the cascade wrong you're very likely to encounter these recursions. Would there be a recursion check the classes could then throw an exception instead of blindly trying to do the same thing over and over.
    why is there no recursion checking mechanism?Because it shouldn't be needed. There isn't one in ObjectOutputStream either. Maybe it's you that's recursing?Would you care to elaborate why you think a recursion check is not needed? If I search for similar errors on google there are quite a few recursions occuring - all because people coded their beans differently than XMLEncoder was expecting.
    Imagine for example the following classes:
    public class Parent
      public Parent(Collection<Child> children);
    public class Child
      public Child(Parent parent);
      public Parent getParent();
    }Attemting to save Parent would then again result in a infinite recursion.
    why is mutatesTo described differently than it's implemented?, ...).Hadn't noticed that. Details?
    Returns true if an equivalent copy of oldInstance may be created by applying a series of statements to newInstanceWhat it really does is it checks whether newInstance IS already an equivalent copy of oldInstance. So I guess the whole wording is a little bit unprecise.
    Would be great if someone could shed some light into this dark alley.
    Have you read the [Swing Connnection articles|http://java.sun.com/products/jfc/tsc/articles/persistence2/] linked from the Javadoc?
    Yes. I have read everything I could get my hands on. And I know now why it's relatively sparse used (in contrast to the benefit it could be).
    Thanks for trying to help.

  • Recursive Loop Error while doing standard cost estimate

    SAP Gurus,
    We are trying to do standard cost estimate on a material and we are getting error because it is going in recursive loop even though we have used "recursive allowed" indicator for item components in the BOM. The error message numbers are CK 730 and CK 740. We are using 4.6c. I have tried the same scenario in ECC 6.0 and still I get the same problem.
    Below is my BOM structure:
    Material 10890345 (has low-level code 012)
            ---> 10867220 (has low-level code 013) and has recursive allowed indicator
    10867220
            ---> 10846733  (has low-level code 014) and has recursive allowed indicator
    10846733
            ---> 10890345 (has low-level code 012) and has recursive allowed indicator
    According to me, the BOM for material 10846733 is causing the problem.
    For some weird reason while doing the costing run for material 10890345, it s not stopping and going in a loop.10890345  and 10846733 should ideally have the same low-level code as they are recursive.
    Please help to provide some solutions at the earliest on how to avoid recursive loop during costing.
    Regards,
    Swapnil

    Dear,
    I have 2 things to shear with you.
    The method we followed to solve the iteration is as below
    1.Config change -
    Valuation variant in the costing variant, we changed the sequence as below
    material valuation
    4 planned price 1
    2 std price
    3 Mov ave price
    2. Material master change
    made all the semi finished goods and finished goods
    procurement type = E,
    costing with qty structure,
    Enter the planned price1
    By doing this what happens is
    when system first start the iteration, takes the planned price 1 and start iterating and next time in the second iteration it takes the calculated price from qty structure till it finds the difference between the value calculated is less than .001. Then it gives the result
    Why lot size is important is, in our case in some levels the usage is very less compared to the first material header qty and system used to stop in between  and not even reaching the last level as during the cycle it was reaching less .001 difference. may be in your case it may not be the case...just check
    Please come back after trying this. this was the only last option i had to solve the issue in my client.
    Another alternative is to have a different material for costing purpose to stop the iteration which i will not recommend as we need to do some calculation for each stage and input the cost of dummy material in each stage.
    My client is happy with the result as the difference between manual calculation and system calculation is less then .1%...this is because SAP will not consider the difference beyond .001, but in excel you get as many as decimals you want.

  • Help needed in making a Recursive loop( loops into loops)

    Hi i have a situation, i need to make loop into loop into loop....undecided loop.
    i have a object list which are parent.........eg.
    i query to get my 1st list is A, B and C....i loop it to display in table
    while looping i query A to get its child AA, AB, and AC, i loop it in table..
    while looping i query AA to get its child AAA, AAB and AAC...
    i have to check for the child till it has child level donw level...but i dont know how can i make a dynamic loop...i cant write a loop it for 15 to 20 .
    Is there any way to make a recursive loop so tht it checks for child into child.
    thanks

    my code is such......
    Corres[] objCorresBean = correspondence.getCorrespondence(objectId);
    for (int i = 0; i < objCorresBean.length; i++) {
    CorrespondenceBean corresBean = objCorresBean;
    String parent_object_id = corresBean.getObjectId();
    childCorresBean = correspondence.getChildCorrespondence
    (parent_object_id);
    for (int j = 0; j < childCorresBean.length; j++) {
    CorrespondenceBean childBean = childCorresBean[j];
    String child_object_id = childBean.getChildObjectId();
    may be child_object_id have some childrens.......i want to make it recursive

  • PRS-T1 stuck in infinite reboot loop after failed firmware update

    Hi,
    I tried to update the firmware, but failed when updating to version 1.0.07.05070. Tried to 2 times. The first time it failed I simply tried again. The second time, it took a lot longer to reach the failed to update message, but it did cause the ereader to reboot.
    Now, it's stuck in an infinite reboot loop on the "Opening book" page. The progress bar on that page stays completely empty, lasts for about 30 seconds, and reboots again. This will go one until the battery is dead or indefinitely if plugged in. 
    I have tried pressing the Home + Menu buttons, but they seem to have no effect.
    Please advise if there is anything I can try to revive it?
    Thanks in advanced.
    David
    Solved!
    Go to Solution.

    Kiroken,
    Here is what I have observed:
    - After a hard boot (reset + power button during 3+ seconds), if I don't do anything, it will reboot every ~30seconds.
    - If I press and hold the Home and Menu buttons, no effect. The same as if I didn't press anything.
    - If I press the Forward + Back buttons (2 & 4), it does not reboot after 30 seconds. Instead, the orange light on the power button blink every ~2-3 seconds.
    - Any other key combinations that I have tried have no effect.
    I have tried with and without several rescue sdcard. No difference. No improvement. In every case, the computer never sees the reader. If plugged into the power outlet, it seems like the battery charges alright. It does not appear to charge if plugged into USB port.
    That's all I know. If I can't fix it, I might be forced to turn it into a coaster or maybe a cutting board for the kitchen.
    David

  • Problem in generating packaged functions!!!!!

    Does anybody know how to restrict generating packaged
    functions just in package script file?
    Generating packaged function, they are generated
    both in function script file and package script file
    while I need just in package script file.

    I think that by default the functions are included in the application default implementation as you create them. If you also include them in a package then they will be generated twice when the implementation is generated.
    If this is the case then simply delete the functions from the implementation, leaving just the package to be implemented and then everything should be ok.
    Regards,
    Steve

  • For Those Experiencing the Infinite Boot Loop on P67A-GD65

    My story in a nutshell - bought the original (non B3) P67A-GD65 from Newegg on the first day it was available along with 8 GB (2X4 GB) Corsair Vengeance DDR3-1600 ram and Intel i5 2500k processor.  Received the items, hooked them up on a test bench (rubber mb supports so no grounding issues) along with a Corsair VX-550 P/S (both 24 pin and 8 pin leads plugged in), GTX-460 video card (2 PCI-E 6 pin connectors plugged in), the default Intel i5 heatsink and a known good USB KB and mouse.  Promptly experienced the infinite loop boot issue others have described - fans on h/s and video card spin up, 1st APS LED lights for a fraction of a second then all 6 light up for 3 to 4 seconds then APS LEDs go out and fans on h/s and video card spin down.  No beeps from speaker and no video signal to monitor.  After everything has stopped spinning (about 3 to 4 seconds), the power comes back on and the cycle repeats exactly the same way every time until I turn off the power supply.  Here is what I tried:
    1.  Used only 1 stick of ram (tried in all 4 slots)
    2.  Pulled 1 stick of DDR3-1600 ram from my working X58 system (again tried in all 4 slots)
    3.  Different power supply (OCZ 520-ADJ)
    4.  Known good PCI video card instead of GTX-460 (in case there was some problem with power draw)
    Under each of these changes, the same infinite boot loop occurred.  Called tech support, they walked me through each step I had already tried and finally suggested I RMA both the MB and the CPU to Newegg.  Did so and the replacements worked fine from the start.
    Then came the B2 stepping issue.  Notified both Newegg and MSI that I had one of the B2 boards.  Newegg notified me they had the new B3 boards in stock.  Arranged for cross shipment where they would ship me the new board and then I would return the old one.  Received the new one last Friday.  Put it on the same test bench as above and the same infinite boot loop is now happening on the new B3 stepping board.  Just to test, put the cpu, ram and GTX-460 video card back into the B2 stepping board and everything works perfectly.
    Another test, since some people reported the infinite loop problem when they had failed to plug in the 8 Pin power lead to the mb, I unplugged the 8 pin connector on the working B2 stepping board.  The infinite loop problem is entirely different in this case.  When you press the power switch, the fans start to spin and the first LED lights for less than a second.  Then the LED goes off and the fans start to spin down.  After everything has stopped, it repeats until the power supply is turned off.
    This is my first MSI motherboard after 15 years of Abit and Asus with the occasional Gigabyte or EVGA thrown in and I am not happy with the QC I have experienced with this board!
    So to summarize, 2 of the 3 P67A-GD65 boards I received from Newegg have had this infinite boot loop problem.  Apparently, I have to RMA again.  Am I lucky or what???!!!
    Monte

    Quote from: BMSliger on 16-March-11, 00:05:11
    If it was the chipset causing this problem, it seems it would be a widespread complaint among all vendors.  I have looked at the Asus and Gigabyte boards and do not see this particular problem described and certainly not multiple users reporting the same problem.  I am giving up on this and will arrange an RMA and will see if I can talk Newegg into an Asus board for only the price difference.  MSI has a very good reputation in the industry, but it has been a disaster for me!!!
    Thanks for your replies,
    Monte
    Frankly, I can understand your frustrations on the problem but it is not fair to judge a brand by looking at the number of complains in a forum. I can guarantee you, there are more RMAs out there from all other manufacturers even before an user even knows that a Forum ever exist for them to post for enquiry and most of them aren't an IT engineer or hardware engineer by self.
    If you want to compare, I have also been in this industry for more than 15 years and I have many DOA boards from other manufacturers as well and DOAs after RMAs are common to me. When you handle thousands of PCs, laptops and mainframes, such things are really common.
    Back to your problem. Maybe I didn't make it clear on how I want to describe on my previous post for your issue in words. I am referring to having a chance to let the system boot into BIOS or past BIOS after multiple times of rebooting, then you can try to flash the BIOS. This is also not uncommon as I have encountered systems which are problematic but are able to boot into Windows after 15 to 20 times of infinite reboots by itself.
    How about processor? Tested it in another system yet? Or is this another unless suggestion to you?

  • Infinite for loop problem

    hello there
    i'm trying to make a ping program that if the user presses a button
    the program pings on a server continusely and print the response
    so i used the infinite for loop but when i'm trying to exit the program
    it doesn,t exit?how to fix that? here is my code
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.awt.Container;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class ReachableTest2 extends JFrame  {
    public static void main(String args[]) {     
    JButton btn=new JButton("Check The Ping");          
    JFrame frame = new JFrame("Ping Check");
               frame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent ev) {
                    System.exit(0);
      ActionListener actionlistener=new ActionListener() {
          public void actionPerformed(ActionEvent evnt) {
                      if(evnt.getActionCommand().equals("Check The Ping"))         
                            try {
           InetAddress address = InetAddress.getByName("212.122.224.10");
           System.out.println("Name: " + address.getHostName());
           System.out.println("Addr: " + address.getHostAddress());
           for( ; ; )
           System.out.println("Reach: " + address.isReachable(3000));
         catch (UnknownHostException e) {
           System.err.println("Unable to lookup ");
         catch (IOException e) {
           System.err.println("Unable to reach ");
             frame.add(btn);
             btn.addActionListener(actionlistener);
             frame.setSize(250,150);
            frame.setVisible(true);
             frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    hi friend ,
    i have made some changes to your code ,i hope this might help let me know if it works for you
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.awt.Container;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class test extends JFrame {
    public static void main(String args[]) {
    JButton btn=new JButton("Check The Ping");
    JFrame frame = new JFrame("Ping Check");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent ev) {
    System.exit(0);
    ActionListener actionlistener=new ActionListener() {
    public void actionPerformed(ActionEvent evnt) {
         if(evnt.getActionCommand().equals("Check The Ping"))
              ping();
         frame.add(btn);
         btn.addActionListener(actionlistener);
         frame.setSize(250,150);
    frame.setVisible(true);
         frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
              public static void ping()
                   Runnable r = new pinging();
                   Thread t = new Thread(r);
                   t.start();
    class pinging implements Runnable {
    public pinging()
    public void run()
    try {
                   InetAddress address = InetAddress.getByName("212.122.224.10");
                   System.out.println("Name: " + address.getHostName());
                   System.out.println("Addr: " + address.getHostAddress());
                   for( ; ; )
                   System.out.println("Reach: " + address.isReachable(3000));
                   catch (UnknownHostException e) {
                   System.err.println("Unable to lookup ");
                   catch (IOException e) {
                   System.err.println("Unable to reach ");
    Regards

  • Can we say that Table Maintenance Generator is Function Group?

    Can we say that Table Maintenance Generator is Function Group?

    Hi Naresh,
    I think as you said it is a function group only..
    When we generate a TMG, a function group with two function modules, two screens and some includes will get generated.
    This function modules and screens get called dynamically through SM30.
    Regards
    Sreekanth

  • Does anyone know how to break an infinite email loop?

    I appear to have an infinite mail loop (caused by an e-mail being sent with too many pictures attached).  Does anyone know how to break the loop?  Everytime I delete it, more (in fact hundreds) reappear.

    I don't use attachments too much, but there is a way of handling your situation. It might help to know about your email structure. You haven't provided too many details, so I'll do the best with what I have.
    Most users access their emails from two main sources: an ISP or an external provider like Google. If you use an ISP, like ATT, it's relatively easy to deal with your email problem. Log onto your ATT webmail, and you can delete the problematic email at its source. Delete the messages one by one, or delete blocks of emails by highlighting them and deleting. In the future, stay up to date with your emails to make sure this doesn't happen again.
    Some users use an external provider like Google, but the solution is the same. Delete messages one by one, or in blocks, until they're all gone.
    There's a trick to help you delete emails more easily: The next time you use Mail, make sure it's offline. You won't be able to download additiional email, but you'll be able to process the mail you already have on your computer. You can't get an "infinite loop" if you stop the flood of emails beforehand.
    Does that sound right? Post with your results!

Maybe you are looking for