IllegalArgumentException in server code !!

Hi - I am getting below exception if I try to run afterCreate() in server side.

Code is also given below. I am using coderunner that comes along with ‘auto generated code’.
Also attaching all debug statements printed by coderunner on the screen.

Apr 18, 2016 7:22:16 PM com.backendless.coderunner.runtime.task.EventInvocationTask runImpl
SEVERE: argument type mismatch
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.backendless.coderunner.runtime.task.EventInvocationTask.runImpl(EventInvocationTask.java:98)
at com.backendless.coderunner.runtime.concurrent.ExtendedRunnable.run(ExtendedRunnable.java:26)
at java.lang.Thread.run(Unknown Source)

Code:

@Asset( “Transaction0” )
public class Transaction0TableEventHandler extends com.backendless.servercode.extension.PersistenceExtender<Transaction0>
{
@Async
@Override
public void afterCreate( RunnerContext context, Transaction0 transaction0, ExecutionResult<Transaction0> result ) throws Exception
{
System.out.println(“Running server code”);
}
}

coderunner_logs.txt (8.5kB)

Can you show your Bootstrap.java class?

here it is:

package com.mytest;

import com.backendless.Backendless;
import com.backendless.servercode.IBackendlessBootstrap;

public class Bootstrap implements IBackendlessBootstrap
{

@Override
public void onStart()
{

// add your code here

}

@Override
public void onStop()
{
// add your code here
}

}

Hello!Try to add the following line in “inStart” method:

Backendless.Data.mapTableToClass( "Transaction0", Transaction0.class );

best regards,
Alex Navara

It solved the problem. Thanks.