command line codegen problems
hello,
I try to build using commandline codegen tool. I am using the sample project from eGate Tutorial (Project 1: This Project addresses a very simple business challenge where an input TimeCard File is read and a workfile is output).
I have had experience doing some build using Ant, but apparently it's not as straightforward as I would've expected with this one.
I have updated the "build.properties" file to match the project as specified on the documentation. The build seems to go okay for a while until it spits the following errors (inlogy.log):
2006-08-07 20:19:23,328 ERROR [main] [com.stc.codegen.anttaskImpl.CodeGen] [] java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.stc.codegen.anttaskImpl.CodeGen.execute(CodeGen.java:218)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: com.stc.codegen.framework.model.CodeGenException: C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\Collaboration_1.java:15:package dtd.s1_input_420537843 does not exist
publicvoid receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, dtd.s1_input_420537843.Employees s1_input_Employees_1, xsd.s1_output_133304065.Employees s1_output_Employees_1 )
^
C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\Collaboration_1.java:15:package xsd.s1_output_133304065 does not exist
publicvoid receive( com.stc.connector.appconn.file.FileTextMessage input, com.stc.connector.appconn.file.FileApplication FileClient_1, dtd.s1_input_420537843.Employees s1_input_Employees_1, xsd.s1_output_133304065.Employees s1_output_Employees_1 )
^
C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java:372:package dtd.s1_input_420537843 does not exist
(dtd.s1_input_420537843.Employees) params.get("s1_input_Employees_1")
^
C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java:374:package xsd.s1_output_133304065 does not exist
(xsd.s1_output_133304065.Employees) params.get("s1_output_Employees_1")
^
Note: C:\JavaCAPS51\commandlinecodegen\temp\1154945927859\Project1dpProject1\CMap1_Service1_ejb\Project1\CMap1_Service1\Collaboration_1_Runtime_Handler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:uncheckedfor details.
4 errors
at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.compileCodegen(CodeGenFrameworkImpl.java:802)
at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkAntImpl.doPostProcess(CodeGenFrameworkAntImpl.java:452)
at com.stc.codegen.anttaskImpl.driver.BuildProject.doPostProcess(BuildProject.java:560)
... 25 more
Caused by: Compile failed; see the compiler error outputfor details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at com.stc.codegen.frameworkImpl.model.util.AntTasksWrapperImpl.javac(AntTasksWrapperImpl.java:285)
at com.stc.codegen.frameworkImpl.model.CodeGenFrameworkImpl.compileCodegen(CodeGenFrameworkImpl.java:795)
... 27 more
As can be seen, it failed on the receive() method of the Collaboration, cannot find the package dtd.s1_input_420537843.Employees and xsd.s1_output_133304065.Employees.
Also, there were some errors to do with velocity:
2006-08-07 20:18:51,734 ERROR [main] [com.stc.codegen.frameworkImpl.model.util.AntVelocityHelperImpl] [] ResourceManager : unable to find resource'velocity-templates/VM_global_library.vm' in any resource loader.
Within eDesigner, it builds sucessfully indeed. No issues whatsoever.
As, we have many deployment profiles, building it one by one in eDesigner is very tedious. So, I'd like to get the command line build tool to do the job so we can have unattended build process and possibly use the deploycli tool in combination.
Any idea on the errors? Has anyone sucessfully used the command line codegen?
Thanks in advance
Ari

