Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.
Java 8's java.time library is heavily influenced by JodaTime, and is really good enough to use on its own. Plus, java.time.Instant is going to generally interact more cleanly with third-party libraries than org.joda.time.Instant is.

It's especially handy in your particular instance: Instant.parse(String str) does exactly the right thing here.

Adbot
ADBOT LOVES YOU

M31
Jun 12, 2012
Java 8's API is fine, but I just assumed he wasn't on Java 8, because he's using SimpleDateFormat.

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

fletcher posted:

Is Joda Time still necessary with Java 8? I've just been using the built in stuff now.
If you can use Java 8 then use its new date system over Joda Time. The project lead for it was Joda Time's creator.

denzelcurrypower
Jan 28, 2011
Can someone recommend a book, website, or resource for learning Java for a complete programming beginner? I am looking into taking a course on database development that utilizes Java with Oracle, and I have some experience with MySQL. I'm looking to get the basics of Java so I won't fall behind in the course. Free or cheap would be great but not a requirement.

vv Awesome, thanks for the suggestions.

denzelcurrypower fucked around with this message at 23:50 on May 2, 2015

Gravity Pike
Feb 8, 2009

I find this discussion incredibly bland and disinteresting.
The official Java "Trails" tutorials are a pretty decent primer on the language. Check out "Learning the Java Language," "Essential Java Classes," and "Collections."

I'd recommend using an IDE as you're getting started. IntelliJ IDEA Community Edition is great, and free, and they have a good tutorial for getting the IDE set up and building a simple program.

FateFree
Nov 14, 2003

MoosetheMooche posted:

Can someone recommend a book, website, or resource for learning Java for a complete programming beginner? I am looking into taking a course on database development that utilizes Java with Oracle, and I have some experience with MySQL. I'm looking to get the basics of Java so I won't fall behind in the course. Free or cheap would be great but not a requirement.

vv Awesome, thanks for the suggestions.

I always recommend Head First Java for complete beginners. Very detailed explanations and pictures to help get the points across.

denzelcurrypower
Jan 28, 2011

FateFree posted:

I always recommend Head First Java for complete beginners. Very detailed explanations and pictures to help get the points across.

The idea behind the book looks good but it says it teaches Java 5.0. Is that worth learning or should I look for a newer edition?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

MoosetheMooche posted:

The idea behind the book looks good but it says it teaches Java 5.0. Is that worth learning or should I look for a newer edition?

You're fine with Java 5, since it includes Generics. You can pick up things introduced in newer runtimes via their appropriate Trails.

Make sure you get the latest JDK, they're backwards compatible.

more like dICK
Feb 15, 2010

This is inevitable.
Please just use the Oracle site instead of becoming yet another Java programmer stuck a decade in the past.

Trying to do any kind of file IO without at least Java 7 is painful.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

I think a book using Java 5 would be fine as long as they realize it is pretty out of date. The basics of the language haven't really changed since then, only a few new features and better library classes. Not that the official Java tutorials are bad, but the Head Start series is a bit more targeted to absolute programming beginners and its style is probably a bit nicer in the absence of an instructor to reinforce the reading (in high school, their C# version was to me, as someone who learns much more effectively from lecture + reading than just reading alone.)

Of course, you could ask in here if you get confused on something no matter what tutorials you follow.

hooah
Feb 6, 2006
WTF?

hooah posted:

Just reinstalled, similar behavior, but I see the content of secondary windows more often.

No further suggestions to make JARs run properly?

HFX
Nov 29, 2004

more like dICK posted:

Please just use the Oracle site instead of becoming yet another Java programmer stuck a decade in the past.

Trying to do any kind of file IO without at least Java 7 is painful.

How does it feel to not work in large corporate enviroments?

As to the Oracle site, it is pretty good, but is mediocre at best for someone who doesn't have at least some experience with object oriented programming. I find the examples are often very simplistic without always have a clear explanation of why they are doing something. They also tend to miss the more complex and interesting use cases.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

hooah posted:

No further suggestions to make JARs run properly?

It's pretty clear at this point that you've got something wrong with your JRE or underlying operating system. I mean, you could download the source for that Portecle and try to run it and see what's happening when it freezes, but at this point I'd start looking for alternate ways to use the software (a VM, maybe? Or if your school offers a remote desktop session, just use that for your assignment.) Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS.

