Error when using restGen via PCT

Posted by thierryk on 24-Oct-2018 03:38

Hi everyone,

I'm integrating PCT on the project (PASOE in Progress v11.7.3). Compiling and generating the librairies works really well. However generating the REST package via RestGen raises an error

Here is the ant code :

<project name="RESTGEN" basedir=".">
<taskdef resource="PCT.properties" />
<RestGen dlcHome="C:\dlc\oe117" projectDir="c:\MAGI\wrk\magiController" destFile="c:\temp\REST.zip" type="paar" services="magiApplication:magiBail" pdsHome="C:\dlc\oe117\oeide"/>
</project>

Here is the log :

Buildfile: C:\MAGI\wrk\builder\restgen.xml
[RestGen] Creating PAAR file with [magiApplication, magiBail] at target c:\temp\REST.zip
[RestGen] java.lang.reflect.InvocationTargetException
[RestGen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[RestGen] Error invoking method. Please check the options provided
[RestGen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[RestGen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[RestGen] at java.lang.reflect.Method.invoke(Method.java:498)
[RestGen] at com.progress.rest.tools.WARGenerator.generatePAARFilesInZipWrapper(WARGenerator.java:32)
[RestGen] at com.progress.rest.tools.WARGenerator.main(WARGenerator.java:374)
[RestGen] Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
[RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFiles(PAARGenerator.java:91)
[RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFilesInZip(PAARGenerator.java:133)
[RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFilesInZip(PAARGenerator.java:114)
[RestGen] ... 6 more
[RestGen] Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority
[RestGen] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
[RestGen] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[RestGen] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
[RestGen] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[RestGen] ... 9 more
[RestGen] Java Result: 1
BUILD SUCCESSFUL
Total time: 5 seconds

Launching the generation directly via the command in proenv works fine.

restgen -proj C:/MAGI/wrk/magiController -restSvcNames magiApplication:magiBail -target C:/temp/REST.zip -genPaar

I've checked PCT code in order to understand where log4j is supposed to be and I found the directory and I found the file. So i'm a bit confused.

Did i miss a parameter or a configuration step ?

Thanks for your help.

Posted by Riverside Software on 24-Oct-2018 08:03

There's in fact a fix which has been committed in January: github.com/.../284

So please verify that you're using PCT 209

All Replies

Posted by Riverside Software on 24-Oct-2018 05:46

Could you execute ant with the -v switch and paste the output ? You will see the classpath of the restgen task.

Posted by thierryk on 24-Oct-2018 07:40

Here it is :

Apache Ant(TM) version 1.9.6 compiled on June 29 2015

Buildfile: C:\MAGI\wrk\builder\restgen.xml

parsing buildfile C:\MAGI\wrk\builder\restgen.xml with URI = file:/C:/MAGI/wrk/builder/restgen.xml

Project base dir set to: C:\MAGI\wrk\builder

parsing buildfile jar:file:/C:/dlc/oe117/oeide/eclipse/plugins/org.apache.ant_1.9.6.v201510161327/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/dlc/oe117/oeide/eclipse/plugins/org.apache.ant_1.9.6.v201510161327/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file

 [RestGen] OpenEdge version found : OpenEdge Release 11.7.3 as of Fri Apr 27 17:40:05 EDT 2018

 [RestGen] Using object : com.phenix.pct.ProgressV117

 [RestGen] Executing 'C:\dlc\oe117\jdk\bin\java.exe' with arguments:

 [RestGen] '-DInstall.Dir=C:\dlc\oe117'

 [RestGen] '-DWork.Dir=C:\MAGI\wrk\builder'

 [RestGen] '-classpath'

 [RestGen] 'C:\dlc\oe117\java\progress.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.openedge.pdt.core_11.7.3.00\oe_common_services.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.openedge.pdt.explorer_11.7.3.00\prgsexplorer.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.openedge.pdt.platform_11.7.3.00\platform.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.openedge.pdt.project_11.7.3.00\oeproject.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.oemobile.designer_11.7.3.00\mobdesigner.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.oemobile_11.7.3.00\oemobile.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.pex_11.7.3.00\pex.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.rest_11.7.3.00\lib\jettison-1.2.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.rest_11.7.3.00\rest.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.openedge.pdt.restoe_11.7.3.00\lib\1padapters-idl.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.branding.iue_2.6.0\lib\velocity-1.7-dep.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.branding.iue_2.6.0\lib\velocity-1.7.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.adapter.rest.core_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.adapter.rest.expose.core_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.adapter.rest.expose.ui_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.adapter.rest.mapper_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.archiver_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.core_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.runtime_1.6.0\lib\rest\expose\1padapters-restExpose.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.caf.ui.mapper_1.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.common.ui.el_2.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.common.ui.mapper.el_2.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.common.ui.mapper_2.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.common.ui_2.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\com.progress.tools.installinfo_2.6.0.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.databinding.observable_1.5.0.v20150422-0725.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.databinding.property_1.5.0.v20150422-0725.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.databinding_1.5.0.v20150422-0725.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.filesystem_1.5.0.v20150725-1910.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.jobs_3.7.0.v20150330-2103.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.resources_3.10.1.v20150725-1910.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.core.runtime_3.11.1.v20150903-1804.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.debug.core_3.10.0.v20150303-1130.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.debug.ui_3.11.101.v20160203-1230.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.common_2.11.0.v20150805-0538.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.common_2.11.1.v20160208-0816.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.databinding_1.3.0.v20150806-0404.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.databinding_1.3.0.v20160208-0841.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.ecore.xmi_2.11.1.v20150805-0538.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.ecore.xmi_2.11.1.v20160208-0816.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.ecore_2.11.1.v20150805-0538.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.emf.ecore_2.11.2.v20160208-0816.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.equinox.common_3.7.0.v20150402-1709.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.equinox.preferences_3.5.300.v20150408-1437.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.jface_3.11.1.v20160128-1644.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.osgi_3.10.102.v20160118-1700.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.swt.win32.win32.x86_64_3.104.2.v20160212-1350.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.swt_3.104.2.v20160212-1350.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.text_3.5.400.v20150505-1044.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.ui.ide_3.11.0.v20150825-2158.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.ui.workbench_3.107.1.v20160120-2131.jar;C:\dlc\oe117\oeide\eclipse\plugins\org.eclipse.wst.server.core_1.8.0.v201601132216.jar'

 [RestGen] 'com.progress.rest.tools.WARGenerator'

 [RestGen] '-proj'

 [RestGen] 'c:\MAGI\wrk\magiController'

 [RestGen] '-restSvcNames'

 [RestGen] 'magiApplication:magiBail'

 [RestGen] '-target'

 [RestGen] 'c:\temp\REST.zip'

 [RestGen] '-includeJars'

 [RestGen] 'false'

 [RestGen] '-genPaar'

 [RestGen]

 [RestGen] The ' characters around the executable and arguments are

 [RestGen] not part of the command.

 [RestGen] Setting environment variable: DLC=C:\dlc\oe117

 [RestGen] Creating PAAR file with [magiApplication, magiBail] at target c:\temp\REST.zip

 [RestGen] Error invoking method. Please check the options provided

 [RestGen] java.lang.reflect.InvocationTargetException

 [RestGen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 [RestGen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

 [RestGen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 [RestGen] at java.lang.reflect.Method.invoke(Method.java:498)

 [RestGen] at com.progress.rest.tools.WARGenerator.generatePAARFilesInZipWrapper(WARGenerator.java:32)

 [RestGen] at com.progress.rest.tools.WARGenerator.main(WARGenerator.java:374)

 [RestGen] Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority

 [RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFiles(PAARGenerator.java:91)

 [RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFilesInZip(PAARGenerator.java:133)

 [RestGen] at com.progress.openedge.pdt.rest.util.PAARGenerator.generatePAARFilesInZip(PAARGenerator.java:114)

 [RestGen] ... 6 more

 [RestGen] Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority

 [RestGen] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)

 [RestGen] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

 [RestGen] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)

 [RestGen] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

 [RestGen] ... 9 more

 [RestGen] Java Result: 1

BUILD SUCCESSFUL

Total time: 8 seconds

Posted by Riverside Software on 24-Oct-2018 08:03

There's in fact a fix which has been committed in January: github.com/.../284

So please verify that you're using PCT 209

Posted by thierryk on 24-Oct-2018 09:05

Thank you, it works perfectly now that i've updated the library.

This thread is closed