问题描述
我使用Phpmyadmin(xampp服务器)创建了一个数据库。
I have created a database using the Phpmyadmin (xampp server).
密码为空。当我尝试更改worklight.properties文件时,它说一些
Poolable连接错误:
Password is empty. When I tried to change the worklight.properties file, it says somePoolable connection error:
每当我调用适配器或部署时它显示的应用程序:
And also whenever I invoke the adapter or deploy the application it shows:
at
com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194) at [internal classes]
当我点击com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)行时,它显示缺少.jar文件。
When I click on the com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110) line it shows that there is a missing .jar file.
worklight.properties
wl.db.type=MYSQL
wl.db.url=jdbc:mysql://localhost:3306/database
wl.reports.db.username=root
wl.reports.db.password=
Adapter.xml
<connectivity>
<connectionPolicy xsi:type="sql:SQLConnectionPolicy">
<!-- Example for using a JNDI data source, replace with actual data source name -->
<!-- <dataSourceJNDIName>java:/data-source-jndi-name</dataSourceJNDIName> -->
<!-- Example for using MySQL connector, do not forget to put the MySQL connector library in the project's lib folder -->
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/database</url>
<user>root</user>
<password></password>
</dataSourceDefinition>
</connectionPolicy>
adapter-impl.js
var selectStatement = WL.Server.createSQLStatement("SELECT * FROM users;");
function getAuths() {
return WL.Server.invokeSQLStoredProcedure({
procedure : getAuths,
parameters : []
});
}
部署应用程序时出现错误消息:
Launching worklight (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130524-0951) on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_25-b17 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://lpch2-ee206922.sasken.com:10080/WorklightStarter_jQueryMobile/
[err] 261 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[WARNING ] Using empty value for configuration property 'ssl.keystore.path'
[WARNING ] Using empty value for configuration property 'ssl.keystore.password'
[err] 4055 WorklightPU INFO [Scheduled Executor-thread-1] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 4579 WorklightPU INFO [Scheduled Executor-thread-1] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary".
[err] 1 WorklightReportsPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[AUDIT ] CWWKZ0001I: Application WorklightStarter_jQueryMobile started in 24.574 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://proxy-22.eksi.com:10080/ProjectKen2/
[ERROR ] FWLSE0188E: Failed to connect to MYSQL database : Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES)) [project ProjectKen2]
[ERROR ] FWLST0003E: ========= Failed starting project /ProjectKen2 [project ProjectKen2]
Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
[ERROR ] SRVE0283E: Exception caught while initializing context: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:146)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2220)
at [internal classes]
Caused by (repeated) ... : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at com.worklight.server.bundle.project.JeeProjectActivator.loadSpringConfiguration(JeeProjectActivator.java:273)
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:134)
... 2 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.worklight.server.database.api.WorklightDataSource.getConnection(WorklightDataSource.java:234)
at com.worklight.server.database.api.WorklightDataSource.afterPropertiesSet(WorklightDataSource.java:110)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 55 more
Caused by: java.sql.SQLException: Access denied for user 'Worklight'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:925)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1704)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1250)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2483)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2516)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2301)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 61 more
[AUDIT ] CWWKZ0001I: Application ProjectKen2 started in 1.638 seconds.
Launching worklight (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130524-0951) on Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_25-b17 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://lpch2-ee206922.sasken.com:10080/WorklightStarter_jQueryMobile/
[err] 261 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[WARNING ] Using empty value for configuration property 'ssl.keystore.path'
[WARNING ] Using empty value for configuration property 'ssl.keystore.password'
[err] 4055 WorklightPU INFO [Scheduled Executor-thread-1] openjpa.Runtime - Starting OpenJPA 1.2.2
[err] 4579 WorklightPU INFO [Scheduled Executor-thread-1] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.HSQLDictionary".
[err] 1 WorklightReportsPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
[AUDIT ] CWWKZ0001I: Application WorklightStarter_jQueryMobile started in 24.574 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://proxy-22.eksi.com:10080/ProjectKen2/
[ERROR ] FWLSE0188E: Failed to connect to MYSQL database : Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES)) [project ProjectKen2]
[ERROR ] FWLST0003E: ========= Failed starting project /ProjectKen2 [project ProjectKen2]
Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
[ERROR ] SRVE0283E: Exception caught while initializing context: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:146)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2220)
at [internal classes]
Caused by (repeated) ... : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in URL [wsjar:file:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.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:/C:/Users/ee206922/Documents/WorklightServerConfig/shared/resources/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at com.worklight.server.bundle.project.JeeProjectActivator.loadSpringConfiguration(JeeProjectActivator.java:273)
at com.worklight.server.bundle.project.JeeProjectActivator.contextInitialized(JeeProjectActivator.java:134)
... 2 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'Worklight'@'localhost' (using password: YES))
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.worklight.server.database.api.WorklightDataSource.getConnection(WorklightDataSource.java:234)
at com.worklight.server.database.api.WorklightDataSource.afterPropertiesSet(WorklightDataSource.java:110)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 55 more
Caused by: java.sql.SQLException: Access denied for user 'Worklight'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:925)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1704)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1250)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2483)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2516)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2301)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 61 more
[AUDIT ] CWWKZ0001I: Application ProjectKen2 started in 1.638 seconds.
推荐答案
要明确:你创建的数据库是什么它意味着什么?它是否意味着成为Worklight Server的数据库,或者它是否适合您的适配器连接的某些服务的后端?
To be clear: the database you have created, what is it meant for? Is it meant to be the database for Worklight Server, or is it meant to be a backend for some service for your adapter to connect to?
- 如果它不适用于Worklight Server,而是一些后端,请不要触摸worklight.properties。
- 否则,编辑问题并解释该部分。
请同时查看和(),熟悉Worklight中的各种概念和选项。
Please also go over IBM Worklight Getting Started and this training module (sample app), to familiarize yourself with the various concepts and options in Worklight.
最后,看看是否有以下帮助:
Finally, see if the following help:
-
确保您在worklight.properties中输入的用户名和密码值是正确的
Make sure the username and password values you've entered in worklight.properties are correct
- 您对worklight.properties的报价仅显示报告数据库用户名和密码,而不是Worklight Server的报价 - 这只是在我上面的问题之后
- 为什么要在报告数据库中添加用户名/密码?您是否为报告创建了数据库?我觉得你需要查看培训模块。
确保MySQL JDBC连接器/ J驱动程序.jar文件位于yourProject \ server \lib中
Make sure the MySQL JDBC Connector/J driver .jar file is located in yourProject\server\lib
确认项目和环境中的所有三个都正常。
Verify all three are OK in your project and environment.
这篇关于IBM Worklight - 尝试部署应用程序/适配器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!