0

我是应用程序服务器环境的新手。我已经安装了 Websphere Application Server v8.5 和 DB2 v10.1 作为数据库服务器。我需要在 websphere 上托管一个应用程序,它使用 JDBC 数据源连接来连接 DB2 数据库。

现在,该应用程序已成功部署并已在 websphere 管理控制台上启动。当我尝试使用 //hostname:portname/application 运行应用程序时,我收到以下错误:

An unexpected error has occured.
Please consult your system logs for more detailed information.

在“C:\Program Files (x86)\ibm\WebSphere\AppServer\profiles\AppSrv01\logs\server1”进入system.out日志后,发现如下错误:

[8/19/13 5:23:55:298 UTC] 0000019d LocalTranCoor E   WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[8/19/13 5:23:55:298 UTC] 0000019d webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletNameNotFound]: java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy348.getCallerIps(Unknown Source)
    at com.rsa.csd.servlet.filters.CallerIpFilter.doFilter(CallerIpFilter.java:40)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:975)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1815)
Caused by: com.rsa.csd.config.IGenConfigService$GenConfigException: runtime.ex
    at com.rsa.csd.config.AAOPGenConfigProxyImpl.invoke(AAOPGenConfigProxyImpl.java:126)
    at com.rsa.csd.config.GenConfigServiceDynamicProxy.invoke(GenConfigServiceDynamicProxy.java:68)
    ... 25 more
Caused by: java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used.
    at net.sf.ehcache.CacheManager.checkStatus(CacheManager.java:1158)
    at net.sf.ehcache.CacheManager.getEhcache(CacheManager.java:807)
    at com.rsa.csd.cache.EhcacheWrapper.getCache(EhcacheWrapper.java:30)
    at com.rsa.csd.cache.EhcacheWrapper.get(EhcacheWrapper.java:23)
    at com.rsa.csd.config.GenConfigCommandBase.getRegionContextHeirarchies(GenConfigCommandBase.java:95)
    at com.rsa.csd.config.GenConfigGetCommand.handleGet(GenConfigGetCommand.java:241)
    at com.rsa.csd.config.GenConfigGetCommand.execute(GenConfigGetCommand.java:55)
    at com.rsa.csd.config.AAOPGenConfigProxyImpl.invoke(AAOPGenConfigProxyImpl.java:119)
    ... 26 more

此应用程序的 Web.xml 文件是:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"  "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app id="WebApp_1376545306753">

<icon/>

<display-name>My App</display-name>

<distributable/>

<context-param>
    <param-name>bootstrapConfigFile</param-name>
    <param-value>pmBootstrapConfigs.xml</param-value>
    <description>
        Bootstraps db connection and configloading, used by
        PassMarkContextLoaderServlet
    </description>
</context-param>

<context-param>
    <param-name>loadLocalConfigsOnly</param-name>
    <param-value>true</param-value>
    <description>
        If true, reloading will be done from file only; if false,
        local configs will be loaded if the localFileBasePaths is
        specified.
    </description>
</context-param>

<context-param>
    <param-name>localFilesBasePath</param-name>
    <param-value>configs</param-value>
    <description>
        Directory/Path where the local files required for the
        configuration framework reside. This path can be relative to
        classpath (classes directory) or an absolute path
    </description>
</context-param>

<context-param>
    <param-name>secondaryBasePathList</param-name>
    <param-value>C:\RAA-Main\configs</param-value>
    <description>
        Directory/Path where the external files required for the
        configuration framework reside. This path can be relative to
        classpath (classes directory) or an absolute path
    </description>
</context-param>

<context-param>
    <param-name>configTreeName</param-name>
    <param-value>PMRoot</param-value>
    <description>
        Name of the configTree in Db to be used for this application
    </description>
</context-param>

<filter>
    <filter-name>CallerIpFilter</filter-name>
    <filter-class>com.rsa.csd.servlet.filters.CallerIpFilter</filter-class>
</filter>

<filter>
    <filter-name>WebServiceLoggingFilter</filter-name>
    <filter-class>com.passmarksecurity.filter.WebServiceLoggingFilter</filter-class>
</filter>

<filter>
    <filter-name>credentialsFilter</filter-name>
    <filter-class>com.rsa.csd.servlet.filters.SessionCredentialsFilter</filter-class>
</filter>

<filter>
    <filter-name>XSSDetectionFilter</filter-name>
    <filter-class>com.rsa.csd.servlet.filters.XSSDetectionFilter</filter-class>
</filter>
<!--
<filter>
    <filter-name>WSDLAuthenticationFilter</filter-name>
    <filter-class>com.rsa.csd.servlet.filters.WSDLAuthenticationFilter</filter-class>
