1
0
-1

I'm trying to make use of the ObjectMapper as per the Transact SDK developer guide (EA v8), but I can't get the classes to resolve when I run the app-test Ant build task.

I've added the files to the fileIncludes section of the service-def.json e.g.

{
"name": "My Processor",
"description": "TODO...",
"type": "Submission Completed Processor",
"version": "0.1.0",
"tmMinVersion": "5.0.0",
"legacyGroovy": false,
"parameters": [
{
"name": "groovyScript",
"filePath": "NewMemberSubmissionProcessor.groovy",
"fileIncludes": [
"com/cusa/submission/processors/my/vo/ContactDetails.groovy",
		...
],
"bind": true,
"required": false,
"clearOnExport": false,
"readOnly": false
},
...
}

I've imported the package into my processor code, and, despite the unit tests running in the IntelliJ environment, the app-test build task does not resolve these classes.

What am I missing?

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Sean Colyer

      Firstly, could you please attach the stack trace/error message to confirm this issue is known and scheduled as fixed in the next SDK?

      If it is the same parsing issue, the workaround is to edit the included class files and add "public" modifier in front of "class" keyword, e.g.:

      package com.cusa.submission.processors.my.vo
      
      public class ContactDetails {
      }
      


      Cheers
      Rado

      1. Sean Colyer

        Hi Rado,

        Here's the stack trace:

        	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
        	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958)
        	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
        	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554)
        	at com.avoka.core.groovy.runtime.SecureGroovyCompiler.getScriptClass(SecureGroovyCompiler.java:165)
        	at com.avoka.transact.ant.svc.SvcTypeCheck.typeCheckScript(SvcTypeCheck.java:194)
        	at com.avoka.transact.ant.svc.SvcTypeCheck.typeCheckServiceDef(SvcTypeCheck.java:146)
        	at com.avoka.transact.ant.svc.SvcTypeCheck.execute(SvcTypeCheck.java:69)
        	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
        	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        	at org.apache.tools.ant.Task.perform(Task.java:348)
        	at org.apache.tools.ant.Target.execute(Target.java:435)
        	at org.apache.tools.ant.Target.performTasks(Target.java:456)
        	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
        	at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
        	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        	at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
        	at org.apache.tools.ant.Main.runBuild(Main.java:857)
        	at org.apache.tools.ant.Main.startAnt(Main.java:236)
        	at org.apache.tools.ant.Main.start(Main.java:199)
        	at org.apache.tools.ant.Main.main(Main.java:287)
        	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        	at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
        /Users/scolyer/Documents/Code/avoka/cusa-forms/build.xml:264: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
        script.groovy: 256: unable to resolve class <CLASS-NAME>

        Removing the modifiers hasn't helped.

        Thanks,

        Sean

      2. Radoslav Ivanov

        Hi Sean

        Thanks for confirming that the missing modifier workarounds the issue.

        Cheers
        Rado

      3. Sean Colyer

        Done. Thanks for looking at this for us.

      CommentAdd your comment...