ibm-mobilefirst - 找不到工作灯项目的 MBean

标签 ibm-mobilefirst worklight-studio worklight-server websphere-liberty worklight-runtime

我在启动部署了工作灯项目 (.war) 的服务器时遇到此错误。想知道是否有人有任何意见。以下是相关信息。

系统采用Redhat OSWorklight version 6.2 Consumer EditionDB2作为数据库以及WS-Liberty 8.5 .5.1 作为服务器。

P.S:我的应用程序在出现此问题之前可用,但是我的工作灯控制台从未正常工作(工作灯控制台上始终出现消息“找不到运行时配置”的问题)。它仍然说同样的事情。

日志

[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.071 seconds.
[WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file wsjar:file:/opt/IBM/WebSphere/Liberty/usr/servers/WL_UAT_Server/apps/MyProjectName.war!/WEB-INF/lib/db2jcc.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file wsjar:file:/opt/IBM/WebSphere/Liberty/usr/servers/WL_UAT_Server/apps/MyProjectName.war!/WEB-INF/lib/db2jcc4.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file wsjar:file:/opt/IBM/WebSphere/Liberty/usr/servers/WL_UAT_Server/apps/MyProjectName.war!/WEB-INF/lib/db2jcc.jar or its parent.
[WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file wsjar:file:/opt/IBM/WebSphere/Liberty/usr/servers/WL_UAT_Server/apps/MyProjectName.war!/WEB-INF/lib/db2jcc4.jar or its parent.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/MyProjectName/
[ERROR   ] FWLSE0188E: Failed to connect to DB2 database : Cannot create PoolableConnectionFactory ([jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null) [project MyProjectName]
[ERROR   ] FWLST0003E: ========= Failed starting project /MyProjectName [project MyProjectName]
Error creating bean with name 'txManager' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null)
[ERROR   ] Error creating bean with name 'txManager' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null)
Error creating bean with name 'txManager' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null)
[ERROR   ] MyProjectName: WL_UAT_Server///10.80.25.54: 2014-08-15T15:19:11.145Z: BeanCreationException:Error creating bean with name 'txManager' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'brokerSessionFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'rssBrokerDS' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rssBrokerDS' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Cannot resolve reference to bean 'worklight-direct' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklight-direct' defined in URL [wsjar:file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight-jee-library-6.2.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ([jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null)
[AUDIT   ] CWWKZ0001I: Application MyProjectName started in 4.022 seconds.
[ERROR   ] FWLSE3002E: The resource is not found.
FWLSE3041E: No MBean found for Worklight project 'MyProjectName'. Possibly the Worklight runtime web application for Worklight project 'MyProjectName' is not running. If it is running, use JConsole to inspect the available MBeans.
[ERROR   ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null
    at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:422)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:127)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
    at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null
    ... 5 more

[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0018I: The server configuration was not updated. No functional changes were detected.
[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.149 seconds.
[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/_MobileBrowserSimulator/
[AUDIT   ] CWWKZ0009I: The application _MobileBrowserSimulator has stopped successfully.
[AUDIT   ] CWWKG0016I: Starting server configuration update.
[AUDIT   ] CWWKG0017I: The server configuration was successfully updated in 0.031 seconds.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/_MobileBrowserSimulator/
[AUDIT   ] CWWKZ0001I: Application _MobileBrowserSimulator started in 0.072 seconds.
[ERROR   ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null
    at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:422)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:127)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
    at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.67.27] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path:  ERRORCODE=-4472, SQLSTATE=null

最佳答案

第一个错误是“FWLSE0188E:无法连接到 DB2 数据库:无法创建 PoolableConnectionFactory ([jcc][10389][12245][3.67.27] 加载 native 库 db2jcct2 失败,java.lang.UnsatisfiedLinkError: no db2jcct2在 java.library.path 中:ERRORCODE=-4472,SQLSTATE=null) [project MyProjectName]"

在 Worklight 中配置 DB2 数据源的推荐方法是使用 JDBC 4.0 驱动程序(同一目录中的 db2jcc4.jar 及其关联的许可证 jar 文件),如 Worklight 文档中所述( herehere )。不涉及原生代码库的使用。

因此,我会检查 Liberty 的 server.xml 文件中的数据源定义。

关于ibm-mobilefirst - 找不到工作灯项目的 MBean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25333005/

相关文章:

ios - 如何从使用 native 日志记录 API 编写的设备中检索工作灯日志?

ibm-mobilefirst - IBM Worklight - 尝试部署应用程序/适配器时出错

ibm-mobilefirst - 如何在 Worklight Studio 中设置 Android SDK 目标

ssl - Worklight Development SSL 问题(无法找到证书链)

android - 用于真实设备的 IBM Worklight SQL 适配器

java - 在多个安全检查之间传递安全上下文数据

javascript - Worklight 将登录凭据传递给 iframed 服务器端内容

ios - IBM MFP IOS 内存泄漏

ios - 导航时 Worklight/iOS7 屏幕在上方移动

java - ERROR : Cannot load this JVM TI agent twice, 检查您的 java 命令行是否有重复的 jdwp 选项