Tuesday, September 14, 2010

Re: GWT Spring integration - what is the best method in late 2010?

at first glance, "UnsupportedClassVersionError: Bad
version number in .class file "

Maybe there was something wrong with your higher complier but runs in
lower jvm


On 9月11日, 上午7时16分, Deepak Singh <deepaksingh...@gmail.com> wrote:
> Any solution pls.
> I am stuck with the error.
>
> On Wed, Sep 8, 2010 at 11:46 PM, Deepak Singh <deepaksingh...@gmail.com>wrote:
>
>
>
> > Hi Mark,
>
> > yes i refreshed the page but no luck. Also googling could not find an aswer
> > needed.
>
> > Later i changed from jdk 1.6 to jdk 1.5 then i got a different error as
> > follows :
>
> > SEVERE: Context initialization failed
> > org.springframework.beans.factory.CannotLoadBeanClassException: Error
> > loading class [org.gwtrpcspring.example.server.GreetingServiceImpl] for bean
> > with name 'greetService' defined in ServletContext resource
> > [/WEB-INF/applicationContext.xml]: problem with class file or dependent
> > class; nested exception is java.lang.UnsupportedClassVersionError: Bad
> > version number in .class file
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanCl ass(AbstractBeanFactory.java:1144)
> > at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactor y.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (AbstractBeanFactory.java:1177)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (AbstractBeanFactory.java:758)
> > at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.preIns tantiateSingletons(DefaultListableBeanFactory.java:422)
> > at
> > org.springframework.context.support.AbstractApplicationContext.finishBeanFa ctoryInitialization(AbstractApplicationContext.java:728)
> > at
> > org.springframework.context.support.AbstractApplicationContext.refresh(Abst ractApplicationContext.java:380)
> > at
> > org.springframework.web.context.ContextLoader.createWebApplicationContext(C ontextLoader.java:255)
> > at
> > org.springframework.web.context.ContextLoader.initWebApplicationContext(Con textLoader.java:199)
> > at
> > org.springframework.web.context.ContextLoaderListener.contextInitialized(Co ntextLoaderListener.java:45)
> > at
> > org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:5 48)
> > at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
> > at
> > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250 )
> > at
> > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
> > at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
> > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > at
> > org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
> > at org.mortbay.jetty.Server.doStart(Server.java:224)
> > at
> > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> > at
> > com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java:185)
> > at
> > com.google.appengine.tools.development.AbstractContainerService.startup(Abs tractContainerService.java:146)
> > at
> > com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerI mpl.java:222)
> > at
> > com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngin eLauncher.java:86)
> > at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:424)
> > at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1059)
> > at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:804)
> > at com.google.gwt.dev.DevMode.main(DevMode.java:279)
> > Caused by: java.lang.UnsupportedClassVersionError: Bad version number in
> > .class file
> > at java.lang.ClassLoader.defineClass1(Native Method)
> > at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
> > at
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
> > at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> > at
> > com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(Iso latedAppClassLoader.java:151)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> > at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
> > at
> > org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBea nClass(AbstractBeanDefinition.java:385)
> > at
> > org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanCl ass(AbstractBeanFactory.java:1138)
> > ... 28 more
>
> > On Wed, Sep 8, 2010 at 6:44 PM, markM <mark.a.mccon...@pfizer.com> wrote:
>
> >> When you got this error did you hit F5 (assuming you're using I.E.) to
> >> refresh the browser? And did that help? Maybe try a project-clean?
> >> Also, have you tried googling the error you got to see what it means?
>
> >> On Sep 8, 5:36 am, Deepak Singh <deepaksingh...@gmail.com> wrote:
> >> > I also downloaded SimpleGwtRpcSpringExample an dimported this into my
> >> > eclipse 3.5 with jdk 1.6 but i could not run it.
> >> > I got the exception
>
> >> > com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException: This
> >> > application is out of date, please click the refresh button on your
> >> browser.
> >> > ( Expecting version 5 from client, got 6.
> >> > I also tried to configure them seperately into my project but got the
> >> same
> >> > error.
>
> >> > Any one who has done this gwt-spring integration, can u pls help on
> >> that.
>
> >> > My need is to call web services method from spring and the get the
> >> result
> >> > back to client code.
> >> > Any other solution to integrate them if anyone is using.On Fri, Sep 3,
> >> 2010 at 7:30 PM, markM <mark.a.mccon...@pfizer.com> wrote:
> >> > > Sam/George,
>
> >> > > Just started looking into this same thing about a month ago. My
> >> > > experience was as follows. I found that the Spring documentation
> >> > > references the GWT Server Library so it must be the official pathway
> >> > > correct? I tried to use the inheritance methodology, one of three the
> >> > > GWT Server Library supports, and got it working temporarily under
> >> > > Jetty/GWT Eclipse plugin. For some reason it stopped working. Then I
> >> > > read further in the GWT Server Library documentation and found that
> >> > > the authors tell you simply not to use the GWT plugin's built in web-
> >> > > server (Jetty). In other words you have to work with the -noserver
> >> > > option in GWT in order to debug server side code because Jetty doesn't
> >> > > support J2EE features that Spring uses that for instance Tomcat or
> >> > > other web servers support. I had used -noserver previously and so
> >> > > thought this not to be a big deal. However, with a fair amount of
> >> > > effort I never got the project to run even in -noserver mode. My
> >> > > experience with the GWT Server Library documentation and I believe
> >> > > they even stated this in the documentation was that you're expected to
> >> > > already understand Spring and this made it more difficult for me to
> >> > > implmenet. Moving to -noserver mode also required me to muck with
> >> > > eclipse setting files in order to make my GWT eclipse project also a
> >> > > Web-Eclipse project. Probably with more time I would have been able
> >> > > to figure it out but it wasn't clean having to muck with eclipse files
> >> > > anyway and I was looking for the simplest methodology as I'm trying to
> >> > > get folks within my company to understand the beauty of GWT and
> >> > > roadblocks like this don't help.
>
> >> > > Yesterday, after reading your post I downloaded the
> >> > > SimpleGwtRpcSpringExample.zip file from the URL Sam mentioned
>
> >> > >http://code.google.com/p/gwtrpc-spring/
>
> >> > > The self-containing Eclipse project worked out of the box! under
> >> > > Jetty! I did have to move to JDK 1.6 and recompile to get rid of a
> >> > > class versioning error. I notice that the bright folks who wrote this
> >> > > component created their own dispatcher class so as to not have to use
> >> > > Spring's dispatcher class. I'm assuming that this is the reason that
> >> > > it worked under Jetty because their custom dispatcher doesn't rely on
> >> > > the extra J2EE facilities that Spring's dispatcher does. There may be
> >> > > downsides to this component but I haven't seen any yet. One thing I
> >> > > read about the GWT Server Library is that if you use their inheritance
> >> > > scheme to spring enable your server side rpc class it's faster because
> >> > > it doesn't use reflection. However, if all you're doing is making
> >> > > calls into the server based upon button clicks the vast majority of
> >> > > your processing is going to likely go in in the server and so the
> >> > > performance thing may be of little consequence. I don't see a pause
> >> > > in the example greet server app when I click the button. If anyone
> >> > > has used the gwtrpc-spring component extensively and knows more about
> >> > > the downsides, if any, I'd love to hear about it.
>
> >> > > On Sep 3, 3:12 am, Alek <akorotenk...@gmail.com> wrote:
> >> > > > Hi,
>
> >> > > > We also use SL for our project. I configured this solution once and
> >> > > > forgot about it.
>
> >> > > > Respect
>
> >> > > > On Aug 31, 11:24 pm, George Georgovassilis<
> >> g.georgovassi...@gmail.com>
> >> > > wrote:
> >> > > > > Hi Sam,
>
> >> > > > > The SL [1] is a community maintained integration of Spring and GWT
> >> > > > > mainly focused at exporting Spring managed beans as RPC services.
> >> It
> >> > > > > was launched four years ago and has reached through many releases
> >> a
> >> > > > > high degree of maturity. The documentation is extensive, it's easy
> >> to
> >> > > > > use (though I'm biased) but it's been criticized for not using
> >> maven.
>
> >> > > > > [1]http://gwt-widget.sourceforge.net/
>
> >> > > > > On Aug 31, 5:31 pm, Sam <sambrod...@gmail.com> wrote:
>
> >> > > > > > Note: this thread is
>
> ...
>
> 阅读更多 >>

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

No comments:

Post a Comment