cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Heroesmith
Level 3

Empty PRODUCT_VERSION_NUMBER

Hello,
I've got a problem with PRODUCT_VERSION_NUMBER variable. I want to parse it in a custom action, but it seems to be empty. Here is the console I have after launching installer built, when I :

    ask for debug info "PRODUCT_VERSION_NUMBER = $PRODUCT_VERSION_NUMBER$" at the beginning of Pre-install actions

    and then execute custom action to parse it :


cwd: C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Windows

cmd: "C:\WINDOWS\system32\java.exe" -Xms16777216 -Xmx50331648 -classpath "C:\Doc
uments and Settings\packaging\Local Settings\Temp\I1254417053\InstallerData\IACl
asses.zip;C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\In
stallerData\Execute.zip;C:\Documents and Settings\packaging\Local Settings\Temp\
I1254417053\Windows\InstallerData\Execute.zip;C:\Documents and Settings\packagin
g\Local Settings\Temp\I1254417053\InstallerData\Resource1.zip;C:\Documents and S
ettings\packaging\Local Settings\Temp\I1254417053\Windows\InstallerData\Resource
1.zip;C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Instal
lerData;C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Wind
ows\InstallerData;" com.zerog.lax.LAX "C:/Documents and Settings/packaging/Local
Settings/Temp/I1254417053/Windows/DW_Install.lax" "C:/Documents and Settings/pa
ckaging/Local Settings/Temp/lax6E0.tmp"
IAResourceBundle: create resource bundle: en
__________________________________________________________________________

InstallAnywhere 2008 VP1
Version: 9.5
__________________________________________________________________________

Thu Oct 01 19:11:07 CEST 2009

Free Memory: 14965 kB
Total Memory: 16320 kB

No Arguments

java.class.path:
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData\IAClasses.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData\Execute.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Windows\
InstallerData\Execute.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData\Resource1.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Windows\
InstallerData\Resource1.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Windows\
InstallerData

ZGUtil.CLASS_PATH:
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData\IAClasses.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData\Execute.zip
C:\Documents and Settings\packaging\Local Settings\Temp\I1254417053\Installe
rData

sun.boot.class.path:
C:\Program Files\Java\jre6\lib\resources.jar
C:\Program Files\Java\jre6\lib\rt.jar
C:\Program Files\Java\jre6\lib\sunrsasign.jar
C:\Program Files\Java\jre6\lib\jsse.jar
C:\Program Files\Java\jre6\lib\jce.jar
C:\Program Files\Java\jre6\lib\charsets.jar
C:\Program Files\Java\jre6\classes

java.ext.dirs:
C:\Program Files\Java\jre6\lib\ext
C:\WINDOWS\Sun\Java\lib\ext

java.version == 1.6.0_16 (Java 1)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 14.2-b01
java.vm.specification.name == Java Virtual Machine Specification
java.vm.specification.vendor == Sun Microsystems Inc.
java.vm.specification.version == 1.0
java.specification.name == Java Platform API Specification
java.specification.vendor == Sun Microsystems Inc.
java.specification.version == 1.6
java.vendor == Sun Microsystems Inc.
java.vendor.url == http://java.sun.com/
java.class.version == 50.0
java.compiler == null
java.home == C:\Program Files\Java\jre6
java.io.tmpdir == C:\DOCUME~1\PACKAG~1\LOCALS~1\Temp\
os.name == Windows XP
os.arch == x86
os.version == 5.1
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.name == packaging
user.home == C:\Documents and Settings\packaging
user.dir == C:\Documents and Settings\packaging\Local Setti
ngs\Temp\I1254417053\Windows
user.language == fr
user.region == null
__________________________________________________________________________

IAResourceBundle: create resource bundle: fr
System's temporary directory = C:\Documents and Settings\packaging\Local Setting
s\Temp

Loading externalized properties
Installer running in different from input language

PRODUCT_VERSION_NUMBER =

version:

Nb token to parse: 0
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(Unknown Source)
at com.intespace.ia.customcode.actions.ExtractVersion.install(ExtractVer
sion.java:26)
at com.zerog.ia.installer.actions.CustomAction.installSelf(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.a(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.m(DashoA10*..)
at com.zerog.ia.installer.AAMgr.actionPerformed(DashoA10*..)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Checking for admin privileges...
null
class com.intespace.ia.customcode.rules.IsAdmin.install() Unexpected Fatal E
rror:
java.lang.NoClassDefFoundError: com/installshield/wizard/service/security/Securi
tyService
at com.intespace.ia.customcode.rules.IsAdmin.evaluateRule(IsAdmin.java:1
9)
at com.zerog.ia.installer.rules.CustomRule.checkSelf(DashoA10*..)
at com.zerog.ia.installer.InstallPiece.checkRulesSelf(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.m(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.m(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.m(DashoA10*..)
at com.zerog.ia.installer.AAMgr.a(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.e(DashoA10*..)
at com.zerog.ia.installer.AAMgrBase.m(DashoA10*..)
at com.zerog.ia.installer.AAMgr.actionPerformed(DashoA10*..)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.installshield.wizard.service.se
curity.SecurityService
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 27 more


Something weird is that when I create an empty test project and do the same test, the variable is right filled with info from Project->Description->Version fields...

Does anybody had the same problem, or an idea to help me ?
Thanks

Julien
Labels (1)
0 Kudos
2 Replies
pv7721
Level 20

Well, there are two things: I'm not sure what it's in your case $PRODUCT_VERSION_NUMBER$, is it something like 1.2.3 or does it contain some other characters? Then how exactly do you get the value of the variable? Do you use something like
String productVersionNumber = installerProxy.substitute( "$PRODUCT_VERSION_NUMBER$" );


P.S. I'll get back to your PM in an hour or so! 🙂
0 Kudos
Heroesmith
Level 3

Hello,
$PRODUCT_VERSION_NUMBER$ is a variable managed by IA, to store what you input in Project->Description->Version fields. It's effectively something like 1.2.3.4
Before calling java customcode, I ask for logging this variable's content and it's empty.
0 Kudos