17

Are there known Tomcat 6.0 and JDK 1.7.0_02 issues?

I know this is a hard question to answer, if the answer is no. But I need to ask just in case the answer is yes. Also I will accept any solutions to the issues below as answers. Please just share whatever issues you have had, and I will update this question if need be.

Issues:

Some issues I have run into since upgrading from JDK 1.7.0 to 1.7.0_02 (which I did to avoid the Eclipse's help menus from crashing, due to a Java 1.7.0 bug.):

  • Tomcat server takes much longer to start, I need a 120 second timeout to handle it.
  • FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) error, which disappeared the next day and then reappeared the third day, with no changes other than reloading Eclipse.
  • Tomcat server takes much longer to shut down. I need a 60 second timeout to handle it, from 15 second default.
  • Eclipse itself appears to crawl to a halt (figuratively speaking) upon building the workspace and validating the project at hand. Everything within Eclipse appears to take longer, even opening an unopened file.

Everything seems suspicious.

P.S. JDK 1.7.0_02 is also known as 1.7.0u2, Java SE 7u2, Java SE 7 Update 2, etc.

Versions:

  • JDK = Oracle, 64-bit, downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html. Exact file downloaded and installed was jdk-7u2-windows-x64.exe.
  • Tomcat = Tomcat 6.0.33, downloaded separately from Eclipse
  • Eclipse = Eclipse Java EE IDE for Web Developers., Version: Indigo Release, Eclipse Platform, Version: 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f, Build id: I20110613-1736.
  • 64-bit Windows 7 machine, 8GB RAM, Intel Core i7-2600 CPU @ 3.4GHz (4 cores)
  • Eclipse, Tomcat, Apache HTTP Server, are all on the same (development) computer.

EDIT: Added system specs above.

Community
  • 1
  • 1
Xonatron
  • 15,622
  • 30
  • 70
  • 84
  • 1
    Which JDK - Oracle/SUN or OpebJDK? – home Feb 02 '12 at 14:20
  • @home, Orcale. I will edit my question and include this. – Xonatron Feb 02 '12 at 14:52
  • Are you using Tomcat from a separate install or from inside Eclipse? Which version of Tomcat (exactly) and Eclipse are you using? I guess it's the 32 bit version, right? – Viruzzo Feb 02 '12 at 19:14
  • I am using `Tomcat 6.0.33`, downloaded separately from Eclipse, and `Eclipse Java EE IDE for Web Developers.`, `Version: Indigo Release`, `Eclipse Platform`, `Version: 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f`, `Build id: I20110613-1736`. 64-bit machine. How can I double check my java version is also 64-bit? I have no idea if a 32-bit version would run or not, but if it did perhaps it would run slower? I will also add this to the question. – Xonatron Feb 02 '12 at 19:24
  • Verified I installed 64-bit version of JDK. The exact file is `jdk-7u2-windows-x64.exe`. – Xonatron Feb 02 '12 at 20:24
  • Matt, be sure to ask this on the Tomcat list. – Riyad Kalla Feb 13 '12 at 17:00
  • @RiyadKalla, what and where is the Tomcat list? Thanks! – Xonatron Feb 13 '12 at 18:17
  • 2
    @MatthewDoucette Sorry about that, I meant the Tomcat-Users mailing list here: http://tomcat.apache.org/lists.html#tomcat-users -- you will need to subscribe to join, but then you can post your question there and it is targeted at the entire Tomcat user community. So if there is a bug, someone there is likely hit it and can help confirm or deny for you. – Riyad Kalla Feb 14 '12 at 00:54
  • @MatthewDoucette Regarding your Eclipse slowdown, what is the value of the `-vm` option in your eclipse.ini file (in the root directory of your Eclipse installation)? Also, if you open a command prompt and type `java -version`, what is the output? – Justin Garrick Feb 23 '12 at 20:20

2 Answers2

1

When running 64 bits Java with default options (references compaction is off by default), it requires almost twice the amount of memory than with 32 bits.

For Eclipse, open the eclipse.ini file and double/increase a lot the -Xmx option.

Of course, your physical memory may not be enough when running some JVMs.

So I recommend you to test the -XX:+UseCompressedOops HotSpot option with 64 bits JVM and monitor memory usage thanks to jconsole for instance. You can also read details about that recent option. That option

For Tomcat, create the file bin/setenv.bat with content:

set JAVA_OPTS="-Xmx1024M -XX:+UseCompressedOops" 
Yves Martin
  • 10,217
  • 2
  • 38
  • 77
  • Thanks for your input. Four things: 1) Right now (and back when I posted this question) I am running `-Xmx2048m` in `eclipse.ini` which I think is four times the size of default settings. 2) I have no `bin/setenv.bat` in my Tomcat folder, and nothing that looks close to it. Maybe explain this one more to me. 3) I have 8 GB RAM. 4) where do I set `-XX:+UseCompressedOops`? Thanks again so much! – Xonatron May 15 '12 at 19:01
  • Compressed oops is supported and enabled by default in Java SE 6u23 and later. – Vadzim May 18 '12 at 21:03
0

Well, perhaps it's all about the new JVM released in that update. It alledgedly improves performance but... well, who knows. JDT on Tomcat6 interacts with JDK 1.7 so unexpected things could happen. Other than that, there're few things to check.

Community
  • 1
  • 1
Alfabravo
  • 7,493
  • 6
  • 46
  • 82