My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 212: gwt-maven-plugin throws java.lang.ClassNotFoundException when used with IBM SDK 1.6.0 & gwt 1.6.4
3 people starred this issue and may be notified of changes. Back to list
Status:  Invalid
Owner:  ----
Closed:  Dec 01


Sign in to add a comment
 
Reported by gaber.terseglav, Jul 08, 2009
Is this Maven 1 or Maven 2?
$ mvn -version
Maven version: 2.0.10
Java version: 1.6.0_11
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

What steps will reproduce the problem?
1. Install IBM Rational Application Developer 7.5.3 to location C:\Program
Files\IBM\SDP75
1. set JAVA_HOME to C:\Program Files\IBM\SDP75\jdk\
2. add C:\Program Files\IBM\SDP75\jdk\bin to system path
3. create pom.xml, that executes gwt-maven-plugin (see attachment)
4. execute mvn clean install
5. GWT Compiler throws exception java.lang.ClassNotFoundException:
_j2se_j9=71168

Workaround:
1. Change JAVA_HOME to sun jdk path: 
d:\java\jdk\jdk_1.6.0_11
2. Change path in system path to path of sun jdk bin directory:
d:\java\jdk\jdk_1.6.0_11\bin
3. execute mvn clean install
4. application compiles without exception 

What is the expected output? What do you see instead?
I expect sucessful compile of simple gwt app. Instead I get exception:
[INFO] Unpack native libraries required to run GWT
[INFO] auto discovered modules [si.kis.GWTPilot]
[INFO] establishing classpath list (scope = compile)
[INFO] Compiling module si.kis.GWTPilot
[INFO]    Compiling 15 permutations
[INFO]    Process output
[INFO]       [ERROR] xxx
"main"java.lang.NoClassDefFoundError:
 _j2se_j9=71168
[INFO]       [ERROR] Caused by: java.lang.ClassNotFoundException:
_j2se_j9=71168

[INFO]       [ERROR]    at
java.net.URLClassLoader.findClass(URLClassLoader.java
:419)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:643)

[INFO]       [ERROR]    at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
ava:345)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:609)

[INFO]       [ERROR] Could not find the main class: _j2se_j9=71168.  Program
wil
l exit.
[INFO]    Process output
[INFO]       [ERROR] xxx
"main"java.lang.NoClassDefFoundError:
 _j2se_j9=71168
[INFO]       [ERROR] Caused by: java.lang.ClassNotFoundException:
_j2se_j9=71168

[INFO]       [ERROR]    at
java.net.URLClassLoader.findClass(URLClassLoader.java
:419)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:643)

[INFO]       [ERROR]    at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
ava:345)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:609)

[INFO]       [ERROR] Could not find the main class: _j2se_j9=71168.  Program
wil
l exit.
[INFO]    Process output
[INFO]       [ERROR] xxx
"main"java.lang.NoClassDefFoundError:
 _j2se_j9=71168
[INFO]       [ERROR] Caused by: java.lang.ClassNotFoundException:
_j2se_j9=71168

[INFO]       [ERROR]    at
java.net.URLClassLoader.findClass(URLClassLoader.java
:419)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:643)

[INFO]       [ERROR]    at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
ava:345)
[INFO]       [ERROR]    at
java.lang.ClassLoader.loadClass(ClassLoader.java:609)

[INFO]       [ERROR] Could not find the main class: _j2se_j9=71168.  Program
wil
l exit.

What version of the product are you using? On what operating system?
groupId: org.codehaus.mojo
artifactId: gwt-maven-plugin
version: 1.1

Please provide any additional information below.
When I tried to check if problem is really in jdk provider, I changed only
system path to sun jdk, but JAVA_HOME pointed to IBM SDK directory. Such
configuration also reproduces bug.
Only when I change both JAVA_HOME and system path so that they point to sun
jdk version application compiles without problems. 

Problem was already identified on the internet without solution:
- http://osdir.com/ml/GoogleWebToolkit/2009-06/msg01274.html
- http://www.mail-archive.com/google-web-toolkit@googlegroups.com/msg19633.html

I guess it is reproducible for every gwt application, but I didn't check
it. If it will not be reproducible on developers environment I can include
stripped version of our app.



pom.xml
2.6 KB   Download
Comment 1 by murray.waters, Aug 10, 2009
I'm getting this same error as well, using RAD 7.5.2. I still get "BUILD SUCCESSFUL"
though... 
Comment 2 by murray.waters, Sep 09, 2009
Even though it says "BUILD SUCCESSFUL", It doesn't actually compile the GWT code. Ie
when you deploy the war/ear and try to open your page, you will get an error saying
you need to recompile from the hosted mode browser.

Is there any way we could isolate this enough to raise a PMR with IBM? Anyone have
any suggestions regarding this? My code gets deployed to WebSphere so it is
preferable to have it compiled using the IBM jdk. 
Comment 3 by murray.waters, Sep 09, 2009
If you do a search for "_j2se_j9" it seems that it is almost always one of the user
arguments that is output during a core dump, eg this which I've copied and pasted
from one of the first results that came up:

2CIUSERARG
-Djava.home=C:\Programme\IBM\Lotus\Notes\framework\rcp\eclipse\plugins\com.ibm.rcp.j2se.win32.x86_1.6.0.20081029a-200811140851\jre
2CIUSERARG
-Djava.ext.dirs=C:\Programme\IBM\Lotus\Notes\framework\rcp\eclipse\plugins\com.ibm.rcp.j2se.win32.x86_1.6.0.20081029a-200811140851\jre\lib\ext
2CIUSERARG -Duser.dir=C:\Programme\IBM\Lotus\Notes
2CIUSERARG _j2se_j9=71168 0x7FB97168
2CIUSERARG -Xdump
2CIUSERARG
-Dosgi.framework.extensions=com.ibm.rcp.core.logger.frameworkhook,com.ibm.rds,com.ibm.cds
2CIUSERARG -Xscmx64m
2CIUSERARG
-Xshareclasses:name=xpdplat_.jvm,controlDir=C:/Programme/IBM/Lotus/Notes/Data/workspace/.config/org.eclipse.osgi,groupAccess,keep,singleJVM,nonfatal
2CIUSERARG -Xgcpolicy:gencon
2CIUSERARG -Xjit:noResumableTrapHandler

So, why does it think that "_j2se_j9=71168" is a name of a class that it needs to
find, it doesn't even sound nor look like a class name? And it seems to be a user
argument?




On Jun 18, 2:47 am, Vasily Vasilkov <chand0s....@gmail.com> wrote:
> Hi
> 
> I have the IBM JDK 6 and GWT 1.6.4 project. I can't compile my project
> with IBM JDK due to exception:
> 
> Caused by: java.lang.ClassNotFoundException: _j2se_j9=71168
>          at java.net.URLClassLoader.findClass(URLClassLoader.java:419)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
>          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:320)
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
> 
> I completely have no idea what this exception means. I also have tried
> to compile on Sun JDK and JRockit - compilation completes
> successfully.
> 
> My env:
> 
> # uname -or
> 2.6.27.7-smp GNU/Linux
> 
> # java -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build pxi3260sr3-20081106_07(SR3))
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32
> jvmxi3260-20081105_25433 (JIT enabled, AOT enabled)
> J9VM - 20081105_025433_lHdSMr
> JIT  - r9_20081031_1330
> GC   - 20081027_AB)
> JCL  - 20081106_01
Comment 4 by charlie.collins, Dec 01, 2009
This isn't a gwt-maven issue, it's a GWT issue, see the issue log there. 
Status: Invalid
Sign in to add a comment

Hosted by Google Code