hooah
Feb 6, 2006
WTF?

carry on then posted:

It's pretty clear at this point that you've got something wrong with your JRE or underlying operating system. I mean, you could download the source for that Portecle and try to run it and see what's happening when it freezes, but at this point I'd start looking for alternate ways to use the software (a VM, maybe? Or if your school offers a remote desktop session, just use that for your assignment.) Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS.

Yeah, I ended up running the thing over RDP to a school machine. loving Java.

Volguus
Mar 3, 2009

carry on then posted:

.... Unfortunately, you may not be able to see a full resolution of the problem without reinstalling your OS.

That's harsh. No matter what, you don't reinstall an entire OS over a JVM issue. Java is just a program that can be run from any folder without any issues whatsoever. Copy it, move it, anything, it will still work.
And "loving Java" ... is not really helpful either. If you'd study the problem a bit more, you will probably find the root cause then be able to fix it (I have no idea, the thing worked on my machine). You may even learn a thing or two in the process. Throwing your arms up in the air is a coward-ish way to get out.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Are you real? He's noticed issues across multiple pieces of software from very different sources and across multiple clean reinstalls of his JDK. Meanwhile no one else can reproduce the issues he's had in either. At this point, you have to look at the things which haven't changed, and that could mean something is wrong with his OS. Nothing you have suggested addresses this.

Volguus
Mar 3, 2009

carry on then posted:

Are you real? He's noticed issues across multiple pieces of software from very different sources and across multiple clean reinstalls of his JDK. Meanwhile no one else can reproduce the issues he's had in either. At this point, you have to look at the things which haven't changed, and that could mean something is wrong with his OS. Nothing you have suggested addresses this.

Haha, have you actually read the posts? They look like they're written by somebody who has trouble working with computers, much less has any programming training/experience. They're full of "i don't know", "i think i did", "maybe reinstalled some time ago", maybe X, maybe Y.
He never said they were clean reinstalls it was simply:

hooah posted:

Just reinstalled, similar behavior, but I see the content of secondary windows more often.

after you suggested to use Revo Uninstaller. Did he? I don't know, maybe he did, maybe he didnt. The entire " dunno, it just doesn't work" dance doesn't help.

FYI, no, you don't need to "uninstall" Java, just simply delete the drat folder (s) (two if you installed jdk, one for jre as well). Are there issues on that machine? Certainly. Does the lack of information (and how vague it is) help in pinpointing the issue? Not at all. Maybe it's java , maybe it's completely something else. While reinstalling the OS will probably solve the issues, that's still a bit harsh. Using a shotgun to kill a cockroach.

So let me ask you this: Are you real? Is this your standard reply to people when they say "poo poo doesn't work" you say "reinstall your OS"? Really? WTF? The information provided is minimal, the work done to fix it (as stated) looks minimal (to zero), and the solution you find to the problem, in spite of the lack of data, is to reinstall?
And given the apparent lack of experience, what makes you think that the user will be able to successfully complete an OS reinstall (that is from scratch, not just over the old one)?

hooah
Feb 6, 2006
WTF?
Alright, I'll try to give more detail. I did use Revo when I uninstalled the existing Java. However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click.

I'm sorry if I haven't satisfied your specificity requirements; I'm pretty busy at the end of the semester, and don't currently have a lot of time for super-detailed troubleshooting. I was just responding to what was asked.

Volguus
Mar 3, 2009

hooah posted:

Alright, I'll try to give more detail. I did use Revo when I uninstalled the existing Java. However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click.

I'm sorry if I haven't satisfied your specificity requirements; I'm pretty busy at the end of the semester, and don't currently have a lot of time for super-detailed troubleshooting. I was just responding to what was asked.

