0
votes

Trying to enable WL Reports feature, I got this error from the Liberty log:

[INFO]FWLSE0192I:JNDI resource jdbc/WorklightReportsDS is mapped to ORACLE DB type [project finance] [err] 0 WorklightReportsPU WARN [Default Executor-thread-5] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightReportsPU', root URL [file:/C:/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.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. [INFO ] FWLSE0186I: Application raw reports are disabled. [project finance] [INFO ] FWLST0002I: ========= Project /finance started [project finance]

So, as you can see nothing gets recorded at the reports database. Also, why is it referring to jdbc/WorklightReportsDS if what I do have configured is finance/jdbc/WorklightReportsDS ?

My Q&A env is WL 6.0 + Liberty + Oracle (Q&A Env)

Following the infocenter instructions, the report database were created using this

CONNECT WORKLIGHTREPORTSDIS/WORKLIGHTREPORTSDIS@ORCLWL @C:\IBM\Worklight\WorklightServer\databases\create-worklightreports-oracle.sql DISCONNECT;

I also have the following:

Server.xml

 <application id="finance" name="finance" location="FinanceMobile.war" type="war">
 .....

  <dataSource jndiName="finance/jdbc/WorklightReportsDS" transactional="false">
        <jdbcDriver libraryRef="worklight/OracleLib"/>
        <properties.oracle driverType="thin" URL="jdbc:oracle:thin:@localhost:1521:ORCLWL" user="WORKLIGHTREPORTSDIS" password="WORKLIGHTREPORTSDIS"/>
    </dataSource>

Web.xml

<resource-ref>
      <description>Reports Database</description>
      <res-ref-name>finance/jdbc/WorklightReportsDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
</resource-ref>

    <env-entry>
        <description>[OPTIONAL] Is reports active (true/false). Default: false.</description>
        <env-entry-name>reports.exportRawData</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>true</env-entry-value>
    </env-entry>

I start the Liberty Server, also start the mobile (Android emulator) app which calls this method

WL.Client.logActivity('This is a test');

Which prints into log cat the following message 09-30 15:21:21.769: D/FinanceMobile(805): Activity [This is a test] logged successfully.

As the liberty log says reporting is disabled, so I can not see any data in the database.

Is something missing in the configuration ?

1
Fixed. Even though the doc says enabling report on worklight.properties is needed only for development, you still have to use it for production as well. Solution is to change worklight.properties to have this reports.exportRawData=true - GDM
Can you add this as an answered question and then mark your own answer as the correct answer? This will help others who may have the same problem who are looking for answered questions. Thanks. - jnortey

1 Answers

0
votes

Did you enable reports? See the following topic in the Information Center: http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/admin/t_raw_data_reports.html

Verify reports are enabled in worklight.properties also when deploying the .war file to your Production server as well.