通过 Eclipse 插件工具将 Web 应用程序添加到 WebSphere Liberty Profile

发布于 2025-01-06 08:56:36 字数 5580 浏览 1 评论 0原文

我正在尝试使用“IBM WebSphere Liberty Profile Tools for Eclipse”让现有的 Web 应用程序与“WebSphere Application Server Liberty Profile v8.5 Beta”一起使用。

我已经按照此处的说明安装了 Eclipse 的开发人员工具以及 liberty 配置文件运行时: https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en#comment-1321558450546

然后,我按照以下步骤继续创建 Liberty Profile 服务器这里的说明: http://publib.boulder.ibm.com/infocenter/wasinfo/beta/index.jsp?topic=%2Fcom.ibm.websphere.w4d.nd.doc%2Ftopics%2Frw4d_dirs.html

我将 Web 应用程序添加到服务器并使用以下控制台输出启动它:

Launching TEST (was4d-1.0.0.20111202-0614/websphere-kernel_1.0.0) on Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_26-b03
    Boot properties: file:/home/tbuckley/work/WAS/was4d/usr/servers/TEST/bootstrap.properties
    Config document: file:/home/tbuckley/work/WAS/was4d/usr/servers/TEST/server.xml
[AUDIT   ] CWWKE0001I: The kernel was launched.
[AUDIT   ] CWWKE0002I: The kernel started after 0.91
[AUDIT   ] CWWKF0007I: A feature update is starting after 0.92 seconds.
[AUDIT   ] CWWKZ0058I: Application monitor started after 1.218 seconds.
[AUDIT   ] CWWKO0219I: TCP Channel http-default has been started and is now listening for requests on host localhost  (IPv4: 127.0.0.1) port 9080.
[AUDIT   ] SRVE9998A: Application myWebApp added to web container.
[AUDIT   ] CWWKZ0001I: The application myWebApp has started successfully.
[AUDIT   ] CWWKF0008I: The feature update is complete after 2.141 seconds.



当我通过浏览器点击网络应用程序网址 http://localhost:9080/myWebApp/ 时,我得到一个空白页面和以下控制台信息:

[ERROR   ] SRVE0015E: Failure to initialize Web application myWebApp



如果我重新加载页面,我会得到以下信息:

[WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/login/*, wrapper-->ServletWrapper[Application Servlet:[/login/*]], application-->myWebApp.
[ERROR   ] SRVE0015E: Failure to initialize Web application myWebApp



我的 web.xml 下还有以下 servlet/mappings:

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>Application Servlet</servlet-name>
    <url-pattern>/login/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>


有什么想法可能是这里出了问题或者我如何获得更详细的调试信息?

更新

我刚刚在那里创建了一个“动态网络项目”框架,并在其中放入了一个index.html 文件。我将它添加到 liberty 服务器中,它通过访问 localhost:9080/simpleApp/index.html 来工作。

我试图添加的现有动态 Web 应用程序非常庞大且复杂。 我在 was4d/usr/servers/TEST/logs/ffdc/ffdc_12.02.16_16.40.33.0.log 下发现了以下内容:

------Start of DE processing------ = 16/02/12 16:36:06:170 GMT, key = java.lang.NullPointerException com.ibm.ws.webcontainer.osgi.WebContainer 131
Exception = java.lang.NullPointerException
Source = com.ibm.ws.webcontainer.osgi.WebContainer
probeid = 131
S    tack Dump = java.lang.NullPointerException
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:142)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:1860)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:499)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:5437)
at com.ibm.ws.webcontainer.osgi.WebContainer.discriminate(WebContainer.java:1095)
at com.ibm.ws.webcontainer.osgi.WebContainer.discriminate(WebContainer.java:1009)
at com.ibm.ws.dispatcher.http.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:143)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:444)
a    t com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:378)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:278)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:249)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:502)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:550)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:899)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:981)
at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:398)
at com.ibm.ws.threading.internal.Worker.run(Worker.java:380)
at java.lang.Thread.run(Thread.java:662)

Web 应用程序中的 spring 设置似乎导致了一些问题?

谢谢

I'm attempting to get an existing web application working with 'WebSphere Application Server Liberty Profile v8.5 Beta' using the 'IBM WebSphere Liberty Profile Tools for Eclipse'.

I have installed the developer tools for Eclipse as well as the liberty profile runtime by following instructions here:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en#comment-1321558450546

I then proceed to create the Liberty Profile Server by following the instructions here:
http://publib.boulder.ibm.com/infocenter/wasinfo/beta/index.jsp?topic=%2Fcom.ibm.websphere.w4d.nd.doc%2Ftopics%2Frw4d_dirs.html

I add my web app to the server and start it with the following console output:

Launching TEST (was4d-1.0.0.20111202-0614/websphere-kernel_1.0.0) on Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_26-b03
    Boot properties: file:/home/tbuckley/work/WAS/was4d/usr/servers/TEST/bootstrap.properties
    Config document: file:/home/tbuckley/work/WAS/was4d/usr/servers/TEST/server.xml
[AUDIT   ] CWWKE0001I: The kernel was launched.
[AUDIT   ] CWWKE0002I: The kernel started after 0.91
[AUDIT   ] CWWKF0007I: A feature update is starting after 0.92 seconds.
[AUDIT   ] CWWKZ0058I: Application monitor started after 1.218 seconds.
[AUDIT   ] CWWKO0219I: TCP Channel http-default has been started and is now listening for requests on host localhost  (IPv4: 127.0.0.1) port 9080.
[AUDIT   ] SRVE9998A: Application myWebApp added to web container.
[AUDIT   ] CWWKZ0001I: The application myWebApp has started successfully.
[AUDIT   ] CWWKF0008I: The feature update is complete after 2.141 seconds.

When I hit the web app url http://localhost:9080/myWebApp/ via a browser I get a blank page and the following console info:

[ERROR   ] SRVE0015E: Failure to initialize Web application myWebApp

If I reload the page I get the following:

[WARNING ] SRVE0274W: Error while adding servlet mapping for path-->/login/*, wrapper-->ServletWrapper[Application Servlet:[/login/*]], application-->myWebApp.
[ERROR   ] SRVE0015E: Failure to initialize Web application myWebApp

I also have the following servlets/mappings under my web.xml:

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>Application Servlet</servlet-name>
    <url-pattern>/login/*</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

Any ideas what could be wrong here or how I could get more detailed debug info?

UPDATE

I just created a skeleton 'dynamic web project' there and put an index.html file in it. I added it to the liberty server and it worked by going to localhost:9080/simpleApp/index.html.

The exisiting dynamic web app I am trying to add is very large and complex.
I found the following under was4d/usr/servers/TEST/logs/ffdc/ffdc_12.02.16_16.40.33.0.log:

------Start of DE processing------ = 16/02/12 16:36:06:170 GMT, key = java.lang.NullPointerException com.ibm.ws.webcontainer.osgi.WebContainer 131
Exception = java.lang.NullPointerException
Source = com.ibm.ws.webcontainer.osgi.WebContainer
probeid = 131
S    tack Dump = java.lang.NullPointerException
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:142)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeServletContainerInitializers(WebApp.java:1860)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:499)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:5437)
at com.ibm.ws.webcontainer.osgi.WebContainer.discriminate(WebContainer.java:1095)
at com.ibm.ws.webcontainer.osgi.WebContainer.discriminate(WebContainer.java:1009)
at com.ibm.ws.dispatcher.http.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:143)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:444)
a    t com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:378)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:278)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:249)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:174)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:83)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:502)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:550)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:899)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:981)
at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:398)
at com.ibm.ws.threading.internal.Worker.run(Worker.java:380)
at java.lang.Thread.run(Thread.java:662)

The spring setup in the web app appears to be causing some issue?

Thanks

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

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

发布评论

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

评论(1

冰葑 2025-01-13 08:56:37

事实证明,这是某些平台上 Spring 的问题(在我的例子中是 WebSphere liberty 8.5)。

从 Spring 3.1.0 M2 升级到 Spring 3.1.1 修复了该问题:
https://jira.springsource.org/browse/SPR-8496

Turns out it is an issue with Spring on certain platforms (WebSphere liberty 8.5 in my case).

Upgrading from Spring 3.1.0 M2 to Spring 3.1.1 fixes the issue:
https://jira.springsource.org/browse/SPR-8496

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