The fact that you don't have time to troubleshoot this issue is completely understandable, especially since you most likely don't care about it enough to troubleshoot it, you just need the drat thing to work. However, "reinstalling an OS" to fix a java problem is a completely out there kind of suggestion (most likely don't have time for that either). The problem that you have (as described) is something that nobody here has ever seen or heard about (me included), therefore without a lot more detective work from you there's not much people can do or say. The other suggestions were reasonable given the information provided, except the "reinstall the OS" one, which is with what I had an issue.


hooah posted:

However, when I reinstalled, the installer found an installation of Java 7 that Revo was apparently unaware of. The Java installer removed the outdated version, then installed the new one. I am still unable to have a JAR GUI (either the Stanford NER program or the previously-mentioned portecle) be responsive beyond one mouse click.
This looks beyond fishy. Where? How? What? What Java installation? Is it in program files? Is that installation added to environment variables (PATH, JAVA_HOME, etc.)? If you run a simple swing UI from the command line ( run cmd, then type "java -jar app.jar") does it really not say a thing? I know you said before that the command line window doesnt even show up, I'm assuming that you probably executed the bat file again or ... some other shenanigans.

Anyway, it doesn't matter. Since you're busy and you had a workaround for your issue, let it be. After the exams and projects and so on, it may be worthwhile spending a bit more time with this. Or just reinstall the OS....

Elias_Maluco
Aug 23, 2007
I need to sleep

M31 posted:

That is a ISO8601 date time, and SimpleDateFormat can not parse them according to the specification. Jackson has a ISO8601 parser, which is included in jackson-databind ISO8601Utils. You should probably be using databinding anyway:

code:
ObjectMapper mapper = new ObjectMapper();
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
JsonNode node = mapper.readTree(json);
JsonNode dateField = node.get("someDate");
Date date = mapper.convertValue(dateField, Date.class);
Also, use Joda Time.

I used SimpleDateFormat with jackson JSON mapper like this and its working:

code:
		ObjectMapper mapper = new ObjectMapper();
		final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
		mapper.setDateFormat(dateFormat);
It was able to parse the dates correctly and to set it to the POJO object. It wanst working before just because I had used "DateTime" instead of "Date" for the POJO class property.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Haha holy poo poo dude my offhand suggestion sure has made you mad for some reason.

Sedro
Dec 31, 2008

hooah posted:

How the hell do I get a jar GUI to actually be responsive when I run it on Windows 8.1? I didn't make the file, so I can't really edit it (Stanford's NER tagger, for the record). It starts up OK and I can click a menu, but as soon as it opens that menu, nothing else responds except the close button.
Get a JVM stack dump using jstack or jvisualvm

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

carry on then posted:

Haha holy poo poo dude my offhand suggestion sure has made you mad for some reason.
Code Rage, dude. Code Rage.

M31
Jun 12, 2012

Elias_Maluco posted:

I used SimpleDateFormat with jackson JSON mapper like this and its working:

code:
		ObjectMapper mapper = new ObjectMapper();
		final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
		mapper.setDateFormat(dateFormat);
It was able to parse the dates correctly and to set it to the POJO object. It wanst working before just because I had used "DateTime" instead of "Date" for the POJO class property.

It will accept the vast majority of ISO8601 dates, but not all of them (eg. 2015-05-06T08:53:45.222Z). Yes, you can probably get away with it, but why use a partial implementation when you can get full support for free.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Why is maven pulling in the wrong version of a transitive dependency?

code:
[INFO] +- org.hibernate:hibernate-search-orm:jar:5.2.0.Final:compile
[INFO] |  +- org.hibernate:hibernate-search-engine:jar:5.2.0.Final:compile
[INFO] |  |  +- org.apache.lucene:lucene-core:jar:4.8.1:compile
[INFO] |  |  +- org.apache.lucene:lucene-analyzers-common:jar:4.8.1:compile
[INFO] |  |  \- org.apache.lucene:lucene-facet:jar:4.8.1:compile
[INFO] |  |     \- org.apache.lucene:lucene-queries:jar:4.8.1:compile
[INFO] |  \- org.hibernate:hibernate-core:jar:4.3.9.Final:compile
[INFO] |     +- antlr:antlr:jar:2.7.7:compile
[INFO] |     \- org.jboss:jandex:jar:1.2.2.Final:compile
Should get the lucene version from the parent of hibernate-search-orm, which is set to 4.10.4: https://repo1.maven.org/maven2/org/hibernate/hibernate-search-parent/5.2.0.Final/hibernate-search-parent-5.2.0.Final.pom

That's the only place 'lucene' appears in my dependency:tree output...why is it still using 4.8.1?

Sedro
Dec 31, 2008
Try mvn dependency:tree -Dverbose

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Sedro posted:

Try mvn dependency:tree -Dverbose

Thank you, that helped me track down the outdated snapshot that was causing it to pull in lucene 4.8.1

Jo
Jan 24, 2005

:allears:
Soiled Meat
On the subject of maven, I've come to realize that my understanding of Java's class/jar/internals is pretty weak. I learned it as a course in my undergrad career and have continued using it, but I realize when it comes to doing things like building ant files or importing jars from external applications, I'm fuzzy. Is there a book or a collection of tutorials which don't really cover the details of learning the Java language, but highlight things like linking/gradle/maven? Is that even something wise to care about, or should I just fudge my way through it and rely on IntelliJ to build and maintain my build scripts?

EDIT: Actually, going through the Oracle docs as recommended above and doing some work with Gradle has been really helpful.

Jo fucked around with this message at 06:26 on May 9, 2015

hooah
Feb 6, 2006
WTF?

Sedro posted:

Get a JVM stack dump using jstack or jvisualvm

Ok, here's the stack dump from jstack:

pre:
Attaching to remote server Files\Java\jdk1.8.0_31\bin\jstack.exe  1390464, please wait...
Error attaching to remote server: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31\bin\jstac
k.exe  1390464/SARemoteDebugger
sun.jvm.hotspot.debugger.DebuggerException: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31
\bin\jstack.exe  1390464/SARemoteDebugger
        at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:115)
        at sun.jvm.hotspot.HotSpotAgent.connectRemoteDebugger(HotSpotAgent.java:517)
        at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:374)
        at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
        at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:183)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:196)
        at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
        at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:483)
        at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
        at sun.tools.jstack.JStack.main(JStack.java:106)
