Java Threading
Hello. I've never worked with before threads, so it's new to me. My goal is to make a program that reads in several text files and stores every word of all text files in a hash map element. If a Word is reproduced, the value of the hasmap will change. I have something that works with a single working file. To make things more efficient when it comes to multiple files, I need files to analyze at the same time. This would therefore require Threading. For the moment, I'm working on something simple, she takes in two text files and treat them simultaneously and just counts the words in the two and returns a single value. For some reason, it does not. I have the thread classimport java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
class WordCountNew extends Thread
{
int count;
private String filename;
public WordCountNew(String filename)
{
this.filename = filename;
}
@Override
public void run()
{
count = 0;
try
{
Scanner in = new Scanner(new File(filename));
while (in.hasNext())
{
in.next();
System.out.println("in while");
count++;
}
System.out.println(filename + ": " + count);
}
catch (FileNotFoundException e)
{
System.out.println(filename + " Error");
}
}
}
And the main classpublic class MainClass {
public static void main(String args[]) throws InterruptedException
{
WordCountNew[] counters = new WordCountNew[2];
counters[0] = new WordCountNew("Coursework2.txt");
counters[0].start();
counters[1] = new WordCountNew("Coursework2.txt");
counters[1].start();
int total = 0;
for (WordCountNew counter : counters) {
counter.join();
total += counter.count;
}
System.out.println("Total: " + total);
}
}
It does not make the while loop in the thread class, even if it loads the file without problem, and the file is full text. My current performance isCoursework2.txt: 0
Coursework2.txt: 0
Total: 0
Is there any logical reason as to why the while loop can not be concluded?
See you soon
Works OK for me
It seems that you you confused (point to an empty file with the same name)
("Try the absolute path like this: WordCountNew("C:/testFolder/testfile.txt ") new;
Tags: Java
Similar Questions
-
Java threading for slide show picture
Hi, I am a newbie in developing Blackberry app...
can someone help me, how to create a slideshow of image using Java thread?
I'm really naïve on this subject
Thank you
Well done - you are not such a newbie!
Maybe I'm missing something...
public void run() {}
While (true) {}
for (i = 0; i< 6;="" i++)="">}
}
}
-
How to call javafx scene for a pure java thread
I have a server as a thread that starts when the application is running, it will listen to a client, when TI receives a message from the client a scene to appear alongside server.
I get error not a fx thread when I call pure java thread.
need help as soon as possible.I think that what you are looking for is the Platform.runLater () function.
This will allow you to give a Runnable which is scheduled on the thread of FX. Put the code to display the scene and it should work.
For example:
Platform.runLater(new Runnable() { public void run() { // the code here to show the Scene } });
-
How should I interpret java thread dumps?
I have a multi-threaded application, I am running on a BlackBerry 9000. I suspect there are blocking issues.
I figured out how to trigger the trace of the stack using javaloader - usb logstacktraces (rather than wait for the alert for error "not responding") and can fetch using javaloader - usb eventlog, but I cannot interpret them.
When I develop java applications normal can I use ^-to get a thread dump containing the source files, line numbers, and (most importantly) a list of locks and blocks, telling me that has a lock on an object, and which is blocked waiting for a lock to be released (either by calling the wait() method or exit).
I don't know if this information is in the Blackberry stack traces.
guid:0x9C3CD62E3320B498 time: Thu Sep 10 15:51:37 2009 severity:0 type:3 app:Java Exception data: ForcedStackTraceException baconology(160) 33 2 0x482E4000 baconology(4AA957F5) BlockRun nap 0x3EF baconology(4AA957F5) BlockRun waitForBuffer 0x4BF baconology(4AA957F5) PiecewiseSourceStream read_ 0x14D7 baconology(4AA957F5) PiecewiseSourceStream read 0x1570 net_rim_cldc-16(4A739706) DataSourceInputStream read 0x25AF net_rim_media(4A739765) MP4Info
0x34E1 net_rim_media(4A739765) MP4Info 0x2DA7 net_rim_media(4A739765) MP4Info 0x2D63 net_rim_media(4A739765) MP4Info 0x33A8 net_rim_media(4A739765) StreamingMediaPlayer doRealize 0x9224 net_rim_cldc-16(4A739706) BasicPlayerImpl realize 0xF80 baconology(4AA957F5) JMFToy fabricateAndRealizePlayer 0x9F5 baconology(4AA957F5) JMFToy$3 run 0xD94 net_rim_cldc-1(4A739706) Thread run Given that this thread is blocked waiting to enter the BlockRun.nap () call, I can assume that it is blocked, waiting for a lock on * this *, because otherwise it would be inside the Object.wait () function, waiting for another thread to issue a notifyAll().
What I need to know is the thread that has the lock, so I can arrange for to be released or not granted at all.
Each (single-threaded) stack trace begins with the name of the process that owns the thread, followed by the ID process in parentheses, then by the thread ID, then the State of the thread (1 = RUNNABLE, 2 = pending, 3 = TIMED WAITING, 4 = BLOCKED), then the ID of the lock on which thread executes a wait(), or the ID of the lock, the thread is stuck on (waiting to acquire).
After the stack traces there is a list of the locks. The list shows which own threads which locks and locks Java class names.
The information contained in the stack traces and the list of locks is sufficient for an automated tool to analyze the dependencies between threads and also find dead-locks (as appropriate). I depeloped such a tool (thus, it is possible, and it's not hard to do), but I'm not free to release him.
-
Is there a way to see the files opened by java threads
-environment-
Java for 64-bit Server VM (build 1.5.0_19 - b02, mixed mode)
Linux 2.6.9 - 78.0.5.ELsmp #1 SMP Wed Sep 24 12:40:24 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Xeon of Intel (r) CPU
--------------------------
Hi all
I would like to know if, in the course of an outOfMemory, there are ways to:
1. do you have a list of thread for the time (basically a thread dump)
2. know the thread which lead to the OOM (even if the thread could well be the 'drop' leading to OOM)
3. get a summary of the brief files on track to open by thread (basically a dump of the heap) use java.
4. get a list of files opened by my thread
Our application is regularly faced with outOfMemory (OOM) and I know that this sometimes load important file, so now I'm testing is the use of hprof (-agentlib:hprof = heap = sites, thread = y, depth = 2). Send "kill-3" on my java process creates a file containing a thread dump + memory usage. But it can't help me for question 2.
Regarding question 4, I tried to establish a correlation between the hprof output + pstack + jstack, pmap, but I'm not the info I'm looking for (pstack, jstack do not show the address of open files)
Finally, if this isn't the right forum for my question, please tell me where to post it.
Thank youHave you tried - XX: + HeapDumpOnOutOfMemoryError?
I would use a recent version of Java as Java 6 update 25.
You can get a list of files opened by looking at/proc / {pid} /fd/ however you should never be allowed to open as many files as you run out of memory.
If you use a Profiler, you can see that the son made at some point, and where objects are allocated.
I don't think you can associate files with a wire.
-
Use of java Threads in the stored procedures
Hi good morning all.
I have four different requests. Each of them works with a lot of data and manages almost 20 to 40 seconds.
If I was running then one by one, then it would take 80-200 seconds of database and user time.
I know there is a possebility to run queries in sqlj using java market.
I wrote a little application with 4 wires, but when running it I realized that each thread runs one after the other, but not in parallel mode.
Here is the code:
/********************************************************************************************************/
Claire;
create or replace and compile java sources named as dailyReport
Import Java.util;
import java. IO;
import java.sql. *;
Import oracle.sqlj.runtime.Oracle;
Import sqlj.runtime.ExecutionContext;
import java.util.Calendar;
import impossible;
public class dailyReport extends Thread {}
public static final String DATE_FORMAT_NOW = "yyyy-MM-dd hh: mm:";
public static ExecutionContext exec_context = new ExecutionContext();
public static String now() {}
Calendar cal = Calendar.GetInstance ();
SimpleDateFormat sdf = new SimpleDateFormat (DATE_FORMAT_NOW);
Return sdf.format (cal.getTime ());
}
Public Shared Sub runReport (int, String, date1, date2 String sessionID) {}
try {}
System.out.println (dailyReport.Now (). ToString());
View all customers
dailyReport thread1 = new dailyReport();
thread2 = new dailyReport() dailyReport;
dailyReport thread3 = new dailyReport();
thread4 dailyReport = new dailyReport();
System.out.println (dailyReport.Now (). ToString());
start the threads by using the start method)
thread1. Run (1, date1, date2, sessionID);
Thread2.run (2, date1, date2, sessionID);
Thread2.run (3, date1, date2, sessionID);
Thread2.run (4, date1, date2, sessionID);
System.out.println (dailyReport.Now (). ToString());
expect each thread help
the join method)
thread1. Join ();
Thread2.join ();
thread3. Join ();
thread4. Join ();
System.out.println (dailyReport.Now (). ToString());
#sql [exec_context] {commit};
System.out.println (dailyReport.Now (). ToString());
Oracle.Close ();
System.out.println (dailyReport.Now (). ToString());
} catch (SQLException e) {}
System.Err.println ("SQLException" + e);
System.Exit (1);
} catch (Exception e) {}
System.Err.println ("Exception" + e);
System.Exit (1);
}
}
public void run (int x, int sessionID String date1, date2 string) {}
try {}
If (x == 1) {}
{#sql [exec_context]
delete from bx_income where sessionID =: sessionID
};
{#sql [exec_context]
insert into bx_income (field_name, amount, sessionID)
a.Field_Name, abs (sum (amount)) "AMOUNT", select: sessionID
de)
Select b.field_name, l.saldo_vhd_nacval 'AMOUNT. '
of arH_saldo_ls l, bx_setup_acct b
where l.date_oper = to_date(:date1,'yyyymmdd')
and l.licsch like b.accnt |' %'
Union of all the
Select b.field_name, l.saldo_vhd_nacval 'AMOUNT. '
of arH_saldo_ls_fil l, bx_setup_acct b
where l.date_oper = to_date(:date1,'yyyymmdd')
and l.licsch like b.accnt |' %'
) a
A.field_name group
};
} else if (x == 2) {}
{#sql [exec_context]
delete from bx_exchange where sessionID =: sessionID
};
{#sql [exec_context]
insert into bx_exchange (field_name, amount, sessionID)
Select a.field_name, sum (DC) / 1000 'EXCHANGE',: sessionID
de)
Select b.field_name,
(case
When kredit love b.accnt |' %' and debet as 8681% ' then - summa_v_nacval
When debet like b.accnt |' %' and kredit as 6681% ' then summa_v_nacval
end) "DC".
arh_dd d, bx_setup_acct b
where date_oper between to_date(:date1,'yyyymmdd') and to_date(:date2,'yyyymmdd')
and b.foreign_ccy = 1
and)
d.Kredit like 6681% ' or
d.Debet like 8681% '
)
and)
d.Debet like b.accnt |' %' or
d.Kredit like b.accnt |' %'
)
Union of all the
Select b.field_name,
(case
When kredit love b.accnt |' %' and debet as 8681% ' then - summa_v_nacval
When debet like b.accnt |' %' and kredit as 6681% ' then summa_v_nacval
end) "DC".
arh_dd_fil d, bx_setup_acct b
where date_oper between to_date(:date1,'yyyymmdd') and to_date(:date2,'yyyymmdd')
and b.foreign_ccy = 1
and)
d.Debet like 6681% ' or
d.Kredit like 8681% '
)
and)
d.Debet like b.accnt |' %' or
d.Kredit like b.accnt |' %'
)
) a
Group of FieldName
};
} else if (x == 3) {}
{#sql [exec_context]
delete from bx_middle where sessionID =: sessionID
};
{#sql [exec_context]
insert into bx_middle (field_name, db_total, db_foreign, cr_total, cr_foreign, sessionID)
Select field_name, sum (DB_TOTAL) / 1000 'DB_TOTAL', sum (DB_FOREIGN) / 1000 'DB_FOREIGN', sum (CR_TOTAL) / 1000 'CR_TOTAL', sum (CR_FOREIGN) / 1000 'CR_FOREIGN',: sessionID
de)
Select field_name, 'DB_TOTAL' db, db * foreign_ccy 'DB_FOREIGN', 'CR_TOTAL', cr cr * foreign_ccy "CR_FOREIGN".
de)
Select a.field_name,
a.foreign_ccy,
(case
When < 0 then dc *(-1) dc
0 otherwise
end) "DB."
(case
When dc > = 0 then dc
0 otherwise
end) "CR."
de)
Select b.field_name,
b.foreign_ccy,
(case
When kredit love b.accnt |' %' then summa_v_nacval
When debet like b.accnt |' %' then (-1) * summa_v_nacval
end) "DC".
arh_dd d, bx_setup_acct b
where date_oper between to_date(:date1,'yyyymmdd') and to_date(:date2,'yyyymmdd')
and)
Debet not like 8681% ' or
Kredit not like 6681% '
)
and)
d.Debet like b.accnt |' %' or
d.Kredit like b.accnt |' %'
)
Union of all the
Select b.field_name,
b.foreign_ccy,
(case
When kredit love b.accnt |' %' then summa_v_nacval
When debet like b.accnt |' %' then (-1) * summa_v_nacval
end) "DC".
arh_dd_fil d, bx_setup_acct b
where date_oper between to_date(:date1,'yyyymmdd') and to_date(:date2,'yyyymmdd')
and)
Debet not like 8681% ' or
Kredit not like 6681% '
)
and)
d.Debet like b.accnt |' %' or
d.Kredit like b.accnt |' %'
)
) a
) a
) a
Group of FieldName
};
} else if (x == 4) {}
{#sql [exec_context]
delete from bx_outcome where sessionID =: sessionID
};
{#sql [exec_context]
insert into bx_outcome (field_name, amount, sessionID)
a.Field_Name, abs (sum (amount)) "AMOUNT", select: sessionID
de)
Select b.field_name, l.saldo_ish_nacval 'AMOUNT. '
of arH_saldo_ls l, bx_setup_acct b
where l.date_oper = to_date(:date2,'yyyymmdd')
and l.licsch like b.accnt |' %'
Union of all the
Select b.field_name, l.saldo_vhd_nacval 'AMOUNT. '
of arH_saldo_ls_fil l, bx_setup_acct b
where l.date_oper = to_date(:date2,'yyyymmdd')
and l.licsch like b.accnt |' %'
) a
A.field_name group
};
}
} catch (SQLException e) {}
System.Err.println ("SQLException" + e);
System.Exit (1);
} catch (Exception e) {}
System.Err.println ("Exception" + e);
System.Exit (1);
}
}
}
/
create or replace procedure run_Daily_Report (x number, String, name of file in string DirName)
is the language java name 'dailyReport.runReport (int, java.lang.String, java.lang.String);
/
/********************************************************************************************************/
Maybe I shouldn't run threads with the thread < N > .run but with thread < N > m:System.NET.HttpListener.start.
Please help me to reslove this problem.
Best regards.
Murad balde.user11221084 wrote:
I wrote a little application with 4 wires, but when running it I realized that each thread runs one after the other, but not in parallel mode.Which is the expected behavior, because Oracle JVM uses a running thread model.
-
I have a task already running (the listener) that start different threads.
class Combo extends implements Application GlobalEventListener
{
Public Shared Sub main (String [] args)
{.
.
Private Sub something()
{
PC PlaceCall = new PlaceCall(PBXNumber,3000);
New Thread (PC) m:System.NET.HttpListener.start ();
/ public class PlaceCall implements Runnable
{
String number ="";
public PlaceCall (String phoneNumber, int wait_time)
{
Number = phoneNumber.trim ();.
.
}
public void run()
{.
.
Private Sub 'something' is often executed. 'PC' is completely removed from memory once its thread has finished?
If this is not the case, how can I change the code? PC is also called other routines with other parameters. and I have a lot of similar subjects doing other things
The code works as coded, I use it in several other cases, but I'm worried about leaks memory.
PC should be removed, unless it has a reference to another object (or a member) that he keep living.
Use the Profiler and you can see if the objects are cleaned or not.
E.
-
East Java portability particularly relevant to his approach to thread?
I read that a case of school, "exam cram"
>
Everything that happens in a Java program is actually the result of a thread that executes a method associated with an object. While Java offers many tools to manipulate threads, the portability of Java has its limits because of the variation in the underlying operating system. It is essential for a programmer Java understand the power and the limitation of Java threads. Recognizing this, the review strongly insists on threads and their interaction with the Java objects.
>
It seems the tips above the portability of Java has something to do with his tools of manipulation of threads? But what are these tools? How they can be linked with the portability of Java? Need some lights!
Thank you
Published by: johniii on November 1, 2010 12:11Only from this excerpt, that looks like a poorly written text.
However, it seems to me like they not say that "the portability of Java has something to do with his tools of manipulation of threads" (and I don't even know what you mean by that), but rather that because portability is one of its goals, which imposes limits on the kinds of multithreaded operations, it can expose.
What is your real issue however?
-
OLIVIER 11.1.1.7.1 Java out of memory
Hi Experts,
I did the 11.1.1.7.1 OBIA installation and configuration under windows server 2008 as mentioned in the guide of the oracle.
After restarting windows server Admin Server and Server BI is started with success but ODI server does not start.
for this I have to manually start the first Nodemanager.cmd, and then odi_server1 frm console.
Once everythng starts correctly and I try to open either analytical or biacm then I face below error...
I installed JROCKET 64-bit with details as follow
C:\users\administrator > java-version
Java version "1.6.0_37".
Java (TM) SE Runtime Environment (build 1.6.0_37 - b06)
Oracle JRockit (R) (build R28.2.5-20-152429-1.6.0_37-20120927-1915-windows-x86_64, update mode)
Please suggest a solution for this issue met...
Thanks in advance for help... :))
< 17 June 2013 15:47:50 IST > < error > < HTTP > < BEA-101017 > < [ServletContext@28255
path of the module: biacm 3721 [App:Oracle.biacm: / biacm spec-version: 2.5 version: 11.1.1.7]
. 1]] root cause of ServletException.
means: award of classblock, 25428704 load, 25088K footp
Rint, in check_alloc (src/jvm/model/classload/classalloc.c:215).
Attempt to allocate 2G bytes
It is not enough native memory for the Java
Execution environment to continue.
Possible reasons:
The system is out of physical space RAM or swap
In 32-bit mode, the process size limit has been hit
Possible solutions:
Reduce the memory load on the system
Increase the physical space of memory or swap
Check if the swap backing store is full
Use Java 64-bit on a 64 bit OS
Decrease the Java heap size (-Xmx /-Xms)
Reduce the number of Java threads
Decrease for the Java thread stack size (-Xss)
Disable the compressed references (-XXcompressedRefs = false)
at java.lang.ClassLoader.defineClass1 (Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:14
1)
at weblogic.utils.classloaders.GenericClassLoader.defineClass (GenericCla
ssLoader.java:343)
Truncated. check the log file full stacktrace
>
Finally I got the solution by updating the file D:\MWH\wlserver_10.3\common\bin\commEnv.cmd with following values described here in bold and underlined
: oracle
If '% PRODUCTION_MODE' is 'true' goto oracle_prod_mode
Set JAVA_VM =-jrockit
Set MEM_ARGS =-Xms64m Xmx128m - XX: + UnlockDiagnosticVMOptions - XX: InitialClassBlockMemory = 256M - XX: MaxClassBlockMemory = 256 M - XXcompressedRefs: enable = false
set JAVA_OPTIONS = % JAVA_OPTIONS % - Xverify: no
GoTo continues
: oracle_prod_mode
Set JAVA_VM =-jrockit
Set MEM_ARGS =-Xms64m-Xmx128m
GoTo continues
-
Is it guaranteed that a started thread will run until the end?
Hi guys,.
Someone wrote this on the threads:
«Thread depends on the VM Scheduler and * it has NOT guaranteed a Thread run and selection by the Scheduler of VM despite you started the thread with a call to x.start () *.» "When you started the Thread it is only in a RUNNABLE STATE, re-read Chapter until you have understood" (Chapter 9 wire - Sun Certified program for Java 6 - Study Guide (310-065) - Kathy Sierra and Bert Bates - 2008)
It's the Red sentence that make me really confused. In fact, I read this chapter several times, and I couldn't read that kind of statement in the chapter. What I have read is the following,
Excerpt from the book (pp. 713-714)
class NameRunnable implements Runnable {}
public void run() {}
for (int x = 1; x < = 3; x ++) {}
System.out.println ("Run by")
+ Thread.currentThread () .getName)
+ ", x is"+ x); ".
}
}
}
public class ManyNames {}
Public Shared Sub main (String [] args) {}
Make an executable
NameRunnable nr = new NameRunnable();
A thread = new Thread (nr);
Put on two = new Thread (nr);
Thread three = new Thread (nr);
one.setName("Fred");
two.setName("Lucy");
three.setName("Ricky");
One.Start ();
Two.Start ();
Three.Start ();
}
}
And the authors wrote this:
Nothing is guaranteed in the previous code EXCEPT this:
Each thread will start and each thread runs until the end.
I try to explain to me, what I heard in the sentence in the book: "each thread will begin, and each thread runs until the end."
$java ManyNames
After this call, the main method of the class that manynames is called and the JVM running the code in this sequential method. When the main thread calls one.start (), the thread (thread Java) is mapped to an operating system thread (well well, in most implementations), but the important thing, the (Java thread) thread gets the RUNNABLE state pending to have a chance to get the State RUNNING one start execution of the its Runnable target run() method. So, at this point, we have two sons who may be selected to get the State of EXECUTION, the main thread and the thread one. Assume the main thread runs a hand through method. In this case, calls two.start () and three.start () are called. Main thread ends, and we have three threads alive, waiting for his ride to get the condition of OPERATION. For me to run in full means that all these discussions will be printed three times the sentence:
"Managed by [NAME of THREAD: Fred or Lucy and Ricky], x is [1, 2, or 3].
And each of them will end their run() (AS THE CODE MEANS) method. A possible output might be:
Directed by Fred, x is 1
Managed by Lucy, x is 1
Managed by Lucy, x is 2
Directed by Fred, x is 2
Managed by Lucy, x is 3
Directed by Fred, x is 3
Managed by Ricky, x is 1
Is managed by Ricky, x 2
Managed by Ricky, x is 3
But this order is not guaranteed.
So, my question is simple, if we execute THE CODE (without everything changed) in ANY Machine Java virtual, it is GUARANTEED all started threads (main thread, Fred, Lucy and Ricky) will run until the end OR I have to believe what the guy wrote to me: it has NOT guaranteed a Thread run and selection by the Scheduler of VM despite you started the thread with a call to x.start ()?
If what this guy says is correct, it should be to create and start a thread if it is not guaranteed that this thread will run until the end? Well, if it is a nice Visual clock on the screen it does not matter if we can see the clock or not, but what would you say if it is a wire that control the process of emergency in a factory, just an example.
Thanks for your opinions,
Alvaro
Published by: Alvaro on July 28, 2011 17:15While there is no guarantee, the goal of starting discussions is that it will run until the end, and this is what happens under normal conditions.
-
support multithreaded Java in Oracle JVM
Hi all
I have a few questions and comments regarding the multithreading support in Oracle JVM. I have a java code that is stored in the database and is multithreaded (in separate threads, I run a plsql procedure who does a lot of precession). If I run the code with my standalone JVM it works like a charm, everything is run in separate threads. But if I keep the code in the database and run (with the Oracle of JVM custom set up for the server) is not any thread, all I have is a single thread that runs all sequentially.
The logic is as follows: using to create a JDBC connection, get a parameter (number of threads) and then launch threads (each thread creates its own connection and executes the plsql procedure). No resource is shared (I have no synchronized code, I do not).
My question is: does JVM Oracle supports multithreaded or not? If Yes, how? Maybe there is something managed in JDBC? (although my useses JDBC code is not multithreaded) If this is not possible with java, do you now how to run something (function oracle, procedure) at the same time as PLSQL? (I tried with DBMS_JOBS but it does not work on all of my databases and our DBAs discourage their use). Implementation of multithreading my process different launch sqlPlus is not an option (as we have no standard security authentication-> connection made by the specification of the user and the password in clear text).
I wanted to use java because is more simple, secure (the connection is already established that the classes are stored in the database) and easy to maintain (up to now, we use different scripts that run on Unix and Windows, and this leads to duplication of effort).
Versions of Oracle that I use are 10g and 11g.
Thank you all very much for your time
Simply the best,
DonHello
Oracle documentation:
The Oracle JVM implements a model of executed thread. With this model, the JAVA virtual machine is running all Java threads on a single OS thread. He planned them alternating and toggle between them only when they block. Blocking occurs when, for example, you call the Thread.yield () method or wait for a network socket by calling mySocket.read ().
That is why it seems that you have only a single thread when you compile the database and run.
The documentation is here:
[http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/chtwo.htm]
Hope that helps with the first part of your question.
Published by: aeon ibo April 27, 2011 07:01
-
I've read a few articles on Java Threads, but I'm confused about a question.
If I spawn a new thread (so-called "thread user") my hand wire under what conditions the main thread is waiting for the thread user complete execution to leave the system?
My understanding was, once the thread user is generated, hand thread will go ahead with his execution and if it reaches the end point until the user thread finishes its task, it will leave just causing the premature end of the thread user.
I wrote a code to test and realized that if I got out of the main thread with the system.exit() function, the user thread ends prematurely. Otherwise, the main thread waits for the thread user complete execution (even without the join() method). In all the articles I read, this concept is not really clearly described, or at least I have not picked correctly. Could you guys please care to explain?In order to clarify
cardan2 wrote:
When the main thread ends its execution, she (the machine JAVA Virtual, not the main thread) will wait for all the "regular" at the end of their first execution threads until the program stops. -
Thread safe operations on the table in the pl/sql procedure?
I develop java application that will run in N locations simultaneously, each application will be of the sons of Mr. each thread takes a unique ID with the NOT_TAKEN State of the queue table and changes its status to TAKEN.
Problem:
How to prevent situation like this thread:
1 get a first select ID with NOT_TAKEN status
2. at the same time thread B select first (so it will be the same ID chosen thread A) ID have the status of NOT_TAKEN.
3 put on a status of changes of identity and
4 thread B status of the TAKEN ID changes
After this thread A and B using the same ID.
What I did:
I've written pl/sql procedure that queue table in exclusive mode lock, selects the first ID, changes its status to CATCH and unlocks the table. Because it is lock in exclusive mode for a single thread can run this procedure at the same time.
Question:
Optimal how must it be resolved, because mine solution prevents to perform all the other updates on the queue table, while it is locked, as the change in status of OPERATION_DONE TAKEN so there performance problem.As Centinul said, you need to lock just one line.
I would just add NOWAIT to the select statement to let the Java thread go and try again, rather than wait for other threads.
Example: (not tested)-- -- Assuming structure of your QueueTable: ( IDCol is PK , StatusCol is VARCHAR2, ... ) -- -- -- or make it part of the package.... CREATE OF REPLACE FUNCTION updateQueue( nQID QueueTable.IDCol%TYPE) RETURN VARCHAR2 AS eLocked EXCEPTION; PRAGMA EXCEPTION_INIT(eLocked,-54); CURSOR curQueueTable IS SELECT 1 CNTR FROM QueueTable WHERE IDCol=nQID AND StatusCol='NOT_TAKEN' FOR UPDATE OF StatusCol NOWAIT; recQueueTable curQueueTable%ROWTYPE; cRtn VARCHAR2(1); BEGIN cRtn := 'Y'; BEGIN OPEN curQueueTable; FETCH curBuffSummary INTO recQueueTable; CLOSE curQueueTable; IF recQueueTable.CNTR IS NOT NULL AND recQueueTable.CNTR = 1 THEN UPDATE QueueTable SET StatusCol = 'TAKEN' WHERE IDCol=nQID; ELSE -- Already updated cRtn := 'N'; END IF; -- You can control your transaction here as well -- COMMIT; -- But if realy should be done in the Java thread. EXCEPTION WHEN eLocked OR STANDARD.TIMEOUT_ON_RESOURCE THEN -- Thread could not get exclusice row lock. Ignore error. cRtn := 'N'; NULL; WHEN OTHERS THEN -- Handle other errors... -- NULL; just kidding... RAISE; END; RETURN cRtn; END;
Published by: thomaso September 18, 2009 10:30
-
A fatal error has been detected by Java runtime environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc = 0x006e0065, pid = 5472, tid = 1784
#
# Version JRE: 6.0_26 - b03
# Java VM: Java hotspot Client VM (20, 1 - b02 mixed mode, sharing windows - x 86)
# Problematic frame:
C# 0X006E0065
#
# If you want to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The accident happened outside the Virtual Machine Java to native code.
# See problematic frame for where report them the bug.
#--------------- T H R E A D ---------------
The current thread (0x0325dc00): JavaThread "AWT-Windows" daemon [_thread_in_native, id = 1784, stack(0x03550000,0x035a0000)]
siginfo: ExceptionCode = 0xc0000005, address 0x006e0065 reading
Records:
EAX = 0X00C78E48 EBX = 0X00000001, ECX = 0X033E5A58 EDX = 0 X 00000004
ESP = 0X0359F800 EBP = 0X0359F82C ESI = 0X0325DD28 EDI = 0X033E5A58
EIP = 0X006E0065, EFLAGS = 0 X 00010293Top of the stack: (sp = 0x0359f800)
0x0359f800: 6d09cb90 0359f894 6d09c650 00000000
0x0359f810: 00000000 00000001 0325dd28 0359f804
0x0359f820: 0359f8b0 6d0c04a8 00000001 0359f858
0x0359f830: 7e418734 001 b 0534 0000981a 033e5a58
0x0359f840: 00000000 00000000 6d09c650 jessicadelacourt
0x0359f850: 0359f894 6d09c650 0359f8c0 7e418816
0x0359f860: 6d09c650 001 b 0534 0000981a 033e5a58
0x0359f870: 00000000 0359f954 0359f94c 005ea378Operating instructions: (pc = 0x006e0065)
0x006e0045:
[error has occurred in the information error (printing of registers, the top of the stack, instructions near pc), id 0xc0000005]Register for memory mapping:
EAX = 0x00c78e48 is an unknown value
X 00000001 EBX = 0 is an unknown value
ECX = 0x033e5a58 is an unknown value
EDX = 0 x 00000004 is an unknown value
ESP = 0x0359f800 is oriented in the stack for the thread: 0x0325dc00
EBP = 0x0359f82c is oriented in the stack for the thread: 0x0325dc00
ESI = 0x0325dd28 is an unknown value
EDI = 0x033e5a58 is an unknown valueBattery: 0 x 03550000 (0x035a0000) and sp = 0x0359f800, free space = 318 k
Native frames: (J = compiled code Java, j = interpreted, Vv = VM code, C = native code)
C 0X006E0065
GetDC C [USER32.dll + 0 x 8734] + 0x6d
GetDC C [USER32.dll + 0 x 8816] + 0x14f
C [USER32.dll + 0x89cd] GetWindowLongW + 0 x 127
C [USER32.dll + 0x8a10] DispatchMessageW + 0xfJava images: (J = compiled Java code, j = interpreted, Vv = VM code)
j sun.awt.windows.WToolkit.eventLoop (V + 0)
j sun.awt.windows.WToolkit.run (V + 52)
j java.lang.Thread.run (V + 11)
v ~ StubRoutines::call_stub--------------- P R O C E S S ---------------
Java threads: (=> the current thread)
JavaThread "Keep-Alive-Timer" 0x0327bc00 demon [_thread_blocked, id = 5192, stack (0x046b0000, 0 x 04700000)]
JavaThread 'Image host 0' 0x05d9e800 daemon [_thread_blocked, id = 4664, stack(0x01090000,0x010e0000)]
0x08544c00 'TickTimer' demon JavaThread [_thread_blocked, id = 2348, stack (0 x 09700000, 0 x 09750000)]
JavaThread "ITimer" demon 0x06365c00 [_thread_blocked, id = 5952, stack(0x09660000,0x096b0000)]
0x060e3400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5736, stack(0x07460000,0x074b0000)]
0x04e86800 JavaThread 'TextField' daemon [_thread_blocked, id = 4516, stack (0 x 07410000, 0 x 07460000)]
0 x 06729400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5956, stack (0x073c0000, 0 x 07410000)]
0x065ab400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 192, stack(0x07370000,0x073c0000)]
0x05bea400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5968, stack (0 x 07320000, 0 x 07370000)]
0x06e14c00 JavaThread "ScrollBar" daemon [_thread_blocked, id = 3300, stack (0 x 05800000, 0 x 05850000)]
0x04b48400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 3592, stack (0x04ac0000, 0x04b10000)]
0x00c77000 'TickTimer' demon JavaThread [_thread_blocked, id = 5920, stack (0x04a20000, 0x04a70000)]
0x0336d400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 3688, stack (0x049d0000, 0x04a20000)]
0x0336ac00 'BadgeStorage' demon JavaThread [_thread_blocked, id = 3224, stack (0 x 04930000, 0 x 04980000)]
0 x 03375800 'AsynchRasterManager.avatar' demon JavaThread [_thread_blocked, id = 3112, stack (0x055c0000, 0 x 05610000)]
JavaThread 'Thread-68' 0x03294c00 daemon [_thread_in_native, id = 3048, stack (0x051e0000, 0 x 05230000)]
0x04d28800 'AsynchRasterManager' demon JavaThread [_thread_blocked, id = 4360, stack (0x04a70000, 0x04ac0000)]
0 x 03449400 JavaThread "thread applet - com.pogo.game.client2.shell.ShellApplet - 14" [_thread_blocked, id = 3452, stack (0 x 04840000, 0 x 04890000)]
JavaThread 0x032ba000 "thread applet - com.pogo.game.client2.shell.ShellApplet - 13" [_thread_blocked, id = 4752, stack (0x047a0000, 0x047f0000)]
JavaThread 0x032eb800 "thread applet - com.pogo.game.client2.freebingo.FreeBingoApplet - 12" [_thread_blocked, id = 2560, stack (0 x 04700000, 0 x 04750000)]
JavaThread 0x033a6800 "thread applet - com.pogo.game.client2.shell.ShellApplet - 11" [_thread_blocked, id = 1684, stack (0x043e0000, 0 x 04430000)]
JavaThread 0x04b2c800 "thread applet - com.pogo.game.client2.shell.ShellApplet - 10" [_thread_blocked, id = 2532, stack (0x036f0000, 0 x 03740000)]
JavaThread 'AWT-EventQueue-7' 0x04b19800 [_thread_in_native, id = 2896, stack (0x048e0000, 0 x 04930000)]
0x0605d000 JavaThread "AWT-stop" [_thread_blocked, id = 4716, stack(0x04890000,0x048e0000)]
0x00c9d800 JavaThread cmdlet-18 LiveConnect Worker Thread"[_thread_blocked, id = 3776, stack(0x04750000,0x047a0000)]
0x04bd7800 JavaThread cmdlet-17 LiveConnect Worker Thread"[_thread_blocked, id = 3028, stack(0x04470000,0x044c0000)]
0x05b09000 JavaThread "Applet 16 LiveConnect Worker Thread" [_thread_blocked, id = 896, stack (0 x 03830000, 0 x 03880000)]
0x05ea5800 JavaThread cmdlet-15 LiveConnect Worker Thread"[_thread_blocked, id = 3476, stack (0 x 03500000, 0 x 03550000)]
0x04d5dc00 JavaThread 'Java Sound event dispatcher' demon [_thread_blocked, id = 4600, stack(0x05190000,0x051e0000)]
0x0329bc00 JavaThread ' browser side object cleanup thread "[_thread_blocked, id = 4248, stack(0x04380000,0x043d0000)]
0 x 03272400 JavaThread 'Feed icon bar State Windows' [_thread_in_native, id = 1024, stack (0x037e0000, 0 x 03830000)]
JavaThread "CacheCleanUpThread" demon 0x0326fc00 [_thread_blocked, id = 4852, stack(0x03790000,0x037e0000)]
0 x 03268800 'CacheMemoryCleanUpThread' demon JavaThread [_thread_blocked, id = 5344, stack (0 x 03740000, 0 x 03790000)]
0 x 03265800 'SysExecutionTheadCreator' demon JavaThread [_thread_blocked, id = 3788, stack (0 x 03200000, 0 x 03250000)]
0 x 03262000 JavaThread "thread of Heartbeat Java plug-in" [_thread_blocked, id = 5772, stack (0x036a0000, 0x036f0000)]
-Online 0x0325dc00 JavaThread "AWT-Windows" daemon [_thread_in_native, id = 1784, stack(0x03550000,0x035a0000)]
0x0325b000 JavaThread "Shredder Java2D" demon [_thread_blocked, id = 1656, stack (0x034a0000, 0x034f0000)]
0 x 03258800 JavaThread "Java plug-in - Pipe Worker Thread (Client side) ' daemon [_thread_in_native, id = 1736, stack(0x03450000,0x034a0000)]
JavaThread 'Timer-0' 0x00ce8400 [_thread_blocked, id = 2376, stack(0x01190000,0x011e0000)]
0x00c84c00 'traceMsgQueueThread' demon JavaThread [_thread_blocked, id = 2000, stack (01100000 0 x, 0 x 01150000)]
JavaThread "Low memory detector" 0x00c5cc00 demon [_thread_blocked, id = 3332, stack (0x00ed0000, 0x00f20000)]
JavaThread "CompilerThread0 C1" demon 0x00c56400 [_thread_blocked, id = 3992, stack (0x00e80000, 0x00ed0000)]
JavaThread "Listener set" 0x00c54800 demon [_thread_blocked, id = 3660, stack (0x00e30000, 0x00e80000)]
JavaThread 'Dispatcher of Signal' demon 0x00c53400 [_thread_blocked, id = 3756, stack (0x00de0000, 0x00e30000)]
0x00c4fc00 JavaThread 'Finalizer' daemon [_thread_blocked, id = 1204, stack (0x00d90000, 0x00de0000)]
0x00c47c00 JavaThread "Reference Handler" daemon [_thread_blocked, id = 3752, stack (0x00d40000, 0x00d90000)]
0 x 00398000 'hand' JavaThread [_thread_blocked, id = 3512, stack(0x00980000,0x009d0000)]Other topics:
0x00c0bc00 VMThread [stack: 0x00cf0000, 0x00d40000] [id = 3572]
0x00c6f800 WatcherThread [stack: 0x00f20000, 0x00f70000] [id = 3320]VM status: not to the point of restoration (normal execution)
VM Mutex/monitor currently owned by thread: None
Bunch
total of new generation def 27456K, used 21144K [0x2a790000, 0x2c550000, 0x2d230000)
Eden space 24448K, 82% have used [0x2a790000, 0x2bb3b3c0, 0x2bf70000)
from space 3008K, 33% used [0x2c260000, 0x2c35ac48, 0x2c550000)
3008K-space, 0% used [0x2bf70000, 0x2bf70000, 0x2c260000)
tenure generation total 60728K, used 49353K [0x2d230000, 0x30d7e000, 0 x 32790000)
60728K-space, 81% have used [(0x302624b8, 0x30262600, 0x2d230000, 0x30d7e000)]
compaction perm gen total 12288K, used 5628K [0 x 32790000, 0 x 33390000, 0 x 36790000)
12288K-space, 45% have used [0x32d0f1b8, 0x32d0f200, 0 x 32790000, 0 x 33390000)
RO space 10240 K, 51% have used [0x36cbdff8, 0x36cbe000, 0 x 36790000, 0 x 37190000)
RW space 12288K, 55% used [(0x3782c208, 0x3782c400, 0x37190000, 0x37d90000)]Hiding code [0 x 01200000, 0 x 01678000, 0 x 03200000)
total_blobs = 2309 nmethods = 2063 cards = 179 free_code_cache = largest_free_block 28894400 = 256Dynamic libraries:
0x00400000 - 0 x 00424000 C:\Program Files\Java\jre6\bin\java.exe
0x7c900000 - 0x7c9b2000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f03000 C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 C:\WINDOWS\system32\Secur32.dll
0x5cb70000 - 0x5cb96000 C:\WINDOWS\system32\ShimEng.dll
0 x 71590000 - 0 x 71609000 C:\WINDOWS\AppPatch\AcLayers.DLL
0x7e410000 - 0x7e4a1000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000 C:\WINDOWS\system32\GDI32.dll
0x7c9c0000 - 0x7d1d7000 C:\WINDOWS\system32\SHELL32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x774e0000 - 0x7761e000 C:\WINDOWS\system32\ole32.dll
0x769c0000 - 0x76a74000 C:\WINDOWS\system32\USERENV.dll
0 x 73000000 - 0 x 73026000 C:\WINDOWS\system32\WINSPOOL. CR1
0 x 76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32. DLL
0x773d0000 - 0x774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll
0x7c340000 - C:\Program Files\Java\jre6\bin\msvcr71.dll 0x7c396000
0x6d7f0000 - C:\Program Files\Java\jre6\bin\client\jvm.dll 0x6da9f000
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d7a0000 - C:\Program Files\Java\jre6\bin\verify.dll 0x6d7ac000
0x6d320000 - C:\Program Files\Java\jre6\bin\java.dll 0x6d33f000
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI. DLL
0x6d7e0000 - C:\Program Files\Java\jre6\bin\zip.dll 0x6d7ef000
0x6d420000 - C:\Program Files\Java\jre6\bin\jp2native.dll 0x6d426000
0x6d1d0000 - C:\Program Files\Java\jre6\bin\deploy.dll 0x6d1e3000
0x77a80000 - 0x77b15000 C:\WINDOWS\system32\CRYPT32.dll
0x77b20000 - 0x77b32000 C:\WINDOWS\system32\MSASN1.dll
0 x 77120000 - 0x771ab000 C:\WINDOWS\system32\OLEAUT32.dll
0x3d930000 - 0x3da16000 C:\WINDOWS\system32\WININET.dll
0x00f70000 - 0x00f79000-C:\WINDOWS\system32\Normaliz.dll
0 x 78130000 - 0 x 78263000 C:\WINDOWS\system32\urlmon.dll
0x3dfd0000 - 0x3e1b9000 C:\WINDOWS\system32\iertutil.dll
0x6d6a0000 - C:\Program Files\Java\jre6\bin\regutils.dll 0x6d6e6000
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x6d600000 - C:\Program Files\Java\jre6\bin\net.dll 0x6d613000
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x6d620000 - C:\Program Files\Java\jre6\bin\nio.dll 0x6d629000
0x6d000000 - C:\Program Files\Java\jre6\bin\awt.dll 0x6d14b000
0x5d090000 - 0x5d12a000 C:\WINDOWS\system32\comctl32.dll
0 x 74720000 - 0x7476c000 C:\WINDOWS\system32\MSCTF.dll
0x77b40000 - 0x77b62000 C:\WINDOWS\system32\apphelp.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x6d230000 - C:\Program Files\Java\jre6\bin\fontmanager.dll 0x6d27f000
0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76d60000 - 0x76d79000 C:\WINDOWS\system32\iphlpapi.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x10000000 - 0x1001f000 C:\WINDOWS\system32\iavlsp.dll
0 x 77690000 - 0x776b1000 C:\WINDOWS\system32\NTMARTA. DLL
0x71bf0000 - 0x71c03000 C:\WINDOWS\system32\SAMLIB.dll
0x662b0000 - 0 x 66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
0x6d510000 - C:\Program Files\Java\jre6\bin\jsound.dll 0x6d535000
0x6d540000 - C:\Program Files\Java\jre6\bin\jsoundds.dll 0x6d548000
0x73f10000 - 0x73f6c000 C:\WINDOWS\system32\DSOUND.dll
0x76c30000 - 0x76c5e000 C:\WINDOWS\system32\WINTRUST.dll
0x76c90000 - 0x76cb8000 C:\WINDOWS\system32\IMAGEHLP.dll
0x72d20000 - 0x72d29000 C:\WINDOWS\system32\wdmaud.drv
0x72d10000 - 0x72d18000 C:\WINDOWS\system32\msacm32.drv
0x77be0000 - 0x77bf5000 C:\WINDOWS\system32\MSACM32.dll
0x77bd0000 - 0x77bd7000 C:\WINDOWS\system32\midimap.dll
0x73ee0000 - 0x73ee4000 C:\WINDOWS\system32\KsUser.dll
0x6d440000 - C:\Program Files\Java\jre6\bin\jpeg.dll 0x6d465000
68000000 0 x - 0 x 68036000 C:\WINDOWS\system32\rsaenh.dll
0x5b860000 - 0x5b8b5000 C:\WINDOWS\system32\netapi32.dll
0x1c000000 - 0x1c006000 C:\WINDOWS\HKNTDLL.dllVM Arguments:
jvm_args :-D__jvm_launched = 5409301771 - Xbootclasspath/a:C:\PROGRA~1\Java\jre6\lib\deploy.jar; C:\Progra~1\Java\jre6\lib\javaws.jar; C:\Progra~1\Java\jre6\lib\plugin.jar-Dsun.awt.warmup=true-Xmx128m
java_command: sun.plugin2.main.client.PluginMain write_pipe_name = jpi2_pid2736_pipe10, read_pipe_name = jpi2_pid2736_pipe9
Type of launcher: SUN_STANDARDEnvironment variables:
Path = c: 9.0\Reader\plug_ins; C:\Program 9.0\Reader\ Adobe. C:\Program may Explorer; C:\Windows\System32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0; C:\PROGRA~1\COMMON~1\MUVEET~1\030625; C:\Program 9.0\Reader\plug_ins\test_tools Adobe
USERNAME = administrator
OS = Windows_NT
PROCESSOR_IDENTIFIER = x 86 Family 15 Model 4 Stepping 1, GenuineIntel--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 2 (1 cores per processor, 2 threads by heart) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht
Memory: 4 k page, physical 1038184 k (366092 k free), Exchange 2498512 k (1765136 k free)
vm_info: Java hotspot Client VM (20, 1 - b02) for JRE windows - x 86 (1.6.0_26 - b03), built on May 4, 2011 00:50:59 by "java_re" with MS VC ++ 7.1 (VS2003)
time: Wed Jul 27 10:42:01 2011
elapsed time: 1443 secondsand
A fatal error has been detected by Java runtime environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc = 0x7c919af2, pid = 3852, tid = 3788
#
# Version JRE: 6.0_26 - b03
# Java VM: Java hotspot Client VM (20, 1 - b02 mixed mode, sharing windows - x 86)
# Problematic frame:
# C [ntdll.dll + 0x19af2]
#
# If you want to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The accident happened outside the Virtual Machine Java to native code.
# See problematic frame for where report them the bug.
#--------------- T H R E A D ---------------
The current thread (0x00caec00): JavaThread "AWT-Windows" daemon [_thread_in_native, id = 3788, stack(0x03550000,0x035a0000)]
siginfo: ExceptionCode = 0xc0000005, address 0x00000010
Records:
EAX = 0 X 00000000 EBX = 0 X 00000000 ECX = 0 X 00001488, EDX = 0X00CE1E90
ESP = 0X0359F8D0 EBP = 0X0359F944 ESI = 0X00CE1E80 EDI = 0X00000000
EIP = 0X7C919AF2, EFLAGS = 0 X 00010246Top of the stack: (sp = 0x0359f8d0)
0x0359f8d0: 00ce1e80 00ce1d50 00000001 002e002c
0x0359f8e0: 6d0c76b4 00090544 0000982c 0359f8dc
0x0359f8f0: 00000000 00000000 0000c0cf 0359f8c8
0x0359f900: 0359f980 7c839ad8 7c830c98 ffffffff
0x0359f910: 7c830c90 7c834ed8 6d062a1c 6d062aa8
0x0359f920: 6d101d8c 6d101d6c 6d101d70 6d06422c
0x0359f930: 7e42d312 00ce1d50 7e418b8c 00000000
0x0359f940: 00001488 0359f98c 7 c 901046 00ce1e80Operating instructions: (pc = 0x7c919af2)
0x7c919ad2: 97 7 c f6 57 1B c0 d0 e1 97 25 e0 f7 d8 7 c 8B f8
0x7c919ae2: 8 b 46 10 and 3 b c3 45 89 CF 0f 84 00 00 00 8 9th b 06
0x7c919af2: ff b 40 10 8 45 fc 83 01 89 45 8 b 06 e8 e0 ff 40
0x7c919b02: 14 05 02 fe 7f 01 0f 85 16 9 f0 f6 02 00 39 5 d dRegister for memory mapping:
EAX = 0 x 00000000 is an unknown value
EBX = 0 x 00000000 is an unknown value
ECX = 0 x 00001488 is an unknown value
EDX = 0x00ce1e90 is an unknown value
ESP = 0x0359f8d0 is oriented in the stack for the thread: 0x00caec00
EBP = 0x0359f944 is oriented in the stack for the thread: 0x00caec00
ESI = 0x00ce1e80 is an unknown value
EDI = 0 x 00000000 is an unknown valueBattery: 0 x 03550000 (0x035a0000) and sp = 0x0359f8d0, free space = 318 k
Native frames: (J = compiled code Java, j = interpreted, Vv = VM code, C = native code)
C [ntdll.dll + 0x19af2] RtlpWaitForCriticalSection + 0x5b
C [ntdll.dll + 0 x 1046] RtlEnterCriticalSection + 0 x 46
GetDC C [USER32.dll + 0 x 8734] + 0x6d
GetDC C [USER32.dll + 0 x 8816] + 0x14f
C [USER32.dll + 0x18ea0] + 0 DefWindowProcW x 180
C [USER32.dll + 0x18eec] DefWindowProcW + 0x1cc
C [ntdll.dll + 0xe473] KiUserCallbackDispatcher + 0 x 13
C [USER32.dll + 0 x 9402] PeekMessageW + 0 x 167Java images: (J = compiled Java code, j = interpreted, Vv = VM code)
j sun.awt.windows.WToolkit.eventLoop (V + 0)
j sun.awt.windows.WToolkit.run (V + 52)
j java.lang.Thread.run (V + 11)
v ~ StubRoutines::call_stub--------------- P R O C E S S ---------------
Java threads: (=> the current thread)
0x00cbf000 'TickTimer' demon JavaThread [_thread_blocked, id = 5692, stack(0x06570000,0x065c0000)]
JavaThread "ITimer" demon 0x049eb400 [_thread_blocked, id = 5580, stack (0x05cd0000, 0x05d20000)]
JavaThread 'Image host 0' 0x033bd000 daemon [_thread_blocked, id = 5528, stack (0x05ad0000, 0x05b20000)]
0x032edc00 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5508, stack (0x05a80000, 0x05ad0000)]
0 x 03331800 JavaThread 'TextField' daemon [_thread_blocked, id = 5504, stack (0x05a30000, 0x05a80000)]
0x04b29400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5500, stack (0x059e0000, 0x05a30000)]
0 x 03310400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5496, stack(0x05990000,0x059e0000)]
0x04b35c00 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5492, stack (0 x 05940000, 0 x 05990000)]
0x04a7a400 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5488, stack (0x058f0000, 0 x 05940000)]
0x032e8c00 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5484, stack (0x058a0000, 0x058f0000)]
0x032d8400 'TickTimer' demon JavaThread [_thread_blocked, id = 5480, stack(0x05850000,0x058a0000)]
0x04a5d800 JavaThread "ScrollBar" daemon [_thread_blocked, id = 5476, stack (0 x 05800000, 0 x 05850000)]
0x0493a400 'BadgeStorage' demon JavaThread [_thread_blocked, id = 5472, stack (0x055d0000, 0 x 05620000)]
0x0332ac00 'AsynchRasterManager.avatar' demon JavaThread [_thread_blocked, id = 4940, stack(0x05580000,0x055d0000)]
0x0332a800 JavaThread 'Clip Direct' daemon [_thread_blocked, id = 4936, stack (0 x 04700000, 0 x 04750000)]
JavaThread "Thread-31" 0x00ce4400 demon [_thread_in_vm, id = 4896, stack (0 x 05010000, 0 x 05060000)]
0x0486b800 JavaThread 'Java Sound event dispatcher' demon [_thread_blocked, id = 4680, stack (0x04fc0000, 0 x 05010000)]
JavaThread 0x00c0a000 "thread applet - com.pogo.game.client2.wordjong.WordjongApplet - 5" [_thread_blocked, id = 4580, stack (0x04c90000, 0x04ce0000)]
JavaThread 0x00ce1800 "thread applet - com.pogo.game.client2.shell.ShellApplet - 4 ' [_thread_blocked, id = 4576, stack (0x04c40000, 0x04c90000)]
JavaThread 0x032d7800 "thread applet - com.pogo.game.client2.shell.ShellApplet - 3 ' [_thread_blocked, id = 4572, stack (0x04bf0000, 0x04c40000)]
0x032da400 JavaThread cmdlet-4 LiveConnect Worker Thread"[_thread_blocked, id = 4556, stack(0x04760000,0x047b0000)]
0 x 03254800 JavaThread 'AWT-EventQueue-4' [_thread_in_native, id = 4552, stack (0 x 03600000, 0 x 03650000)]
0 x 03224400 JavaThread cmdlet-3 LiveConnect Worker Thread"[_thread_blocked, id = 4544, stack (0 x 04420000, 0 x 04470000)]
0x0324e000 JavaThread ' browser side object cleanup thread "[_thread_blocked, id = 3276, stack(0x04380000,0x043d0000)]
0 x 03247000 JavaThread 'Feed icon bar State Windows' [_thread_in_native, id = 3100, stack (0x037e0000, 0 x 03830000)]
0 x 03242000 JavaThread "CacheCleanUpThread" demon [_thread_blocked, id = 2296, stack(0x03790000,0x037e0000)]
0x0321e000 'CacheMemoryCleanUpThread' demon JavaThread [_thread_blocked, id = 2464, stack (0 x 03740000, 0 x 03790000)]
0x03217c00 JavaThread 'SysExecutionTheadCreator' demon [_thread_blocked, id = 804, stack (0x036a0000, 0x036f0000)]
JavaThread 0x00ca0400 "thread of Heartbeat Java plug-in" [_thread_blocked, id = 1204, stack (0 x 03400000, 0 x 03450000)]
0x00cef800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id = 2052, stack(0x03650000,0x036a0000)]
-Online 0x00caec00 JavaThread "AWT-Windows" daemon [_thread_in_native, id = 3788, stack(0x03550000,0x035a0000)]
0x00cad400 JavaThread "AWT-stop" [_thread_blocked, id = 3512, stack (0 x 03500000, 0 x 03550000)]
0x00cac400 JavaThread "Shredder Java2D" demon [_thread_blocked, id = 3572, stack (0x034a0000, 0x034f0000)]
JavaThread 0x00c85400 "Java plug-in - Pipe Worker Thread (Client side) ' daemon [_thread_in_native, id = 3752, stack(0x03450000,0x034a0000)]
JavaThread 'Timer-0' 0x00c9e800 [_thread_blocked, id = 3756, stack(0x01190000,0x011e0000)]
0x00ca3800 'traceMsgQueueThread' demon JavaThread [_thread_blocked, id = 3660, stack (01100000 0 x, 0 x 01150000)]
JavaThread "Low memory detector" 0x00c59000 demon [_thread_blocked, id = 3332, stack (0x00ed0000, 0x00f20000)]
JavaThread "CompilerThread0 C1" demon 0x00c53000 [_thread_blocked, id = 3320, stack (0x00e80000, 0x00ed0000)]
JavaThread "Listener set" 0x00c51400 demon [_thread_blocked, id = 3732, stack (0x00e30000, 0x00e80000)]
JavaThread 'Dispatcher of Signal' demon 0x00c50000 [_thread_blocked, id = 2000, stack (0x00de0000, 0x00e30000)]
0x00c4c800 JavaThread 'Finalizer' daemon [_thread_blocked, id = 2376, stack (0x00d90000, 0x00de0000)]
0x00c47c00 JavaThread "Reference Handler" daemon [_thread_blocked, id = 2840, stack (0x00d40000, 0x00d90000)]
0 x 00398000 'hand' JavaThread [_thread_blocked, id = 1656, stack(0x00980000,0x009d0000)]Other topics:
0x00c0bc00 VMThread [stack: 0x00cf0000, 0x00d40000] [id = 1736]
0x00c63c00 WatcherThread [stack: 0x00f20000, 0x00f70000] [id = 3992]VM status: not to the point of restoration (normal execution)
VM Mutex/monitor currently owned by thread: None
Bunch
def generation total 9216K, used 5704K [0x2a790000, 0x2b180000, 0x2d230000)
Eden space K 8256, 65% have used [0x2a790000, 0x2acd6338, 0x2afa0000)
Since space 960K, 31% used [0x2b090000, 0x2b0dbfd8, 0x2b180000)
960K-space, 0% used [0x2afa0000, 0x2afa0000, 0x2b090000)
tenure 20200 km total generation, used 17868K [0x2d230000, 0x2e5ea000, 0 x 32790000)
20200K-space, 88% have used [0x2e3a3148, 0x2e3a3200, 0x2d230000, 0x2e5ea000)
compaction perm gen total 12288K, used 5239K [0 x 32790000, 0 x 33390000, 0 x 36790000)
12288K-space, 42 percent have used [0x32cadfc8, 0x32cae000, 0 x 32790000, 0 x 33390000)
RO space 10240 K, 51% have used [0x36cbdff8, 0x36cbe000, 0 x 36790000, 0 x 37190000)
RW space 12288K, 55% used [(0x3782c208, 0x3782c400, 0x37190000, 0x37d90000)]Hiding code [0 x 01200000, 0 x 01540000, 0 x 03200000)
total_blobs = 1944 nmethods = 1691 cards = 187 free_code_cache = largest_free_block 30160448 = 192Dynamic libraries:
0x00400000 - 0 x 00424000 C:\Program Files\Java\jre6\bin\java.exe
0x7c900000 - 0x7c9b2000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f03000 C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 C:\WINDOWS\system32\Secur32.dll
0x5cb70000 - 0x5cb96000 C:\WINDOWS\system32\ShimEng.dll
0 x 71590000 - 0 x 71609000 C:\WINDOWS\AppPatch\AcLayers.DLL
0x7e410000 - 0x7e4a1000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000 C:\WINDOWS\system32\GDI32.dll
0x7c9c0000 - 0x7d1d7000 C:\WINDOWS\system32\SHELL32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x774e0000 - 0x7761e000 C:\WINDOWS\system32\ole32.dll
0x769c0000 - 0x76a74000 C:\WINDOWS\system32\USERENV.dll
0 x 73000000 - 0 x 73026000 C:\WINDOWS\system32\WINSPOOL. DRV
0 x 76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32. DLL
0x773d0000 - 0x774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll
0x7c340000 - C:\Program Files\Java\jre6\bin\msvcr71.dll 0x7c396000
0x6d7f0000 - C:\Program Files\Java\jre6\bin\client\jvm.dll 0x6da9f000
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d7a0000 - C:\Program Files\Java\jre6\bin\verify.dll 0x6d7ac000
0x6d320000 - C:\Program Files\Java\jre6\bin\java.dll 0x6d33f000
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI. DLL
0x6d7e0000 - C:\Program Files\Java\jre6\bin\zip.dll 0x6d7ef000
0x6d420000 - C:\Program Files\Java\jre6\bin\jp2native.dll 0x6d426000
0x6d1d0000 - C:\Program Files\Java\jre6\bin\deploy.dll 0x6d1e3000
0x77a80000 - 0x77b15000 C:\WINDOWS\system32\CRYPT32.dll
0x77b20000 - 0x77b32000 C:\WINDOWS\system32\MSASN1.dll
0 x 77120000 - 0x771ab000 C:\WINDOWS\system32\OLEAUT32.dll
0x3d930000 - 0x3da16000 C:\WINDOWS\system32\WININET.dll
0x00f70000 - 0x00f79000-C:\WINDOWS\system32\Normaliz.dll
0 x 78130000 - 0 x 78263000 C:\WINDOWS\system32\urlmon.dll
0x3dfd0000 - 0x3e1b9000 C:\WINDOWS\system32\iertutil.dll
0x6d6a0000 - C:\Program Files\Java\jre6\bin\regutils.dll 0x6d6e6000
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x6d600000 - C:\Program Files\Java\jre6\bin\net.dll 0x6d613000
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x6d620000 - C:\Program Files\Java\jre6\bin\nio.dll 0x6d629000
0x6d000000 - C:\Program Files\Java\jre6\bin\awt.dll 0x6d14b000
0x5d090000 - 0x5d12a000 C:\WINDOWS\system32\comctl32.dll
0 x 74720000 - 0x7476c000 C:\WINDOWS\system32\MSCTF.dll
0x77b40000 - 0x77b62000 C:\WINDOWS\system32\apphelp.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x6d230000 - C:\Program Files\Java\jre6\bin\fontmanager.dll 0x6d27f000
0x71a50000 - 0x71a8f000 C:\WINDOWS\System32\mswsock.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76d60000 - 0x76d79000 C:\WINDOWS\system32\iphlpapi.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x10000000 - 0x1001f000 C:\WINDOWS\system32\iavlsp.dll
0 x 77690000 - 0x776b1000 C:\WINDOWS\system32\NTMARTA. DLL
0x71bf0000 - 0x71c03000 C:\WINDOWS\system32\SAMLIB.dll
0x662b0000 - 0 x 66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
68000000 0 x - 0 x 68036000 C:\WINDOWS\system32\rsaenh.dll
0x5b860000 - 0x5b8b5000 C:\WINDOWS\system32\netapi32.dll
0x6d790000 - C:\Program Files\Java\jre6\bin\unpack.dll 0x6d79f000
0x6d510000 - C:\Program Files\Java\jre6\bin\jsound.dll 0x6d535000
0x6d540000 - C:\Program Files\Java\jre6\bin\jsoundds.dll 0x6d548000
0x73f10000 - 0x73f6c000 C:\WINDOWS\system32\DSOUND.dll
0x6d1a0000 - C:\Program Files\Java\jre6\bin\dcpr.dll 0x6d1c3000
0x76c30000 - 0x76c5e000 C:\WINDOWS\system32\WINTRUST.dll
0x76c90000 - 0x76cb8000 C:\WINDOWS\system32\IMAGEHLP.dll
0x72d20000 - 0x72d29000 C:\WINDOWS\system32\wdmaud.drv
0x72d10000 - 0x72d18000 C:\WINDOWS\system32\msacm32.drv
0x77be0000 - 0x77bf5000 C:\WINDOWS\system32\MSACM32.dll
0x77bd0000 - 0x77bd7000 C:\WINDOWS\system32\midimap.dll
0x73ee0000 - 0x73ee4000 C:\WINDOWS\system32\KsUser.dll
0x6d440000 - C:\Program Files\Java\jre6\bin\jpeg.dll 0x6d465000VM Arguments:
jvm_args :-D__jvm_launched = 4409882789 - Xbootclasspath/a:C:\PROGRA~1\Java\jre6\lib\deploy.jar; C:\Progra~1\Java\jre6\lib\javaws.jar; C:\Progra~1\Java\jre6\lib\plugin.jar-Dsun.awt.warmup=true-Xmx128m
java_command: sun.plugin2.main.client.PluginMain write_pipe_name = jpi2_pid2736_pipe3, read_pipe_name = jpi2_pid2736_pipe2
Type of launcher: SUN_STANDARDEnvironment variables:
Path = c: 9.0\Reader\plug_ins; C:\Program 9.0\Reader\ Adobe. C:\Program may Explorer; C:\Windows\System32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0; C:\PROGRA~1\COMMON~1\MUVEET~1\030625; C:\Program 9.0\Reader\plug_ins\test_tools Adobe
USERNAME = administrator
OS = Windows_NT
PROCESSOR_IDENTIFIER = x 86 Family 15 Model 4 Stepping 1, GenuineIntel--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 2 (1 cores per processor, 2 threads by heart) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht
Memory: 4 k page, physical 1038184 k (432152 k free), Exchange 2498512 k (1810068 k free)
vm_info: Java hotspot Client VM (20, 1 - b02) for JRE windows - x 86 (1.6.0_26 - b03), built on May 4, 2011 00:50:59 by "java_re" with MS VC ++ 7.1 (VS2003)
time: Wed Jul 27 10:08:30 2011
elapsed time: 430 secondsHi CarmenK,
I recommend you contact the Sun Microsystems Java support & get help support professionals.
http://www.Java.com/en/download/support.jsp
Reference: Java Help CenterHope the helps of information.
-
Hello
I added a button on the screen of my Blackberry and I have a class called WebCall who has the Socket connection
http://www.BlackBerry.com/developers/docs/7.1.0api/javax/microedition/IO/SocketConnection.html
I want that when I click the button, it calls the WebCall class.
How to archive this?
Thank you
Hamid Weiss
Citing a treatment on a button click has been discussed on this thread:
http://supportforums.BlackBerry.com/T5/Java-development/pushing-screen/TD-p/2399831
In this case, you should be aware that the button click process runs on the event Thread. But to make blocking as network activity operations, you must do this in your own Thread:
http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865
So, you need start a Thread to do the treatment on your network. Processing on BlackBerry thread is quite similar to the standard Java Thread processing, so there is no specific documentation of BB for this, but you should a lot of samples of Java if you look around.
According to the first link that I've referenced, I would recommend that you study the samples you will find. They will never do exactly what you want, but while you are learning, it is better to start with a sample of work and make small changes to get to what you want, try to create everything from scratch.
And you should make yourself familiar with this micro-site:
http://developer.BlackBerry.com/Java/
Good luck and have fun!
Maybe you are looking for
-
problem with the connections of dial for the nor 9411.
Sir, I have a knob on the model of nemicon Corp. don't. NOC-SP2500-2MD-10-100-00. It has 8 wires for connections like this- Red = + 5v Black = 0v. commune A blue bar green B B gray white bar orange yellow Z Z bar I have it plugged into the module or
-
I went to connect my TV to my computer HDMI cable I was not paying attention when something appears on the screen and I apparently hit something and now all that appears on my TV is the screensaver on my computer, I get the sound but nothing else whe
-
on setting the action column does not appear
What difficulty it opens there is no Action column
-
HY!I have a HP48GII, but I don't know how to change the format of the angle of for example: 49.50 to 49 ° 30'.Please help if you know.
-
RDP for the CSA MC using the user state
I'm trying to activate an administrator remote access to the MC via RDP. The rule is triggered, which denies this action is #262. Is there a way to allow access to the box based on user RDP State? I need what the admin group is part of a DHCP pool so