This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Issues running CustomCodeAction on Windows 64 bit
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 02, 2009
12:09 PM
Issues running CustomCodeAction on Windows 64 bit
I've created a default installer with InstallAnywhere 2009 Enterprise SP1 that has one custom action. This custom action works fine on a Windows 32-bit machine (XP) but fails on a Windows 64-bit machine (2003 and XP).
Here is the results of the install on a Windows 64-bit machine. Has anyone encountered something like this?
__________________________________________________________________________
Tue Jun 02 12:43:52 EDT 2009
Free Memory: 8051 kB
Total Memory: 16384 kB
java.class.path:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\IAClasses.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Resource1.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData\Resource1.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData
ZGUtil.CLASS_PATH:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\IAClasses.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData
sun.boot.class.path:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\resources.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\rt.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\sunrsasign.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\jsse.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\jce.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\charsets.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\classes
java.ext.dirs:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\ext
C:\WINDOWS\Sun\Java\lib\ext
java.version == 1.6.0_11 (Java 1)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 11.0-b16
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:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre
java.io.tmpdir == C:\DOCUME~1\bentleyt\LOCALS~1\Temp\
os.name == Windows 2003
os.arch == x86
os.version == 5.2
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.name == bentleyt
user.home == C:\Documents and Settings\bentleyt
user.dir == C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows
user.language == en
user.region == null
__________________________________________________________________________
Install Begin: Tue Jun 02 12:43:25 EDT 2009
Install End: Tue Jun 02 12:43:44 EDT 2009
Installed by InstallAnywhere 10.0 Enterprise Build 3762
User Interactions
-----------------
#Choose Install Folder
#---------------------
USER_INSTALL_DIR=C:\\Program Files (x86)\\My_Product
#Choose Shortcut Folder
#----------------------
USER_SHORTCUTS=C:\\Documents and Settings\\bentleyt\\Start Menu\\Programs\\My_Product
Summary
-------
Installation: Unsuccessful.
23 Successes
0 Warnings
0 NonFatalErrors
1 FatalErrors
Action Notes:
None
Install Log Detail:
Check Disk Space: C:\Program Files (x86)\My_Product
Status: SUCCESSFUL
Additional Notes: NOTE - Required Disk Space: 94,815,443; Free Disk Space: 73,084,141,568
Install Directory: C:\Program Files (x86)\My_Product\
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\Uninstall_My_Product\
Status: SUCCESSFUL
Install Uninstaller: My_Product (Install All Uninstaller Components)
Status: SUCCESSFUL
Create LaunchAnywhere: resource jar is empty
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\jre
Status: SUCCESSFUL
Install JRE: C:\Program Files (x86)\My_Product\jre
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.exe
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.lax
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\iawin32.dll
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\win64_32_x64.exe
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\remove.exe
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: DisplayName
Value Data: My_Product
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: UninstallString
Value Data: "C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.exe"
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: ProductID
Value Data: b4e4eae0-1ef3-11b2-a05a-945833c60398
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: InstallLocation
Value Data: C:\Program Files (x86)\My_Product
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: InstallDate
Value Data: Tue Jun 02 12:43:26 EDT 2009
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: DisplayVersion
Value Data: 1.0.0.0
Status: SUCCESSFUL
Install Uninstaller: My_Product (Install All Uninstaller Components)
Status: SUCCESSFUL
Error: java.net.UnknownHostException: WMWX64BENTLEYT: WMWX64BENTLEYT
Status: SUCCESSFUL
Custom Action: com.ibm.tom.MyCustomAction
Status: FATAL ERROR
Additional Notes: FATAL ERROR - class com.ibm.tom.MyCustomAction FatalInstallException: java.net.UnknownHostException: WMWX64BENTLEYT: WMWX64BENTLEYT
---------------------------------------------------------------
Here is the Java custom code
package com.ibm.tom;
import java.net.InetAddress;
import com.zerog.ia.api.pub.CustomCodeAction;
import com.zerog.ia.api.pub.CustomError;
import com.zerog.ia.api.pub.FatalInstallException;
import com.zerog.ia.api.pub.InstallException;
import com.zerog.ia.api.pub.InstallerProxy;
import com.zerog.ia.api.pub.UninstallerProxy;
public class MyCustomAction extends CustomCodeAction
{
@Override
public String getInstallStatusMessage()
{
return "MyCustomAction"; // screen will say "Installing... My Action"
}
@Override
public String getUninstallStatusMessage()
{
return "MyCustomAction"; // screen will say "Installing... My Action"
}
@Override
public void install(InstallerProxy ip) throws InstallException
{
CustomError error = (CustomError)ip.getService(CustomError.class);
String msg;
try
{
msg = InetAddress.getLocalHost().getHostName();
error.setLogDescription("Host Name: " + msg);
error.log();
}
catch (Throwable e)
{
error.setLogDescription("Error: " + e.toString());
error.log();
//e.printStackTrace();
throw new FatalInstallException(e.toString());
}
}
@Override
public void uninstall(UninstallerProxy up) throws InstallException
{
// TODO Auto-generated method stub
}
}
----------------------------------------------------------------
----------------------------------------------------------------
Here is the results of the install on a Windows 64-bit machine. Has anyone encountered something like this?
__________________________________________________________________________
Tue Jun 02 12:43:52 EDT 2009
Free Memory: 8051 kB
Total Memory: 16384 kB
java.class.path:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\IAClasses.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Resource1.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData\Resource1.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\InstallerData
ZGUtil.CLASS_PATH:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\IAClasses.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData\Execute.zip
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\InstallerData
sun.boot.class.path:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\resources.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\rt.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\sunrsasign.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\jsse.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\jce.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\charsets.jar
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\classes
java.ext.dirs:
C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre\lib\ext
C:\WINDOWS\Sun\Java\lib\ext
java.version == 1.6.0_11 (Java 1)
java.vm.name == Java HotSpot(TM) Client VM
java.vm.vendor == Sun Microsystems Inc.
java.vm.version == 11.0-b16
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:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows\resource\jre
java.io.tmpdir == C:\DOCUME~1\bentleyt\LOCALS~1\Temp\
os.name == Windows 2003
os.arch == x86
os.version == 5.2
path.separator == ;
file.separator == \
file.encoding == Cp1252
user.name == bentleyt
user.home == C:\Documents and Settings\bentleyt
user.dir == C:\Documents and Settings\bentleyt\Local Settings\Temp\I1243960976\Windows
user.language == en
user.region == null
__________________________________________________________________________
Install Begin: Tue Jun 02 12:43:25 EDT 2009
Install End: Tue Jun 02 12:43:44 EDT 2009
Installed by InstallAnywhere 10.0 Enterprise Build 3762
User Interactions
-----------------
#Choose Install Folder
#---------------------
USER_INSTALL_DIR=C:\\Program Files (x86)\\My_Product
#Choose Shortcut Folder
#----------------------
USER_SHORTCUTS=C:\\Documents and Settings\\bentleyt\\Start Menu\\Programs\\My_Product
Summary
-------
Installation: Unsuccessful.
23 Successes
0 Warnings
0 NonFatalErrors
1 FatalErrors
Action Notes:
None
Install Log Detail:
Check Disk Space: C:\Program Files (x86)\My_Product
Status: SUCCESSFUL
Additional Notes: NOTE - Required Disk Space: 94,815,443; Free Disk Space: 73,084,141,568
Install Directory: C:\Program Files (x86)\My_Product\
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\Uninstall_My_Product\
Status: SUCCESSFUL
Install Uninstaller: My_Product (Install All Uninstaller Components)
Status: SUCCESSFUL
Create LaunchAnywhere: resource jar is empty
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\jre
Status: SUCCESSFUL
Install JRE: C:\Program Files (x86)\My_Product\jre
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.exe
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.lax
Status: SUCCESSFUL
Install Directory: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\iawin32.dll
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\win64_32_x64.exe
Status: SUCCESSFUL
Install File: C:\Program Files (x86)\My_Product\Uninstall_My_Product\resource\remove.exe
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: DisplayName
Value Data: My_Product
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: UninstallString
Value Data: "C:\Program Files (x86)\My_Product\Uninstall_My_Product\Uninstall My_Product.exe"
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: ProductID
Value Data: b4e4eae0-1ef3-11b2-a05a-945833c60398
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: InstallLocation
Value Data: C:\Program Files (x86)\My_Product
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: InstallDate
Value Data: Tue Jun 02 12:43:26 EDT 2009
Status: SUCCESSFUL
Make Registry Entry: Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\My_Product
Value Name: DisplayVersion
Value Data: 1.0.0.0
Status: SUCCESSFUL
Install Uninstaller: My_Product (Install All Uninstaller Components)
Status: SUCCESSFUL
Error: java.net.UnknownHostException: WMWX64BENTLEYT: WMWX64BENTLEYT
Status: SUCCESSFUL
Custom Action: com.ibm.tom.MyCustomAction
Status: FATAL ERROR
Additional Notes: FATAL ERROR - class com.ibm.tom.MyCustomAction FatalInstallException: java.net.UnknownHostException: WMWX64BENTLEYT: WMWX64BENTLEYT
---------------------------------------------------------------
Here is the Java custom code
package com.ibm.tom;
import java.net.InetAddress;
import com.zerog.ia.api.pub.CustomCodeAction;
import com.zerog.ia.api.pub.CustomError;
import com.zerog.ia.api.pub.FatalInstallException;
import com.zerog.ia.api.pub.InstallException;
import com.zerog.ia.api.pub.InstallerProxy;
import com.zerog.ia.api.pub.UninstallerProxy;
public class MyCustomAction extends CustomCodeAction
{
@Override
public String getInstallStatusMessage()
{
return "MyCustomAction"; // screen will say "Installing... My Action"
}
@Override
public String getUninstallStatusMessage()
{
return "MyCustomAction"; // screen will say "Installing... My Action"
}
@Override
public void install(InstallerProxy ip) throws InstallException
{
CustomError error = (CustomError)ip.getService(CustomError.class);
String msg;
try
{
msg = InetAddress.getLocalHost().getHostName();
error.setLogDescription("Host Name: " + msg);
error.log();
}
catch (Throwable e)
{
error.setLogDescription("Error: " + e.toString());
error.log();
//e.printStackTrace();
throw new FatalInstallException(e.toString());
}
}
@Override
public void uninstall(UninstallerProxy up) throws InstallException
{
// TODO Auto-generated method stub
}
}
----------------------------------------------------------------
----------------------------------------------------------------
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 28, 2009
04:14 PM
Tom,
Were you able to find the cause/solution this? I am also hitting this problem.
I have found this problem only occurs in the installer using 32-bit JRE on 64-bit Windows.
With 32-bit JRE on 32-bit Windows, 64-bit JRE on 64-bit Windows, or a sample Java program, InetAddress.getLocalHost().getHostName() is OK.
Thanks,
-Tai
Were you able to find the cause/solution this? I am also hitting this problem.
I have found this problem only occurs in the installer using 32-bit JRE on 64-bit Windows.
With 32-bit JRE on 32-bit Windows, 64-bit JRE on 64-bit Windows, or a sample Java program, InetAddress.getLocalHost().getHostName() is OK.
Thanks,
-Tai
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 14, 2009
11:09 AM
taile1 wrote:
Tom,
Were you able to find the cause/solution this? I am also hitting this problem.
I have found this problem only occurs in the installer using 32-bit JRE on 64-bit Windows.
With 32-bit JRE on 32-bit Windows, 64-bit JRE on 64-bit Windows, or a sample Java program, InetAddress.getLocalHost().getHostName() is OK.
Thanks,
-Tai
I've had the same issue and the only solution was to not mix 32 bit and 64 bit JRE/JDKs.
If I did, a fair number of my plugins would no longer function properly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 01, 2010
04:43 AM
I am experiencing the same issuewhen installing using a 32 bit windows VM on a 64 bit windows 7 machine. I also get the UnknownHostException with a message showing the host name twice in CAPITALS.
Now the strange part is that if I run the same code in the custom code after the install using the same VM it works correctly.
private String getHostName()
{
}
Now the strange part is that if I run the same code in the custom code after the install using the same VM it works correctly.
private String getHostName()
{
String host = null;
try
{
catch (java.net.UnknownHostException uhe)
{
return host;
try
{
java.net.InetAddress inetAddr = java.net.InetAddress.getLocalHost();
if (inetAddr != null)
{
}if (inetAddr != null)
{
host = inetAddr.getHostName();
}catch (java.net.UnknownHostException uhe)
{
System.out.println(uhe.toString());
}return host;
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2012
11:00 AM
I believe the way to get this working using a 32 bit JVM on a 64bit host is to add to the lax file the following
lax.nl.java.option.additional=-Djava.net.preferIPv4Stack=true
I made this change to the installed programs and the installer itself.
lax.nl.java.option.additional=-Djava.net.preferIPv4Stack=true
I made this change to the installed programs and the installer itself.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)