Caused by: java.net.MalformedURLException: invalid URL String: //Files\Java\jdk1.8.0_31\bin\jstack.exe  1390464/SARemote
Debugger
        at java.rmi.Naming.parseURL(Naming.java:243)
        at java.rmi.Naming.lookup(Naming.java:96)
        at sun.jvm.hotspot.RMIHelper.lookup(RMIHelper.java:113)
        ... 13 more
Caused by: java.net.URISyntaxException: Illegal character in authority at index 2: //Files\Java\jdk1.8.0_31\bin\jstack.e
xe  1390464/SARemoteDebugger
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.parseAuthority(URI.java:3186)
        at java.net.URI$Parser.parseHierarchical(URI.java:3097)
        at java.net.URI$Parser.parse(URI.java:3063)
        at java.net.URI.<init>(URI.java:588)
        at java.rmi.Naming.intParseURL(Naming.java:273)
        at java.rmi.Naming.parseURL(Naming.java:237)
        ... 15 more
Anything else I need to provide?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

hooah posted:

[pre]
Attaching to remote server Files\Java\jdk1.8.0_31\bin\jstack.exe 1390464, please wait...

This looks wonky. What did you type into the command prompt to actually run jstack?

hooah
Feb 6, 2006
WTF?

Jabor posted:

This looks wonky. What did you type into the command prompt to actually run jstack?

After changing to the jdk \bin directory, "jstack.exe [PID]". I had done that after clicking on a menu. Here's a dump from just after starting the jar:
pre:
C:\Program Files\Java\jdk1.8.0_31\bin>jstack.exe 1394468
2015-05-09 08:19:39
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode):

