Weblogic 10 和 Struts 2.x 问题 - Javassist

发布于 2024-09-27 06:54:05 字数 1627 浏览 5 评论 0原文

请帮助解决这个问题,我快要疯了...

我正在尝试使用 Weblogic 10 作为应用程序服务器和 IIS 作为 Web 服务器(公司约束)以及 EJB 3 和 Struts 2 来制作客户端-服务器 Web 应用程序。然而,我遇到了无法解决的问题。

使用 Struts 2.2,我在启动服务器时得到以下堆栈跟踪:

<12-ott-2010 16.02.21 CEST> <Error> <HTTP> <BEA-101165> <Could not load user def
ined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher.
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inj
ect.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 295 - com/opensymphony/xwork2/inject/ContainerImpl.java:295:-1
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.
java:190)
        at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterMa
nager.java:320)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        Truncated. see log file for complete stacktrace
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[...]
java.lang.IllegalArgumentException: Javassist library is missing in classpath! P
lease add missed dependency!
        at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)

[...]

但是,在所有其他与 Struts 相关的库中,Javassist 包在 Web 类路径 (/WEB-INF/lib direcotry) 中清晰可见,我还可以浏览它的包和课程。我还将它放入 CLASSPATH 库和 Weblogic 初始化参数中,但没有任何效果。我不知道该怎么想。这是 Struts 2/Weblogic 集成错误吗?

更奇怪的是,最初我设法让 Struts 2 工作。然后由于某种原因(我真的不知道为什么)它停止了,我无法摆脱这个错误。

感谢您的帮助。

Please help with this issue, I'm going mad...

I'm trying to make a client-server web application using Weblogic 10 as an application server and IIS as a webserver (corporate constraints), with EJB 3 and Struts 2. I am however having strage problems which I cannot solve.

Using Struts 2.2 I get the following stack trace while starting the server:

<12-ott-2010 16.02.21 CEST> <Error> <HTTP> <BEA-101165> <Could not load user def
ined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher.
java.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inj
ect.ContainerImpl$MethodInjector
File: ContainerImpl.java
Method: inject
Line: 295 - com/opensymphony/xwork2/inject/ContainerImpl.java:295:-1
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
        at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.
java:190)
        at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterMa
nager.java:320)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        Truncated. see log file for complete stacktrace
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[...]
java.lang.IllegalArgumentException: Javassist library is missing in classpath! P
lease add missed dependency!
        at ognl.OgnlRuntime.<clinit>(OgnlRuntime.java:165)

[...]

However, the Javassist package is clearly visible in the web classpath (/WEB-INF/lib direcotry) among all the other Struts-related libraries, I can also browse its packages and classes. I also put it in the CLASSPATH library and in Weblogic initializaion parameters but nothing works. I don't know what to think. Is this a Struts 2/Weblogic integration bug?

Even weirder is the fact that initially I managed to make Struts 2 work. Then for some reason (I don't really know what for) it stopped and I can't get rid of that error.

Thanks for your help.

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

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

发布评论

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

评论(1

风蛊 2024-10-04 06:54:05

通常,当所有希望都破灭时,解决方案就会出现。显然,我所要做的就是将所有 Struts 库(包括 Javassist)移动到父 EAR 项目的 /lib 目录中。这对我来说听起来很奇怪,但它有效,而且我坚持使用该解决方案。

一般来说,我对 Weblogic 和企业应用程序不是很熟悉,因此并没有轻易想到服务器将 EAR 视为基本上下文而不是包含的 WAR。

Often solutions come when all hope is lost. Apparently all I had to do was moving all Struts libraries (including Javassist) to the /lib directory of the parent EAR project. This sounds weird to me, but it works and I'm sticking with the solution.

I'm not very familiar with Weblogic and Enterprise apps in general, so it didn't came to mind readily that the server treats the EAR as the base context and not the contained WAR.

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