RouterServer and sdo_router_partition

Hi all,
I'm trying to use the Oracle Spatial Routing Engine from here (http://www.oracle.com/technology/software/products/spatial/index.html) in conjunction with some of my data loaded into the Oracle Network Model. Using the Network Model java API works fine and now i'd like to look at this RouteServer as it seems to offer some nice "extras".
My question is regarding the SDO_ROUTER_PARTITION package. This appears to partition up the network but seems to rely on some hardcoded table names for my network. The readme with the file suggests calling the "partition_router" procedure but this doesn't allow me to supply any network name or table names.
Additionally there doesn't seem to be anywhere within the OC4J configuration where I specify the network name I wish to use...
Is this "production ready" or have I completely missed something here?! (i.e this doesn't work with the Network Model).
Thanks,
Steve

My previous reply wasn't as clear as it could be, so here is an attempt at clarity:
The network data model includes a generic schema for doing analysis across a wide range of network applications. Applications can extend this schema with attributes specific to the domain/requirements of the application.
The routing engine uses a customized schema to support a routing application, that is, the routing engine extends the network data model tables with attributes specific to the routing application. In addition, the routing application has an additional SIGN_POST table which is used to generate driving directions.
If you store data in the routing schema, you can in fact register the network with the network data model by pointing to the routing engine EDGE and NODE tables, and use the Network Data Model analysis functions on that data.
I hope this is clear!

Similar Messages

  • Oracle routeserver initialization exception

    Hi forum,
    I'm trying to use different routeserver demos. Now I use the pro oracle spatial 11 dataset. Everything is imported into the database, metadata were inserted and sdo_router_partition.partition_router is done.
    Configuration is done in the web.xml file.
    The startup throws the following excception:
    [oracle.spatial.router.server.RouteServerImplementation, Thu Nov 05 19:43:53 CET 2009,#OC4J Launcher, FATAL] oracle.spatial.router.engine.RoutingEngineException: [REE-0126: Node reference for start  node 4841079272520679426 of edge 108501659 is missing in partition 0]
         at oracle.spatial.router.engine.Partition.fillNonBoundaryEdgesWithNodeReferences(Partition.java:188)
         at oracle.spatial.router.engine.Partition.readPartition(Partition.java:114)
         at oracle.spatial.router.engine.PartitionCache.loadPartitionFromDatabase(PartitionCache.java:290)
         at oracle.spatial.router.engine.PartitionCache.obtainPartitionReference(PartitionCache.java:248)
         at oracle.spatial.router.engine.Network.<init>(Network.java:77)
         at oracle.spatial.router.server.RouteServerImplementation.<init>(RouteServerImplementation.java:145)
         at oracle.spatial.router.server.RouteServerServlet.init(RouteServerServlet.java:319)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2361)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4810)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4734)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4922)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1134)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:738)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
         at com.evermind.server.Application.getHttpApplication(Application.java:545)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1909)
         at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:645)
         at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:290)
         at com.evermind.server.http.HttpServer.setSites(HttpServer.java:270)
         at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:177)
         at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2450)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:998)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
         at java.lang.Thread.run(Thread.java:619)
    A datarow for partition 0 is in the partition table.
    So, where ist the problem? I'm running oracle 11.1.0.7 on Win2003 with quickstartkit mv11r1_qs and deployed routeserver from ORA_HOME/md/jlib folder (routeserver.ear).
    Arnd

    The first problem is solved, it seems to be a data issue. Use the nacteq_sd dataset for the demo, not the adci dataset.
    Here is my next problem: The routeserver samples doesn't work, I get a java IO exception (using pre geocoded demo, no geocoder access!!):
    <?xml version="1.0" encoding="UTF-8" ?>
    <generic_error>Error: Message:Error in sending request to elocation server. Nested exception is: java.io.FileNotFoundException: http://localhost:8888/servlets/lbs java.io.FileNotFoundException: http://localhost:8888/servlets/lbs at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1151) at oracle.spatial.geocoder.client.HttpClientGeocoder.sendRequest(HttpClientGeocoder.java:224) at oracle.spatial.geocoder.client.HttpClientGeocoder.batchGeocode(HttpClientGeocoder.java:146) at oracle.spatial.router.server.RouteServerServlet.processBatchRouteRequest(RouteServerServlet.java:736) at oracle.spatial.router.server.RouteServerServlet.takeXMLRequestAndReturnResponse(RouteServerServlet.java:562) at oracle.spatial.router.server.RouteServerServlet.doPost(RouteServerServlet.java:419) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)</generic_error>
    My route server is deployed in http://localhost:8888/routeserver/
    The URL http://localhost:8888/servlets/lbs returns 404 - file not found. What is the correct value for the setting?
    <servlet-mapping>
    <servlet-name>RouteServerServlet</servlet-name>
    <url-pattern>/servlet/RouteServerServlet</url-pattern>
    </servlet-mapping>

  • Getting Error while running SDO_ROUTER_PARTITION in Release 10.2.0.1.0

    Hi
    We are building the road network for Bangalore data with Oracle Routing server. we are using Oracle Release 10.2.0.1.0. I haven’t run the script loadrouter.sql which is shipped with Oracle Routing server
    When I try to create the PARTITION table using the procedure
    exec SDO_ROUTER_PARTITION.partition_router('NODE_PART', 4000);
    we are getting the error as
    ERROR at line 1:
    ORA-29531: no method partition_router in class
    oracle/spatial/router/partitioning/ElocationPartition
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 99
    ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 663
    ORA-06512: at line 1
    Even later I tried to run loadrouter.sql script, its giving error as package already exists.
    But I copied the entire tables into dump file and put it in Oracle Release 10.1.0.4.0 its working fine because already I run the loadrouter.sql script there.
    Then I configured the Routing Server for this Data, its working fine.
    But when I make the return_driving_directions=”true” its giving error as
    <?xml version="1.0" encoding="UTF-8" ?>
    <RoutingEngineException>[REE-0108: SQLException caught while trying to call SDO_ROUTER_PARTITION.get_edge_info: [ORA-00942: table or view does not exist ORA-06512: at "MDSYS.SDO_ROUTER_PARTITION", line 1606 ORA-06512: at line 1 ]]</RoutingEngineException>
    How to solve these problems?

    hi,
    do you have atg search installed in your environment? if so configure it properly
    Edited by: Raghuram A on Mar 14, 2013 11:33 PM

  • Routing engine problems: partition_id AND frequent exceptions in responses

    Hi.
    I want to use Oracle routing engine with Oracle Spatial 10gR2 for Europe.
    I have tables NODE, EDGE, SIGN_POST and PARTITION populated okay with data from a data vendor.
    I have 600000 edges and 415000 nodes. 128 partitions were generated by
    using: exec SDO_ROUTER_PARTITION.partition_router('NODE_PART', 4000);
    Two issues occur to me:
    1. select num_nodes from partition where partition_id = 0; returns 390 nodes, but neither in table node nor edge are records with partition_id = 0, which is as I have learned the Highway Partition. Does that make sense?
    2. Route requests sometimes return correct results, but more frequently routing engine exceptions:
    Most popular are:
    - Route not found between destination/source node and highway network!
    - mbrAwareAStarSearch could not find a route!
    What might be wrong?
    I also experience both problems with the NAVTEQ example data for San Francisco extracted from sf_routing.zip.
    Below find requests leading to exceptions indicated using NAVTEQ example data extracted from sf_routing.zip in order to make the described reproducable:
    1. Route not found between destination/source node and highway network!:
    <?xml version="1.0" standalone="yes"?>
    <route_request id="8"
    route_preference="shortest"
    road_preference="highway"
    return_driving_directions="false"
    distance_unit="km"
    time_unit="hour"
         return_route_geometry="true"
    pre_geocoded_locations="true">
    <start_location>
    <pre_geocoded_location id="1">
    <edge_id>-37847628</edge_id>
    <percent>.5</percent>
    <side>L</side>
    </pre_geocoded_location>
    </start_location>
    <end_location>
    <pre_geocoded_location id="2">
    <edge_id>-37846969</edge_id>
    <percent>.5</percent>
    <side>R</side>
    </pre_geocoded_location>
    </end_location>
    </route_request>
    2. - mbrAwareAStarSearch could not find a route!
    <?xml version="1.0" standalone="yes"?>
    <route_request id="8"
    route_preference="shortest"
    road_preference="highway"
    return_driving_directions="false"
    distance_unit="km"
    time_unit="hour"
         return_route_geometry="true"
    pre_geocoded_locations="true">
    <start_location>
    <pre_geocoded_location id="1">
    <edge_id>-37827163</edge_id>
    <percent>.5</percent>
    <side>R</side>
    </pre_geocoded_location>
    </start_location>
    <end_location>
    <pre_geocoded_location id="2">
    <edge_id>-37847628</edge_id>
    <percent>.5</percent>
    <side>R</side>
    </pre_geocoded_location>
    </end_location>
    </route_request>

    The highway partition, partition zero, is "logical" idea. That is it only exists in the partition table. Each node and edge in the data belongs to a partition that it shares with other nodes or edges in the same physical area. This physical relationship is shown in the partition ids stored in the edge and node tables. Once these partitions are figured out each edge is looked at to see if it's a highway edge, that is, it has a func_class of 1 or 2. Once this is done these edges have their start and end nodes classified as highway nodes and those are considered to be in partition zero also.
    I've run into the MBR error you're seeing in my testing and have been looking into it. Forgive my poor analogy, but there appear to be "holes" in the highway system. If one has a major artery, say interstate 95 coming out of FL, all routes between FL and VA are going to want to use that major artery. If there was a "hole" in interstate 95, a section that was not classified as a highway section thus not in partition 0, those routes would be dropped as unusable. If all the routes get dropped in this way you get the mbrAwareAStarSearch error.
    I haven't seen the other error but I'll use your example and have a look into it.

  • Strange error in SDO_ROUTER_PARTITION.PARTITION_ROUTER

    Hi,
    the statement
    exec SDO_ROUTER_PARTITION.PARTITION_ROUTER('PARTITION', 4000);
    gives the following output on Oracle 10.2.0.1.0 on Windows XP w/patch 5632711 applied.
    What can be worng? Why should the partition procedure create a file or a directory?
    Please advice, we are stuck!!
    error starting at line 1 in command:
    exec SDO_ROUTER_PARTITION.PARTITION_ROUTER('PARTITION', 4000);
    Error report:
    ORA-29280: percorso della directory non valido
    ORA-06512: a "SYS.UTL_FILE", line 33
    ORA-06512: a "SYS.UTL_FILE", line 436
    ORA-06512: a "MDSYS.SDO_ROUTER_PARTITION", line 524
    ORA-06512: a line 1
    29280. 00000 - "invalid directory path"
    *Cause:    A corresponding directory object does not exist.
    *Action:   Correct the directory object parameter, or create a corresponding
    directory object with the CREATE DIRECTORY command.
    Thanks in advance.

    Thanks a lot Steven, your hint solved the problem.
    The procedure now starts and completes, however, the final tables are empty (!)
    The operation log follows:
    Mer Feb 21 17:59:53 2007
    ******* Beginning SDO Router partitioning
    Mer Feb 21 17:59:53 2007
    INFO: create and load node_part table
    Mer Feb 21 17:59:54 2007
    INFO: cleanup partitioning temporary tables
    Mer Feb 21 17:59:54 2007
    ERROR: exception processing partition of the NEW_PARTITION table
    Mer Feb 21 17:59:54 2007
    INFO: create index np_v_idx on node_part
    Mer Feb 21 17:59:55 2007
    INFO: create and load edge_part
    Mer Feb 21 18:0:3 2007
    INFO: create index edge_part_s_idx on edge_part
    Mer Feb 21 18:0:4 2007
    INFO: create index edge_part_t_idx on edge_part
    Mer Feb 21 18:0:4 2007
    INFO: create index edge_part_st_p_idx on edge_part
    Mer Feb 21 18:0:5 2007
    INFO: create and load outedge and inedge columns in node_part table
    Mer Feb 21 18:4:44 2007
    INFO: create index node_part_p_idx on node_part
    Mer Feb 21 18:4:44 2007
    INFO: recreating node table with partitioning information
    Mer Feb 21 18:4:46 2007
    INFO: updating edge table with partitioning information
    Mer Feb 21 18:5:4 2007
    INFO: creating and loading super_node_ids table
    Mer Feb 21 18:5:5 2007
    INFO: creating and loading super_edge_ids table
    Mer Feb 21 18:5:5 2007
    INFO: creating the final partition table
    Mer Feb 21 18:5:5 2007
    INFO: create index partition_p_idx on partition table
    Mer Feb 21 18:5:5 2007
    ******* Completed SDO Router partitioning
    Is it the type of trouble you are having too?
    Antonio

  • A problem with Threads and loops.

    Hi, I have some code that needs to be constantly running, like while(true)
          //code here
    }However, the code just checks to see if the user has input anything (and then if the user has, it goes to do some other stuff) so I don't need it constantly running and hogging up 98% of the CPU. So I made my class (which has the method that needs to be looped, call it ClassA) implement Runnable. Then I just added the method which needed to be looped into the public void run()
    I have another class which creates an instance of the above class (call it ClassB), and the main(String[] args) is in there.
    public static void main(String[] args)
              ClassA test = new ClassA();
              Thread thread = new Thread(test.getInstanceOfClassA());
              thread.start();
              while(true)
                           //I do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...) but I can't think of away to get it to run - sleep - run -sleep forever. Can someone help me?

    Hi, I have some code that needs to be constantly
    running, like while(true)
    //code here
    }However, the code just checks to see if the user has
    input anything (and then if the user has, it goes to
    do some other stuff) so I don't need it constantly
    running and hogging up 98% of the CPU. Where does the user input come from. Are you reading from an InputStream? If so, then your loop will be blocked anyway when reading from the InputStream until data is available. During that time, the loop will not consume processor cycles.
    public static void main(String[] args)
              ClassA test = new ClassA();
    Thread thread = new Thread(test.getInstanceOfClassA());I have never seen this idiom. If ClassA instanceof Runnable, you simply write new Thread(test).
              thread.start();
              while(true)
    //I do not know what to put
    do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...)Yeah, why would you want to call it more than once given that you have an infinite loop in ClassA.run()?
    Harald.
    Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with Threads and "plase wait..."-Window

    Hi everyone,
    I have a problem that I'm not able to solve in any way... I have a time-consuming task (a file decryption) which I execute in a separate thread; I've used the SwingWorker class, like suggested by sun-tutorial, and it works right. The problem is that I have to wait that the decryption have finished before continuing with program-execution. Therefore I would like to display a "please wait"-window while the task runs. I've tryed all the possible ways I know but the problem is always the same: the waitWindow is displayed empty, the bounds are painted but the contents no; it's only painted when the decrypt-task has finished. Please help me, I have no more resources....
    decrypt-file code:
    public class DecryptFile {
      private String cryptedFileNameAndPath;
      private ByteArrayInputStream resultStream = null;
      // need for progress
      private int lengthOfTask;
      private int current = -1;
      private String statMessage;
      public DecryptFile(String encZipFileNameAndPath) {
        cryptedFileNameAndPath = encZipFileNameAndPath;
        //Compute length of task...
        // 0 for indeterminate
        lengthOfTask = 0;
      public ByteArrayInputStream getDecryptedInputStream() {
        return this.resultStream;
       * Called from ProgressBarDemo to start the task.
      public void go() {
        current = -1;
        final SwingWorker worker = new SwingWorker() {
          public Object construct() {
            return new ActualTask();
        worker.start();
       * Called from ProgressBarDemo to find out how much work needs
       * to be done.
      public int getLengthOfTask() {
        return lengthOfTask;
       * Called from ProgressBarDemo to find out how much has been done.
      public int getCurrent() {
        return current;
      public void stop() {
        current = lengthOfTask;
       * Called from ProgressBarDemo to find out if the task has completed.
      public boolean done() {
        if (current >= lengthOfTask)
          return true;
        else
          return false;
      public String getMessage() {
        return statMessage;
       * The actual long running task.  This runs in a SwingWorker thread.
      class ActualTask {
        ActualTask () {
          current = -1;
          statMessage = "";
          resultStream = AIUtil.getInputStreamFromEncZip(cryptedFileNameAndPath); //here the decryption happens
          current = 0;
          statMessage = "";
      }The code that calls decryption and displays waitWindow
          final WaitSplash wS = new WaitSplash("Please wait...");
          final DecryptFile cryptedTemplate = new DecryptFile (this.templateFile);
          cryptedTemplate.go();
          while (! cryptedTemplate.done()) {
            try {
              wait();
            } catch (Exception e) { }
          this.templateInputStream = cryptedTemplate.getDecryptedInputStream();
          wS.close();Thanks, thanks, thanks in advance!
    Edoardo

    Maybe you can try setting the priority of the long-running thread to be lower? so that the UI will be more responsive...

  • Problem with threads and graphics

    I have a thread that chooses paths for a Travelling salesman problem, it then calls a TSPdraw class and passes it the path, which the class then draws. the problem is when i have two threads it creates two windows but only draws a path in one of them. any ideas where i`m going wrong

    Are you using swing components? Swing isn't threadsafe. If you have multiple threads that want to update your UI you need to use the SwingUtilities.invokeLater(...)or invokeAndWait(...). There is a page in the swing tutorial about this at: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

  • Problem with threads and ProgressMonitor

    Dear Friends:
    I have a little problem with a thread and a ProgressMonitor. I have a long time process that runs in a thread (the thread is in an separate class). The thread has a ProgressMonitor that works fine and shows the tasks progress.
    But I need deactivate the main class(the main class is the user interface) until the thread ends.
    I use something like this:
    LongTask myTask=new LongTask();
    myTask.start();
    myTask.join();
    Now, the main class waits for the task to end, but the progress monitor don`t works fine: it shows only the dialog but not the progress bar.
    What's wrong?

    Is the dialog a modal dialog? This can block other UI updates.
    In general, you should make sure that it isn't modal, and that your workThread has a fairly low priority so that the UI can do its updating

  • Problem with threads and/or memory

    I'm developing an application where there are 3 threads. One of them sends a request to the other, and if the 2nd can't answer it, it sends it to the 3rd (similar to CPU -> CACHE -> MEMORY). When i run the program with 1000-10.000 requests, no problem occurs. When i run it with 300.000-1.000.000 requests, it sometimes hangs. Is this a problem with the garbage collector, or should it be related to the threads mecanism.
    (note: eache thread is in execution using a finite state machine)

    i had been running the program inside Netbeans.
    Running the jar using the command line outside
    Netbeans i have no more problems... Does Netbeans use
    it's own JVM?Depends how you set it up, but look under the options. There are settings for the compiler and jvm that it uses.

  • Null And " "

    What is the difference between these two lines of codes?
    String currentFile = null;
    String currentFile = "";
    Edited by: AMARSHI on Jul 10, 2008 7:07 AM

    The reference variable itself, takes up the same amount of space, of course, as all references are the same size. Now, the object on the heap is a different story. With null there isn't one, of course (or if there is there is only one for the entire VM), and for the second a String object will be created in the String pool (once again, only one for the entire VM that every = "" assignment will use). But really, what difference does it make? If there is a difference, it is on the order of a few bytes (at max) for the entire VM, and if this is a concern, your probably doing something else greviously wrong. This miniscule difference should not concern you.
    Edit: And "nulling" variables to "save" memory is also not something you should be concerned with. Either the variable will go out of scope and the object garbage collected anyway, or it's in constant use and so will not be taking up any extraneous heap space. If one of those is not the case, you are, once again, doing something greviously wrong.

  • And/or if statement in rtf templates.

    Hi all,
    I'm using XML Publisher 4.5.
    I have created a word template file (rtf) for my reports. I need to be able to show some content in the template file by using and and/or if statement.
    fx. <?if:doc_type='STANDARD'?> OR <?if:doc_type='DEFAULT'?>
    How can I do this?
    In advance thank you.
    Best regards
    Kenneth

    Hi D,
    Thank you for your answer.
    I have seriously thought about that solution; but I don't think it's a smart way to do it.
    If i do it like that, i need to copy the whole table and paste it inside the if statements.
    I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
    POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
    CP_RELEASE_NUM can be: '' or N
    If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
    OR POH_PO_TYPE is STANDARD
    OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
    THEN show table (which contains the whole PO).
    It shall show the content of the PO in any of these cases.
    BR Kenneth

  • I install window 8 and Unfortunatly all drive format. And all drive mix, now i have only 1 DRIVE C. I want Bit locker Drive's data Back

    Last sunday i install a window 8 and this window format my all drive & make it 1 drive (DRIVE C). Before all of this i have 5 drive in different size with 1 Bitlocker protect drive.
    So i try data recovery software to recover my data. i got back all my data without that ( bitlocker ) protected drive.
    so please guys help me how can i get back data from bitlocker protected drives.
    please please help me.

    Hi,
    I sorry for your experience, but there is no way to recovery the data encryped by BitLocker untill now.
    BitLocker is designed to make the encrypted drive unrecoverable without the required authentication. When in recovery mode, the user needs the recovery password or recovery key to unlock the encrypted drive. Therefore, we highly recommend
    that you store the recovery information in AD DS or in another safe location.
    Please refer to the link below for the statement:
    http://technet.microsoft.com/de-de/library/ee449438(v=ws.10).aspx#BKMK_RecoveryInfo
    Roger Lu
    TechNet Community Support

Maybe you are looking for

  • Is there a way to delete more then 1 file at a time?

    I inserted a CD from a friend of mine, it was suppose to be my wedding photo's. It was not.....it downloaded automatically all the contents of the CD into my photo's and there was over a thousand images entered. I believe this is why my I Photo is no

  • PO line item material can not be changed. SAP gives message 06387.

    Hello, When we create purchase orders with reference to Quotations, SAP is not letting us change the PO part number after the PO has been created.  SAP generates message 06387 saying that 'Agreement item contains a different material'. Because we cre

  • How to organize photos in iPhoto?

    Hi! All my photos are organized by events in iPhoto, and I would like to move all the photos i took during my exchange year to a seperate album or event. I tried to organize them by making a new album and drag all the albums into it, but it resulted

  • How to install oracle 9i jdeveloper

    hi i just download 9i jdeveloper from here. it is a 135MB jdev9i_902.zip file. however i couldn't find the setup file to install. Is there any instruction that i can follow to install oracle 9i jdeveloper and use it for Oracle9i interMedia/BC4J Inter

  • Poor sound quality with NAD amplifier

    I have tried connecting my airport express to a NAD amplifier and using my ipod touch as a remote. The sound quality is very poor - too much bass. I am using quality cables from the 3.5 jack to phono input on the amp. Any suggestions.