Hi All,
Hoping someone can help.
I've started looking a bit further into using PCT and am getting problems with the DBConnectionSet.
I'm passing in variables from a props file so that I can configure the script easily for different environments/progress versions.
I'm trying to use some DBConnectionSets so that I can just define them once and reference them when I need but I keep getting a message "databases.openpeople" doesn't denote a DBConnectionSet and can't quite see what I'm doing wrong.
Anyone have any ideas?
Thanks
Paul
<?xml version="1.0" encoding="utf-8"?> <project name="OpenPeople" default="pctversion" basedir="."> <description>App</description> <property environment="env" /> <property file="OE114.props" /> <taskdef resource="PCT.properties" classpath="${ant.libraries.path}/PCT.jar" /> <typedef resource="types.properties" classpath="${ant.libraries.path}/PCT.jar" /> <taskdef resource="extras.properties" classpath="${ant.libraries.path}/PCT.jar" /> <PCTVersion /> <!-- DB Connection Settings --> <!-- Standard OP DB's --> <DBConnectionSet id="databases.openpeople"> <DBConnection dbName="${db.openstrt.name}" dbDir="${db.openstrt.path}" singleUser="false"> <PCTAlias name="dictdb" /> </DBConnection> <DBConnection dbName="${db.paydb.name}" dbDir="${db.paydb.path}" singleUser="false"> </DBConnection> <DBConnection dbName="${db.userdef.name}" dbDir="${db.userdef.path}" singleUser="false"> </DBConnection> </DBConnectionSet> <DBConnectionSet id="databases.openstrt"> <DBConnection dbName="${db.openstrt.name}" dbDir="${db.openstrt.path}" singleUser="false"> <PCTAlias name="dictdb" /> </DBConnection> </DBConnectionSet> <!-- PCT Version --> <target name="pctversion"> <PCTVersion /> </target> <!-- Clean Files --> <target name="clean"> <delete> <fileset dir="${compile.path}/Framework" includes="**/*.r" /> <fileset dir="${compile.path}/OpenPeople" includes="**/*.r" /> <fileset dir="${compile.path}/OpenStrt" includes="**/*.r" /> </delete> </target> <!-- Build Framework Code --> <target name="build-framework" depends="build-framework-abs"> <echo>Framework Build Complete</echo> </target> <target name="build-framework-abs"> <echo>Building ABS Framework files</echo> <PCTCompile basedir="${source.path}/Framework" destDir="${compile.path}/Framework" graphicalMode="true" dlcHome="${progress.DLC}" md5="true" minSize="false" cpinternal="iso8859-1" cpstream="iso8859-1" compileUnderscore="true" inputchars="16000" assemblies="../Assemblies" token="4000" progPerc="5" stopOnError="false" failOnError="false"> <fileset dir="${source.path}/Framework" casesensitive="false"> <include name="**/*.cls" /> <include name="**/*.p" /> <exclude name="Untitled*.*" /> <exclude name="src/*.*" /> </fileset> <propath> <pathelement path="${source.path}/Framework" /> <pathelement path="${source.path}/OpenStrt" /> <pathelement path="${source.path}/OpenStrt/app" /> </propath> <DBConnectionSet refid="databases.openpeople" /> </PCTCompile> </target> </project>
Should add that im using PCT Version 1.1-pre - Build 194
Tried your build and it seems OK, I had to strip some windows options and created my own property file . I'm using build 274 on linux though.
What is the exact error, on which line ?
What does your OE114.props look like ?
$ ant build-framework-abs
Buildfile: /tmp/build.xml
[PCTVersion] PCT Version 1.1-pre - Build 274
build-framework-abs:
[echo] Building ABS Framework files
[PCTCompile] Unable to find assemblies file /Assemblies - Skipping attribute
[PCTCompile] PCTCompile - Progress Code Compiler
[PCTCompile] 0 file(s) compiled
BUILD SUCCESSFUL
Total time: 0 seconds
You could add Verbose="true" to the compile target
and add -v to ant to get more detailed errors
ant -v build-framework-abs Apache Ant(TM) version 1.9.4 compiled on April 29 2014 Trying the default build file: build.xml Buildfile: /tmp/build.xml Detected Java version: 1.6 in: /usr/java/jdk1.6.0_18/jre Detected OS: Linux parsing buildfile /tmp/build.xml with URI = file:/tmp/build.xml Project base dir set to: /tmp parsing buildfile jar:file:/usr/local/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/local/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file [property] Loading Environment env. [property] Loading /tmp/OE114.props [PCTVersion] PCT Version 1.1-pre - Build 274 Build sequence for target(s) `build-framework-abs' is [build-framework-abs] Complete build sequence is [build-framework-abs, pctversion, build-framework, clean, ] build-framework-abs: [echo] Building ABS Framework files [PCTCompile] OpenEdge version found : OpenEdge Release 11.5.1 as of Wed May 6 18:21:44 EDT 2015 [PCTCompile] Using object : com.phenix.pct.ProgressV113 [PCTCompile] Unable to find assemblies file /Assemblies - Skipping attribute [PCTCompile] PCTCompile - Progress Code Compiler [PCTCompile] Current OS is Linux [PCTCompile] Setting environment variable: DLC=/usr/dlc [PCTCompile] Executing '/usr/dlc/bin/_progres' with arguments: [PCTCompile] '-b' [PCTCompile] '-q' [PCTCompile] '-inp' [PCTCompile] '16000' [PCTCompile] '-cpstream' [PCTCompile] 'iso8859-1' [PCTCompile] '-cpinternal' [PCTCompile] 'iso8859-1' [PCTCompile] '-tok' [PCTCompile] '4000' [PCTCompile] '-zn' [PCTCompile] '-param' [PCTCompile] '/tmp/pct_params5295.txt' [PCTCompile] '-p' [PCTCompile] '/tmp/pctinit28963.p' [PCTCompile] [PCTCompile] The ' characters around the executable and arguments are [PCTCompile] not part of the command. [PCTCompile] Trying to connect to : -db /tmp/test/people [PCTCompile] Creating alias dictdb for database 1 [PCTCompile] Trying to connect to : -db /tmp/test/pay [PCTCompile] Trying to connect to : -db /tmp/test/userdef [PCTCompile] PROPATH : /tmp/pct64636.pl,. [PCTCompile] RUN pct/v11/pctCompile.p [PCTCompile] 0 file(s) compiled [PCTCompile] Return value : 0 BUILD SUCCESSFUL Total time: 0 seconds
The error I get is
BUILD FAILED
C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build\build.xml:62: databases.openpeople doesn't denote a DBConnectionSet
Total time: 386 milliseconds
Props file is as follows
#
# OP Build Properties
#
#Ant Libraries
ant.libraries.path=C:/DevelopmentOE/OpenPeople/current/source/SBS_114/build/lib
# Progress environment settings
progress.DLC=C:/OE114
# Database Paths
db.openstrt.name=openstrt
db.openstrt.path=C:/Databases/current/11.4/development
db.paydb.name=paydb
db.paydb.path=C:/Databases/current/11.4/development
db.userdef.name=userdef
db.userdef.path=C:/Databases/current/11.4/development
#Source Path
source.path=C:/DevelopmentOE/OpenPeople/current/source/SBS_114
#Compile Path
compile.path=C:/DevelopmentOE/OpenPeople/current/source/SBS_114
#Fail on Error
failonerror=false
After adding the verbose i get
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Buildfile: C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build\build.xml
parsing buildfile C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build\build.xml with URI = file:/C:/DevelopmentOE/OpenPeople/current/source/SBS_114/build/build.xml
Project base dir set to: C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build
parsing buildfile jar:file:/C:/OE114/oeide/eclipse/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/OE114/oeide/eclipse/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
[property] Loading Environment env.
[property] Loading C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build\OE114.props
[PCTVersion] PCT Version 1.1-pre - Build 194
Build sequence for target(s) `build-framework' is [build-framework-abs, build-framework]
Complete build sequence is [build-framework-abs, build-framework, pctversion, clean, ]
build-framework-abs:
[echo] Building ABS Framework files
[PCTCompile] OpenEdge version found : OpenEdge Release 11.4 as of Fri Jul 25 19:01:34 EDT 2014
[PCTCompile] Using object : com.phenix.pct.ProgressV114
[PCTCompile] PCTCompile - Progress Code Compiler
Class class com.phenix.pct.DBConnectionSet is not a subclass of class com.phenix.pct.DBConnectionSet
BUILD FAILED
C:\DevelopmentOE\OpenPeople\current\source\SBS_114\build\build.xml:62: databases.openpeople doesn't denote a DBConnectionSet
at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:254)
at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:214)
at org.apache.tools.ant.types.DataType.getCheckedRef(DataType.java:202)
at com.phenix.pct.DBConnectionSet.getRef(DBConnectionSet.java:43)
at com.phenix.pct.DBConnectionSet.getDBConnections(DBConnectionSet.java:56)
at com.phenix.pct.PCTRun.getDbConnections(PCTRun.java:571)
at com.phenix.pct.PCTRun.createInitProcedure(PCTRun.java:1113)
at com.phenix.pct.PCTRun.execute(PCTRun.java:667)
at com.phenix.pct.PCTCompile.execute(PCTCompile.java:683)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
Total time: 404 milliseconds
I'd try to use the latest version of PCT
I am. Latest version on that page is 194 which is what I'm using I downloaded it again just to make sure.
If I ignore trying to use a refid and just define the DBConnection within the PCTCompile it works fine.
Hi,
This was already reported by somebody else (perhaps on github). Try the loaderRef attribute when declaring the typedef and taskdef attribute with the same value.
On holidays, can't be more precise for now.
Gilles
Envoyé de mon téléphone
[collapse]Reply by Paul MowatI am. Latest version on that page is 194 which is what I'm using I downloaded it again just to make sure.
If I ignore trying to use a refid and just define the DBConnection within the PCTCompile it works fine.
Stop receiving emails on this subject.Flag this post as spam/abuse.
And usually coming from multiple PCT.jar in the classpath
Gilles
Envoyé de mon téléphone
[collapse]Reply by Paul MowatI am. Latest version on that page is 194 which is what I'm using I downloaded it again just to make sure.
If I ignore trying to use a refid and just define the DBConnection within the PCTCompile it works fine.
Stop receiving emails on this subject.Flag this post as spam/abuse.