使用 java 1.4.2_07-b05 在 Tomcat 上出现长类名的 NoClassDefFoundError

发布于 2024-07-06 12:25:40 字数 505 浏览 8 评论 0原文

我有一个java类:

it.eng.ancona.view.RuoliView$TabElaborazioneFattureValidazione$ElencoDettaglioElaborazioneFattureValidazione$RigaElencoDettaglioElaborazioneFattureValidazione

多个内部类太长了。

如果我在 Eclipse 上使用 1.4.2_07-b05 并且调用这个类,一切都会顺利。

如果我在 Tomcat 5.0 上使用 1.4.2_07-b05,它会抛出 NoClassDefFoundError

我尝试删除类名,之后一切正常。

我在网上搜索了一下,发现类名的最大长度是65000,所以长度应该没问题。 在日食上一切正常。

操作系统是Vista。

有人知道这是错误还是其他吗?

I have a java class:

it.eng.ancona.view.RuoliView$TabElaborazioneFattureValidazione$ElencoDettaglioElaborazioneFattureValidazione$RigaElencoDettaglioElaborazioneFattureValidazione

It's so long for multiple inner class.

If I use 1.4.2_07-b05 on Eclipse and I call this class, all goes fine.

If I use 1.4.2_07-b05 on Tomcat 5.0 it throws NoClassDefFoundError.

I try to cut the class name, and after this all works fine.

I've searched the internet and I've found that the max length for a class name is 65000, so the length should be ok. And on eclipse all works.

The OS is Vista.

Someone know if it's a bug or anything else?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心凉怎暖 2024-07-13 12:25:40

这可能是由 Windows 的最大路径长度引起的。 尝试将 Tomcat 服务器移至 C:\TC 等位置,看看是否仍然存在问题。 还要检查该类应该位于的 jar 中是否确实有它。

This could be caused by the maximum path length of Windows. Try moving your Tomcat server to something like C:\TC to see if you still have a problem. Also check if the jar that this class should be in, actually does have it.

半边脸i 2024-07-13 12:25:40

这不是一个类路径问题吗?

在 Eclipse 中,获得正确的类路径相当容易,因为它管理自己的构建目录。

该类是否在您的 WAR 中(或 autodeploy 文件夹,或者您用来部署到 Tomcat 的任何文件夹中)?

isn't this more a Classpath problem?

Within Eclipse it is fairly easy to get a correct classpath, since it manages its own build directory.

Is the class in your WAR (or autodeploy-folder, or whatever you use to deploy to Tomcat)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文