I have been getting this error while starting up my server with my worklight project (.war) deployed on it. Was wondering if anyone has any inputs. Below are the relevant information.
在启动我的服务器时,我已经得到了这个错误,我的worklight项目(.war)部署在它上面。想知道是否有人有任何输入。以下是相关信息。
The system is set up in Redhat OS
, Worklight version 6.2 consumer edition
, DB2
as database and WS-Liberty 8.5.5.1
as server.
该系统在Redhat操作系统、Worklight version 6.2 consumer edition、DB2 as数据库和WS-Liberty 8.5.5.1中设置为服务器。
P.S: My application was available before this problem occured, however my worklight console was never working correctly (always had problem with message on worklight console saying "no runtime configuratin can be found
"). It still says the same.
P。S:在出现这个问题之前,我的应用程序是可用的,但是我的工作灯控制台从来没有正确工作过(总是有问题,在worklight控制台的消息上说“不能找到运行时配置”)。还是一样。
logs
日志
[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
2 个解决方案
#1
2
Solved !!! No runtime configuratin can be found
I was getting this error because there were two instances of WL Admin Services(wladmin and worklightadmin) deployed in the server. Their configuration was added in server.xml twice, once by worklight installer and once by worklight server configuration tool. So my application was communicating to 'worklightadmin' Admin Service and WL Console communicating to 'wladmin' Admin Service. That's why there was no runtime available in the worklight console. Uninstalling 'wladmin' Admin Service from server by removing below snippet does the trick.
我得到这个错误是因为在服务器中部署了两个WL管理服务实例(wladmin和worklightadmin)。他们的配置被添加到服务器中。xml两次,一次是通过worklight安装程序,一次是通过worklight server配置工具。因此,我的应用程序是与“worklightadmin”管理服务和WL控制台通信,用于“wladmin”管理服务。这就是为什么在worklight控制台没有运行时的原因。从服务器上卸载“wladmin”管理服务,删除下面的代码片段。
<!-- Declare the Worklight Administration Service application. -->
<!-- <application id="wladmin" location="worklightadmin.war" name="wladmin" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="user"/>
</security-role>
<security-role name="worklightdeployer">
<user name="user"/>
</security-role>
<security-role name="worklightmonitor">
<user name="user"/>
</security-role>
<security-role name="worklightoperator">
<user name="user"/>
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.2.jar"/>
</commonLibrary>
</classloader>
</application> -->
<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<!-- <jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value="WL_UAT_Server_Config"/> -->
#2
3
The first error is "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]"
第一个错误是“FWLSE0188E:未能连接到DB2数据库:无法创建PoolableConnectionFactory ([jcc][10389][12245][3.67.27],在加载本地库db2jcct2、java.lang时失败。不满足链接错误:java.library中没有db2jcct2。路径:ERRORCODE=-4472, SQLSTATE=null)[项目MyProjectName]
The recommended way to configure the DB2 data sources in Worklight is to use the JDBC 4.0 driver (db2jcc4.jar and its associated license jar files in the same directory), as described in the Worklight documentation (here and here). It does not involve the use of native code libraries.
在Worklight中配置DB2数据源的推荐方法是使用JDBC 4.0驱动程序(db2jcc4)。jar及其相关的许可证jar文件在同一个目录中),如Worklight文档中描述的(这里和这里)。它不涉及使用本地代码库。
Therefore I would check the data source definition in Liberty's server.xml file.
因此,我将检查Liberty服务器中的数据源定义。xml文件。
#1
2
Solved !!! No runtime configuratin can be found
I was getting this error because there were two instances of WL Admin Services(wladmin and worklightadmin) deployed in the server. Their configuration was added in server.xml twice, once by worklight installer and once by worklight server configuration tool. So my application was communicating to 'worklightadmin' Admin Service and WL Console communicating to 'wladmin' Admin Service. That's why there was no runtime available in the worklight console. Uninstalling 'wladmin' Admin Service from server by removing below snippet does the trick.
我得到这个错误是因为在服务器中部署了两个WL管理服务实例(wladmin和worklightadmin)。他们的配置被添加到服务器中。xml两次,一次是通过worklight安装程序,一次是通过worklight server配置工具。因此,我的应用程序是与“worklightadmin”管理服务和WL控制台通信,用于“wladmin”管理服务。这就是为什么在worklight控制台没有运行时的原因。从服务器上卸载“wladmin”管理服务,删除下面的代码片段。
<!-- Declare the Worklight Administration Service application. -->
<!-- <application id="wladmin" location="worklightadmin.war" name="wladmin" type="war">
<application-bnd>
<security-role name="worklightadmin">
<user name="user"/>
</security-role>
<security-role name="worklightdeployer">
<user name="user"/>
</security-role>
<security-role name="worklightmonitor">
<user name="user"/>
</security-role>
<security-role name="worklightoperator">
<user name="user"/>
</security-role>
</application-bnd>
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_1.0.2.jar"/>
</commonLibrary>
</classloader>
</application> -->
<!-- Declare the JNDI properties for the Worklight Administration Service. -->
<!-- <jndiEntry jndiName="wladmin/ibm.worklight.admin.environmentid" value="WL_UAT_Server_Config"/> -->
#2
3
The first error is "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]"
第一个错误是“FWLSE0188E:未能连接到DB2数据库:无法创建PoolableConnectionFactory ([jcc][10389][12245][3.67.27],在加载本地库db2jcct2、java.lang时失败。不满足链接错误:java.library中没有db2jcct2。路径:ERRORCODE=-4472, SQLSTATE=null)[项目MyProjectName]
The recommended way to configure the DB2 data sources in Worklight is to use the JDBC 4.0 driver (db2jcc4.jar and its associated license jar files in the same directory), as described in the Worklight documentation (here and here). It does not involve the use of native code libraries.
在Worklight中配置DB2数据源的推荐方法是使用JDBC 4.0驱动程序(db2jcc4)。jar及其相关的许可证jar文件在同一个目录中),如Worklight文档中描述的(这里和这里)。它不涉及使用本地代码库。
Therefore I would check the data source definition in Liberty's server.xml file.
因此,我将检查Liberty服务器中的数据源定义。xml文件。