Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

ibm mobilefirst - No MBean found for worklight project

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.

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.

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.

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
See Question&Answers more detail:<a href="https://stackoverflow.c

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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]"

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.

Therefore I would check the data source definition in Liberty's server.xml file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...