lisa phillips

Greenhorn
+ Follow
since Feb 19, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by lisa phillips

I currently have the following IF statement:
<if>
<equals arg1="${property.env.name}" arg2="PROD" />
<then>
<antcall target="FTPPRODFiles"/>
</then>
</if>
I now want to check another set of parameters in addition to the existing one:
<equals arg1="${property.app.name}" arg2="ScriptEngine" />
OR
<equals arg1="${property.app.name}" arg2="ScriptProfiler" />

So the bottom line is I need it to be either:
<equals arg1="${property.env.name}" arg2="PROD" /> AND <equals arg1="${property.app.name}" arg2="ScriptEngine" />
OR
<equals arg1="${property.env.name}" arg2="PROD" /> AND <equals arg1="${property.app.name}" arg2="ScriptProfiler" />
What is the best way to check for this logic?
Thanks,
Lisa
20 years ago
I placed the rowset.jar into the lib/ext directory and got a little further. I then placed all the jar files that were previously in my home dir lib (that is where I pointed to from the classpath) and then it worked! That was great. I later found out that when using the -jar command on the command line it didn't use the classpath.
So, all is well and I actually learned a lot with this exercise.
Thank you!
Lisa
20 years ago
The error is at runtime. I'll try what you suggested and let you know.
What are [code] tags?
Lisa
20 years ago
I'm having an issue getting a JAVA Application Client to run and would welcome any suggestions or input to resolve this problem. I'm not a developer, just the builder/deployer of the applications. There are two developers looking at this problem too, but they are stumped too.
It complains that it can't find sun/jdbc/rowset/CachedRowSet, which is contained in the rowset.jar - which is in the classpath. I've put all the supporting information below, if you need additional information please let me know and I'll provide it.

***** ERRORS FROM RUNNING SCRIPT BELOW *****
*** NOT Using Verbose: ***
Exception in thread "main" java.lang.NoClassDefFoundError: sun/jdbc/rowset/CachedRowSet
*** Using Verbose (only included the output with the error): ***
[Loading superclasses of com/actuate/schemas/SubmitJobResponse]
[Loaded java.sql.SQLException from /usr/java130/jre/lib/rt.jar]
[Loading superclasses of java/sql/SQLException]
[Signaling in VM: java/lang/NoClassDefFoundError, message: sun/jdbc/rowset/CachedRowSet]
Exception in thread "main" java.lang.NoClassDefFoundError: sun/jdbc/rowset/CachedRowSet[Loaded sun.i
o.UnknownCharacterException from /usr/java130/jre/lib/rt.jar]
[Loading superclasses of sun/io/UnknownCharacterException]
[Preparing sun/io/UnknownCharacterException]

***** SCRIPT TO RUN THE JAVA COMMAND *****
#!/usr/bin/ksh
#
#
LIBDIR="/actuate/Mace/lib"
JAVA_CP=""
MAIN_JAR="MaceEXT.jar"
JAVA_PATH="/usr/java130/jre/bin"
JAVA_HOME="/usr/java130/jre"
JAVA_FULLVERSION=`$JAVA_PATH/java -fullversion`
######################################################
JAVA_EXE=${JAVA_HOME}/bin/java
PATH=$JAVA_PATH:$PATH
export PATH
export JAVA_HOME
JAVA_CP="${LIBDIR}/sljcx.jar"
JAVA_CP="${LIBDIR}/sljc.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/rowset.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/wsdl4j.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/tt-bytecode.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/servlet.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/saaj.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/log4j-1.2.4.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/jaxrpc.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/commons-logging.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/axis.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/ivjejb35.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/j2ee.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/activation.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/mail.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/ns.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/xmlParserAPIs.jar":${JAVA_CP}
JAVA_CP="${LIBDIR}/xercesImpl.jar":${JAVA_CP}
JAVA_CP="$JAVA_HOME/lib/rt.jar":${JAVA_CP}
echo ""
echo "Classpath"
echo $JAVA_CP
echo ""
echo "JAVA_Home"
echo $JAVA_HOME
echo ""
echo "JAVA_EXE"
echo $JAVA_EXE
echo ""
echo "JAVA_Path"
echo $JAVA_PATH
echo ""
echo "JAVA FullVersion"
echo $JAVA_FULLVERSION
#$JAVA_EXE -cp $JAVA_CP -jar $MAIN_JAR -h dev -c adduser -u 000 -p ""
$JAVA_EXE -verbose -cp $JAVA_CP -jar $MAIN_JAR -h dev -c adduser -u 000 -p ""