</filter>
-->
<filter-mapping>
    <filter-name>CallerIpFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>XSSDetectionFilter</filter-name>
    <url-pattern>/contextManager</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>XSSDetectionFilter</filter-name>
    <url-pattern>/logManager</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>WebServiceLoggingFilter</filter-name>
    <url-pattern>/services/AuthService</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/healthCheck</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/healthCheck/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/contextManager</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/contextManager/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/logManager</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/logManager/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>*.jsp</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>credentialsFilter</filter-name>
    <url-pattern>/services/*</url-pattern>
</filter-mapping>


<servlet>
    <servlet-name>RsaContextLoader</servlet-name>
    <display-name>Rsa Context LoaderListener Servlet</display-name>
    <servlet-class>com.passmarksecurity.servlet.RsaContextLoaderServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet>
    <servlet-name>AxisServlet</servlet-name>
    <display-name>Apache-Axis Servlet</display-name>
    <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
</servlet>

<servlet>
    <servlet-name>PMContextManager</servlet-name>
    <display-name>PM Context Manager</display-name>
    <servlet-class>
        com.passmarksecurity.servlet.PassMarkContextManagerServlet
    </servlet-class>
    <load-on-startup>3</load-on-startup>
</servlet>

<servlet>
    <servlet-name>LogManager</servlet-name>
    <display-name>Log Manager</display-name>
    <servlet-class>
        com.passmarksecurity.servlet.LogManagerServlet
    </servlet-class>
    <load-on-startup>4</load-on-startup>
</servlet>

<servlet>
    <servlet-name>HealthCheck</servlet-name>
    <display-name>Health Check</display-name>
    <servlet-class>
        com.passmarksecurity.servlet.HealthCheckServlet
    </servlet-class>
    <load-on-startup>5</load-on-startup>
</servlet>

<servlet>
    <servlet-name>ContextServlet</servlet-name>
    <display-name>save the root context full path to be used for axis client configuration creation</display-name>
    <servlet-class>com.rsa.csd.acsp.servlet.ContextServlet</servlet-class>
    <load-on-startup>6</load-on-startup>
</servlet>


<servlet-mapping>
    <servlet-name>PMContextManager</servlet-name>
    <url-pattern>/contextManager</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>LogManager</servlet-name>
    <url-pattern>/logManager</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>HealthCheck</servlet-name>
    <url-pattern>/healthCheck</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
</servlet-mapping>

<session-config>
    <session-timeout>10</session-timeout>
</session-config>

<mime-mapping>
    <extension>xsd</extension>
    <mime-type>text/xml</mime-type>
</mime-mapping>

<welcome-file-list>
    <welcome-file>Login.jsp</welcome-file>
</welcome-file-list>

<!-- error pages -->
<error-page>
    <error-code>404</error-code>
    <location>/WEB-INF/jsps/Error.jsp</location>
</error-page>
<error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/jsps/Error.jsp</location>
</error-page>
<error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/WEB-INF/jsps/Error.jsp</location>
</error-page>

<resource-ref id="ResourceRef_1376545306753">
    <res-ref-name>jdbc/PassMarkDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

<resource-ref id="ResourceRef_1376545306754">
    <description>Work Manager</description>
    <res-ref-name>wm/default</res-ref-name>
    <res-type>commonj.work.WorkManager</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

<env-entry>
    <description>Required when accessing PM core database under DB2 using DAOFactory</description>
    <env-entry-name>db2SchemaName</env-entry-name>
    <env-entry-value>RSA_CORE_SCHEMA</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
</env-entry>

应用程序日志之一指出以下错误:

    2013-08-19 01:14:34,525 +0000 ERROR - [] | [] | [] | [SYSTEM_ERROR | Failed to initialize the context: null]
    2013-08-19 04:54:03,157 +0000 WARN - [] | [] | [] | [Alert type=device-type-detector-load-failed, application=UNKNOWN, site=site, host=localhost, time=Mon Aug 19 04:54:03 UTC 2013, message values="", Failed to load device type detector data file, Failed to load device type detector data file from ]
    2013-08-19 04:54:03,173 +0000 ERROR - [] | [] | [] | [CONFIG_ERROR | Initializing PassMark config context failed: exception loading the ApplicationContext for this configSpace PMRoot because: Error creating bean with name 'deviceTypeDetector' defined in ConfigResource: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid file: \
    CAUSE: Error creating bean with name 'deviceTypeDetector' defined in ConfigResource: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Invalid file: \]
    2013-08-19 04:54:03,219 +0000 ERROR - [] | [] | [] | [SYSTEM_ERROR | Failed to initialize the context: null]

还需要补充一点,其他应用程序在这个环境中运行良好。我只在其中一个应用程序中面临这个问题。我正在研究 Amazon AWS EC2 M1 中型实例...具有 3.75 GB 内存和 64 位 Windows Server 2012 平台...使用 JDK 6 更新 45。

我知道这可能很幼稚,但我对 Java 环境一无所知,因为我来自数据库/数据仓库领域。请指导我如何找到实际原因并解决此问题。如果专家建议我一些好的在线博客来了解更多关于 Java 应用程序和 websphere 基础知识,我也将不胜感激。

任何帮助都非常感谢。非常感谢。

4

1 回答 1

0

显然,您的过滤器在第 40 行com.rsa.csd.servlet.filters.CallerIpFilter抛出java.lang.reflect.UndeclaredThrowableException。直到堆栈跟踪,您的 Ehcache 初始化存在问题。

所以,首先我想尝试升级到BigMemory -下载。实际上,它是升级的 Ehcache 并且我认为有多达 4 个内核和 32 gig 的内存的免费产品包。

否则,您应该从堆栈跟踪中提供有关您的 JDK、操作系统架构和类的源代码的信息。

于 2013-08-19T06:09:56.563 回答