"D3D Screen Updater" #22 daemon prio=7 os_prio=1 tid=0x0000000018840000 nid=0x154520 in Obj
0]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e15e7fb8> (a java.lang.Object)
        at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
        - locked <0x00000000e15e7fb8> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"TimerQueue" #20 daemon prio=5 os_prio=0 tid=0x00000000187b5800 nid=0x1545cc waiting on con
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e15e0a80> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.util.concurrent.DelayQueue.take(Unknown Source)
        at javax.swing.TimerQueue.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Swing-Shell" #18 daemon prio=6 os_prio=0 tid=0x0000000018721000 nid=0x1547b8 waiting on co
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e1394df0> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x0000000001e30800 nid=0x15478c waiting on conditi
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x0000000017368000 nid=0x154240 waiting on cond
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e0ff5c10> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.awt.EventQueue.getNextEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x0000000017367800 nid=0x1545f4 runnable [0x0
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x000000001730f000 nid=0x1545f8 in Object.wait() [0
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0ff2050> (a java.lang.Object)
        at java.lang.Object.wait(Unknown Source)
        at sun.awt.AWTAutoShutdown.run(Unknown Source)
        - locked <0x00000000e0ff2050> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x000000001730e800 nid=0x1509b8 in Objec

   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0fec898> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0fec898> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at sun.java2d.Disposer.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00000000157ce800 nid=0x1543f8 runnable [0
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015772800 nid=0x154408 waiting
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015771800 nid=0x154040 waiting
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x000000001576c800 nid=0x153dcc waiting
0000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x000000001576a800 nid=0x1547ac waiting on
0]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015769000 nid=0x1544b8 runnable
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000001f25800 nid=0x154780 in Object.wait()
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x0000000001f1d000 nid=0x1547c0 in Obje
]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Unknown Source)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
        - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=2 tid=0x0000000015737800 nid=0x154410 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000001e46800 nid=0x154790 runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000001e48000 nid=0x15476c runnable

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000001e4a000 nid=0x154788 runnable

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x0000000001e4c000 nid=0x1547c4 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x000000001701d800 nid=0x154008 waiting on conditio

JNI global references: 489

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
I say it looks weird because that's the output you'd expect if you ran jstack Files\Java\jdk1.8.0_31\bin\jstack.exe 1390464, which makes me suspect a typo. Or typing in the unquoted path from the root of the drive and having the shell "helpfully" run the correct program, without fixing the command line. Could you try it again?

hooah
Feb 6, 2006
WTF?
Sure, but first, one thing that I'm unsure about is the process ID. I used Task Manager to get it, but all I could find was a PID for java.exe. Should that be the correct PID, or should I look for a different one?

Hughlander
May 11, 2005

hooah posted:

Sure, but first, one thing that I'm unsure about is the process ID. I used Task Manager to get it, but all I could find was a PID for java.exe. Should that be the correct PID, or should I look for a different one?

jps

hooah
Feb 6, 2006
WTF?

Y'know, I think you could be more cryptic. I don't have any process that starts with jps.

Hughlander
May 11, 2005

hooah posted:

Y'know, I think you could be more cryptic. I don't have any process that starts with jps.

Phone post but if you would type those cryptic letters in Google the first hit is http://docs.oracle.com/javase/7/docs/technotes/tools/share/jps.html which looks promising.

hooah
Feb 6, 2006
WTF?
Ah, I see now. Here's a dump from what should be the correct JVM:
pre:
2015-05-09 10:24:49
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode):

"D3D Screen Updater" #23 daemon prio=7 os_prio=1 tid=0x0000000017efb800 nid=0x156ce4 in Obj
0]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e1690838> (a java.lang.Object)
        at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
        - locked <0x00000000e1690838> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"TimerQueue" #21 daemon prio=5 os_prio=0 tid=0x0000000017eb4000 nid=0x157260 waiting on con
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e1689300> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.util.concurrent.DelayQueue.take(Unknown Source)
        at javax.swing.TimerQueue.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Swing-Shell" #19 daemon prio=6 os_prio=0 tid=0x0000000017817000 nid=0x1571cc waiting on co
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e1394f78> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x00000000022a0800 nid=0x1572e0 waiting on conditi
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x00000000177f8000 nid=0x15714c waiting on cond
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e0ff59c8> (a java.util.concurrent.locks.AbstractQ
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unkn
        at java.awt.EventQueue.getNextEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x00000000177f3000 nid=0x15705c runnable [0x0
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x00000000177f1000 nid=0x157060 in Object.wait() [0
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0ff1e08> (a java.lang.Object)
        at java.lang.Object.wait(Unknown Source)
        at sun.awt.AWTAutoShutdown.run(Unknown Source)
        - locked <0x00000000e0ff1e08> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x0000000017e03800 nid=0x157128 in Objec

   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0fec650> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0fec650> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at sun.java2d.Disposer.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000017470800 nid=0x157134 runnable [0
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015be2800 nid=0x156a90 waiting
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015be1800 nid=0x156ac4 waiting
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000015bdc800 nid=0x1573d8 waiting
0000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000015bda800 nid=0x157124 waiting on
0]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015bd9000 nid=0x157320 runnable
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000002395800 nid=0x1572d4 in Object.wait()
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000000238d000 nid=0x1572dc in Obje
]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Unknown Source)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
        - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=2 tid=0x0000000015ba7800 nid=0x1572d8 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000022b6800 nid=0x1572f0 runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000022b8000 nid=0x156a30 runnable

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000022ba000 nid=0x1569ec runnable

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000022bc000 nid=0x1572f4 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x0000000017471800 nid=0x157114 waiting on conditio

JNI global references: 507

Sedro
Dec 31, 2008
Post the stack dump after the process is frozen

hooah
Feb 6, 2006
WTF?
Alright, here you go:

pre:
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode):

