Two instances of quirky behavior: array size of empty array and tab control freeze

LV 7.1
Array size of empty array. Adding empty arrays to an array of higher dimension produces a fantom array of non-zero size.
Tab control freeze. An event structure with checked 'lock front panel until the event case completes' option permanently freezes the front panel in certain special circumstances.
Zador

tst wrote:
 Tell me if you still think this makes sense.
Whew, let me look at this tonight after I activate the 4D module in my brain.
(I think it makes sense, though ) Generally I look at the product of the dimensions array to determine if an array is empty. You can initialize a multidimensional array with some dimensions at zero and it is reproduced nicely in the array size output. Also the "Empty array" tool correctly identifies it as empty, even if some dimensions are nonzero.
Message Edited by altenbach on 03-15-200612:42 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
init.png ‏3 KB

Similar Messages

  • Array size limitations... and prime number programs.

    What are they? I am an ameteur programmer who wrote an extremely efficient prime finding program, if i do say so myself. The program doesnt find high primes, just prime numbers from 1-1,000,000,000 so far. Thats one version, the next version i use is faster, but because it uses an ArrayList, it can only do the primes 1-10,000,000. I am trying to work the programs up to primes with 50 or more digits, but ArrayList runs out of space, Integer is too small, I dont quite know how to switch all my code to be compatable with BigIntegers, and I cannot find a limit to arrays. I guess that I could find big primes if a) Integer was bigger, b)I tried, but what i wanted to do, because the second program is way more effecient, is to use an array to store primes instead of an ArrayList. The only problem? Arrays cannot be appended, so I need to know the limit in size for an array... So far, from my tests, I have found the limit to be somewhere around, 15,380,277. The only problem with this is that every time i compile, i can use a different number. So I would like it if a) somone could tell me the limit to an array's size, b) ideas for programs that can find primes with 50 or more digits, c) Down below is the code, could someone tell me how to convert it to BigIntegers?
      private void primeFinder1root(int beg, int end){
        int tmp = 0;
        int counter = 0;
        int counter2 = 2;
        boolean flag;
        for(int n = 3; n < end; n+=2){
          if(n%5!=0){
            flag = true;
            for(int d = 3; d <= Math.sqrt(n) && flag; d+=2){
              counter++;
              if(n%d == 0)
                flag = false;
            if(flag){
              System.out.println(n);
              counter2++;
              tmp = n;
              if(counter2%100000 == 0)
                System.out.println(n);
        System.out.println();
        System.out.println("The program looped " + counter + " times. There were " + counter2 + " primes found. "
                             + tmp + " was the last prime found.");
      }That is the first progam that does not use an ArrayList, but is still extremely effecient, it only looped 1,744,118,556 times to find the primes 1-100,000,000 which seems like a lot, but it truely isn't. I realize that by using counters and printing, I am slowing the program down immensly, but i am fine with that.
      public void primeFinder(){
        boolean flag;
        int tmp = 0;
        int tmp2 = 0;
        int counter = 0;
        primes.add(2);
        for(int n = 3; n < end; n+=2){
          if(n%5!=0){
            flag = true;
            for(int i = 0; i < primes.size()/2 && ((Integer)primes.get(i)).intValue() <= Math.sqrt(n) && flag; i++){
              tmp = ((Integer)primes.get(i)).intValue();
              if(n%tmp == 0)
                flag = false;
              counter ++;
            if(flag && n!=1){
              System.out.println(n);
              primes.add(n);
              tmp2 = n;
              if(primes.size() % 100000 == 0)
                System.out.println(n);
        primes.add(0, 1);
        System.out.println(counter + " " + primes.size() + " " + tmp2);
      }This is the code that stores all the primes it finds in an ArrayList, and then compares all numbers to the ArrayList of primes. This is extremely more effecient than the first, looping only 278,097, 308 times to find the primes 1-10,000,000 (the other looped 868,772,491 times). I used 10,000,000 as my example because this program cannot go to 100,000,000 because there are 5,761,455 primes and the ArrayList can only hold ~4,000,000 objects. Because of this ~4,000,000 object limitation on the ArrayList I have set my sites on the Array. This is the reason why I want to know the limitations of an Array if you could please tell me. If you could also, I would like help making my code compatable with BigIntegers as well.
    Well, sorry for the very long post, but thank you if you answer it and took the time to read it.
    Dumber_Child

    I too was in the quest to develop the most efficient prime number code few years ago when I was a student.
    Here is a more fine tuned version for your code
       public static long findPrimes(int max, ArrayList out){
          long count=0;
          FastList primes = new FastList((int)Math.sqrt(max));
          primes.add(2);
          for (int i=3; i<=max; i+=2)
             int al_size = primes.size();
             double sqrt = Math.sqrt(i);
             boolean prime_flag =true;
             boolean loop_flag = prime_flag;
             for (int j=0; j<al_size && loop_flag; j++)
                int val = primes.get(j);
                if (i%val == 0)
                   loop_flag = prime_flag = false;
                else if (val > sqrt)
                   loop_flag = false;
                count++;
             if (prime_flag)
                primes.add(i);
          primes.addToArrayList(out);
          return count;
    Following a data structure to store the prime numbers while processing
    Since this holds first number of primes in an array instead of in an ArrayList
    the get will work much faster and for those elements the casting is not required
       static class FastList
          ArrayList list = new ArrayList();
          int cache[];
          int pointer = 0;
          int fastAreaSize;
          public FastList(int fastAreaSize){
             cache = new int[fastAreaSize];
             this.fastAreaSize = fastAreaSize;
          public void add(int i){
             if (pointer < fastAreaSize)
                cache[pointer] = i;
             list.add(new Integer(i));
             pointer++;
          public int size(){
             return pointer;
          public int get(int i){
             if (i<fastAreaSize)
                return cache;
    else
    return((Integer)list.get(i)).intValue();
    public void addToArrayList(ArrayList al){
    for (int i=0; i<pointer; i++)
    if (i<fastAreaSize)
    al.add(new Integer(cache[i]));
    else
    al.add(list.get(i));
    When running in my pc
    above code detected primes within range 0-10000000 in 281809517 iterations within 6.718secs
    while your original code did the same in 278097308 iterations within 13.687 secs.
    By the way i removed the check for '5' thats why my code does more iterations.
    Notice that I have relocated code like Math.sqrt and ((Integer).....).intValue() to reduce the re calculating the same thing. That saved a lot of time.

  • How can one increase or zoom the size of the menu bar tabs/control items? They are tiny at HD resolution.

    i have a large monitor and i have it set to high res. This makes everything small. I bring it up with no squint but this does not work on the upper menu/tool bar/control/tabs or their drop down menus, leaving me squinting again. There needs to be a no squint feature for this area of the browser

    '''''NoSquint''''' changes only the web page display, not the Firefox user interface.
    Try this Add-on:
    *'''''Theme Font and Size Changer''''' -->https://addons.mozilla.org/en-US/firefox/addon/theme-font-size-changer/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Font size for Safari menu and tabs headings

    Hi,
    I setup Safari for the first time on my new Nexoc Laptop and have been very pleased that it works quite nice. My display resolution is 1900x1200 , so I love the possibility to set a minimum font for viewing pages.However as this works fine, I don´t find any possibility to get the menus of Safari readable without headache. I Set up the Window fonts to get Window´s windows readable, but how to archive bigger font-size for the Safari Menus ?

    You can increase the String pref layout.css.devPixelsPerPx from 1.0 to 2.0 in 0.1 steps to see what works best.
    In Firefox 3.6 and later this pref is a String value parsed to a float and allows to fine tune the dimensions of all elements more precisely.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />

  • Data type of preprend array size in Flatten To String block

    Hi 
    The data type of the preprend array size in Flatten To String block is given as I32. Is it somehow possible to reduce the data type to I8, since the width and height of my array won't exceed 255 ?. I also need to do the same in Unflatten To String as well. 
    Best regards
    Oesen

    Oesen wrote:
    Hi 
    The data type of the preprend array size in Flatten To String block is given as I32. Is it somehow possible to reduce the data type to I8, since the width and height of my array won't exceed 255 ?. I also need to do the same in Unflatten To String as well. 
    The short answer is no.  This is because the index is an I32.  NI likes to keep integers as an I32 whenever possible for reasons like this.
    Since you are dealing with a 2D array (width and height), it will actually use 2 I32s before the actual data.
    As Ravens stated, you could put in your own array sizes before the array in the string.  But it is worth saving 6 bytes?  Not likely.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Two instances of Firefox open when I click on a link within my email client. How can I stop this from happening?

    I am running on an iMac OS X 10.6.3 using Firefox 3.6.3 as my default browser and I use Postbox 1.1.5 as my email client. Anytime I click on a link within an email message two instances of Firefox open, one with my home page and one with the site the link was meant for. This happens only when Firefox is not already open. If Firefox is running and a link is clicked on it opens normally within the open instance of Firefox. I have contacted Postbox and am currently awaiting a response to see if they have any suggestions. While this is not a serious issue it is a bit annoying. I have Firefox set to open new links in tabs not new instances of windows, so it shouldn't be that. Any help in getting this to stop would be greatly appreciated.
    == This happened ==
    Every time Firefox opened
    == Not sure, it's been going on for quite awhile.

    That is a bug on Mac.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=531552 - Firefox 3.6b opens two windows when opening external links
    ''(please do not comment in bug reports to avoid bug spam for the devs)''

  • How do I determine array size in a formula node

    I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
    I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.

    Your own advice is the only and best one.
    greetings from the Netherlands

  • How to empty array dynamically

    I am trying to build a array to store the x cursor position data. Each time, I can drage X cursor and move left or right. Then I click "add data in array", the x position is added to array. I can continue to add as many as I want when I move x cursor again and again. All those work good. I want to keep loop and sequence structure as attached VI.
    My problem is: I have difficulty to empty array dynamically. For example, I did not choose right x cursor position, I want clean/empty array just by click "CLEAN" button. I do not want event structure to do this since it cause other problems.
    Please take a look see how to make it.
    Thanks
    Attachments:
    buildArrayclean.vi ‏41 KB

    You need to feed an empty array to the shift register, not to the indicator.
    See attached, LabVIEW 8.0.
    (You don't even need an empty array constant, just use "use default if unwired" on the output tunnel. The default data for an array is an empty array.).
    Also, your outer loop is pointless. It does not do anything since it stops at the same time as the inner loop. You only need the inner loop. ... and why do you need a big sequence structure???
    Message Edited by altenbach on 04-11-2006 09:21 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    buildArraycleanMOD2.vi ‏44 KB

  • ClearType is on and size of text is medium 125% problem menu bar bookmark bar and tab text is not clere at all

    system is windows 7 ClearType is on and also in display settings medium is chosen for 125% text size all the bars and tab text is very not clear at all

    Little bit of progress:
    When I allow whatever IE7 blocks, the menu works but 75% of
    the background images don't show up until I hover over them. The
    tabbed menu seems to work fine then though.
    Edit: Sorted the images no showing, but the "Stopped ActiveX
    running" etc error menu still pops up...can I stop that happening
    or is it something that is set on each individual's computer?
    Also the white box background around the round buttons show
    up, as if it was jpeg not a GIF, is that solvable?

  • Distinguishing between two instances of the same portlet

    Hi Experts,
    Is there a way to distinguish between two instance of the same portlet in different browser windows?
    I'm looking for something like URL parameter passing, but just for portlets.
    The problem is, I want a way to pass a parameter between views in a portlet, but in such a way that if another browser window is opened and navigated to that portlet page, the parameter won't be the same. Perhaps I can explain better with this example:
    Page A has a portlet on it which has a textbox and 2 buttons - the first button stores the value in the textbox in the PortletRequest (or PortletURL) and if you click the second button the portlet navigates to a different view which displays the value. If I navigate with a second browser window to Page A, however, and only click the navigate button, that value which was stored by the first instance of the portlet will still be shown. I want them to be independent, I don't want changes in the one's PortletRequest to reflect in the other one's PortletRequest.
    Any ideas?
    Thanks,
    JP

    Why not use two instances of the same portlet, i.e. create two channels of the same portlet.
    The behave the same, have the same application logic, so all you need is to transfer informations between the two portlets.If you want this within user space use the portlet session, otherwise access the http session context /application context and store the data there.
    The behavior would be controlled by the portlet preferences, so channel a (instance 1) would be configured to run as controller and channel b (instance 2) would be configured as receiver.

  • Is there a limit on the size of an array?

    I have two arrays: array1 and array2.
    I have a function that is iterating through array1. If an item in the array matches a particular condition, then that item is pushed onto array2. I can successfully push up to 19 items onto array2. However, if I attempt to push any additional item on top of the 19 items already in the array, then that push fails. Can I not have more than 19 items in an array? Is there any way to increase the size of the array?

    If you are seeing only 20 array elements in the Data Browser it does not mean that the array is limited to 20 elements*. You are perhaps seeing a display restriction in the data browser. Have you checked the actual number of elements in your final array by testing its length property?
    You can change the number of elements displayed in the Data Browser in the ExtendScript Toolkit Preferences on the Debugging page.
    *Note that there are 20 items shown as the first one has an idex of 0.
    Ian

  • Set Fixed Array Size

    Hello. I am trying to develop a VI for an FPGA target and I'm trying to make it so whoever is using the VI can specify the size of an input array when they instantiate it (such as by having an input to the VI that says "max array size" or something). So far it seems like the only way to do something like this is to go into the VI itself and manually set the array size for each input array for the VI (i.e. open the VI, right click on each input array, select "Set Dimension SIze", choose "fixed", set number of elements). I'd like to have one point where I can set the size of all the arrays at once (since in my case they are all the same size), and let the person using the VI set it to the proper size for whatever application they are using it for (to be clear, let's say I have two uses for this VI, and in one case I have an input array of size 100 and in anohter use of size 1000, I'd like to be able to set these somehow instead of doing it through the dialog). Thanks.
    Solved!
    Go to Solution.

    Unfortunately, per-call configuration of array size is not something that is supported today. This is a great idea, I would suggest that you post it on the FPGA Idea Exchange so we can get a feel for how many other people need this same feature.

  • How to create an instance of a class which is actually an array?

    the following code gives a runtime exception
    Object obj = (Object )attributeClass.newInstance();
    Exception:
    java.lang.InstantiationException: [Ltest.Name;[/b]
    Here test.Name is user defined class and i want to create an array instance of that class.
    I have tried the following also:
    [b]Object methodArgs[] = new Object[length];
    for(int j=0;j<length;++j){
    methodArgs[j] = singleMemberClass.cast(testArray[j]);
    Object temp = attributeClass.cast(methodArgs);
    In the above code singleMemberClass is test.Name, but the last line gives the following exception.
    java.lang.ClassCastException
    Message was edited by:
    lalit_mangal
    Message was edited by:
    lalit_mangal

    Try the following code
    import java.lang.reflect.Array;
    public class TestReflection {
         public static void main(String args[]) {
              Object array = Array.newInstance(A.class, 3);
              printType(array);
         private static void printType(Object object) {
              Class type = object.getClass();
              if (type.isArray()) {
                   System.out.println("Array of: " + elementType);
              System.out.println("Array size: " + Array.getLength(object));
    class A{
    }

  • Java.lang.OutOfMemoryError: Requested array size exceeds VM limit

    Hi!
    I've a this problem and I do not know how to reselve it:
    I' ve an oracle 11gr2 database in which I installed the Italian network
    when I try to execute a Shortest Path algorithm or a shortestPathAStar algorithm in a java program I got this error.
    [ConfigManager::loadConfig, INFO] Load config from specified inputstream.
    [oracle.spatial.network.NetworkMetadataImpl, DEBUG] History metadata not found for ROUTING.ITALIA_SPAZIO
    [LODNetworkAdaptorSDO::readMaximumLinkLevel, DEBUG] Query String: SELECT MAX(LINK_LEVEL) FROM ROUTING.ITALIA_SPAZIO_LINK$ WHERE LINK_LEVEL > -1
    *****Begin: Shortest Path with Multiple Link Levels
    *****Shortest Path Using Dijkstra
    [oracle.spatial.network.lod.LabelSettingAlgorithm, DEBUG] User data categories:
    [LODNetworkAdaptorSDO::isNetworkPartitioned, DEBUG] Query String: SELECT p.PARTITION_ID FROM ROUTING.ITA_SPAZIO_P_TABLE p WHERE p.LINK_LEVEL = ? AND ROWNUM = 1 [1]
    [QueryUtility::prepareIDListStatement, DEBUG] Query String: SELECT NODE_ID, PARTITION_ID FROM ROUTING.ITA_SPAZIO_P_TABLE p WHERE p.NODE_ID IN ( SELECT column_value FROM table(:varray) ) AND LINK_LEVEL = ?
    [oracle.spatial.network.lod.util.QueryUtility, FINEST] ID Array: [2195814]
    [LODNetworkAdaptorSDO::readNodePartitionIds, DEBUG] Query linkLevel = 1
    [NetworkIOImpl::readLogicalPartition, DEBUG] Read partition from blob table: partition 1181, level 1
    [LODNetworkAdaptorSDO::readPartitionBlobEntry, DEBUG] Query String: SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    [oracle.spatial.network.lod.LabelSettingAlgorithm, WARN] Requested array size exceeds VM limit
    [NetworkIOImpl::readLogicalPartition, DEBUG] Read partition from blob table: partition 1181, level 1
    [LODNetworkAdaptorSDO::readPartitionBlobEntry, DEBUG] Query String: SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    I use the sdoapi.jar, sdomn.jar and sdoutl.jar stored in the jlib directory of the oracle installation path.
    When I performe this query : SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    I got the following result
    BLOB NUM_INODES NUM_ENODES NUM_ILINKS NUM_ELINKS NUM_INLINKS NUM_OUTLINKS USER_DATA_INCLUDED
    (BLOB) 3408 116 3733 136 130 128 N
    then the java code I use is :
    package it.sistematica.oracle.spatial;
    import it.sistematica.oracle.network.data.Constant;
    import java.io.InputStream;
    import java.sql.Connection;
    import oracle.spatial.network.lod.DynamicLinkLevelSelector;
    import oracle.spatial.network.lod.GeodeticCostFunction;
    import oracle.spatial.network.lod.HeuristicCostFunction;
    import oracle.spatial.network.lod.LODNetworkManager;
    import oracle.spatial.network.lod.LinkLevelSelector;
    import oracle.spatial.network.lod.LogicalSubPath;
    import oracle.spatial.network.lod.NetworkAnalyst;
    import oracle.spatial.network.lod.NetworkIO;
    import oracle.spatial.network.lod.PointOnNet;
    import oracle.spatial.network.lod.config.LODConfig;
    import oracle.spatial.network.lod.util.PrintUtility;
    import oracle.spatial.util.Logger;
    public class SpWithMultiLinkLevel
         private static NetworkAnalyst analyst;
         private static NetworkIO networkIO;
         private static void setLogLevel(String logLevel)
         if("FATAL".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_FATAL);
         else if("ERROR".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_ERROR);
         else if("WARN".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_WARN);
         else if("INFO".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_INFO);
         else if("DEBUG".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_DEBUG);
         else if("FINEST".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_FINEST);
         else //default: set to ERROR
         Logger.setGlobalLevel(Logger.LEVEL_ERROR);
         public static void main(String[] args) throws Exception
              String configXmlFile =                "LODConfigs.xml";
              String logLevel =           "FINEST";
              String dbUrl =                Constant.PARAM_DB_URL;
              String dbUser =                Constant.PARAM_DB_USER;
              String dbPassword =                Constant.PARAM_DB_PASS;
              String networkName =                Constant.PARAM_NETWORK_NAME;
              long startNodeId = 2195814;
              long endNodeId = 3415235;
         int linkLevel = 1;
         double costThreshold = 1550;
         int numHighLevelNeighbors = 8;
         double costMultiplier = 1.5;
         Connection conn = null;
         //get input parameters
         for(int i=0; i<args.length; i++)
         if(args.equalsIgnoreCase("-dbUrl"))
         dbUrl = args[i+1];
         else if(args[i].equalsIgnoreCase("-dbUser"))
         dbUser = args[i+1];
         else if(args[i].equalsIgnoreCase("-dbPassword"))
         dbPassword = args[i+1];
         else if(args[i].equalsIgnoreCase("-networkName") && args[i+1]!=null)
         networkName = args[i+1].toUpperCase();
         else if(args[i].equalsIgnoreCase("-linkLevel"))
         linkLevel = Integer.parseInt(args[i+1]);
         else if(args[i].equalsIgnoreCase("-configXmlFile"))
         configXmlFile = args[i+1];
         else if(args[i].equalsIgnoreCase("-logLevel"))
         logLevel = args[i+1];
         // opening connection
         System.out.println("Connecting to ......... " + Constant.PARAM_DB_URL);
         conn = LODNetworkManager.getConnection(dbUrl, dbUser, dbPassword);
         System.out.println("Network analysis for "+networkName);
         setLogLevel(logLevel);
         //load user specified LOD configuration (optional),
         //otherwise default configuration will be used
         InputStream config = (new Network()).readConfig(configXmlFile);
         LODNetworkManager.getConfigManager().loadConfig(config);
         LODConfig c = LODNetworkManager.getConfigManager().getConfig(networkName);
         //get network input/output object
         networkIO = LODNetworkManager.getCachedNetworkIO(
         conn, networkName, networkName, null);
         //get network analyst
         analyst = LODNetworkManager.getNetworkAnalyst(networkIO);
         double[] costThresholds = {costThreshold};
         LogicalSubPath subPath = null;
         try
              System.out.println("*****Begin: Shortest Path with Multiple Link Levels");
              System.out.println("*****Shortest Path Using Dijkstra");
              String algorithm = "DIJKSTRA";
              linkLevel = 1;
              costThreshold = 5000;
              subPath = analyst.shortestPathDijkstra(new PointOnNet(startNodeId), new PointOnNet(endNodeId),linkLevel, null);
              PrintUtility.print(System.out, subPath, true, 10000, 0);
              System.out.println("*****End: Shortest path using Dijkstra");
              catch (Exception e)
              e.printStackTrace();
              try
              System.out.println("*****Shortest Path using Astar");
              HeuristicCostFunction costFunction = new GeodeticCostFunction(0,-1, 0, -2);
              LinkLevelSelector lls = new DynamicLinkLevelSelector(analyst, linkLevel, costFunction, costThresholds, numHighLevelNeighbors, costMultiplier, null);
              subPath = analyst.shortestPathAStar(
              new PointOnNet(startNodeId), new PointOnNet(endNodeId), null, costFunction, lls);
              PrintUtility.print(System.out, subPath, true, 10000, 0);
              System.out.println("*****End: Shortest Path Using Astar");
              System.out.println("*****End: Shortest Path with Multiple Link Levels");
              catch (Exception e)
              e.printStackTrace();
         if(conn!=null)
         try{conn.close();} catch(Exception ignore){}
    At first I create a two link level network with this command
    exec sdo_net.spatial_partition('ITALIA_SPAZIO', 'ITA_SPAZIO_P_TABLE', 5000, 'LOAD_DIR', 'sdlod_part.log', 'w', 1);
    exec sdo_net.spatial_partition('ITALIA_SPAZIO', 'ITA_SPAZIO_P_TABLE', 60000, 'LOAD_DIR', 'sdlod_part.log', 'w', 2);
    exec sdo_net.generate_partition_blobs('ITALIA_SPAZIO', 1, 'ITA_SPAZIO_P_BLOBS_TABLE', true, true, 'LOAD_DIR', 'sdlod_part_blob.log', 'w', false, true);
    exec sdo_net.generate_partition_blobs('ITALIA_SPAZIO', 2, 'ITA_SPAZIO_P_BLOBS_TABLE', true, true, 'LOAD_DIR', 'sdlod_part_blob.log', 'w', false, true);
    Then I try with a single level network but I got the same error.
    Please can samebody help me?

    I find the solution to this problem.
    In the LODConfig.xml file I have:
    <readPartitionFromBlob>true</readPartitionFromBlob>
                   <partitionBlobTranslator>oracle.spatial.network.lod.PartitionBlobTranslator11g</partitionBlobTranslator>
    but when I change it to
    <readPartitionFromBlob>true</readPartitionFromBlob>
                   <partitionBlobTranslator>oracle.spatial.network.lod.PartitionBlobTranslator11gR2</partitionBlobTranslator>
    The application starts without the obove mentioned error.

  • Can not get two instances to join same cluster even on same machine

    On a RedHat Linux box, I have failed to get two instances of coherence to join the same cluster. I have managed to get the muticast test tool to show that packets are being sent and received. To do this, I had to:
    java -cp bin/tangasol.jar -Djava.net.preferIPv4Stack=true com.tangosol.net.MulticastTest
    Wed Apr 15 21:02:45 WET 2009: Sent packet 1.
    Wed Apr 15 21:02:45 WET 2009: Received test packet 1 from self (sent 7ms ago).
    Wed Apr 15 21:02:47 WET 2009: Sent packet 2.
    Wed Apr 15 21:02:47 WET 2009: Received test packet 2 from self
    Wed Apr 15 21:02:49 WET 2009: Sent packet 3.
    Wed Apr 15 21:02:49 WET 2009: Received test packet 3 from self (sent 1ms ago).
    Wed Apr 15 21:02:51 WET 2009: Sent packet 4.
    Wed Apr 15 21:02:51 WET 2009: Received test packet 4 from self
    However, I could not get the following to show that two instances are joining the same cluster... When I start to instances, both of them create a new cluster with only one member in each.
    java -Djava.net.preferIPv4Stack=true -jar lib/coherence.jar
    and obviously, when I try to start two instances of the sample application, I get the same problem.
    java -cp ./lib/coherence.jar:./lib/tangosol.jar:./examples/java -Djava.net.preferIPv4Stack=true -Dtangosol.coherence.localhost=172.16.27.10 -Dtangosol.coherence.localport=8188 -Dtangosol.coherence.cacheconfig=/cache/explore-config.xml com.tangosol.examples.explore.SimpleCacheExplorer

    Thanks for that... I ran:
    jdk1.6.0_13/bin/java -Dtangosol.coherence.log.level=6 -Dtangosol.coherence.log=/my1.log -Dtangosol.ccacheconfig=/cache/explore-config.xml -Djava.net.preferIPv4Stack=true -jar lib/coherence.jar
    and then
    jdk1.6.0_13/bin/java -Dtangosol.coherence.log.level=6 -Dtangosol.coherence.log=/my2.log -Dtangosol.ccacheconfig=/cache/explore-config.xml -Djava.net.preferIPv4Stack=true -jar lib/coherence.jar
    from the same machine and get the following from the log file of the second run (my2.log)
    Oracle Coherence Version 3.4.2/411
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    2009-04-16 06:53:11.574/0.625 Oracle Coherence GE 3.4.2/411 <Warning> (thread=main, member=n/a): UnicastUdpSocket failed to set receive buffer size to 1428 packets (2096304 bytes); actual size is 89 packets (131071 bytes). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.
    2009-04-16 06:53:11.660/0.711 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2009-04-16 06:53:14.892/3.943 Oracle Coherence GE 3.4.2/411 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0x2FFB" with Member(Id=1, Timestamp=2009-04-16 06:53:11.58, Address=192.168.1.7:8089, MachineId=26887, Location=process:3514, Role=CoherenceConsole, Edition=Grid Edition, Mode=Development, CpuCount=8, SocketCount=2) UID=0xC0A8010700000120ADB3521C69071F99
    SafeCluster: Name=cluster:0x2FFB
    Group{Address=224.3.4.2, Port=34411, TTL=4}
    MasterMemberSet
    ThisMember=Member(Id=1, Timestamp=2009-04-16 06:53:11.58, Address=192.168.1.7:8089, MachineId=26887, Location=process:3514, Role=CoherenceConsole)
    OldestMember=Member(Id=1, Timestamp=2009-04-16 06:53:11.58, Address=192.168.1.7:8089, MachineId=26887, Location=process:3514, Role=CoherenceConsole)
    ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2009-04-16 06:53:11.58, Address=192.168.1.7:8089, MachineId=26887, Location=process:3514, Role=CoherenceConsole)
    RecycleMillis=120000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
    TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=192.168.1.7:8089}, Connections=[]}
    ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.4, OldestMemberId=1}
    the contents of the xml file are:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <!--
    Caches with any name will be created as default replicated.
    -->
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>default-replicated</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <!--
    Default Replicated caching scheme.
    -->
    <replicated-scheme>
    <scheme-name>default-replicated</scheme-name>
    <service-name>ReplicatedCache</service-name>
    <backing-map-scheme>
    <class-scheme>
    <scheme-ref>default-backing-map</scheme-ref>
    </class-scheme>
    </backing-map-scheme>
    </replicated-scheme>
    <!--
    Default backing map scheme definition used by all
    The caches that do not require any eviction policies
    -->
    <class-scheme>
    <scheme-name>default-backing-map</scheme-name>
    <class-name>com.tangosol.util.SafeHashMap</class-name>
    </class-scheme>
    </caching-schemes>
    </cache-config>

Maybe you are looking for