Java application hangs during running java native method

Hello,
There is compiled java application.
It hangs at very begginings.
It was detected that in the beggining a new Frame should be created. Then one java library invokes native method. During invoking of the native method application hangs.
Stack is available only until native method invocation.
Thread 25196 "main": (state = IN_NATIVE)
at sun.awt.X11GraphicsDevice.getDoubleBufferVisuals(Native Method)
at sun.awt.X11GraphicsDevice.getDefaultConfiguration(X11GraphicsDevice.java:181)
at java.awt.Window.init(Window.java:271)
at java.awt.Window.<init>(Window.java:319)
at java.awt.Frame.<init>(Frame.java:419)
at javax.swing.JFrame.<init>(JFrame.java:194)
at com.test.ORBManager.Splash.<init>(Splash.java:10)
at com.test.ORBManager.Splash.main(Splash.java:48)
Method getDoubleBufferVisuals(int screen) is used to enumerates all visuals that support double buffering (according to comments in the source code).
Tried to run with "-verbose" options...
I tried to use jconsole &#1080; jvisualvm. But did not find anything special.
Also "strace" command showed some results but do not know how to proceed:
select(6, [5], [5], NULL, NULL) = 1 (out [5])
writev(5, [{"b\0\6\0\r\0\0\0DOUBLE-BUFFER\0\0\0", 24}], 1) = 24
select(6, [5], [], NULL, NULL) = 1 (in [5])
read(5, "\1\0\t\0\0\0\0\0\1\211\0\204\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32
read(5, 0x83b57bc, 4096) = -1 EAGAIN (Resource temporarily unavailable)
gettimeofday({1275494877, 569746}, NULL) = 0
select(6, [5], [5], NULL, NULL) = 1 (out [5])
writev(5, [{"b\0\6\0\r\0\0\0DOUBLE-BUFFER\0\0\0", 24}], 1) = 24
select(6, [5], [], NULL, NULL) = 1 (in [5])
read(5, "\1\0\n\0\0\0\0\0\1\211\0\204\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 32
read(5, 0x83b57bc, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(6, [5], [5], NULL, NULL) = 1 (out [5])
writev(5, [{"\211\6\3\0\1\0\0\0&\0\0\0", 12}], 1) = 12
select(6, [5], [], NULL, NULL) = 1 (in [5])
read(5, "\1\0\v\0\f\0\0\0\1\0\0\0\377\32\0\0\377\r\307 \0\0\0\0\0\23\372\300\376\3346\34"..., 4096) = 44
read(5, 0x83c31e4, 36) = -1 EAGAIN (Resource temporarily unavailable)
select(6, [5], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
I have downloaded from the internet the source code of native method but do not know what I can do with it.
Is it possible to debug native method somehow?
How to detect where the library contans the native method is located?
What other ways can provide more information about reason.
It seems that the problem is related to graphics. Judging by class name "X11GraphicsDevice" it is related to X server. May be some server settings?
The problem is present on SLED 11 machines.
It is not reproduced on SLED 10.
I will be really appreciate for any help.
Thanks in advance.
Vasily.

Hi,
Thanks for tip. I used jstack. It gives a little bit more info but I have to few knoledges how to treat the info.
----------------- 24231 -----------------
----------------- 24317 -----------------
0xffffe430     ????????
0x6dd12229     ????????
0xb0ca5898     * java.net.PlainSocketImpl.socketAccept(java.net.SocketImpl) bci:0 (Interpreted frame)
0xb0c9fb6b     * java.net.PlainSocketImpl.accept(java.net.SocketImpl) bci:7 line:384 (Interpreted frame)
0xb0c9fb6b     * java.net.ServerSocket.implAccept(java.net.Socket) bci:50 line:450 (Interpreted frame)
0xb0c9fb6b     * java.net.ServerSocket.accept() bci:48 line:421 (Interpreted frame)
0xb0c9fa94     * sun.rmi.transport.tcp.TCPTransport.run() bci:59 line:340 (Interpreted frame)
0xb0c9fe71     * java.lang.Thread.run() bci:11 line:595 (Interpreted frame)
0xb0c9d236     <StubRoutines>
0xb6f38eac     _ZN9JavaCalls11call_helperEP9JavaValueP12methodHandleP17JavaCallArgumentsP6Thread + 0x1bc
0xb7108aa8     _ZN2os20os_exception_wrapperEPFvP9JavaValueP12methodHandleP17JavaCallArgumentsP6ThreadES1_S3_S5_S7_ + 0x18
0xb6f38705     _ZN9JavaCalls12call_virtualEP9JavaValue11KlassHandle12symbolHandleS3_P17JavaCallArgumentsP6Thread + 0xd5
0xb6f3879e     _ZN9JavaCalls12call_virtualEP9JavaValue6Handle11KlassHandle12symbolHandleS4_P6Thread + 0x5e
0xb6fb0765     _Z12thread_entryP10JavaThreadP6Thread + 0xb5
0xb71a9373     _ZN10JavaThread3runEv + 0x133
0xb71096b8     _Z6_startP6Thread + 0x178
0xb781a1b5     start_thread + 0xc5
----------------- 24318 -----------------
0xffffe430     ????????
0x1b7bfaf0     ????????
----------------- 24373 -----------------
0xffffe430     ????????
0xb71087be     _ZN2os5Linux14safe_cond_waitEP14pthread_cond_tP15pthread_mutex_t + 0xae
0xb70fe2af     _ZN13ObjectMonitor4waitExiP6Thread + 0xa6f
0xb718bdc6     _ZN18ObjectSynchronizer4waitE6HandlexP6Thread + 0x56
0xb6f925e3     JVM_MonitorWait + 0x163
0xb0ca5898     * java.lang.Object.wait(long) bci:0 (Interpreted frame)
0xb0c9fb6b     * java.lang.ref.ReferenceQueue.remove(long) bci:44 line:120 (Interpreted frame)
0xb0c9fa94     * java.lang.ref.ReferenceQueue.remove() bci:2 line:136 (Interpreted frame)
0xb0c9fa94     * sun.java2d.Disposer.run() bci:3 line:125 (Interpreted frame)
0xb0c9fe71     * java.lang.Thread.run() bci:11 line:595 (Interpreted frame)
0xb0c9d236     <StubRoutines>
0xb6f38eac     _ZN9JavaCalls11call_helperEP9JavaValueP12methodHandleP17JavaCallArgumentsP6Thread + 0x1bc
0xb7108aa8     _ZN2os20os_exception_wrapperEPFvP9JavaValueP12methodHandleP17JavaCallArgumentsP6ThreadES1_S3_S5_S7_ + 0x18
0xb6f38705     _ZN9JavaCalls12call_virtualEP9JavaValue11KlassHandle12symbolHandleS3_P17JavaCallArgumentsP6Thread + 0xd5
0xb6f3879e     _ZN9JavaCalls12call_virtualEP9JavaValue6Handle11KlassHandle12symbolHandleS4_P6Thread + 0x5e
0xb6fb0765     _Z12thread_entryP10JavaThreadP6Thread + 0xb5
0xb71a9373     _ZN10JavaThread3runEv + 0x133
0xb71096b8     _Z6_startP6Thread + 0x178
0xb781a1b5     start_thread + 0xc5
----------------- 24227 -----------------
0xffffe430     ????????
0x6cbc4021     ????????
0x6cbc232a     ????????
0x6cbc3c9a     ????????
0x6cc1d5d1     ????????
0x6d41013f     ????????
0x6d460f19     ????????
0xb0ca5898     * sun.awt.X11GraphicsDevice.getDoubleBufferVisuals(int) bci:0 (Interpreted frame)
0xb0c9fb6b     * sun.awt.X11GraphicsDevice.getDefaultConfiguration() bci:140 line:181 (Interpreted frame)
0xb0c9fa94     * java.awt.Window.init(java.awt.GraphicsConfiguration) bci:51 line:271 (Interpreted frame)
0xb0c9fb6b     * java.awt.Window.<init>() bci:66 line:319 (Interpreted frame)
0xb0c9fb6b     * java.awt.Frame.<init>(java.lang.String) bci:1 line:419 (Interpreted frame)
0xb0c9fb6b     * javax.swing.JFrame.<init>(java.lang.String) bci:2 line:194 (Interpreted frame)
0xb0c9fb6b     * com.test.ORBManager.Splash.<init>() bci:3 line:10 (Interpreted frame)
0xb0c9fb6b     * com.test.ORBManager.Splash.<init>(java.lang.String[]) bci:4 line:48 (Interpreted frame)
0xb0c9d236     <StubRoutines>
0xb6f38eac     _ZN9JavaCalls11call_helperEP9JavaValueP12methodHandleP17JavaCallArgumentsP6Thread + 0x1bc
0xb7108aa8     _ZN2os20os_exception_wrapperEPFvP9JavaValueP12methodHandleP17JavaCallArgumentsP6ThreadES1_S3_S5_S7_ + 0x18
0xb6f38cdf     _ZN9JavaCalls4callEP9JavaValue12methodHandleP17JavaCallArgumentsP6Thread + 0x2f
0xb6f638b2     _Z17jni_invoke_staticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP6Thread + 0x152
0xb6f54ac2     jni_CallStaticVoidMethod + 0x122
0x08049873     ????????
0xb76c9705     ????????The last stack also has "sun.awt.X11GraphicsDevice.getDoubleBufferVisuals(int) bci:0 (Interpreted frame)" but what tode next?
Also I found that the native code is in java 1.5 source code: \j2se\src\solaris\native\sun\awt\awt_GraphicsEnv.c.
How it is possible to compile it?

Similar Messages

  • Application hangs while running a report from Forms

    Hi all,
    I am getting a problem regarding running reports from Oracle forms application for printing in a shared printer at client system. There is no problem when I set the DESTYPE to HTMLCSS or FILE. But when I set it to PRINTER then the application hangs and report server gets busy. Once this problem occurs other reports from other client systems are not generating even if this is a HTMLCSS or FILE type.
    The thing is the application has ran successfully for two months. Suddenly from last few days the problem is arising.
    Few things that I have noticed:
    1) When the application hangs I cheked the Task manager, where the process rwlpr.exe is running. If I manually ends the process there the application comes back with a message 'unable to run report'.
    2) I have checked few log files, where I have found few log files whose names end with a job number. The file generates from a succesfully running report shows few steps tht end s with closing the printer. But the file that is generated from an unsuccessfull job stops at the step 'Opening Printer //<machine name>/<printer share name>'.
    3) Then finally I have changed the DESTYPE to file and using the HOST command printing the text file to shared printer in dos mode. Its working fine. But often the first problem arises again.
    What are the possible resons that may cause this problem.
    Looking for your positive response.
    Thanks and regards
    Sandy

    From dos prompt I have used the type commad.
    From server machine in dos prompt I have used,
    type d:\rep.txt > \\<client machine name>\<printer shared name that is connected to client printer>
    from Server machine I have opened a Notepad doc, File >Print >Selected the printer that is in client machine.
    This works fine.
    Now my code to print a report directly to printer,
    V_PRINTERNAME := '\\mmondal\mmondalprn'; -- shared Printer name at Client machine
    repid := find_report_object('REP_BANK_MST');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,V_PRINTERNAME);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'kt30');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no P_ISPOSTED='||:CHK_ISPOSTED);
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=kt30','_blank');
    ELSE
    message('Error when running report');
    END IF;
    exception when others then
         message(to_char(sqlcode));
    This hngs the application. And other requests enqued in job queue does not process. If I cancel the stucked job then other reports complete sucessfully.
    Log - rwserver.trc shows the following:
    [2011/6/14 4:48:28:437] Debug 50103 (JobManager:updateJobStatus): Finished updating job: 1051
    [2011/6/14 4:48:28:484] Debug 50103 (RWCacheItem:addFile): add file 'mmondalprn65558177.txt' for job 1051
    [2011/6/14 4:48:28:484] Debug 50103 (RWCache:updateCurrentCapacity): Current cache capacity is 32948731
    [2011/6/14 4:48:30:671] Exception 50157 (): Error while sending file to printer \\mmondal\mmondalprn. Exit with error code 1848
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
         at oracle.reports.utility.Utility.newRWException(Utility.java:756)
         at oracle.reports.utility.SOSD.sendPrinter(SOSD.java:128)
         at oracle.reports.server.DesPrint.sendFile(DesPrint.java:102)
         at oracle.reports.server.Destination.send(Destination.java:484)
         at oracle.reports.server.JobObject.distribute(JobObject.java:1582)
         at oracle.reports.server.JobManager.updateJobStatus(JobManager.java:2231)
         at oracle.reports.server.EngineCommImpl.updateEngineJobStatus(EngineCommImpl.java:134)
         at oracle.reports.server._EngineCommImplBase._invoke(_EngineCommImplBase.java:94)
         at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
         at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
         at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
         at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
    [2011/6/14 4:48:30:671] State 56016 (JobManager:updateJobStatus): Job 1051 status is: Executed successfully but there were some errors when distribute the output
    REP-50159: Executed successfully but there were some errors when distribute the output
    [2011/6/14 4:48:30:671] Debug 50103 (JobManager:notifyWaitingJobs): Master job 1051 notify its duplicated jobs.
    [2011/6/14 4:48:30:671] Debug 50103 (JobManager:updateJobStatus): Finished updating job: 1051
    [2011/6/14 4:48:30:671] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 1
    [2011/6/14 4:48:30:671] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Ready
    [2011/6/14 4:48:30:671] Exception 50159 (): Executed successfully but there were some errors when distribute the output
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
         at oracle.reports.server.JobManager.runJobInEngine(JobManager.java:1009)
         at oracle.reports.server.JobManager.runJobLocal(JobManager.java:1779)
         at oracle.reports.server.JobManager.dispatch(JobManager.java:1045)
         at oracle.reports.server.ConnectionImpl.runJob(ConnectionImpl.java:1280)
         at oracle.reports.server._ConnectionImplBase._invoke(_ConnectionImplBase.java:401)
         at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
         at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
         at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
         at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
    [2011/6/14 4:48:30:671] Debug 50103 (JobManager:runJobInEngine): Encounted exception in job 1051
    [2011/6/14 4:48:30:671] Debug 50103 (ConnectionImpl:runJob): jobid = 1051 Failed with exceptionoracle.reports.RWException: IDL:oracle/reports/RWException:1.0
    [2011/6/14 4:48:30:671] Exception 50159 (): Executed successfully but there were some errors when distribute the output
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
         at oracle.reports.server.JobManager.runJobInEngine(JobManager.java:1009)
         at oracle.reports.server.JobManager.runJobLocal(JobManager.java:1779)
         at oracle.reports.server.JobManager.dispatch(JobManager.java:1045)
         at oracle.reports.server.ConnectionImpl.runJob(ConnectionImpl.java:1280)
         at oracle.reports.server._ConnectionImplBase._invoke(_ConnectionImplBase.java:401)
         at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
         at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
         at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
         at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
    [2011/6/14 4:48:30:703] Info 56013 (ConnectionManager:release): Connection 196 is released
    [2011/6/14 4:48:30:703] Info 56013 (ConnectionManager:release): Connection 197 is released
    [2011/6/14 4:48:31:31] Debug 50103 (JobManager:removeJob): will remove job 51
    [2011/6/14 4:48:31:31] Debug 50103 (RWCache:deleteItem): delete item for job 51
    [2011/6/14 4:48:31:31] Debug 50103 (RWCacheItem:clear): job 51 become invalid
    [2011/6/14 4:48:31:31] Debug 50103 (RWCache:updateCurrentCapacity): Current cache capacity is 32942484
    [2011/6/14 4:48:31:46] Debug 50103 (JobManager:removeJob): removed job 51
    [2011/6/14 4:48:47:906] Info 56013 (ConnectionManager:release): Connection 198 is released
    [2011/6/14 4:48:51:890] Info 56013 (ConnectionManager:release): Connection 199 is released
    [2011/6/14 4:50:48:437] Info 56013 (ConnectionManager:release): Connection 200 is released
    Most of the time when all the instances are restarted then for the first time it runs successfully.
    The above code worked fine for Last two months.

  • Java native  method

    I have a c function with prototype,
    int __stdcall QA_Open(char *, char *, int *);If I want to call this method, what java datatypes correspond with the int ref in the argument list.
    I guess the int is a pointer but i do not know what java datatype correspond with an integer pointer

    This is the documentation
    //Prototype
    INTRET QA_Open (STRVAL vsIniFile, STRVAL vsSection,INTREF riHandle );
    //Documentation
    vsIniFile
    Name of configuration file to open
    vsSection
    Section of the configuration file to use
    riHandle
    Instance handle returned by the API
    From the documentation, I gather its expects a pointer that will be passed back each time a method in the API is called

  • Application hangs during accessing transactional database.

    Hi! Here is minimazed test which creates a database with secondary index, fills it with some records and then starts two threads. One thread adds records, another thread deletes records. The problem is that threads hangs with the following backtraces:
    (dbx) thread t@2
    Current function is __db_pthread_mutex_lock
    204 RET_SET((pthread_cond_wait(
    t@2 (l@2) stopped in ___lwp_cond_wait at 0xfffffd7ffee6e8ea
    0xfffffd7ffee6e8ea: ___lwp_cond_wait+0x000a: jae ___lwp_cond_wait+0x18 [ 0xfffffd7ffee6e8f8, .+0xe ]
    (dbx) where
    current thread: t@2
    [1] ___lwp_cond_wait(0xfffffd7ffeb88620, 0xfffffd7ffeb88608, 0x0, 0x0, 0xfffffd7ffeb88608, 0xfffffd7ffeb9dfb8), at 0xfffffd7ffee6e8ea
    [2] __lwp_cond_wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee574ec
    =>[3] __db_pthread_mutex_lock(dbenv = 0x41c7f0, mutex = 118U), line 204 in "mut_pthread.c"
    [4] __lock_get_internal(lt = 0x420f90, locker = 2147484656U, flags = 0, obj = 0x424eb0, lock_mode = DB_LOCK_WRITE, timeout = 0, lock = 0xfffffd7ffe9fd760), line 808 in "lock.c"
    [5] __lock_vec(dbenv = 0x41c7f0, locker = 2147484656U, flags = 0, list = 0xfffffd7ffe9fd748, nlist = 2, elistp = 0xfffffd7ffe9fd740), line 116 in "lock.c"
    [6] __db_lget(dbc = 0x424df0, action = 2, pgno = 5U, mode = DB_LOCK_WRITE, lkflags = 0, lockp = 0xfffffd7ffe9fd8d8), line 1006 in "db_meta.c"
    [7] __bam_search(dbc = 0x424df0, root_pgno = 1U, key = 0xfffffd7ffe9fdc68, flags = 1410U, slevel = 1, recnop = (nil), exactp = 0xfffffd7ffe9fda6c), line 489 in "bt_search.c"
    [8] __bam_c_search(dbc = 0x424df0, root_pgno = 0, key = 0xfffffd7ffe9fdc68, flags = 25U, exactp = 0xfffffd7ffe9fda6c), line 2479 in "bt_cursor.c"
    [9] __bam_c_get(dbc = 0x424df0, key = 0xfffffd7ffe9fdc68, data = 0xfffffd7ffe9fdce0, flags = 25U, pgnop = 0xfffffd7ffe9fdb34), line 953 in "bt_cursor.c"
    [10] __db_c_get(dbc_arg = 0x42f6f0, key = 0xfffffd7ffe9fdc68, data = 0xfffffd7ffe9fdce0, flags = 25U), line 689 in "db_cam.c"
    [11] __db_c_put(dbc_arg = 0x424460, key = 0xfffffd7ffe9fdf28, data = 0xfffffd7ffe9fdf00, flags = 20U), line 1327 in "db_cam.c"
    [12] __db_put(dbp = 0x41d070, txn = 0x423f30, key = 0xfffffd7ffe9fdf28, data = 0xfffffd7ffe9fdf00, flags = 20U), line 380 in "db_am.c"
    [13] __db_put_pp(dbp = 0x41d070, txn = 0x423f30, key = 0xfffffd7ffe9fdf28, data = 0xfffffd7ffe9fdf00, flags = 20U), line 1500 in "db_iface.c"
    [14] Db::put(this = 0x41c708, txnid = (nil), key = 0xfffffd7ffe9fdf28, value = 0xfffffd7ffe9fdf00, flags = 20U), line 340 in "cxx_db.cpp"
    [15] Storage::put(this = 0x41c690, key = 2003, data = 2003), line 114 in "bdb_put_del_hang.cpp"
    [16] reading_thread_func(arg = (nil)), line 161 in "bdb_put_del_hang.cpp"
    [17] thrsetup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee6b40b
    [18] lwpstart(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee6b640
    (dbx) thread t@3
    Current function is __db_pthread_mutex_lock
    204 RET_SET((pthread_cond_wait(
    t@3 (l@3) stopped in ___lwp_cond_wait at 0xfffffd7ffee6e8ea
    0xfffffd7ffee6e8ea: ___lwp_cond_wait+0x000a: jae ___lwp_cond_wait+0x18 [ 0xfffffd7ffee6e8f8, .+0xe ]
    (dbx) where
    current thread: t@3
    [1] ___lwp_cond_wait(0xfffffd7ffeb88668, 0xfffffd7ffeb88650, 0x0, 0x0, 0xfffffd7ffeb88650, 0xfffffd7ffeb9dfb8), at 0xfffffd7ffee6e8ea
    [2] __lwp_cond_wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee574ec
    =>[3] __db_pthread_mutex_lock(dbenv = 0x41c7f0, mutex = 119U), line 204 in "mut_pthread.c"
    [4] __lock_get_internal(lt = 0x420f90, locker = 2147484655U, flags = 0, obj = 0x424b80, lock_mode = DB_LOCK_WRITE, timeout = 0, lock = 0xfffffd7ffe7fd7d0), line 808 in "lock.c"
    [5] __lock_vec(dbenv = 0x41c7f0, locker = 2147484655U, flags = 0, list = 0xfffffd7ffe7fd7b8, nlist = 2, elistp = 0xfffffd7ffe7fd7b0), line 116 in "lock.c"
    [6] __db_lget(dbc = 0x424ac0, action = 2, pgno = 5U, mode = DB_LOCK_WRITE, lkflags = 0, lockp = 0xfffffd7ffe7fd948), line 1006 in "db_meta.c"
    [7] __bam_search(dbc = 0x424ac0, root_pgno = 1U, key = 0xfffffd7ffe7fdc48, flags = 1410U, slevel = 1, recnop = (nil), exactp = 0xfffffd7ffe7fdadc), line 489 in "bt_search.c"
    [8] __bam_c_search(dbc = 0x424ac0, root_pgno = 0, key = 0xfffffd7ffe7fdc48, flags = 8U, exactp = 0xfffffd7ffe7fdadc), line 2479 in "bt_cursor.c"
    [9] __bam_c_get(dbc = 0x424ac0, key = 0xfffffd7ffe7fdc48, data = 0xfffffd7ffe7fdc70, flags = 8U, pgnop = 0xfffffd7ffe7fdba4), line 871 in "bt_cursor.c"
    [10] __db_c_get(dbc_arg = 0x424790, key = 0xfffffd7ffe7fdc48, data = 0xfffffd7ffe7fdc70, flags = 8U), line 689 in "db_cam.c"
    [11] __db_c_del_primary(dbc = 0x425120), line 2249 in "db_cam.c"
    [12] __db_c_del(dbc = 0x425120, flags = 0), line 285 in "db_cam.c"
    [13] __db_del(dbp = 0x41d070, txn = 0x42f5d0, key = 0xfffffd7ffe7fdf30, flags = 0), line 492 in "db_am.c"
    [14] __db_del_pp(dbp = 0x41d070, txn = 0x42f5d0, key = 0xfffffd7ffe7fdf30, flags = 0), line 485 in "db_iface.c"
    [15] Db::del(this = 0x41c708, txnid = (nil), key = 0xfffffd7ffe7fdf30, flags = 0), line 226 in "cxx_db.cpp"
    [16] Storage::del(this = 0x41c690, key = 501), line 131 in "bdb_put_del_hang.cpp"
    [17] writing_thread_func(arg = (nil)), line 173 in "bdb_put_del_hang.cpp"
    [18] thrsetup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee6b40b
    [19] lwpstart(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffee6b640
    Looks like some problems with locking, because if I set_lk_detect(DB_LOCK_DEFAULT) some methods fails with DB_LOCK_DEADLOCK, but i do not understand where is raise condition, because both threads calls just a single operations. Can anybody explain the problem?
    Here is soruce code:
    #include <set>
    #include "pthread.h"
    #include "bdb/db_cxx.h"
    static const char *__THIS_FILE__ = __FILE__;
    class Storage
    private:
    DbEnv m_bdbEnv;
    Db m_bdbLongKeys, m_bdbLongKeysSec;
    static void bdb_error_call( const DbEnv dbEnv, const char errpfx, const char *msg )
    printf( "%s\n", msg );
    static int bdb_sec_callback( Db secondary, const Dbt pkey, const Dbt pdata, Dbt skey )
    skey->set_data( pdata->get_data() );
    skey->set_size( pdata->get_size() );
    return 0;
    public:
    Storage( void )
    : m_bdbEnv( DB_CXX_NO_EXCEPTIONS ),
    m_bdbLongKeys( &m_bdbEnv, DB_CXX_NO_EXCEPTIONS ),
    m_bdbLongKeysSec( &m_bdbEnv, DB_CXX_NO_EXCEPTIONS )
    int open( const char *storageURL )
    m_bdbEnv.set_errcall( bdb_error_call );
    static const u_int32_t envFlags =
    DB_CREATE | /* create if not exists */
    DB_INIT_MPOOL | /* memory pool */
    DB_INIT_LOCK | /* locking */
    DB_INIT_LOG | /* recovery */
    DB_INIT_TXN | /* transactions */
    DB_THREAD;
    int error = m_bdbEnv.open( storageURL, envFlags, 0 );
    if (error != 0)
    m_bdbEnv.err( error, "DbEnv::open() failed." );
    return -1;
    static const u_int32_t dbFlags =
    DB_CREATE | /* create if not exists */
    DB_AUTO_COMMIT | /* auto commit */
    DB_THREAD;
    m_bdbLongKeys.set_errcall( bdb_error_call );
    error = m_bdbLongKeys.open( NULL, "longKeys.db", NULL, DB_BTREE, dbFlags, 0 );
    if (error != 0)
    m_bdbLongKeys.err( error, "Db::open() failed." );
    return -1;
    m_bdbLongKeysSec.set_errcall( bdb_error_call );
    m_bdbLongKeysSec.set_flags( DB_DUP | DB_DUPSORT );
    if (error != 0)
    m_bdbLongKeysSec.err( error, "Db::set_flags() failed (%s:%d).",
    __THIS_FILE__, __LINE__ );
    return -1;
    error = m_bdbLongKeysSec.open( NULL, "longKeys-sec.db", NULL, DB_BTREE, dbFlags, 0 );
    if (error != 0)
    m_bdbLongKeysSec.err( error, "Db::open() failed (%s:%d).",
    __THIS_FILE__, __LINE__ );
    return -1;
    error = m_bdbLongKeys.associate( NULL, &m_bdbLongKeysSec, bdb_sec_callback, DB_AUTO_COMMIT );
    if (error != 0)
    m_bdbLongKeys.err( error, "Db::associate() failed (%s:%d).",
    __THIS_FILE__, __LINE__ );
    return -1;
    return 0;
    int close( void )
    m_bdbLongKeysSec.close(0);
    m_bdbLongKeys.close(0);
    m_bdbEnv.close(0);
    return 0;
    int put( long key, long data )
    Dbt dbtKey, dbtData;
    dbtKey.set_data( (void*) &key );
    dbtKey.set_size( sizeof(key) );
    dbtData.set_data( (void*) &data );
    dbtData.set_size( sizeof(data) );
    int error = m_bdbLongKeys.put( NULL, &dbtKey, &dbtData, DB_NOOVERWRITE );
    if (error != 0)
    m_bdbLongKeys.err( error, "Db::put() failed (%s:%d)", __THIS_FILE__, __LINE__ );
    return -1;
    return 0;
    int del( long key )
    Dbt dbtKey;
    dbtKey.set_data( (void*) &key );
    dbtKey.set_size( sizeof(key) );
    int error = m_bdbLongKeys.del( NULL, &dbtKey, 0 );
    if (error != 0)
    m_bdbLongKeys.err( error, "Db::del() failed (%s:%d)", __THIS_FILE__, __LINE__ );
    return -1; }
    return 0;
    Storage *g_storage = NULL;
    static long g_numberTotal = 1000;
    static long g_numberToRead = g_numberTotal/2;
    static std::set<long> g_toRead;
    static std::set<long> g_toWrite;
    extern "C" void reading_thread_func( void arg );
    extern "C" void writing_thread_func( void arg );
    void reading_thread_func( void arg )
    std::set<long>::const_iterator it = g_toRead.begin();
    std::set<long>::const_iterator it_end = g_toRead.end();
    for (int j = 2*g_numberTotal+1; it != it_end; ++it) {
    ++j;
    if (g_storage->put(j, j) != 0)
    printf( "put() failed (%s:%d).\n", __THIS_FILE__, __LINE__ );
    return NULL;
    void writing_thread_func( void arg )
    std::set<long>::const_iterator it = g_toWrite.begin();
    std::set<long>::const_iterator it_end = g_toWrite.end();
    for (; it != it_end; it++) {
    if (g_storage->del(*it) == 0)
    printf( "Deleted key %d\n", *it );
    else
    printf( "Failed to delete key %d\n", *it );
    return NULL;
    int main( int argc, char *argv[] )
    pthread_t read_tid, write_tid;
    if (g_numberToRead > g_numberTotal)
    return 1;
    g_storage = new Storage;
    if (g_storage->open("test_storage") != 0)
    return 3;
    for (int i = 0; i < g_numberTotal; ++i) {
    if (g_storage->put(i, i) != 0)
    std::cout << "Failed to add key '" << i << "'" << std::endl;
    if (i <= g_numberToRead)
    g_toRead.insert(i);
    else
    g_toWrite.insert(i);
    pthread_create( &read_tid, NULL, reading_thread_func, NULL );
    pthread_create( &write_tid, NULL, writing_thread_func, NULL );
    pthread_join( read_tid, NULL );
    pthread_join( write_tid, NULL );
    if (g_storage != NULL) {
    g_storage->close();
    delete g_storage;
    return 0;
    }

    Hi,
    Thank you for you answer, but I still not happywith
    it.
    I attentively read the documents you providedbefore
    posted the message on the forum. Ok. Let me explain again.
    I could enclose these calls in each owntransaction
    (and I tried it, but had the same result) but itdoes
    not make a sence if DB_AUTO_COMMIT flag wasspecified
    for the Db::open()Using transaction does not necessarily eliminate the
    chance of deadlock. Practically any application that
    uses locking may deadlock. Can you post here the
    example in which you are trying it transactionally?
    And maybe I will try to correct it.The example is in the my first message. It would be nice if you could suggest a good solution to workaround the deadlock.
    There is only ONE OPERATION from the BerkeleyDBAPI
    point of view in each thread under the transaction
    and I would expect that the one single Db::put()or
    Db::del() can not cause the deadlock. Why it
    happens?Because "With the exception of the Queue access
    method, the Berkeley DB access methods do page-level
    locking." (Locking granularity:
    http://www.oracle.com/technology/documentation/berkele
    y-db/db/ref/lock/page.html)
    The only solution I see now is use
    DbEnv::set_lk_detect() and handle the
    DB_LOCK_DEADLOCK error code on each DB operationand
    retry the operation on the deadlock, but it is the
    last thing I would like to use.
    The conclusion:
    - why single API call of Db::put() or Db::del()under
    transaction made in the same time cause adeadlock?
    Because both of them will require write locks on the
    same page.
    "The first component of the infrastructure, deadlock
    detection, is not so much a requirement specific to
    transaction-protected applications, but instead is
    necessary for almost all applications in which more
    than a single thread of control will be accessing the
    database at one time. Even when Berkeley DB
    automatically handles database locking, it is
    normally possible for deadlock to occur. Because the
    underlying database access methods may update
    multiple pages during a single Berkeley DB API call,
    deadlock is possible even when threads of control are
    making only single update calls into the database."
    (Deadlock detection:
    http://www.oracle.com/technology/documentation/berkele
    y-db/db/ref/transapp/deadlock.html)
    Please let me know if this time I was clear enough.
    Bogdan Coman

  • A big problem: The Application Deads During Running.

    Hi! everyone:
    We four colleagues are developping an application use the observer/observerable pattern. In the normal case, this application starts about 20-40 threads some of which repait the GUI and some manipulate the database. With no exception and runtime error, the problem seemed strange: the computer will dead after 3 or 4 hours after start. We have tried resolve this problem through every way, but failed. And it's not seem to be the problem of system resource.
    any advice will be appreciated.
    thanks!
    Dunhong Zhao.

    Thanks for your response!
    Our OS version is Windows98 4.0 and JVM is 1.3.0.
    We have figured out that the system resources are over-consumed, especially the CPU. But we have no idea to find out where is the problem. We have redesign a thread that speeches the alarm messages and the thread that repaints the GUI, the application works better, but the problem still exists. I don't know much about java's garbage-collector mechanism, maybe this is the source of our problem? should I call the System.gc() every time when I finished the repainting? but I find it consumes more time this way. Maybe it's because we have used too much threads, and some of them cause a traffic jam?
    thanks again.
    I'm waiting for your advice.

  • Problems with c++ native methods

    hello to all ,
         I am building an client-server application in java , which uses java native methods written
    in c++ .In every client's request , the applcation updates a hashtable .The hashtable is kept as an
    Object member variable in a java class .So updating the hashtable is like this : the native method is
    called which accesses the Object member variable , updates the hashtable and sets the new Object
    member variable value.
         That's the way that it should work ,but i am experiencing some serious problems because the jvm
    keeps on crashing with UNEXCPECTED SIGNAL 11 .My distribution is Mandrake 9.0 ,and i use java
    j2sdk1.4.1_01
    Here some very naive questions i have to ask :
    1.Is it possible that the jvm crashes because the size of the hashtable is not fixed ?
    2.Can it be a system problem (like libgcc ) or else ?
         Any opinion on this would be very helpful
         Thanks in advance ,
              Sbile
    P.S. Here the log file being created after every crash
    Unexpected Signal : 11 occurred at PC=0x404657B6
    Function=is_forwarded__C7oopDesc+0x6
    Library=/usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    Dynamic libraries:
    08048000-0804e000 r-xp 00000000 03:06 463913 /usr/local/j2sdk1.4.1_01/bin/java
    0804e000-0804f000 rw-p 00005000 03:06 463913 /usr/local/j2sdk1.4.1_01/bin/java
    40000000-40011000 r-xp 00000000 03:06 278533 /lib/ld-2.2.5.so
    40011000-40012000 rw-p 00010000 03:06 278533 /lib/ld-2.2.5.so
    40013000-4001c000 r-xp 00000000 03:06 119905 /usr/local/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so
    4001c000-4001d000 rw-p 00008000 03:06 119905 /usr/local/j2sdk1.4.1_01/jre/lib/i386/native_threads/libhpi.so
    4001e000-40021000 r--s 00000000 03:06 447528 /usr/local/j2sdk1.4.1_01/jre/lib/ext/dnsns.jar
    40021000-40022000 r--s 00000000 03:06 198504 /usr/lib/kaffe/lib/microsoft.jar
    40022000-4002f000 r-xp 00000000 03:06 573447 /lib/i686/libpthread-0.9.so
    4002f000-40036000 rw-p 0000d000 03:06 573447 /lib/i686/libpthread-0.9.so
    40036000-40038000 r-xp 00000000 03:06 278544 /lib/libdl-2.2.5.so
    40038000-40039000 rw-p 00001000 03:06 278544 /lib/libdl-2.2.5.so
    40039000-40150000 r-xp 00000000 03:06 573443 /lib/i686/libc-2.2.5.so
    40150000-40155000 rw-p 00117000 03:06 573443 /lib/i686/libc-2.2.5.so
    40159000-40471000 r-xp 00000000 03:06 119911 /usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    40471000-40625000 rw-p 00317000 03:06 119911 /usr/local/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so
    40635000-40646000 r-xp 00000000 03:06 278548 /lib/libnsl-2.2.5.so
    40646000-40647000 rw-p 00011000 03:06 278548 /lib/libnsl-2.2.5.so
    40649000-4066b000 r-xp 00000000 03:06 573445 /lib/i686/libm-2.2.5.so
    4066b000-4066c000 rw-p 00021000 03:06 573445 /lib/i686/libm-2.2.5.so
    4066c000-4067c000 r-xp 00000000 03:06 119915 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libverify.so
    4067c000-4067e000 rw-p 0000f000 03:06 119915 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libverify.so
    4067e000-4069f000 r-xp 00000000 03:06 119916 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libjava.so
    4069f000-406a1000 rw-p 00020000 03:06 119916 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libjava.so
    406a1000-406b6000 r-xp 00000000 03:06 119918 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libzip.so
    406b6000-406b8000 rw-p 00014000 03:06 119918 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libzip.so
    406b8000-41d86000 r--s 00000000 03:06 119961 /usr/local/j2sdk1.4.1_01/jre/lib/rt.jar
    41dc9000-41de0000 r--s 00000000 03:06 119941 /usr/local/j2sdk1.4.1_01/jre/lib/sunrsasign.jar
    41de0000-41e51000 r--s 00000000 03:06 119943 /usr/local/j2sdk1.4.1_01/jre/lib/jsse.jar
    41e51000-41e64000 r--s 00000000 03:06 119942 /usr/local/j2sdk1.4.1_01/jre/lib/jce.jar
    41e64000-42120000 r--s 00000000 03:06 119959 /usr/local/j2sdk1.4.1_01/jre/lib/charsets.jar
    441c8000-441ca000 r--s 00000000 03:06 198471 /usr/lib/kaffe/lib/comm.jar
    441ca000-441cc000 r--s 00000000 03:06 198505 /usr/lib/kaffe/lib/pjava.jar
    441cc000-441d0000 r--s 00000000 03:06 185441 /usr/local/j2sdk1.4.1_01/lib/servlet.jar
    4c3d3000-4c3fe000 r--p 00000000 03:06 212998 /usr/share/locale/ISO-8859-15/LC_CTYPE
    4c3fe000-4c40c000 r--s 00000000 03:06 447534 /usr/local/j2sdk1.4.1_01/jre/lib/ext/ldapsec.jar
    4c40d000-4c416000 r-xp 00000000 03:06 278554 /lib/libnss_files-2.2.5.so
    4c416000-4c417000 rw-p 00008000 03:06 278554 /lib/libnss_files-2.2.5.so
    4c61b000-4c638000 r--s 00000000 03:06 447527 /usr/local/j2sdk1.4.1_01/jre/lib/ext/sunjce_provider.jar
    4c638000-4c6d7000 r--s 00000000 03:06 447529 /usr/local/j2sdk1.4.1_01/jre/lib/ext/localedata.jar
    4c6d7000-4c6eb000 r--s 00000000 03:06 198506 /usr/lib/kaffe/lib/rmi.jar
    4c6eb000-4cb9e000 r--s 00000000 03:06 185437 /usr/local/j2sdk1.4.1_01/lib/tools.jar
    4cb9e000-4cc93000 r--s 00000000 03:06 198503 /usr/lib/kaffe/lib/kjc.jar
    4cc93000-4cd9e000 r--s 00000000 03:06 198507 /usr/lib/kaffe/lib/rt.jar
    4cd9e000-4cda6000 r--s 00000000 03:06 201714 /usr/lib/kaffe/lib/sax.jar
    4cda6000-4cf61000 r--s 00000000 03:06 201715 /usr/lib/kaffe/lib/xerces.jar
    4cf61000-4cf81000 r--s 00000000 03:06 201713 /usr/lib/kaffe/lib/jdom.jar
    4cf81000-4cf85000 r-xp 00000000 03:06 266660 /home/sbile/diplomatikh/build/src/lib/libBuildHashTable.so
    4cf85000-4cf86000 rw-p 00004000 03:06 266660 /home/sbile/diplomatikh/build/src/lib/libBuildHashTable.so
    4cf95000-4d03e000 r-xp 00000000 03:06 508019 /usr/lib/libstdc++.so.5.0.0
    4d03e000-4d054000 rw-p 000a8000 03:06 508019 /usr/lib/libstdc++.so.5.0.0
    4d059000-4d060000 r-xp 00000000 03:06 278604 /lib/libgcc_s-3.2.so.1
    4d060000-4d061000 rw-p 00007000 03:06 278604 /lib/libgcc_s-3.2.so.1
    4d0e2000-4d0f2000 r-xp 00000000 03:06 119921 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libnet.so
    4d0f2000-4d0f4000 rw-p 0000f000 03:06 119921 /usr/local/j2sdk1.4.1_01/jre/lib/i386/libnet.so
    Local Time = Sat May 10 04:25:40 2003
    Elapsed Time = 7
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002E6
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.1_01-b01 mixed mode)
    # An error report file has been saved as hs_err_pid4063.log.
    # Please refer to the file for further information.

    The dreaded Signal 11 means you've overwritten some memory you're not supposed to.
    Check that all of your array indexes are in range, that you're not accessing memory that's been freed etc etc.
    Try placing print statements at strategic places in your native code to narrow down the problem

  • How to use a C function as a native method

    Could anybody tell me how to use a C function as a Java native method.
    Thanks

    Read all about it.
    You'd probably have to write a little wrapper (using JNI) that passes
    parameters and return values around between your C function and
    the JVM.
    kind regards,
    Jos

  • How call native method without code modification

    "How to access third party's C API from Java Using JNI without modifying the C code"

    Unfortunately, the only way I know of doing this is to use a pass-through DLL that you write. Logically it
    looks like this:
    Java App (written by you)
    |
    v
    Java native methods (written by you)
    |
    v
    JNI DLL (written by you)
    |
    v
    3rd party DLL
    It adds a little bit of overhead, but it's not too big of a deal. Check out the JNI tutorial on how to write this.
    Bryan

  • Java Application does not run in Windows XP

    Hi, I have developed a Java Swing application using JRE 1.4.2 and everything works fine under Windows 2000. However, for some Windows XP machines, the application hangs on startup when it tries to show the initial splash screen. No exceptions are thrown and the application must be terminated from the Task Manager.
    A workaround seems to be setting the javaw.exe properties so that it runs in "compatibility mode for Windows 2000".
    Any ideas?

    Are you doing any JNI or native calls during start-up? That's my quess.
    If you are, must be calling win2000 functions.

  • Java application hangs on I/O

    Hello,
    Could use some help as I've been racking my brain and going crazy. I have a Java application who's sole purpose in life is to monitor a QFS file system for when it goes bad. This main process kicks off a thread(we'll call it thread A) which lives indefinitely. This thread wakes up every so often and kicks off a thread to write a file, and then a thread to read that file back in, and then a thread to delete that file. Thread A has no interaction back to the main process but does monitor each of it's subthreads. This process works great for all testing that you can do, like unmounting the file system and pulling network cables etc. The problem lies when the QFS servers start doing their server not responding routine(basically a real failure and not a purposely inflicted one. What happens is that the whole Java application hangs. The main process, and the parent thread(thread A) all grind to a hault. From the command line anything you try to do in that file system also hangs but you can ctrl-c out of it(like a ls or cd to it. I have been experimenting with all the ways I can think of to fix this, like thread.interupt(), using Runtime.exec instead of I/O objects and trying to control the Process object, and I've tried exposing the FileInputStream and FileOutputStream objects in order to call close() on them. I've been reading that the interupt() method doesn't work for all intense purposes and that the latter method I tried is the way to do it, although, these postings say that that doesn't necessarily always work on Linux. Unfortunately, I am running this application on a Solaris 10 X86 platform which has a lot of similarities to Linux and am experiencing this not working. Has anybody had to do anything like this or handle cases like this that could maybe point me in the direction that they were successful in?
    Thanks

    Just to verify you are not, in any way, using external apps via something like exec() right?
    So the blocking processes are read, write and delete?
    And you are sure that you are in fact calling interrupt on all of the relevant threads?
    Presuming yes than given that you have already demonstrated that you can't interrupt them it doesn't matter much what you do in java it isn't going to work. So look for a different solution.
    One possibility, spin up a seperate java app that does the actual work. Create a socket server, obviously seperate from other threads to manage. It verifies that the app is still working and allows the caller to shut it down - via system.exit().
    Then you have a management app that starts that app and when needed you tell it to shut down and then restart it.

  • Class not found -java.security.AccessController.doPrivileged(Native Method)

    The applet was working fine around 6 months back but now the application is throwing the below exception:
    load: class DisiConnectionApplet.class not found.
    java.lang.ClassNotFoundException: DisiConnectionApplet.class
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed:http://messaging.danskenet.net/ie/NewsTicker/NewsTicker.nsf/f49a4a079e88f527c12572020033b098/$FILE/DisiConnectionApplet/class.class
         at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
         at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 7 more
    Exception: java.lang.ClassNotFoundException: DisiConnectionApplet.class
    I have checked and found the class is on proper place... I googled the issue and found that there might be any issue in IE settings... but didn't get any proper solution...
    I am using IE 6.0 with below Java plug-in :::::::::::::
    Java Plug-in 1.6.0_11
    Java(tm) Plug-in 2 SSV Helper
    Java(tm) Plug-in SSV Helper
    Web Browser Applet Control
    Please let me know what should be done on this case....????

    its exactly that... and who are you calling a fool? I think its a case of the pot calling the kettle black there mate (except you have no right to call me anything, since you are the one looking for help, and we are the ones that know)... oh and check the date... it says aug 2003... is that a month ago? come back in a month and i'll give you your answer then

  • Java.lang.NoClassDefFoundError when running the Junit method

    Hi Friends
    I am stuck in this typical Junit problem for a copule of days but still not able to find any solution for it.The problem is as below.
    I have written Junit test case for 1 method that has been added in the session bean. the code is as below.
    public void testfindResponses() {
                   ClientManager cMgr = null;
                   Collection retvalue= new ArrayList();
                   try {
                   System.out.println("Before");
                   cMgr = EJBHomeUtilities.getClientManagerHome().create();
                   System.out.println("After" + cMgr.toString());
              //     retvalue=cMgr.findSurveyResponses(clientPk,startTime,endTime);
                   }catch (RemoteException e) {
                   //logger.error(e.getMessage());
                   throw new EJBException(e.getMessage());
                   } catch (CreateException e) {
                   // logger.error(e.getMessage());
                   throw new EJBException(e.getMessage());
                   } finally {
                   EJBHomeUtilities.removeSessionBean(cMgr);
              //return retvalue;
    when i run this using the Junit consol;e on the eclipse i am getting
    java.lang.NoClassDefFoundError
         at sun.reflect.GeneratedSerializationConstructorAccessor35.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:869)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
         at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:120)
         at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
         at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:37)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
         at $Proxy0.create(Unknown Source)
         at com.march.hth.test.client.ClientManagerBeanTest.testfindSurveyResponses(ClientManagerBeanTest.java:3918)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    The remote reference that i get seems to not work atall.i tried to put debug statements to see if i am getting the remote reference,but the control seems to not go there itself.
    The same method if i write for another session bean it is working fine without any errors.
    Please let me know whats wrong here as i am stuck up with this issue for a long time .waiting for positive replies from your side.
    Thanks & Regards
    Vikram K

    I also came across this error . . . the exception message seemed to indicate a problem in the HTML file. In mine, I had the HEIGHT and WIDTH attributes set to 100% -- something that is nonsensical outside of a browser context. I changed those values to some number of pixels (800 and 600, say), and the exception did not reoccur. I suggest you try the same.
    --john                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Calling multiple DLL from Java and calling same native method

    i have two dll files named DLL_1.dll and DLL_2.dll .
    Both of them contain a native method which has a signature
    JNIEXPORT void JNICALL Java_Database_Notify
    (JNIEnv *, jclass);
    This method is common to both the DLL
    Now i load both of the DLL's using,
    System.loadLibrary("DLL_1");
    System.loadLibrary("DLL_2");
    Both of the DLL are loaded form same Java Application
    But the problem is that , whenever i try to call the Notify Method , it calls the Notify method of DLL_1 only.
    How do i call the Notify Methos of second DLL(i.e DLL_2).
    Is there any reference that i can get to all the DLL files when i load then , so that i can use that reference to invoke the Notify method of that particular DLL.

    i have two dll files named DLL_1.dll and DLL_2.dll .
    Both of them contain a native method which has a
    signature
    JNIEXPORT void JNICALL Java_Database_Notify
    (JNIEnv *, jclass);
    This method is common to both the DLL
    Now i load both of the DLL's using,
    System.loadLibrary("DLL_1");
    System.loadLibrary("DLL_2");
    Both of the DLL are loaded form same Java
    Application
    But the problem is that , whenever i try to call the
    Notify Method , it calls the Notify method of DLL_1
    only.
    How do i call the Notify Methos of second DLL(i.e
    DLL_2).
    Is there any reference that i can get to all the DLL
    files when i load then , so that i can use that
    reference to invoke the Notify method of that
    particular DLL.You need to explain exactly what you are trying to achieve.
    As per the description above it is impossible in java.
    And I didn't say JNI, I said java.
    Your above statement suggests that you think that you can have exactly the same java signature do two different things.
    Note again that I said java not JNI.
    A JNI method is just a tag that represents a java signature. Your description suggests that you are attempting to do it twice.
    There are three possibilities.
    1. Your explanation is incomplete.
    2. You are trying to do something that is impossible in java.
    3. You are trying to solve a problem and your description of your solution is not sufficient to determine what that is (and of course the solution is wrong.)

  • At java.lang.Throwable.fillInStackTrace(Native Method)

    Hello,
    I have a Jsp,which has a hyper link to another Jsp.Some times very rarely i get this error when i click on the
    link.
    java.lang.RuntimeException: IOException occured
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.RuntimeException.<init>(Compiled Code)
    at weblogic.servlet.internal.ServletOutputStreamImpl.write(Compiled Code)
    at weblogic.servlet.internal.WLOutputStreamWriter.flushBuffer(Compiled Code)
    at weblogic.servlet.internal.WLOutputStreamWriter.write(Compiled Code)
    at weblogic.servlet.internal.WLOutputStreamWriter.write(Compiled Code)
    at java.io.Writer.write(Compiled Code)
    at weblogic.servlet.jsp.JspWriterImpl.print(Compiled Code)
    at examples.jsp._pfsonline._https._showhide.__sso_showhide_cur._jspService(Compiled Code)
    at weblogic.servlet.jsp.JspBase.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    can some one tell me when does this happen.Is it something to do with the configuration.
    Thanks
    Shashi

    Did you ever find out the answer to this question?
    I have been getting a similar error. My page draws
    fine, but I get an occasional error:
    java.lang.RuntimeException: IOException occured
    at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:178)
    at weblogic.servlet.internal.WLOutputStreamWriter.flushBuffer(WLOutputStreamWriter.java:139)
    at weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWriter.java:104)
    at weblogic.servlet.internal.WLOutputStreamWriter.write(WLOutputStreamWriter.java:111)
    at java.io.Writer.write(Unknown Source)
    at weblogic.servlet.jsp.JspWriterImpl.print(JspWriterImpl.java:155)
    at jspc._admin._offering.__offering_intro._jspService(__offering_intro.java:433)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:941)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:905)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:391)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:273)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Let me know if you get any answers.
    Best,
    JL
    [email protected]

  • Java.lang.OutOfMemoryError(Native Method)

    Hello Everybody,
    We hava a java.lang.OutOfMemoryError,the problem weblogic server installed in windows 2003 x64,weblogic version 9.2 MP1,sun jdk 1.5.0_22 32bit,the memory configuration below:
    set MEM_ARGS=-server -Xms1024m -Xmx1024m -verbose:gc -Xloggc:%SERVER_NAME%_GC.log -XX:SurvivorRatio=3 -XX:NewSize=512M -XX:MaxNewSize=512M -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+HeapDumpOnCtrlBreak -XX:+HeapDumpOnOutOfMemoryError
    if "%JAVA_VENDOR%"=="Sun" (
         set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% -XX:MaxPermSize=512m
    The error in log below:
    ####<2013-2-16 上午11时08分15秒 CST> <Error> <Kernel> <CWGK-APP-2> <node2> <[STANDBY] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1360984095564> <BEA-000802> <ExecuteRequest failed
    java.lang.OutOfMemoryError.
    java.lang.OutOfMemoryError
         at java.io.RandomAccessFile.readBytes(Native Method)
         at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
         at weblogic.diagnostics.archive.FileUtils.readFile(FileUtils.java:46)
         at weblogic.diagnostics.archive.filestore.FileIndexMetaInfo.buildIndex(FileIndexMetaInfo.java:403)
         at weblogic.diagnostics.archive.filestore.FileIndexMetaInfo.buildIndex(FileIndexMetaInfo.java:319)
         at weblogic.diagnostics.archive.filestore.FileDataArchive.computeFullIndices(FileDataArchive.java:521)
         at weblogic.diagnostics.archive.filestore.FileDataArchive.computeIndices(FileDataArchive.java:629)
         at weblogic.diagnostics.archive.filestore.FileDataIndexer$IndexCommand.run(FileDataIndexer.java:199)
         at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    >
    How can i solution the problem?
    Please help.

    Need more log information to diagnose it.
    Kinds,
    Gabriel Abelha

Maybe you are looking for

  • I installed an update and now itunes won't open.

    It doesn't even jump when it's clicked on and I tried to re-install to no avail, help! I rlly don't want to lose my music library. Any help would be greatly appreciated but I've tried everything I can think of and looked on other discussion boards fo

  • File Render is greyed out

    CS3 Encore 3.02.007 Mac OSX 10.5.3 Simple project, a two part DVD series... 4 chapters each and appx. 1.5 hours on first DVD and 1 hour on 2nd DVD First DVD rendered and burned without a hitch The DVD project is ready to go... except I cannot get it

  • Can I connect my A1225 IMAC'S as a Dual Monitors?

    Can I connect my A1225 IMAC'S as a Dual Monitors?

  • ZEN NANO PLUS PROBL

    Songs are not playing back that are loaded on the device. The names of the songs display on device but will not play...it skips the songs. I've updated the firmware. I've tried deleting all of the music on the device and reloaded and a few songs will

  • Plz tell me BDC  CALL TRANSACTION steps with simple example

    hi, plz tell me the steps BDC  CALL TRANSACTION steps with simple example