"D3D Screen Updater" #22 daemon prio=7 os_prio=1 tid=0x0000000017da8800 nid=0x159e10 in Object.wait() [0x000000001beee0
0]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
        - locked <0x00000000e15ed320> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"TimerQueue" #20 daemon prio=5 os_prio=0 tid=0x0000000017d63800 nid=0x15a1e0 waiting on condition [0x000000001b22e000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e15e5de8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.util.concurrent.DelayQueue.take(Unknown Source)
        at javax.swing.TimerQueue.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Swing-Shell" #18 daemon prio=6 os_prio=0 tid=0x00000000176ca000 nid=0x157fd4 waiting on condition [0x000000001963e000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e139a1a0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"DestroyJavaVM" #15 prio=5 os_prio=0 tid=0x00000000020a0800 nid=0x158d28 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x00000000176ab000 nid=0x15a1d0 waiting on condition [0x0000000018a2f000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e0ff5d08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionO
ject)
        at java.util.concurrent.locks.LockSupport.park(Unknown Source)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
        at java.awt.EventQueue.getNextEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x0000000017697800 nid=0x15a06c runnable [0x000000001876f000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.windows.WToolkit.eventLoop(Native Method)
        at sun.awt.windows.WToolkit.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x0000000017695800 nid=0x1592f0 in Object.wait() [0x000000001866e000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0ff2148> (a java.lang.Object)
        at java.lang.Object.wait(Unknown Source)
        at sun.awt.AWTAutoShutdown.run(Unknown Source)
        - locked <0x00000000e0ff2148> (a java.lang.Object)
        at java.lang.Thread.run(Unknown Source)

"Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x0000000017694800 nid=0x15a6ac in Object.wait() [0x000000001856f000

   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0fec960> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0fec960> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at sun.java2d.Disposer.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000017318800 nid=0x15a778 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015a82800 nid=0x15a7b4 waiting on condition [0x00000000000
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015a81800 nid=0x15a1d4 waiting on condition [0x00000000000
0000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000015a7c800 nid=0x159e20 waiting on condition [0x00000000000
0000]
   java.lang.Thread.State: RUNNABLE

"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000015a7a800 nid=0x159480 waiting on condition [0x00000000000000
0]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015a79000 nid=0x157334 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000002195800 nid=0x159834 in Object.wait() [0x0000000016dee000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        - locked <0x00000000e0c06f58> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(Unknown Source)
        at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x000000000218d000 nid=0x159ed0 in Object.wait() [0x0000000016cee00
]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Unknown Source)
        at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
        - locked <0x00000000e0c06998> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=2 tid=0x0000000015a47800 nid=0x159f38 runnable

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000020b6800 nid=0x156954 runnable

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000020b8000 nid=0x156c9c runnable

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000020ba000 nid=0x15a2a4 runnable

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000020bc000 nid=0x15a014 runnable

"VM Periodic Task Thread" os_prio=2 tid=0x0000000017322800 nid=0x15a550 waiting on condition

JNI global references: 470

Adbot
ADBOT LOVES YOU

FateFree
Nov 14, 2003

I don't understand this trace all that well but are you doing anything wacky with threading in this app? Are you using SwingWorker correctly? Is it possible some deadlock condition is happening or you are running logic on the main UI thread?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply