奇怪的GWT错误与服务器端的外部jar [英] Strange GWT Error with external jar on server side

查看:98
本文介绍了奇怪的GWT错误与服务器端的外部jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的GWT Applicatopn的服务器端使用外部jar(Apache Mahout)。
据我所知,在服务器端使用外部jar不应该导致错误。只有在客户端,但是当我尝试运行代码时,出现以下错误:
没有源代码可用于de.unimannheim.paniscus.server ...
这里有什么错误? / p>

请帮助我,我需要为我的论文解决这个问题




大家好,我现在创建了一个collbaorative.gwt.xml,我从apache mahout继承了de.unimannheim.paniscus.server.collaborative中使用的所有类,但它仍然不起作用。对不起,我很无奈这里有什么错误?

解决方案

我同意Dusty Campbell,你不应该继承*中的jar。 gwt.xml。 *。gwt.xml 中的< inherits> 标记指定应该继承的gwt-modules。因此,只有客户端兼容的代码才能被继承。



引用来自gwt文档:< inherits name =logical-module-名称/> :继承指定模块的所有设置,就像继承模块的XML内容被逐字复制一样,任何数量的模块都可以用这种方式继承
另请参阅: http://code.google.com/webtoolkit/doc/1.6 /DevGuideOrganizingProjects.html#DevGuideInheritingModules



我的猜测是您(错误地)使用了de.unimannheim.paniscus.server包中的一个类客户端或共享代码。即使只是一个导入语句( import de.unimannheim.paniscus.server。* )也会导致这个异常。


I want to use a external jar (Apache Mahout) on the server side of my GWT Applicatopn. As far as i know using external jars on the server side shouldn't cause an error. Only on the client side but when i try to run the code i get the following error: "no source code is available for de.unimannheim.paniscus.server..." Whats wrong here ?

Please help me i need to solve this for my thesis


Hi guys i created now an collbaorative.gwt.xml where i inherited all classes from apache mahout that are used within de.unimannheim.paniscus.server.collaborative but it's still not working. Sorry i'm helpless whats wrong here ?

解决方案

I agree with Dusty Campbell, you should not inherit the jar in the *.gwt.xml. The <inherits> tag in the *.gwt.xml specifies gwt-modules which should be inherited. So only client-side-compatible code can be inherited.

Citation from the gwt docs: "<inherits name="logical-module-name" /> : Inherits all the settings from the specified module as if the contents of the inherited module's XML were copied verbatim. Any number of modules can be inherited in this manner" see also: http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideInheritingModules

My guess is that you (by mistake) use a class from the "de.unimannheim.paniscus.server" package in client-side or shared code. Even just an import statement (import de.unimannheim.paniscus.server.*) will cause this exception.

这篇关于奇怪的GWT错误与服务器端的外部jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