Thread Max priority causing Exception

Hello All, (again)
I have written a multithreaded component that is used to access a database and return resultsets.
The way it currently works is main (request thread) contacts a group of 5 threads, notifies them all and they begin executing their own run(). (currently I have simply hardcoded each of there run()) after starting these threads or waking these threads main goes off to an infinate loop where it simply checks a long short circuit if statement. (I know I would be better off to wait/notify main I just haven't got there yet.) While main is looping the pther 5 threads open their connections to the DB and begin extracting info. This runs completely fine as long as the 5 threads priority are left at normal. However when I set the 5 threads priority to Max I periodicly throw an Exception. The stackTrace from the exception is as follows.
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.close(Unknown Source)
at seedsBE.DBAccesor.closeConnection(DBAccesor.java:62)
at seedsMW.FilterThread.run(FilterThread.java:31)
(Sorry dont know how to use the format tags.)
I have tested this several times and it appears that this only happens when I increase the 5 threads priority to max. What or How or is this priority change causeing this error? Is it garbage collection/out of memory issue?
FYI Currently the code is executing on a single processor machine.
Thanks in advance
B.
P.S.How do you get more Duke dollars? Sees as how I always ask more questions than I answer.

"Sounds like you're maybe sharing one JDBC resource among multiple threads, and having a race condition. You'll need to let each thread have their own resources (connection, statement, etc) or properly synchronize access to them to not step on each others' toes (closing in one thread while another is using it, etc). "
I have tried to seperate all the components needed for db comunication to where each individual thread has its own DB connection and likes. I do not believe that any of my code above the jdbc share anything. I also assume that since each thread has its own data base connection I could exceed the database number of connections. But I am not aware that trying to open more connection than possible might cause a problem. I am operating under the assumtion that the oracle connection pool would work magically and handle this for me.
Currently i am only using these 5 threads to contact the data base and I can still throw this exception when threads are at max priority. I did a small stress test and ran 35 threads at once against the connection and this worked fine as long as the threads where norm priority. So I am not thinking that it is a number of connection issue.
Someone above told me to look at the api and try to squeeze out as much info from the exception I can. I am going to look into that now. But all other help and comments are appreciated. I also need to think about syncing these methods but I am not sure, yet, how that can help me since each method is simply using its own run()
Thanks all

Similar Messages

  • Code causing exceptions at its own sweet time and place

    import java.lang.*;
    class newthread implements Runnable
         Thread t;
         int click=0;
         public volatile boolean running=true;
         newthread(int p)
              t=new Thread(this);
              t.setPriority(p);
         void start()
              t.start();
         public void run()
              while(running)
                   click++;
         void start1()
              running=true;
         void stop()
              running=false;     
    class threadpriority2
         public static void main(String argv[])
              newthread ob1=new newthread(Thread.NORM_PRIORITY+2);
              newthread ob2=new newthread(Thread.NORM_PRIORITY-2);
              ob1.start();
              ob2.start();
              try
                   Thread.sleep(5000);
              catch(Exception e)
                   System.out.println("error detected:"+e);
              System.out.println("first one:"+ob1.click);
              System.out.println("first one:"+ob2.click);
              System.out.println("the priority of ob1 is:"+ob1.t.getPriority());
              System.out.println("the priority of ob2 is:"+ob2.t.getPriority());
              ob1.stop();
              ob2.stop();
              ob2.t.setPriority(Thread.NORM_PRIORITY+3);      
              ob1.t.setPriority(Thread.NORM_PRIORITY-3);
              ob1.start1();
              ob2.start1();
              ob1.start();
              ob2.start();
              System.out.println("the priority of ob1 is:"+ob1.t.getPriority());
              System.out.println("the priority of ob2 is:"+ob2.t.getPriority());
              try
                   Thread.sleep(5000);
              catch(Exception e)
                   System.out.println("error detected:"+e);
              ob1.stop();
              ob2.stop();
              System.out.println("first one:"+ob1.click);
              System.out.println("first one:"+ob2.click);
    errors during runtime:
    Exception in thread "main" java.lang.IllegalThreadStateException
    at java.lang.Thread.start(Unknown Source)
    at newthread.start(threadpriority2.java:17)
    at threadpriority2.main(threadpriority2.java:77)
    when i run this code it causes exceptions at its own sweet locations when i run it separately.if once it displays some valid input it would then be followed by the exception
    next time if i run it it will throw exception as soon as i run it at the very start without displaying even an iota of valid data like the previous case
    is ti because the os is placing restrictions on the threads growth or something else.incase there is an error in my code it should atleast pop up the exceptions at one particular loaction in the output and not give different outputs

    1) When you post code, please use and tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    wasnt aware of it.will keep it in mind i post nexttime.sorry for the inconvenience[\b]
    3) You have multiple threads, right? The scheduling of which thread gets how much CPU time when is not subject to your control or prediction, so of course you'll see different timings in subsequent runnings of the same code.[b]actually the problem is not with multiple threads showing different times.whats happening is that exceptions are being thrown randomly at runtime.once when i ran it the exception was displayed at the very beginning of the output and the program snapped.next when i ran it first some output which was slated to be displayed got displayed and then the exceptions appeared in the output.now if the exceptions are thrown at the very beginning its obvious theres some problem at the background coz in the second case that never happened[\b]
    i guess the formatting tips have taken effect[:D]

  • Thread pool throws reject exceptions even though the queue is not full

    Hi. I am using org.springframework.scheduling.concurrent.ThreadPo olTaskExecutor which is based on java
    java.util.concurrent.ThreadPoolExecutor
    with a enviornment under load.
    I see on some cases, that this thread pool throws tasks with reject exception
    even though the queue size is 0.
    According to the documentation, this thread pool should increase the pool size to core size and then wait untill all queue is full to create new threads.
    this is not what happends. for some reason the queue is not filled but exceptions are thrown.
    Any ideas why this can happen?

    This is the stack trace:
    taskExecutorStats-1 2010-04-27 11:01:43,324 ERROR [com.expand.expandview.infrastructure.task_executor] TaskExecutorController: RejectedExecutionException exception in thread: 18790970, failed on thread pool: [email protected]544f07, to run logic: com.expand.expandview.infrastructure.logics.DispatchLogicsProviderLogic
    org.springframework.core.task.TaskRejectedException: Executor [java.util.concurrent.ThreadPoolExecutor@dd9007] did not accept task: com.expand.expandview.infrastructure.task_executor.TaskExecuterController$1@141f728; nested exception is java.util.concurrent.RejectedExecutionException
         at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.execute(ThreadPoolTaskExecutor.java:305)
         at com.expand.expandview.infrastructure.task_executor.TaskExecuterController.operate(TaskExecuterController.java:68)
         at com.expand.expandview.infrastructure.proxies.DataProxy.callLogic(DataProxy.java:131)
         at com.expand.expandview.infrastructure.proxies.DataProxy.operate(DataProxy.java:109)
         at com.expand.expandview.infrastructure.logics.AbstractLogic.operate(AbstractLogic.java:455)
         at com.expand.expandview.server.app.logics.stats.StatsPersisterSingleChunkLogic.persistSlots(StatsPersisterSingleChunkLogic.java:362)
         at com.expand.expandview.server.app.logics.stats.StatsPersisterSingleChunkLogic.doLogic(StatsPersisterSingleChunkLogic.java:132)
         at com.expand.expandview.infrastructure.logics.AbstractLogic.execute(AbstractLogic.java:98)
         at com.expand.expandview.server.app.logics.ApplicationLogic.execute(ApplicationLogic.java:79)
         at com.expand.expandview.infrastructure.task_executor.TaskExecuterControllerDirect.operate(TaskExecuterControllerDirect.java:33)
         at com.expand.expandview.infrastructure.proxies.LogicProxy.service(LogicProxy.java:62)
         at com.expand.expandview.infrastructure.logics.AbstractLogic.service(AbstractLogic.java:477)
         at com.expand.expandview.server.app.logics.stats.StatsPersisterLogic.persist(StatsPersisterLogic.java:48)
         at com.expand.expandview.server.app.logics.stats.StatsPersisterLogic.doLogic(StatsPersisterLogic.java:19)
         at com.expand.expandview.infrastructure.logics.AbstractLogic.execute(AbstractLogic.java:98)
         at com.expand.expandview.server.app.logics.ApplicationLogic.execute(ApplicationLogic.java:79)
         at com.expand.expandview.infrastructure.task_executor.TaskExecuterController$1.run(TaskExecuterController.java:80)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.util.concurrent.RejectedExecutionException
         at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1760)
         at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
         at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:658)
         at org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.execute(ThreadPoolTaskExecutor.java:302)
         ... 19 more

  • Unable to change the thread's priority at linux jdk6

    i try to set the thread's priority to value like Thread.MIN_PRIORITY
    i observe the thread's priority by "threadump"
    the setting is ok at windows (XP + jdk5 build 1.5.0_12-b04)
    but not at linux jdk6 (build 1.6.0_04-b12)
    at linux, i see all threads at my server are with priority "10"
    (e.g. gc, finalizer, http listener etc)
    i am using tomcat (running as root), i have tried to set the "default thread priority", but still can't change the thread's priority
    and i have tried to add jvm options to "turn on" thread priority:
    -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=1
    but still no use
    so i guess this should be a problem of "linux" or jvm
    is there any hint if it is about jvm problem?
    thanks

    Hi David,
    >
    > > #com.sapportals.wcm.repository.manager.reporting.RPRepositoryManager#sap.com/irj#com.sapportals.wcm.repository.manager.reporting.RPRepositoryManager#Guest#0##n/a##9056c970715111de8591000c2942fce3#SAPEngine_Application_Thread[impl:3]_14##0#0#Error##Plain###setting initial ACL on /reporting_backend/reports/Content Administration/User related Cleanup/actioninbox.cleanup - com.sap.security.api.NoSuchRoleException: Role with uniqueName content_admin_role not found!
    >  at com.sap.security.core.imp.RoleFactory.getRoleByUniqueName(RoleFactory.java:1783)
    >  at com.sapportals.wcm.repository.RMAdapter.getResource(RMAdapter.java:228)
    >  at com.sapportals.wcm.repository.runtime.CmAdapter.findResource(CmAdapter.java:1349)
    >  at com.sapportals.portal.prt.dispatcher.Dispatcher.initDispatcher(Dispatcher.java:361)
    >
    Have you check this content_admin_role not found ?
    Thanks
    Sunny

  • Digital graph causes exception in 8.5

    Wanted to port some of my older LV panels to 8.5.  I noticed that LabView would generate the following message when attempting to load one of my panels:
    "Unhandled exception at 0x007513e0 in LabVIEW.exe: 0xC0000005: Access violation reading location 0x00000000"
    The following is a snippit of code from the debugger:
    007513B0  aaa
    007513B1  adc         esi,dword ptr [ebp]
    007513B4  bound       edx,qword ptr [ebx]
    007513B6  jne         007513B8
    007513B8  jnp         007513CD
    007513BA  jne         007513BC
    007513BC  xchg        eax,esp
    007513BD  adc         esi,dword ptr [ebp]
    007513C0  xor         ecx,ecx
    007513C2  xor         eax,eax
    007513C4  test        edx,edx
    007513C6  je          00751461
    007513CC  mov         eax,dword ptr [edx+4]
    007513CF  test        eax,eax
    007513D1  push        esi
    007513D2  mov         esi,dword ptr [edx]
    007513D4  jle         0075145B
    007513DA  mov         edx,dword ptr [edx+8]
    007513DD  push        edi
    007513DE  mov         edi,eax
    007513E0  mov         al,byte ptr [esi]    <<<<************************************************ Dies here
    007513E2  cmp         al,2
    007513E4  jne         007513EB
    007513E6  or          ecx,4
    007513E9  jmp         00751412
    007513EB  cmp         al,5
    Panels like this one are mid sized, containing 10 - 20 sub VIs.  I stripped the panel down to try and find what exactly was causing LV 8.5 to crash.  It turns out to be the digital graph.    I have attached a very simple panel that just contains the digital graph with nothing wired to it.  If you try to run this in 8.5 I am guessing it will cause the problem.  I tried it on a few PCs and get the same results.
    Attachments:
    main.vi ‏20 KB

    Looking at my disks, version 6 appears to have been the first release to support digital graphs.  I remember using as soon as it was available.  
    I tried several tests to see if I could further narrow down the problem for NI.
    I am able to load the raw version 6.0 examples directly into 8.5.  
    1) I saved version 6.0 example  "Simple Digital Waveform Graph" (SDWG) into a seperate VI.   It loads in both 6.1 and 8.5 with no exception.
    2) Loaded main.vi example and copied it into the SDWG using 6.1.   Causes exception in 8.5
    3) Connect the two graphs together in example so digital data is shown on both graphs, then saved the values as defaults.  This version loads in 8.5 with no exception.
    4) Start with main.vi, clear all the waveform data and save as defaults.  Causes exception in 8.5
    So, problem appears to have nothing to do with the cursors but does appear to be something with the data that had been stored into this graph when the defaults were saved.   It is really strange that clearing the data does not solve the problem.  Maybe this is a bigger problem than I originally thought.   
    Message Edited by lecroy on 10-09-2008 01:07 PM

  • LORD - ERP Error ERP_LORD_GET_HEAD caused exception EXC_LORD_NOT_LOADED

    Hello,
    We have an CRM 7.0 system linked to EHP4 ECC.
    We have implemented LEAN Order Interface.
    Now while saving an ERP Sales Order from CRM Screen, it gives an errror saying "ERP Interfaced stopped / failed unexpectedly".
    We have implemented enhancement spot ENH_SPOT_LORD for the same in ECC.
    No Detailed error description is appearing, no application log is being written, neither in ECC nor in CRM.
    Required Switches are also made activated in SWF5. Mapping Structures are also mapped in LORD_MAPPING and LORD_MAPPING_RO.
    error message that I get is : ERP_LORD_GET_HEAD caused exception EXC_LORD_NOT_LOADED
    Can some1 please help the BADI's and the mandatory methods that needs to be over written in Enhancement.
    Or can some1 please tell where I am going wrong?
    Thanks & Regards,
    Narendra.

    Hi Narendra,
    Did you get a solution to this please?
    Thks,
    William

  • Finally cause Exception be forgotten

    In trying out that finally cause previous return value be forgotten, as described on page 206 of "The Java Programming Language, 3rd edition", I wrote the following code, and tested it with jdk1.3.1. To my supprise, not only the return value was forgotten, the exception was appeared forgotten as well:
    class PException extends Exception {
    class Final {
        void f1(int i) {
         int result;
         System.out.println("f1("+i+")");
         try {
             result = f2(i);
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("caught an Exception: " + e);
         try {
             result = f3(i);
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("caught an Exception: " + e);
        int f2(int i) throws PException {
         try {
             if (i == 1) {
              System.out.println("generate exception");
              throw new PException();
             return 1;
         } finally {
             return 2;
        int f3(int i) throws PException {
         if (i == 1) {
             System.out.println("generate exception");
             throw new PException();
         return 1;
        public static void main(String[] args) {
         Final f = new Final();
         f.f1(1);
         f.f1(2);
         f.f1(1);
    }Here is the result:
    f1(1)
    generate exception
    result = 2
    generate exception
    caught an Exception: PException
    f1(2)
    result = 2
    result = 1
    f1(1)
    generate exception
    result = 2
    generate exception
    caught an Exception: PException

    The concern here is that when the
    try {
    finally {
    }pattern is used, without the catch block, purelly for flow control purpose, a return statement in the finally block could be problematic. If a finally block ends with a return statement, any exception that might be thrown in the try block would be ignored. The unhandled exception will not propergate, it simply lost in the midst. Because any code could throw unchecked exception, if the exception cannot afford to be lost, then one should be careful not to use return in the finally block. See the following test code:
    class Finally {
        void test() {
         int result;
         System.out.println("test()");
         try {
             result = f1();
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             result = f2();
             System.out.println("result = " + result);
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             f3();
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
         try {
             f4();
         } catch(Exception e) {
             System.out.println("Caught an Exception: " + e);
        int f1() {
         System.out.println("f1()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
             return b; // this return clobber the unchecked exception
        int f2() {
         System.out.println("f2()");
         int a = 0;
         int b = 0;
         a = 1/0; // this generate an unchecked exception
         b = 1;
         return b;
        void f3() {
         System.out.println("f3()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
             return;   // this return clobber the unchecked exception
        void f4() {
         System.out.println("f4()");
         int a = 0;
         int b = 0;
         try {
             a = 1/0;  // this generate an unchecked exception
             b = 1;
         } finally {
        public static void main(String[] args) {
         Finally f = new Finally();
         f.test();
    /code]
    Here are the results:test()
    f1()
    result = 0
    f2()
    Caught an Exception: java.lang.ArithmeticException: / by zero
    f3()
    f4()
    Caught an Exception: java.lang.ArithmeticException: / by zero
    We see that the devide by zero exception throw by f1() simply vanished, the unintended result 0, instead of the intended result 1, is returned. The test() method did not detect any abnormality in f1(), which is scary. To drive the point home, we try f3() and f4(), which has void return type. A simple return statement in f3() causes exception be lost. The stack frame seems intact, for otherwise, the test() method would exit abruptly before f2() even get a chance to be called.

  • Emulator Threading Issue: Null Reference Exception with CloudQueue.CreatIfNotExists

    I am using Azure 2.2 SDK and Storage library (2.1.0.1).
    var queueClient = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient();
    var queue = queueClient.GetQueueReference("etsuttest");
    for (int index = 0; index < 2; ++index)
     Task.Factory.StartNew(() => GetCommand(queueClient));
    GetCommand(queueClient);
    private void GetCommand(CloudQueueClient queueClient)
     int counter = 0;
     var queue = queueClient.GetQueueReference("test");
     while true)
      queue.CreateIfNotExists();
     // Dequeue code..
      Thread.Sleep(1000);
    The exception:
    Microsoft.WindowsAzure.Storage.StorageException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
    Result StackTrace: 
    at Microsoft.WindowsAzure.Storage.Shared.Protocol.HttpResponseParsers.ProcessExpectedStatusCodeNoException[T](HttpStatusCode[] expectedStatusCodes, HttpStatusCode actualStatusCode, T retVal, StorageCommandBase`1 cmd, Exception ex)
       at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.<CreateQueueImpl>b__14(RESTCommand`1 cmd, HttpWebResponse resp, Exception ex, OperationContext ctx)
       at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase`1 cmd, IRetryPolicy policy, OperationContext operationContext)
     --- End of inner exception stack trace ---
        at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase`1 cmd, IRetryPolicy policy, OperationContext operationContext)
       at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.Create(QueueRequestOptions options, OperationContext operationContext)
       at Microsoft.WindowsAzure.Storage.Queue.CloudQueue.CreateIfNotExists(QueueRequestOptions options, OperationContext operationContext)
       at GetCommand(CloudQueueClient queueClient) in

    Thank you for reporting this and we apologize for the inconvenience. We will fix this issue in an upcoming release.

  • How to set causing Exception correctly?

    I'm trying to nest exceptions. I've written a JUnit tests which does this, but while it works for simple nesting, it doesn't for my more complex Exception.
    The following works:
            Exception e1 = new Exception("bla");
            Exception e2 = new Exception("whatever");
            e1.initCause(e2);
            Assert.assertEquals(e2, e1.getCause());
            Exception e3 = new Exception("yet another exception");
            e2.initCause(e3);
            Assert.assertEquals(e3, e1.getCause().getCause());
            Exception e4 = new Exception("yawn");
            e3.initCause(e4);
            Assert.assertEquals(e4, e1.getCause().getCause().getCause());The following doesn't:
         * The exception to use when a Hibernate transaction can't be ended.
         * The causes of this are created according to the given exceptions.
         * If <code>exception</code> exists:
         * <pre>
         * this
         * |
         * +--> exception
         *      |
         *      +--> hibernateException1
         *           |
         *           +--> hibernateException2 (if it exists)
         * </pre>
         * If <code>exception</code> is <code>null</code>:
         * <pre>
         * this
         * |
         * +--> hibernateException1
         *      |
         *      +--> hibernateException2 (if it exists)
         * </pre>
         * @param errorMessage The error message to show
         * @param exception The exception coming from the business process, which may be <code>null</code>
         * @param hibernateException1 The first Hibernate exception, which <strong>must exist</strong>
         * @param hibernateException2 The second Hibernate exception, which may be <code>null</code>
        public RecoverableSystemException(String errorMessage, Exception exception, HibernateException hibernateException1, HibernateException hibernateException2) {
            super(errorMessage, getCause(exception, hibernateException1, hibernateException2));
         * Gets the causing exception for {@link #RecoverableSystemException(String, Exception, HibernateException, HibernateException)}.
         * @param exception The exception coming from the business process, which may be <code>null</code>
         * @param hibernateException1 The first Hibernate exception, which <strong>must exist</strong>
         * @param hibernateException2 The second Hibernate exception, which may be <code>null</code>
         * @return The causing exception to use for the constructor
        private static Exception getCause(Exception exception, HibernateException hibernateException1, HibernateException hibernateException2) {
            if (hibernateException2 != null && hibernateException1 != null) {
                hibernateException1.initCause(hibernateException2);
            if (exception == null) {
                return hibernateException1;
            else {
                if (hibernateException1 != null) {
                    exception.initCause(hibernateException1);
                return exception;
        }with the test looking like this:
            this.hibernateException1 = new HibernateException("h1");
            this.hibernateException2 = new HibernateException("h2");
            this.businessProcessException = new Exception("e1");
            RecoverableSystemException recoverableSystemException = new RecoverableSystemException("Test", null, this.hibernateException1, this.hibernateException2);
            Assert.assertEquals("Checking Hibernate exception 1", this.hibernateException1, recoverableSystemException.getCause());
            // THIS FAILS
            Assert.assertEquals("Checking Hibernate exception 2", this.hibernateException2, recoverableSystemException.getCause().getCause());Any help would be greatly appreciated!

    initCause is rarely if ever used. It is possible that the way HibernateException is written does not support the use of this call. Have a look at its source to find out if it does.

  • JEditorPane PageLoader thread causing exceptions, not on EDT

    Hello,
    I have a swing GUI that creates a JEditorPane component and loads up an HTML file using the setPage() method to finally display it. I'm occaisionally getting NullPointerExceptions and ArrayIndexOutOfBoundsExceptions when running the GUI. It is apparent that the JEditor pane spawns a page loading process to load up the HTML. When the loading completes, this page loading thread signals the swing JEditorPane component to update its display. Because the signalling is being done from the pageloader thread and not from the EDT it seems to be creating race conditions and therefore the exceptions.
    An example of the typical stacktrace thrown is:
    Exception in thread "Thread-6" java.lang.NullPointerException
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:97)
    at javax.swing.text.FlowView$LogicalView.loadChildren(FlowView.java:684)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.FlowView.loadChildren(FlowView.java:122)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.FlowView.setParent(FlowView.java:272)
    at javax.swing.text.html.ParagraphView.setParent(ParagraphView.java:58)
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.BoxView.replace(BoxView.java:164)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:97)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.html.BlockView.setParent(BlockView.java:55)
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.BoxView.replace(BoxView.java:164)
    at javax.swing.text.html.TableView$RowView.replace(TableView.java:1457)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:97)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.BoxView.replace(BoxView.java:164)
    at javax.swing.text.html.TableView.replace(TableView.java:896)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:97)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.html.TableView.setParent(TableView.java:800)
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.BoxView.replace(BoxView.java:164)
    at javax.swing.text.CompositeView.loadChildren(CompositeView.java:97)
    at javax.swing.text.CompositeView.setParent(CompositeView.java:122)
    at javax.swing.text.html.BlockView.setParent(BlockView.java:55)
    at javax.swing.text.html.HTMLEditorKit$HTMLFactory$BodyBlockView.setParent(HTMLEditorKit.java:1277)
    at javax.swing.text.CompositeView.replace(CompositeView.java:200)
    at javax.swing.text.BoxView.replace(BoxView.java:164)
    at javax.swing.text.View.updateChildren(View.java:1095)
    at javax.swing.text.View.insertUpdate(View.java:679)
    at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1590)
    at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1849)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
    at javax.swing.text.DefaultStyledDocument.create(DefaultStyledDocument.java:145)
    at javax.swing.text.html.HTMLDocument.create(HTMLDocument.java:281)
    at javax.swing.text.html.HTMLDocument$HTMLReader.flushBuffer(HTMLDocument.java:3323)
    at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:2127)
    at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:231)
    at javax.swing.JEditorPane.read(JEditorPane.java:557)
    at javax.swing.JEditorPane.read(JEditorPane.java:585)
    at javax.swing.JEditorPane$PageLoader.run(JEditorPane.java:648) As can be seen from the stack trace, the javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) line is called from the PageLoader.run thread which attempts to manipulate the swing component.
    I haven't prepared a small compact test case for this yet as it is a race condition and only occurs under certain timings. The GUI on my machine throws these exceptions on almost every second run but far less frequently on another test machine.
    I'm using Java 6 u 13 b 3 in linux ubuntu Jaunty.
    Is there a way to load the page synchronously or to correctly load the page without causing these exceptions?
    Thanks,
    Mark
    Edited by: Mark_Silberbauer on Jun 9, 2009 11:30 AM

    I would try to create a HTMLDocument instance and read content there by the kit you use. When the document's filling is finished just call editorPane.setDocument() in EDT.
    Regards,
    Stas

  • SO Wait causes exception occurred within external code called by call library node

    when trying to run some old code that used to work ok, i now get this error message:
    exception occurred within external code called by call library node
    and the vi flagged as calling the exception is SO Wait. the error occurs with different soundcards. does anyone know what is causing this problem?

    Hi Kreuters
    It sounds as if you have a case of memory corruption. Which version of LabVIEW and DAQ (traditonal or DAQmx) are you running and also on which operating system?
    would it be possible for you to post your VI on this thread? in some cases there are ways to fix the problem
    Regards
    YatinM
    NIUK

  • NAM 3.2 external attribute source policy cause Exception

    I tried to use the example in NAM SDK for External Attribute Source
    policy, the package is downloaded here:
    http://tinyurl.com/4uvb8rp
    After following the instruction to enable the policy in IDP, the update
    failed, I looked at the log file and found this exception during start:
    java.lang.InstantiationException
    There is no further information or exception stack trace in the log.
    Have any one done this successfully? Any idea what may cause this
    problem? I didn't notice that the java class in the examples don't have
    default constructor, I tried adding one that cause a different
    exception.
    Any help is appreciated.
    Thanks
    Mark
    mxu1386
    mxu1386's Profile: https://forums.netiq.com/member.php?userid=1361
    View this thread: https://forums.netiq.com/showthread.php?t=50412

    This is solved, I used wrong class name, should use the factory class.
    Thanks
    Mark
    mxu1386
    mxu1386's Profile: https://forums.netiq.com/member.php?userid=1361
    View this thread: https://forums.netiq.com/showthread.php?t=50412

  • Printing in Java 1.4 - printJob.getGraphics() causes exception

    Hi,
    I'm trying to print (using java 1.4) however the code
    'printJob.getGraphics()' (where printJob is a PrintJob object) seems to cause an exception (see below..)
    Could anyone please tell me a bit more about what this exception means?
    Thanks a lot!
    Kat
    Here's the exception:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D0844C6
    Function=Java_sun_awt_windows_WPrinterJob_setNativePrintService+0x19D
    Library=C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\awt.dll
    Current Java thread:
    at sun.awt.windows.WPrinterJob.setNativePrintService(Native Method)
    at sun.awt.windows.WPrinterJob.setPrintService(WPrinterJob.java:384)
    at sun.print.RasterPrinterJob.getPrintService(RasterPrinterJob.java:354)
    at sun.awt.windows.WPrinterJob.getPrintService(WPrinterJob.java:408)
    at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:997)
    at sun.print.PrintJob2D.run(PrintJob2D.java:529)
    at java.lang.Thread.run(Thread.java:536)
    Dynamic libraries:
    0x00400000 - 0x00406000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\bin\java.exe
    0x77F50000 - 0x77FF9000 C:\WINDOWS\System32\ntdll.dll
    0x77E60000 - 0x77F45000 C:\WINDOWS\system32\kernel32.dll
    0x77DD0000 - 0x77E5B000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77CC0000 - 0x77D35000 C:\WINDOWS\system32\RPCRT4.dll
    0x77C10000 - 0x77C63000 C:\WINDOWS\system32\MSVCRT.dll
    0x6D330000 - 0x6D45C000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\client\jvm.dll
    0x77D40000 - 0x77DCD000 C:\WINDOWS\system32\USER32.dll
    0x77C70000 - 0x77CB0000 C:\WINDOWS\system32\GDI32.dll
    0x76B40000 - 0x76B6C000 C:\WINDOWS\System32\WINMM.dll
    0x76390000 - 0x763AA000 C:\WINDOWS\System32\IMM32.DLL
    0x629C0000 - 0x629C8000 C:\WINDOWS\System32\LPK.DLL
    0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32\USP10.dll
    0x6D1D0000 - 0x6D1D7000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\hpi.dll
    0x6D300000 - 0x6D30D000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\verify.dll
    0x6D210000 - 0x6D229000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\java.dll
    0x6D320000 - 0x6D32D000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\zip.dll
    0x6D260000 - 0x6D27C000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\jdwp.dll
    0x501D0000 - 0x501D5000 C:\JBuilder4\jdk1.3\bin\dt_socket.dll
    0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32\ws2_32.dll
    0x71AA0000 - 0x71AA8000 C:\WINDOWS\System32\WS2HELP.dll
    0x71A50000 - 0x71A8B000 C:\WINDOWS\System32\mswsock.dll
    0x76F20000 - 0x76F45000 C:\WINDOWS\System32\DNSAPI.dll
    0x76FB0000 - 0x76FB7000 C:\WINDOWS\System32\winrnr.dll
    0x76F60000 - 0x76F8C000 C:\WINDOWS\system32\WLDAP32.dll
    0x76FC0000 - 0x76FC5000 C:\WINDOWS\System32\rasadhlp.dll
    0x71A90000 - 0x71A98000 C:\WINDOWS\System32\wshtcpip.dll
    0x6D000000 - 0x6D0FA000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\awt.dll
    0x73000000 - 0x73023000 C:\WINDOWS\System32\WINSPOOL.DRV
    0x771B0000 - 0x772CA000 C:\WINDOWS\system32\ole32.dll
    0x5AD70000 - 0x5ADA4000 C:\WINDOWS\system32\uxtheme.dll
    0x6D180000 - 0x6D1D0000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\fontmanager.dll
    0x51000000 - 0x51044000 C:\WINDOWS\System32\ddraw.dll
    0x73BC0000 - 0x73BC6000 C:\WINDOWS\System32\DCIMAN32.dll
    0x6D910000 - 0x6D981000 C:\WINDOWS\System32\D3DIM.DLL
    0x210F0000 - 0x21114000 C:\WINDOWS\System32\Hook98.dll
    0x6D2A0000 - 0x6D2C1000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\jsound.dll
    0x72D20000 - 0x72D29000 C:\WINDOWS\System32\wdmaud.drv
    0x72D10000 - 0x72D18000 C:\WINDOWS\System32\msacm32.drv
    0x77BE0000 - 0x77BF4000 C:\WINDOWS\System32\MSACM32.dll
    0x77BD0000 - 0x77BD7000 C:\WINDOWS\System32\midimap.dll
    0x6D130000 - 0x6D152000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\dcpr.dll
    0x6D100000 - 0x6D123000 C:\Program Files\s1studio_jdk\j2sdk1.4.1\jre\bin\cmm.dll
    0x763B0000 - 0x763F5000 C:\WINDOWS\system32\COMDLG32.DLL
    0x772D0000 - 0x77333000 C:\WINDOWS\system32\SHLWAPI.dll
    0x77340000 - 0x773CB000 C:\WINDOWS\system32\COMCTL32.dll
    0x69800000 - 0x69FEE000 C:\WINDOWS\system32\SHELL32.dll
    0x71950000 - 0x71A34000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_x-ww_1382d70a\comctl32.dll
    0x21F10000 - 0x21F17000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\2\HPBF0010.DLL
    0x21F30000 - 0x21FA4000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\2\HPBF0016.dll
    0x21FB0000 - 0x21FC0000 C:\WINDOWS\System32\MSVCIRT.dll
    0x21FC0000 - 0x220D2000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\2\HPBF0013.DLL
    0x220E0000 - 0x220FE000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\2\HPBF0011.DLL
    0x77C00000 - 0x77C07000 C:\WINDOWS\system32\VERSION.dll
    0x6E680000 - 0x6E6B9000 C:\WINDOWS\System32\COMPSTUI.dll
    0x76380000 - 0x76385000 C:\WINDOWS\System32\MSIMG32.dll
    0x22100000 - 0x2210F000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\2\HPBAFD32.DLL
    0x76C90000 - 0x76CB2000 C:\WINDOWS\system32\imagehlp.dll
    0x6D510000 - 0x6D58C000 C:\WINDOWS\system32\DBGHELP.dll
    0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32\PSAPI.DLL
    Local Time = Tue Feb 18 15:37:46 2003
    Elapsed Time = 22
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1-b21 mixed mode)
    # An error report file has been saved as hs_err_pid3640.log.
    # Please refer to the file for further information.

    I have this problem, too. I have seen numerous references to it in the forum, but no solution - not even something to try! I have tried printing to the same printer using an HP LaserJet III driver and had success, but then IT ALSO STARTED GETTING THE SAME EXCEPTION!!! The same code on another PC has no errors and runs every time. We are comparing to see what the difference is between the two machines in hopes of finding a solution. But the one that fails worked yesterday! We really could use some help on this one...

  • Message worker threads maxed

    Hello,
    Friday I was experimenting with a global signature, assigned to the PO and trying to get it to work. In the the mean time the server abended. After rebooting I noticed that the signature started working but that the message worker threads where maxed out and messages started queueing in 4 and 5. I ran a post office repair over night and this morning things seemed better. I then turned off the global signature and now things are slow again and threads are again maxed out. Is this a normal behavior? Does the signature associate to every user in the PO? Or is something just wrong with my PO that I need to repair.
    Some of my settings:
    GroupWise Post Office Agent
    Up Time: 0 Days 0 Hours 49 Minutes [PO]
    Total
    C/S Users 623
    Remote/Caching Users 14
    Application Connections 791
    Physical Connections 129
    IMAP Sessions 0
    SOAP Sessions 0
    Priority Queues 0
    Normal Queues 3545
    GWCheck Auto Queues 0
    GWCheck Scheduled Queues 0
    Thread Status
    Total Busy
    C/S Handler Threads 29 16
    Message Worker Threads 20 20
    GWCheck Worker Threads 4 0
    IMAP Threads 4 0
    SOAP Threads 2 0
    Message Transfer Status Open
    Thanks in advance

    csupers,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • What causes exception.getMessage() = null?

    i have a piece of code in a servlet like this:
    try{}
    catch(Throwable theException)
    String msg = theException.getMessage();
    there are occasions when the msg is null. wonder if someone can shed some lights on what kind of exceptions will cause msg = null. thanks

    You can use instance variables in a servlet- like any
    other java class. However, it is not normally
    necessary to have instance variables in a servlet
    (since they usually just act as a navigation
    controller) and you must be very careful in how you
    use such variables since only one instance of a
    servlet is typically invoked and all threads share the
    variables of that instance. As a general rule of
    thumb, it is best to avoid instance variables on a
    servlet. In many ways, the design needs around
    instance variables in a servlet are closer to the
    design needs of class variables, since you have so
    many resources accessing the same reference field.
    The people around you may have over-stated the point,
    but their pushing you in the right direction.This guy is probably totally right and I talking out of my ass. I know there is an issue but my servlet work has been limited as of late.

Maybe you are looking for

  • Is there any possible way I can dual boot Windows with OSX 10.7.2 on a MacBook Pro 15' from 2006?

    Hello, I am new to this forums. I have searched about dual boot win/mac, but couldn't find a clear answer, so I decided to post this now. I run a MacBook Pro 15' from 2006 (Intel based) and have upgraded it to OSX 10.7.2 Lion. I have tried to install

  • Time capsule slow when transferring files over wifi - please help!

    Well - the problem started after the insallation of Lion. It takes around 1 min to transferre 8 mb. So if i want to see a film from the TC i need to cable it and thats not realy the point of having a wireless harddisk. I have turn spotlight off I hav

  • Using the Alphabets & + in keypad

    When I make a international call on a BB or other phone, I end up typing  "+ <countrycode> <number>" How to use the "+" on the iPhone keypad? Can the alphabets be used to dial using the name of the contact? Smart phones have the feature to select use

  • Finally here, some questions please!

    Dear all, After months of holding off and waiting for an update, I finally gave in and got my imac. It is sweet! 3.06 Ghz model, 24" with nvidia 8800 gs plus wirless keyboard/mouse. I just wanted to ask... 1) I got Apple care. I opened the box and th

  • Fatal problem.. Please help me..

    Hi all I have a fatal problem when executing any Java based application. when running an webApplication I get this error: Null pointer exception Internal error 500 When running a server-client application I get this one: java.io.exception No output f