Running a thread for a specified time

my main program has 10 threads. i want to run each thread for 30 secs . but if one thread is on progress it may be allowed some time to complete its task otherwise evrbody should return after 30 secs.how can i do it ?
thankx

code is hanging...
also how do i do >>if one thread is on progress it may be allowed some time to complete its task otherwise evrbody should return after 30 secs
class Shared
boolean stop=false;
// do nothing but helps only for synchronisation
class ThreadProducer1 extends Thread
{    Shared obj;
     public void run()
     {   long endTime = System.currentTimeMillis() + 30 * 1000;
         long currentTime;
          for (int k=0;k<1000;k++)
          {System.out.println("thread1");     // doing its work
         currentTime=System.currentTimeMillis();
          if (currentTime>endTime) break;
class ThreadProducer2 extends Thread
{   Shared obj;
     public void run()
     {   long endTime = System.currentTimeMillis() + 30 * 1000;
         long currentTime;
          for (int k=0;k<1000;k++){
          System.out.println("thread2");     // doing its work
          currentTime=System.currentTimeMillis();
          if (currentTime>endTime) break;}     // doing its work
class ThreadProducer3 extends Thread
{   Shared obj;
     public void run()
     {   long endTime = System.currentTimeMillis() + 30 * 1000;
         long currentTime;
          for (int k=0;k<1000;k++)
          System.out.println("thread 3");     // doing its work
          currentTime=System.currentTimeMillis();
          if (currentTime>endTime) break;
          }     // doing its work
class Test
public static void main(String argv[])
    try{
     ThreadProducer1 t1 = new ThreadProducer1();
     ThreadProducer2 t2 = new ThreadProducer2();
     ThreadProducer3 t3 = new ThreadProducer3();
     t1.start();
    t2.start();
     t3.start();
    Thread.sleep(30000); // main thread wakes up after 30 secs.
     }catch (InterruptedException ex)
         System.out.println("exception");

Similar Messages

  • How to run a thread for second time ?

    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();

    baskark wrote:
    I have a written a ThreadPool, but I found that basically a thread is not running for the second time. i.e First i call run() method and call stop(). If i call again run() method for the same thread, it is not running. What should I do, If i want to run the thread for the second time ?
    class NewThread implements Runnable {
    String name;
    NewThread(String a) {
    name=a;
    public void run() {
    try{
    for(int i=0;i<5;i++) {
    System.out.println("Thread :" + name + " #" +i);
    Thread.sleep(5);
    catch (Exception e) {
    e.printStackTrace();
    class threadRunnableTest {
    public static void main (String args[]) {
    Runnable runnable=new NewThread("BaSkAr");
    Thread thread = new Thread(runnable);
    try{
    System.out.println("First Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("First Thread it to be stopped!!");
    thread.stop();
    System.out.println("Second Thread is starting !!!");
    thread.start();
    Thread.sleep(2000);
    System.out.println("Second Thread it to be stopped!!");
    thread.stop();
    catch (Exception e) {
    e.printStackTrace();
    It's usually helpful to check the documentation:
    [http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()|http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#start()]
    start
    public void start()Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
    The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
    It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution.
    So, make a new java.lang.Thread

  • How do i run two threads with different sleep times?

    How do i run two threads with different sleep times?
    Ive got thread A and thread B, they both update a jpanel.
    They both start when i press the start button.
    However thread A updates every 250ms and thread B updates every 1000ms. i cant just run them both at 250ms becuase this will mess it up.
    So for every four runs of thread A i want thread b to only be run once
    Does anyone know how to do this?
    Thanks, Ant...

    ok, ive done it but now i cant stop it!
    ive added buttons to start and stop, the start button works but the stop button doesnt. why doesnt "t.stop();" work?
        public void run() {
            while(t == Thread.currentThread()) {
                System.out.println("No " + t.getName());
                if (t.getName().equals("1")){
                    try {
                        t.sleep(1000); // in milliseconds
                    } catch (InterruptedException e) {}
                } else{
                    try {
                        t.sleep(250); // in milliseconds
                    } catch (InterruptedException e) {}
        }

  • How to run a VI for very short time, e.g. 100ms?

    Hi,
    I need to run a VI for very short amounts of time, say 100ms, 200ms, 500ms or 1s. I want to get this time from the user, maybe as a control variable. How may I do this? I tried using the "elapsed time" function but seems like it was not meant for such small time periods. Any ideas?
    Thanks
    Kaiser 

    What are you trying to do in the "short time"? When you say "run a VI" do you mean "start, run and stop running", or do you mean for the vi to do something for the specified time, i.e. flash a front panel LED for a precise period after the operator clicks a button? In the later case 100mS is actually fairly long, and can be accomplished with various timing functions, with varying degrees of accuracy. The most accurate, in a Windows environment, would probably be the timed loop. If you need really accurate, particularly if you are interfacing with hardware (a pushbutton, an actual lamp, etc.) a real-time system would be the best bet.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Help: I want to auto schedule a load using file watcher but it runs only once for the first time and after that it is not running at all

    Hi All,
    I am trying  to execute the below code as provided from one of the blogs. i am able to run the job only once based on a file watcher object(i.e. for very first time) and after that the job is not running at all and if  i schedule the job to run automatically based on interval of 10 or more minutes it is executing properly). Please let me know or guide me if i have missed any step or configuration.that is needed.
    Version of Oracle 11.2.0.1.0
    OS : Windows 7 Prof
    Given all the necessary privileges
    BEGIN
      DBMS_SCHEDULER.CREATE_CREDENTIAL(
         credential_name => 'cred',
         username        => 'XXXX',
         password        => 'XXXX');
    END;
    CREATE TABLE ZZZZ (WHEN timestamp, file_name varchar2(100),
       file_size number, processed char(1));
    CREATE OR REPLACE PROCEDURE YYYY
      (payload IN sys.scheduler_filewatcher_result) AS
    BEGIN
      INSERT INTO ZZZZ VALUES
         (payload.file_timestamp,
          payload.directory_path || '/' || payload.actual_file_name,
          payload.file_size,
          'N');
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_PROGRAM(
        program_name        => 'prog1',
        program_type        => 'stored_procedure',
        program_action      => 'YYYY',
        number_of_arguments => 1,
        enabled             => FALSE);
      DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
        program_name        => 'prog1',
        metadata_attribute  => 'event_message',
        argument_position   => 1);
      DBMS_SCHEDULER.ENABLE('prog1');
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_FILE_WATCHER(
        file_watcher_name => 'file_watcher1',
        directory_path    => 'D:\AAAA',
        file_name         => '*.txt',
        credential_name   => 'cred',
        destination       => NULL,
        enabled           => FALSE);
    END;
    BEGIN
      DBMS_SCHEDULER.CREATE_JOB(
        job_name        => 'job1',
        program_name    => 'prog1',
        queue_spec      => 'file_watcher1',
        auto_drop       => FALSE,
        enabled         => FALSE);
      DBMS_SCHEDULER.SET_ATTRIBUTE('job1','PARALLEL_INSTANCES',TRUE);
    END;
    EXEC DBMS_SCHEDULER.ENABLE('file_watcher1,job1');
    Regards,
    kumar.

    Please post a copy and paste of a complete run of a test case, similar to what I have shown below.
    SCOTT@orcl12c> SELECT banner FROM v$version
      2  /
    BANNER
    Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
    PL/SQL Release 12.1.0.1.0 - Production
    CORE    12.1.0.1.0    Production
    TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
    NLSRTL Version 12.1.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl12c> CONN / AS SYSDBA
    Connected.
    SYS@orcl12c> -- set file watcher interval to one minute:
    SYS@orcl12c> BEGIN
      2    DBMS_SCHEDULER.SET_ATTRIBUTE
      3       ('file_watcher_schedule',
      4        'repeat_interval',
      5        'freq=minutely; interval=1');
      6  END;
      7  /
    PL/SQL procedure successfully completed.
    SYS@orcl12c> CONNECT scott/tiger
    Connected.
    SCOTT@orcl12c> BEGIN
      2    -- create credential using operating system user and password (fill in your own):
      3    DBMS_SCHEDULER.CREATE_CREDENTIAL
      4       (credential_name     => 'cred',
      5        username          => '...',
      6        password          => '...');
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- create table to insert results into:
    SCOTT@orcl12c> CREATE TABLE ZZZZ
      2    (WHEN      timestamp,
      3      file_name varchar2(100),
      4      file_size number,
      5      processed char(1))
      6  /
    Table created.
    SCOTT@orcl12c> -- create procedure to insert results:
    SCOTT@orcl12c> CREATE OR REPLACE PROCEDURE YYYY
      2    (payload IN sys.scheduler_filewatcher_result)
      3  AS
      4  BEGIN
      5    INSERT INTO ZZZZ VALUES
      6        (payload.file_timestamp,
      7         payload.directory_path || '/' || payload.actual_file_name,
      8         payload.file_size,
      9         'N');
    10  END;
    11  /
    Procedure created.
    SCOTT@orcl12c> -- create program, define metadata, and enable:
    SCOTT@orcl12c> BEGIN
      2    DBMS_SCHEDULER.CREATE_PROGRAM
      3       (program_name          => 'prog1',
      4        program_type          => 'stored_procedure',
      5        program_action      => 'YYYY',
      6        number_of_arguments => 1,
      7        enabled          => FALSE);
      8    DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
      9       program_name         => 'prog1',
    10       metadata_attribute  => 'event_message',
    11       argument_position   => 1);
    12    DBMS_SCHEDULER.ENABLE ('prog1');
    13  END;
    14  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> BEGIN
      2    -- create file watcher:
      3    DBMS_SCHEDULER.CREATE_FILE_WATCHER
      4       (file_watcher_name   => 'file_watcher1',
      5        directory_path      => 'c:\my_oracle_files',
      6        file_name          => 'f*.txt',
      7        credential_name     => 'cred',
      8        destination          => NULL,
      9        enabled          => FALSE);
    10  END;
    11  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> BEGIN
      2    -- create job:
      3    DBMS_SCHEDULER.CREATE_JOB
      4       (job_name          => 'job1',
      5        program_name          => 'prog1',
      6        queue_spec          => 'file_watcher1',
      7        auto_drop          => FALSE,
      8        enabled          => FALSE);
      9    -- set attributes:
    10    DBMS_SCHEDULER.SET_ATTRIBUTE ('job1', 'PARALLEL_INSTANCES', TRUE);
    11  END;
    12  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- enable:
    SCOTT@orcl12c> EXEC DBMS_SCHEDULER.enable ('file_watcher1, job1');
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- write file (file must not exist previously):
    SCOTT@orcl12c> CREATE OR REPLACE DIRECTORY upncommon_dir AS 'c:\my_oracle_files'
      2  /
    Directory created.
    SCOTT@orcl12c> declare
      2    filtyp utl_file.file_type;
      3  begin
      4    filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file1.txt', 'W', NULL);
      5    utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
      6    utl_file.fclose (filtyp);
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
    SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- check for results:
    SCOTT@orcl12c> SELECT * FROM zzzz
      2  /
    WHEN
    FILE_NAME
    FILE_SIZE P
    22-OCT-13 10.12.28.309000 PM
    c:\my_oracle_files/file1.txt
            57 N
    1 row selected.
    SCOTT@orcl12c> declare
      2    filtyp utl_file.file_type;
      3  begin
      4    filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file2.txt', 'W', NULL);
      5    utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
      6    utl_file.fclose (filtyp);
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
    SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
    PL/SQL procedure successfully completed.
    SCOTT@orcl12c> -- check for results:
    SCOTT@orcl12c> SELECT * FROM zzzz
      2  /
    WHEN
    FILE_NAME
    FILE_SIZE P
    22-OCT-13 10.12.28.309000 PM
    c:\my_oracle_files/file1.txt
            57 N
    22-OCT-13 10.14.08.580000 PM
    c:\my_oracle_files/file2.txt
            57 N
    2 rows selected.

  • Howto get Measure values for a specified time interval

    hello,
    I am building a BIBeans application where in i need to display a crosstab depending upon user defined time period.So, I need to provide 2 text fields which can be populated with a user specified calendar date for specifying the time range..Then I need to display the details according to this user entered time period. I would like to know how to achieve this if the time dimension can be drilled upto an individual date.Can any one help me in this regard?
    Thanks in advance
    Rags

    Hi Katarina :
    your code is "MDDimension timeDim = metadataManager.getDimensionByUniqueID(timeDimensionID);"
    the variable "metadataManager" is instance by " MetadataManager metadataManager=new MetadataManager()".
    Is right above?
    but I run it ,the programe throw a exception.
    why do it throw this question?I hope you can answer me .thank you !!
    the exception is following :
    java.lang.NullPointerException
         oracle.dss.metadataManager.common.MDObject oracle.dss.metadataManager.client.MetadataManager.getMDObject(oracle.dss.metadataUtil.PropertyBag)
              MetadataManager.java:1763
         oracle.dss.metadataManager.common.MDObject oracle.dss.metadataManager.client.MetadataManager.getMDObject(java.lang.String, java.lang.String, java.lang.String)
              MetadataManager.java:3323
         oracle.dss.metadataManager.common.MDDimension oracle.dss.metadataManager.client.MetadataManager.getDimension(java.lang.String, java.lang.String)
              MetadataManager.java:3424
         oracle.dss.metadataManager.common.MDDimension oracle.dss.metadataManager.client.MetadataManager.getDimensionByUniqueID(java.lang.String)
              MetadataManager.java:3615

  • How to disconnect from internet for a specified time?

    Hi, I just read about an application that allows you to set times when your computer is disconnected from the internet. Unfortunately, the name of the application was not mentioned, nor whether it runs on a Mac or not. Does anyone know of such an application? It could come in handy in increasing one's kids' (and one's own) productivity.
    Thank you.
    M. Chaouli

    Thank you for the helpful response. What I really want is a program that lets me sever all connections to the internet (e-mail, web, i-chat, etc.) for specified periods of time. Perhaps parental controls allows this. I'll have to look into it.
    Thanks again,
    mc

  • Unable to run Web App for the 2nd Time

    Hi,
    I am using Weblogic 8.1 sp5 as my deploying platform. Using the official tutorials, I am able to export my JSC2 web app into a WAR file that is deployable on my Weblogic server.
    Upon running the application, it works perfectly. However, upon closing my browser and then restarting the browser, running the web app again yields exceptions, please refer to the bottom.
    What am I doing wrong? I am suspecting the web-app wasn't detroyed properly when another instances of it is started...
    Please advise.
    Adams
    Error 500--Internal Server Error
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(Ljavax/faces/context/FacesContext;)V(ViewHandlerImpl.java:601)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:316)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(UploadFilter.java:194)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:326)
         at weblogic.servlet.jsp.PageContextImpl.forward(Ljava/lang/String;)V(PageContextImpl.java:150)
         at jsp_servlet.__jscreator_index._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__jscreator_index.java:122)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6985)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    Caused by: java.lang.RuntimeException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:343)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:328)
         at com.sun.faces.context.ExternalContextImpl.dispatch(Ljava/lang/String;)V(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:130)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:311)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.microsoft.jdbc.base.BaseExceptions.createException(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(ILjava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Lcom/microsoft/jdbc/base/BaseParameters;)V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters()V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.preImplExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal()Ljava/sql/ResultSet;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery()Ljava/sql/ResultSet;(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery()Ljava/sql/ResultSet;(PreparedStatement.java:124)
         at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(Ljavax/sql/RowSetInternal;)V(CachedRowSetXReader.java:193)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute(Ljava/sql/Connection;)V(CachedRowSetXImpl.java:950)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute()V(CachedRowSetXImpl.java:1410)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute()V(CachedRowSetDataProvider.java:1219)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:329)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)

    Well, I have solve this problem myself.. apparently, I used static variables to initalise the app. Changing the static variables to session variables solved the problems.

  • Running JDeveloper 11122 for the 1st time error

    Hello there,
    I just install JDeveloper 1.1.1.2.2 I also did create just an fusion web application to see how is going to run. When I run the application, Windows messages popup to request to keep blocking the java application or unblock the application so I click unblock. Below is the messages I got and every time I run the application I am getting the same messages.
    Can someone help me with this error? How can I fix this problem?
    ** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    C:\Users\Ghislain\AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    \Java\jre6\lib\ext\QTJava.zip was unexpected at this time.
    Process exited.

    user13300876 wrote:
    Hello there,
    I just install JDeveloper 1.1.1.2.2 I also did create just an fusion web application to see how is going to run. When I run the application, Windows messages popup to request to keep blocking the java application or unblock the application so I click unblock. Below is the messages I got and every time I run the application I am getting the same messages.
    Can someone help me with this error? How can I fix this problem?
    ** Using HTTP port 7101 ***
    *** Using SSL port 7102 ***
    C:\Users\Ghislain\AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    \Java\jre6\lib\ext\QTJava.zip was unexpected at this time.
    Process exited.This is an issue with a system class path entry after installing Apple's QuickTime. The release notes for 11.1.2.1 include a workaround - see if this works for you:
    http://www.oracle.com/technetwork/developer-tools/jdev/5rn-shermanu1-496572.html

  • Refresh IE page if computer idle for a specified time with powershell

    Hi,
    I have a Windows 8 pc that i have created a kiosk mode for and i want to be able to check the idle time so that if the idle is more than three minutes it will close all tabs without a warning and navigate the primary tab to a specific web site.
    The script needs to be constantly running i the background, I'll add the script to a scheduled task to start when the user logs in.
    Could you please help me?
    Cheers,
    CredFX

    The Windows 8 computer is a touch screen as well so idle means any mouse movement, keyboard stroke or touch of the screen.
    I have found this from a site that gets the idle time, I'm just not sure how to create the IE navigation part from it.
    Add-Type @'
    using System;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    namespace PInvoke.Win32 {
    public static class UserInput {
    [DllImport("user32.dll", SetLastError=false)]
    private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii);
    [StructLayout(LayoutKind.Sequential)]
    private struct LASTINPUTINFO {
    public uint cbSize;
    public int dwTime;
    public static DateTime LastInput {
    get {
    DateTime bootTime = DateTime.UtcNow.AddMilliseconds(-Environment.TickCount);
    DateTime lastInput = bootTime.AddMilliseconds(LastInputTicks);
    return lastInput;
    public static TimeSpan IdleTime {
    get {
    return DateTime.UtcNow.Subtract(LastInput);
    public static int LastInputTicks {
    get {
    LASTINPUTINFO lii = new LASTINPUTINFO();
    lii.cbSize = (uint)Marshal.SizeOf(typeof(LASTINPUTINFO));
    GetLastInputInfo(ref lii);
    return lii.dwTime;
    Function getidletime
    $Last = [PInvoke.Win32.UserInput]::LastInput
    $Idle = [PInvoke.Win32.UserInput]::IdleTime
    Write-Host ("Idle for " + $Idle.Days + " days, " + $Idle.Hours + " hours, " + $Idle.Minutes + " minutes, " + $Idle.Seconds + " seconds.")

  • Check Sysdate for a specified Time

    Hi,
    I have requirement to check sysdate for particular time in a script,If it has systime is equal to that time in the evening, I need to exit the script and write messages to log file. I am doing the following but it's not working properly, Can anybody help with this?
    if sysdate > to_date('19:20','HH24:MI')then
    v_timeout := 'Y';
    v_output := 'Database Shutdown time... Exiting Script';
    utl_file.put_line(v_file_handle, v_output);
    Thanks
    Kalyan
    exit;
    end if;

    to_date('19:20','HH24:MI')The date out going by this command is the first day of the current month...
    SQL> select sysdate, to_date('19:20','HH24:MI') from dual;
    SYSDATE             TO_DATE('19:20','HH
    14-04-2008 13:19:42 01-04-2008 19:20:00You have to use the current day instead :
    SQL> select sysdate, trunc(sysdate)+19/24+20/1440 from dual;
    SYSDATE             TRUNC(SYSDATE)+19/2
    14-04-2008 13:21:21 14-04-2008 19:20:00Nicolas.
    Paolo, how did you made ? I have a opened window without your response above mine, and an other with your post... hmmm some strange forum behaviour...
    Message was edited by:
    N. Gasparotto

  • Problem running Illustrator CS6 for the first time

    Hi!
    I just installed Illustrator CS6 from the Creative Cloud and the following message appears as I try to start the program "Unable to set maximum number of files to be opened" and then it closes again.
    Can somebody help me?
    Many thanks!

    This was a known bug for some users in 16.0.0. It seems to have gotten fixed in the latest update (16.1.0) that was released end August. Run the update (look under Help > Updates) and hopefully this issue should get resolved.

  • If I sign up for 3g service on my iPAD, can I easily get Verizon to turn it off for a specified time...I might be in a Wifi area...or I might need to save some money on service I don't need for awhile.

    If i sign up for 3g service on m iPAD with Verizon, can I easily discontinue the 3g for awhile when I don't need it; then have Verizon turn it back on when I contact them?  Will they charge me for that on/off service?

    We don't work for Adobe. We are just users.
    You'll want to take this to the proper forum for that product at Adobe PDF Pack (read only)
    Good luck.

  • Email has been running in background for a long time and I need to shut it down and restart empty.

    With hundreds of thousands of emails and 30+ files the program is updating each and taking days. This eats a lot of resources.
    Is it possible to close and delete the entire program and start fresh?

    Look at https://support.mozilla.org/en-US/kb/using-multiple-profiles and create a new profile; DON'T delete your old one yet. The new profile will be 'empty', so you will need to re-enter your email accounts.
    As an additional or alternate step, you can store your old emails in a separate directory or media and then delete them from your active TB folders. See http://barryduggan.info/exportMail.php

  • I am trying to run my registered CS6 Design Standard programs for the first time after install. InDesign runs OK, but Illustrator and Photoshop will only run in trail mode. How do I activate those two?

    I can't get my registered versions of CS6 Photoshop and Illustrator to run in full mode. I installed CS6 Design Standard online end of June (an upgrade from CS5.5), on my old MacBook Pro. I didn't run the programs then as I was waiting on arrival of new MacBook Pro. I migrated the programs from my old MacBook to the new, and today tried to run those programs for the first time. InDesign work OK (after an initial hiccup) but Illustrator and Photoshop will only run in trial mode, and won't let me save files. My CS6 Design Standard shows with it's registration in my Adobe Account. All seems in order, but Illustrator and Photoshop won't run in registered mode. Can you please help?

    Demons1 in the future please only migrate your documents and settings.
    Please use the uninstallers to remove your current installation.  They are located in the Applications/Utilities/Adobe Installers folder.  Once the uninstall is complete you will also want to run the CC Cleaner Tool.  You can find more details at Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
    If you need to download a fresh copy of the installation files for Creative Suite 6 you can do so at Download CS6 products.

Maybe you are looking for

  • I cannot access AOL webmail after upgrading to Firefox 3.6.15

    When trying to access AOL Webmail, I get "Bad Request - Invalid Verb HTTP Error 400. The request verb is invalid."

  • New hard drive and photoshop license problem

    I have a Dell Inspiron 6000 with a 1.5 Ghz Pentium processor, 2 GB of RAM, and Win Xp/Pro SP3. The hard drive in this computer failed, and it has been replaced.  I used an image backup from Acronis True Image 10 to "restore" the new disk. Now, when I

  • Hand Tool Appears and Have to Restart Computer - CS5

    This problem has been going on for quite some time. I'll be working on a project and then out of nowhere the hand tool is activated and I'm no longer able to use any of the other tools. If I quit all the open Adobe programs and restart PS, the hand s

  • Adding an additional mouse

    My Arch 0.6 desktop currently uses a USB mouse.  I just purchased a PS/2 KVM switch for use with this and an additional computer.  Will I have any issues using the KVM device with the PS/2 mouse and my primary desktop, or must I add an entry to my XF

  • Shortcut problem Asha 305

    I formatted my mmc last day so that all data is lost, but in the theme option it still had shortcut of the removed theme ,it also happen for tone option, i still can see the shortcut of the tone that have been gone.,. Please how to fix dis?