curious class class not found exception

2012-10-28 Thread Nuno Godinho de Matos
Presently, when i try to run my gwt application through eclipse I am 
getting a curious:
java.lang.NoClassDefFoundError: 
com/google/gwt/user/client/rpc/RemoteService

The intersting about this exception is that by command line firing a 
gwt:run my project loads and runs just fine.
It is thorugh eclipse, where the classpath is even larger, that the 
exception happens.


After creating a fancy perl script to farm the .jar files and directories 
indicated by oracle visual vm for sun.java.classpath system variable, i was 
able to track that my maven runtime project has this class under the 
following loacations:

Search results are: 
 $VAR1 = {
  
'/home/nmatos/.m2/repository/com/google/gwt/gwt-servlet/2.4.0/gwt-servlet-2.4.0.jar'
 
= [


'com/google/gwt/user/client/rpc/RemoteService.class',


'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.class'

  ],
  
'/home/nmatos/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar' 
= [

  'com/google/gwt/user/client/rpc/RemoteService.class',

  'com/google/gwt/user/client/rpc/RemoteService.java',

  
'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.class',

  
'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java'

]
};


On the other hand, when I use the google eclipse plugin to lunch the 
com.google.gwt.dev.DevMode , I have an even larger set of jar files 
containing this class (due to overhead jars that originate from automatic 
project configuration triggered by the eclipse plugin):
Search results are: 
 $VAR1 = {
  
'/home/nmatos/Desktop/Applications/eclipse_20121024/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201208080121-rel-r42/gwt-2.4.0/gwt-servlet.jar'
 
= [


   'com/google/gwt/user/client/rpc/RemoteService.class',


   'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.class'


 ],
  
'/home/nmatos/Desktop/Applications/eclipse_20121024/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201208080121-rel-r42/gwt-2.4.0/gwt-user.jar'
 
= [


'com/google/gwt/user/client/rpc/RemoteService.class',


'com/google/gwt/user/client/rpc/RemoteService.java',


'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.class',


'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.java'


  ],
  
'/home/nmatos/.m2/repository/com/google/gwt/gwt-servlet/2.4.0/gwt-servlet-2.4.0.jar'
 
= [


'com/google/gwt/user/client/rpc/RemoteService.class',


'com/google/gwt/user/client/rpc/RemoteServiceRelativePath.class'

  ],
  
'/home/nmatos/.m2/repository/com/google/gwt/gwt-user/2.4.0/gwt-user-2.4.0.jar' 
= [

 

Re: curious class class not found exception

2012-10-28 Thread Jens
And gwt-servlet.jar is in your war/WEB-INF/lib folder? 

In your stack trace you can see: 

at 
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:207)

which indicates that you are using AppEngine. The IsolatedAppClassLoader 
JavaDoc states that it isolates the webapp from the DevAppServer and 
everything on system classpath. I don't know AppEngine but it sounds to me 
that only libs in WEB-INF/lib are allowed and it does not really matter 
whats on system class path.

Maven probably put gwt-servlet.jar automatically into WEB-INF/lib if you 
have defined a dependency for it.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JFkMUXErsBoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: curious class class not found exception

2012-10-28 Thread Nuno Godinho de Matos
Thanks a lot and well spotted!

What you just said makes all the sense in the world.
I will take a look at my runtime lib folder in while.

Thanks again.


On Sunday, October 28, 2012 5:57:10 PM UTC+1, Jens wrote:

 And gwt-servlet.jar is in your war/WEB-INF/lib folder? 

 In your stack trace you can see: 

 at 
 com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:207)

 which indicates that you are using AppEngine. The IsolatedAppClassLoader 
 JavaDoc states that it isolates the webapp from the DevAppServer and 
 everything on system classpath. I don't know AppEngine but it sounds to me 
 that only libs in WEB-INF/lib are allowed and it does not really matter 
 whats on system class path.

 Maven probably put gwt-servlet.jar automatically into WEB-INF/lib if you 
 have defined a dependency for it.

 -- J.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/AkFz0i-_LbUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.