0
votes

Worklight Studio 6, SQL adapter attempting connection to DB2 database.

Standard pattern for procedure

return WL.Server.invokeSQLStatement({
    preparedStatement : listUnassignedWorkOrders, 
    parameters : []
});

When I invoke my procedure I see this error

[ERROR ] FWLSE0035E: Invocation of procedure 'SqlStatement' failed. [project Infrabel01] Type 'Function' currently does not support marshalling to JSON.

And the logs show

[err] 0 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/C:/djna-nobackup/Workspaces/WL6.0/01/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.

How to diagnose? How would I set the trace level in worklight?

JPA docs say:

property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"

But where to put that in worklight?

1
The actual error was caused by a typo in the implementation, the error message is actually quite clear. The question of how one might enable JPA tracing does remain, but is now academic.djna
Please always add the "worklight" tag as well, otherwise we may miss the question. Pleas also write this as an Answer. Thanks.Idan Adar

1 Answers

0
votes

The WorklightPU WARN in the log is not relevant and has been removed in newer releases of Worklight.

For your actual issue, see the following developerWorks threads with the same issue that was resolved.

Type 'Function' currently does not support marshalling to JSON.