***** JAR -tvf OF ROWSET.JAR *****
server105:/actuate/Mace/lib $ jar -tfv rowset.jar
0 Tue Jun 13 19:45:42 EDT 2000 META-INF/
66 Tue Jun 13 19:45:42 EDT 2000 META-INF/MANIFEST.MF
0 Tue Jun 13 19:45:30 EDT 2000 sun/
0 Tue Jun 13 19:45:30 EDT 2000 sun/jdbc/
0 Tue Jun 13 19:45:42 EDT 2000 sun/jdbc/rowset/
551 Tue Jun 13 19:45:30 EDT 2000 sun/jdbc/rowset/BaseRow.class
9112 Tue Jun 13 19:45:32 EDT 2000 sun/jdbc/rowset/BaseRowSet.class
35562 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/CachedRowSet.class
597 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/ColInfo.class
1290 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/InsertRow.class
18442 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/JdbcRowSet.class
2109 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/Row.class
4489 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetMetaDataImpl.class
4707 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetReaderImpl.class
8270 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetWriterImpl.class
4745 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SQLInputImpl.class
3287 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SQLOutputImpl.class
2326 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialArray.class
1560 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialBlob.class
1948 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialClob.class
592 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialRef.class
2419 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialStruct.class
1903 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/WebRowSet.class
257 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReader.class
15620 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReaderDocHandler.class
2029 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReaderImpl.class
258 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlWriter.class
9797 Tue Jun 13 19:45:42 EDT 2000 sun/jdbc/rowset/XmlWriterImpl.class
***** ECHO OF VARIABLES FROM SCRIPT *****
Classpath
/usr/java130/jre/lib/rt.jar:/actuate/Mace/lib/xercesImpl.jar:/actuate/Mace/lib/xmlParserAPIs.jar:/ac
tuate/Mace/lib/ns.jar:/actuate/Mace/lib/mail.jar:/actuate/Mace/lib/activation.jar:/actuate/Mace/lib/
j2ee.jar:/actuate/Mace/lib/ivjejb35.jar:/actuate/Mace/lib/axis.jar:/actuate/Mace/lib/commons-logging
.jar:/actuate/Mace/lib/jaxrpc.jar:/actuate/Mace/lib/log4j-1.2.4.jar:/actuate/Mace/lib/saaj.jar:/actu
ate/Mace/lib/servlet.jar:/actuate/Mace/lib/tt-bytecode.jar:/actuate/Mace/lib/wsdl4j.jar:/actuate/Mac
e/lib/rowset.jar:/actuate/Mace/lib/sljc.jar:/actuate/Mace/lib/sljcx.jar
JAVA_Home
/usr/java130/jre
JAVA_EXE
/usr/java130/jre/bin/java
JAVA_Path
/usr/java130/jre/bin
JAVA FullVersion
java full version "J2RE 1.3.0 IBM build ca130-20020504"
***** DIRECTORY LISTING *****
server105:/actuate/Mace $ ls -lat
-rwxr-xr-x 1 actuate actuate 1673 Apr 04 09:11 go.sh
-rw-r----- 1 actuate actuate 476699 Apr 03 12:37 MaceEXT.jar
drwxr-xr-x 2 actuate actuate 4096 Apr 02 10:49 lib
-rw-r----- 1 actuate actuate 1818 Mar 28 11:15 MaceConfig.xml
server105:/actuate/Mace/lib $ ls -lat
-rw-r----- 1 actuate actuate 32033 Apr 02 10:49 ivjejb35.jar
-rw-r----- 1 actuate actuate 329096 Apr 02 10:49 j2ee.jar
-rw-r----- 1 actuate actuate 374291 Apr 01 16:39 ns.jar
-rw-r----- 1 actuate actuate 654326 Apr 01 16:31 sljc.jar
-rw-r----- 1 actuate actuate 81987 Apr 01 16:31 sljcx.jar
-rw-r----- 1 actuate actuate 54368 Mar 31 08:32 activation.jar
-rw-r----- 1 actuate actuate 867459 Mar 31 08:32 axis.jar
-rw-r----- 1 actuate actuate 24287 Mar 31 08:31 commons-logging.jar
-rw-r----- 1 actuate actuate 32069 Mar 31 08:31 jaxrpc.jar
-rw-r----- 1 actuate actuate 378778 Mar 31 08:31 log4j-1.2.4.jar
-rw-r----- 1 actuate actuate 305414 Mar 31 08:31 mail.jar
-rwxrwxrwx 1 actuate actuate 62388 Mar 31 08:31 rowset.jar
-rw-r----- 1 actuate actuate 18468 Mar 31 08:31 saaj.jar
-rw-r----- 1 actuate actuate 78350 Mar 31 08:31 servlet.jar
-rw-r----- 1 actuate actuate 130773 Mar 31 08:31 tt-bytecode.jar
-rw-r----- 1 actuate actuate 109356 Mar 31 08:31 wsdl4j.jar
-rw-r----- 1 actuate actuate 933730 Mar 31 08:31 xercesImpl.jar
-rw-r----- 1 actuate actuate 78440 Mar 31 08:31 xmlParserAPIs.jar
20 years ago
Greg,
Sorry for the LONG message, but I was just trying to provide the necessary information!
The good news is that one of the items you mentioned (<target "mytarget" if="property"> means the target won't be executed if the property isn't set) was the ticket and lets me accomplish the goal of getting rid of the file on the file system.
I was actually already using the "if", but was making it too difficult by having it check for the existence of a file vs a property that was set. Live and learn. Ant/programming is fairly new to me, so you may see me visiting the saloon once in awhile - if not for help maybe a drink!
Thanks again for your help,
Lisa
21 years ago
I'm not getting any hits here so I'll try and explain this better by taking another approach.
I have multiple projects which may have a file(s) that need string replacements. For example, ApplicationCAT has the file abc.xml that has two lines that require string replacements. ApplicationDOG has file abc.xml that only needs one string replacement.
I'm using one build.xml for all my projects (applications). In the properties file of each of the projects I specify the file(s)/existingString/replacementString that needs to take place during the build.
** EXAMPLE from the projects properties file **
WEB.Modify1.file=C:\\ccView\\${VOB.project.name}\\${VOB.project.name}_vob\\code\\${WEB1.project.name}\\${WEB.content}\\WEB-INF\\abc.xml
WEB.Token1.string=virtualHostName="default_host"
WEB.Value1.string=virtualHostName="VHMyTime"
** END EXAMPLE **
There will be as many of these entries in the properties files as there are string replacements. If there was a second string replacement I would have something like the above with the parameters: WEB.Modify2.file, WEB.Token2.string,WEB.Value2.string.
So at this point I have all the file and string replacement info in all of my projects properties files.
In my build.xml I must accomodate for the project that has the most string replacements. Here is an example of what is in the build.xml:
** CODE USED TO CHECK FOR EXISTENCE OF STRINGREPLACEMENT1.TXT **
<antcall target="replaceString1">
<param name="Modify1.file" value="${WEB.Modify1.file}"/>
<param name="Replace1.string" value="${WEB.Token1.string}"/>
<param name="Replacement1.string" value="${WEB.Value1.string}"/>
</antcall>
<antcall target="replaceString1">
<param name="Modify2.file" value="${WEB.Modify2.file}"/>
<param name="Replace2.string" value="${WEB.Token2.string}"/>
<param name="Replacement2.string" value="${WEB.Value2.string}"/>
</antcall>
** END **
So the above code will execute the string replacement command in targets "replaceString1" and "replaceString2". The problem is that project ApplicationDOG (going back to the example) only has ONE string replacement that needs to take place, so the build fails with it tries to do the second string replacement because there are no values.
The way I worked around this was to put a "dummy" file on the file system (stringreplacement"x".txt). For each project I have an area that I place these. ApplicationDOG would just have "stringreplacement1", while ApplicationCAT would have "stringreplacement1.txt" and "stringreplacment2.txt".
I then use an "available file" statement before the <antcall target="replaceStringx"> statement, which will check for the existence of the stringreplacementx.txt file. If it exist it executes the ant call, if not it skips it.
** EXAMPLE **
<available file="${global.vobAppBuildCode.dir}/${module.project.name}/stringreplacement1.txt" type="file" property="stringreplacement1.exists"/>
<antcall target="replaceString1">
<param name="Modify1.file" value="${WEB.Modify1.file}"/>
<param name="Replace1.string" value="${WEB.Token1.string}"/>
<param name="Replacement1.string" value="${WEB.Value1.string}"/>
</antcall>
** END OF EXAMPLE **
THE GOAL - FINALLY!!
I don't want to have to put the stringreplacmentx.txt file(s) on the file system as a means to check if it should execute the ant call. I would prefer it if there was a way to check if there was a value for WEB.modify1.file, WEB.modify2.file, etc. If a value has been set in the projects properties file there should be a value in there.
Is this possible? I initially though I could use something like the "available" task to check for a "JVM system resource" (I'm not sure if this would qualifies as as a JVM System Resource though).
I don't know if this makes any more sense than it did before, I hope so. If you want to take a look at the projects properties file and the build.xml I will gladly send it to you.
Thanks for your help,
Lisa
21 years ago
I need to provide some info before I go into my question. I am using a single ANT build.xml for several projects, the goal is to keep the build.xml generic and use properties files for each of the projects. Due to this I've built it to accomodate all projects.
Using a web module (WSAD terminology) for an example I will have one OR more replace strings for files within that module for the different projects. The information regarding the replacement strings resides in each Projects property file, and looks something like this:
** PROPERTIES SET IN THE PROJECTS PROPERTY FILE ******
WEB.Modify1.file=C:\\ccView\\${VOB.project.name}\\${VOB.project.name}_vob\\code\\${WEB1.project.name}\\${WEB.content}\\WEB-INF\\ibm-web-bnd.xmi
WEB.Token1.string=virtualHostName="default_host"
WEB.Value1.string=virtualHostName="VHMyTime"
** END **
I currently using the following code to look for the presence of a file (stringreplacement1.txt) to determine if I should call the target "replaceString1". This is a real pain, because I have to remember to create the stringreplacement1.txt file, and it is an even bigger pain when there are lots of replacements (i.e. have to create stringreplacement2.txt, etc..).
** CODE USED TO CHECK FOR EXISTENCE OF STRINGREPLACEMENT1.TXT **
<available file="${global.vobAppBuildCode.dir}/${module.project.name}/stringreplacement1.txt" type="file" property="stringreplacement1.exists"/>
<antcall target="replaceString1">
<param name="Modify1.file" value="${WEB.Modify1.file}"/>
<param name="Replace1.string" value="${WEB.Token1.string}"/>
<param name="Replacement1.string" value="${WEB.Value1.string}"/>
</antcall>
** END **
Can anyone suggest a better way to do this? Is there a way to check if there is a value associated with "WEB.Modify1.file", and if so then do the antcall?
Thanks,
Lisa
21 years ago