Extract the ClassAnnotation via PCT not working?
 
Forums / SmartComponent Library - Developer Forum / Extract the ClassAnnotation via PCT not working?

Extract the ClassAnnotation via PCT not working?

7 posts, 1 answered
  1. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    Answered
    09 Sep 2022
    Link to this post
    So i get the following Error:

    extract-class-annotations:
         [echo] Build Files: 
         [echo] File Mask:   *BusinessTask.cls
       [PCTRun] An Progress.Lang.SysError has occured:
       [PCTRun] Element 'UnabbreviateDataTypeName' konnte nicht in Klasse 'Consultingwerk.Util.DataTypeHelper' gefunden werden. (12927) 

    But when i look into the DataTypeHelper.cls i find 
    METHOD PUBLIC STATIC CHARACTER UnabbreviateDataTypeName (pcDataType AS CHARACTER):

    Somebody getting the same error?

    My xml looks like this (except for some placeholders i replace those right before i launch the xml)

    <project name="ExtractClassAnnotations" default="ExtractClassAnnotations" basedir="<lwpPath>" >
        <property name="dlcHome" value="{{dlcHome}}" />
        <property name="tempDir" value="{{tempDir}}" />
        <property name="dbUsername" value="{{dbUsername}}" />
        <property name="dbPassword" value="{{dbPassword}}" />
        <property name="dbPath" value="{{dbPath}}" />
        <property name="assemblies" value="{{assemblies}}" />
        <property name="progress.DLC" value="${dlcHome}" />

        <taskdef resource="PCT.properties" classpath="<CI_HOME>/dependencies/pct/PCT.jar" />
        <typedef resource="types.properties" classpath="<CI_HOME>/dependencies/pct/PCT.jar" />

        <import file="<lwpPath>\Consultingwerk\Studio\ExtractClassAnnotations\extract-class-annotations.xml"/>

        <target name="extract-class-annotations">
            <extractClassAnnotations directory="${directory}"
                                     fileMask="${fileMask}"
                                     overwriteWriteProtected="true"
                                     assemblies="${assemblies}"
                                     excludeAnnotations="@Test,@TestIgnore,@BusinessEntityGenerator"
                                     verbose="true">
                <options>
                    <DBConnection dbName="dob" dbDir="${dbPath}/dob" userName="${dbUsername}" password="${dbPassword}" />
                    <DBConnection dbName="SmartDB" dbDir="${dbPath}/SmartDB" userName="${dbUsername}" password="${dbPassword}" />
                </options>

            </extractClassAnnotations>
        </target>
    </project>

  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    09 Sep 2022 in reply to Markus Grigoleit
    Link to this post
    It's working fine for me :) and the customer I'm working with right now. 

    The method UnabbreviateDataTypeName has been added to the DataTypeHelper in February 2015. 

    Just a wild guess. Might there be an issue with your configuration and something get's mixed up between the legacy OpenEdge 11.6 workspace and the OpenEdge 12.2 workspace?

    Did you try to execute ANT with the -v switch to get more verbose output? 
  3. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    09 Sep 2022 in reply to Mike Fechner
    Link to this post
    So i did the -v switch and got the propath out. I thought that the base-dir of the pct run would be included automatically which is not the case.

    But the current directory "." is included in the propath
    I assume <pathelement path="${user.dir}" />
    does this.

    So a simple change into that directory worked.
    But now i get 

    [PCTRun] Unbekanntes Attribut Static in Widget:Attribute-Phrase benutzt. (3406)

    Is it safe to adjust the propath in the xml which is located  inside the consultingwerk folder ?
    I would prefer it that way.
    Last modified on 09 Sep 2022 07:09 by Markus Grigoleit
  4. Daniel van Doorn
    Daniel van Doorn avatar
    17 posts
    Registered:
    18 Jun 2018
    09 Sep 2022 in reply to Markus Grigoleit
    Link to this post
    Good day Markus!
    I am reading here and I have bit of trouble understanding what is happening. 
    The extract class annotations build has one task, parse the source with ProParse, extract the class annotations and write those to a file. There is no compilation involved in the process. 

    Can you make sure everything SmartComponent Library related is compiled correctly? Maybe remove the old .r code and do a recompile. The result must be 0 compilation errors. 

    If that is all okay, I am thinking in the same direction as Mike, there must be a version / PROPATH messed up somewhere. 

    Is it safe to adjust the propath in the xml which is located  inside the consultingwerk folder ?
    I would prefer it that way.
    Which file do you imply? SmartComponentLibrary/Consultingwerk/Studio/ExtractClassAnnotations/extract-class-annotations.xml ?

    In general it's a very bad idea to change files in the framework, unless Consultingwerk instructs you to do so. If the PROPATH should be changed, there is room for that in your own build file. But as long as we cannot explain why the PROPATH needs to be changed, I would not change it. 

    You could take the PROPATH out of  the -v listing, start a Progress session, update the PROPATH to the one from the Ant listing and try to search the files in that session. I would not be surprised if it finds an outdated class version somewhere. 


  5. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    09 Sep 2022 in reply to Daniel van Doorn
    Link to this post
    Hello Daniel,

    My Propath looks like this:

    ROPATH : C:\Users\Markus.Grigoleit\_workspace\server\isag\dev\01\master\src\logiweb_progress,C:\Users\MARKUS~1.GRI\AppData\Local\Temp\pct119161124.pl,.,c:\dlc\dlc122_x64\gui,c:\dlc\dlc122_x64\gui\ablunit.pl,c:\dlc\dlc122_x64\gui\adecomm.pl,c:\dlc\dlc122_x64\gui\adecomp.pl,c:\dlc\dlc122_x64\gui\adedesk.pl,c:\dlc\dlc122_x64\gui\adedict.pl,c:\dlc\dlc122_x64\gui\adeedit.pl,c:\dlc\dlc122_x64\gui\adeicon.pl,c:\dlc\dlc122_x64\gui\aderes.pl,c:\dlc\dlc122_x64\gui\adeshar.pl,c:\dlc\dlc122_x64\gui\adeuib.pl,c:\dlc\dlc122_x64\gui\adeweb.pl,c:\dlc\dlc122_x64\gui\adexml.pl,c:\dlc\dlc122_x64\gui\dataadmin.pl,c:\dlc\dlc122_x64\gui\OpenEdge.BusinessLogic.pl,c:\dlc\dlc122_x64\gui\OpenEdge.Core.pl,c:\dlc\dlc122_x64\gui\OpenEdge.ServerAdmin.pl,c:\dlc\dlc122_x64\gui\prodict.pl,c:\dlc\dlc122_x64\gui\protools.pl,c:\dlc\dlc122_x64,c:\dlc\dlc122_x64\bin

    Any Idea what i am missing?
    And yes i mean the extract-class-annotations.xml
  6. Daniel van Doorn
    Daniel van Doorn avatar
    17 posts
    Registered:
    18 Jun 2018
    09 Sep 2022 in reply to Markus Grigoleit
    Link to this post
    Hi,

    Just the PROPATH doesn't help me. Try to find occurrences of:
    DataTypeHelper. 

    Can you confirm the SmartComponent Library compilation is successful, without any errors?

    If you think updating the PROPATH will resolve the issue, you can do that in the build file where the extractClassAnnotations macro is used, like in the sample below:
            <extractClassAnnotations directory="."
                                     fileMask="*BusinessEntity.cls"
                                     overwriteWriteProtected="true"
                                     excludeAnnotations="@Test,@TestIgnore,@BusinessEntityGenerator"
                                     verbose="true"
                                     assemblies="../SmartComponentLibrary/Assemblies">
                <propathentries>
                    <pathelement path="." />
                    <pathelement path="../CustomFramework" />
                    <pathelement path="../SmartComponentLibrary" />
                </propathentries>
            </extractClassAnnotations>   
  7. Markus Grigoleit
    Markus Grigoleit avatar
    31 posts
    Registered:
    04 Jun 2019
    12 Sep 2022 in reply to Daniel van Doorn
    Link to this post
    Hello Daniel,

    it was compiled without errors, but the r-code was not included in the pro path.

    I got it to work now, thanks!
7 posts, 1 answered