Running Worklight 5.0.6 on Tomcat 7 with MySQL 5.6
I dropped all the previous databases and let the Install Manager recreate them. The console runs fine and I am able to upload the wlapp and adapetrs. However, after deploying myproject.war I get the following error every 5 seconds:
SEVERE: Persistency data access problem
com.worklight.core.exceptions.PersistentDataAccessException:
Persistency data access problem at com.worklight.core.exceptions.DefaultExceptionHandler.handleException(DefaultExceptionHandler.java:50) at com.worklight.core.tasks.TaskThread.run(TaskThread.java:100)
Caused by:
org.springframework.dao.InvalidDataAccessApiUsageException: Can only perform operation while a transaction is active.;
nested exception is <openjpa-1.2.2-r422266:898935 nonfatal user error>
org.apache.openjpa.persistence.TransactionRequiredException: Can only perform operation while a transaction is active.
OS: Windows Server 2008 R2 Standard
Databases: APPCNTR, WLREPORT, WRKLGHT
Content of the context.xml
<Context>
<Resource name="jdbc/WorklightDS"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="worklight"
password="***"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/WRKLGHT"/>
<Resource name="jdbc/WorklightReportsDS"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="worklight"
password="***"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/WLREPORT"/>
<Resource name="jdbc/AppCenterDS"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="worklight"
password="***"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/APPCNTR"/>
</Context>
Tomcat's web.xml
<resource-ref>
<res-ref-name>jdbc/WorklightDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<res-ref-name>jdbc/WorklightReportsDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
worklight.properties
wl.db.jndi.name=java:comp/env/jdbc/WorklightDS
wl.db.type=MYSQL
Here are the steps in more details: Yes, here the steps:
Use IM to install worklight 5.0.6.1 - this puts three webapps in my Tomcat folder: appcenterconsole.war, applicationcenter.war, and worklight.war
Run console (runs successfully):
http://hostname:8080/worklight/console
Create a hybrid project in eclipse which this generates myprojectname.war file in the /bin folder
Update the publicWorkLightContext, publicWorkLightPort, wl.db.type, wl.db.jndi.name variables found in the workllight.properties file in the server/conf folder of my project.
Rename the myproject.war to myappname.war to match the value of the publicWorkLightContext variable
Manually drop the myappname.war file under the webapps folder of Tomcat (this is when the error starts appearing)
Additionaly upload the adapter and wlapp files through the worklight console. This step works fine and I can see the respective records created in the databases