CAQuietExec fails in WiX installer while executing inetsrv\appcmd - iis-7

I'm writing some CustomActions in WiX to migrate a web.config from IIS6 to IIS7 and am getting an error. However if I copy and paste the failing command from the install log file, it succeeds. Here's section of the log file that indicates the error. You'll see the first two appcmds succeed but the last migration command fails.
Action 10:43:52: UnlockModulesCmd.
Action start 10:43:52: UnlockModulesCmd.
MSI (s) (80:44) [10:43:52:631]: PROPERTY CHANGE: Adding QtExecCmdLine property. Its value is '"C:\Windows\system32\inetsrv\appcmd" unlock config -section:system.webServer/modules'.
Action ended 10:43:52: UnlockModulesCmd. Return value 1.
MSI (s) (80:44) [10:43:52:641]: Doing action: UnlockModules
Action 10:43:52: UnlockModules. Migrating to IIS7
Action start 10:43:52: UnlockModules.
MSI (s) (80:44) [10:43:52:691]: Creating MSIHANDLE (834) of type 790542 for thread 2116
MSI (s) (80:B8) [10:43:52:691]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI72FF.tmp, Entrypoint: CAQuietExec
MSI (s) (80!7C) [10:43:52:771]: Creating MSIHANDLE (835) of type 790541 for thread 892
MSI (s) (80!7C) [10:43:52:771]: Creating MSIHANDLE (836) of type 790531 for thread 892
MSI (s) (80!7C) [10:43:52:781]: Closing MSIHANDLE (836) of type 790531 for thread 892
MSI (s) (80!7C) [10:43:52:781]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" unlock config -section:system.webServer/modules'.
MSI (s) (80!7C) [10:43:53:752]: Creating MSIHANDLE (837) of type 790531 for thread 892
CAQuietExec: Unlocked section "system.webServer/modules" at configuration path "MACHINE/WEBROOT/APPHOST".
MSI (s) (80!7C) [10:43:53:762]: Closing MSIHANDLE (837) of type 790531 for thread 892
MSI (s) (80!7C) [10:43:53:762]: Closing MSIHANDLE (835) of type 790541 for thread 892
MSI (s) (80:B8) [10:43:53:762]: Closing MSIHANDLE (834) of type 790542 for thread 2116
Action ended 10:43:53: UnlockModules. Return value 1.
MSI (s) (80:44) [10:43:53:772]: Doing action: UnlockHandlersCmd
Action 10:43:53: UnlockHandlersCmd.
Action start 10:43:53: UnlockHandlersCmd.
MSI (s) (80:44) [10:43:53:792]: PROPERTY CHANGE: Adding QtExecCmdLine property. Its value is '"C:\Windows\system32\inetsrv\appcmd" unlock config -section:system.webServer/handlers'.
Action ended 10:43:53: UnlockHandlersCmd. Return value 1.
MSI (s) (80:44) [10:43:53:792]: Doing action: UnlockHandlers
Action 10:43:53: UnlockHandlers. Migrating to IIS7
Action start 10:43:53: UnlockHandlers.
MSI (s) (80:44) [10:43:53:862]: Creating MSIHANDLE (838) of type 790542 for thread 2116
MSI (s) (80:08) [10:43:53:862]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI7780.tmp, Entrypoint: CAQuietExec
MSI (s) (80!60) [10:43:54:123]: Creating MSIHANDLE (839) of type 790541 for thread 2144
MSI (s) (80!60) [10:43:54:123]: Creating MSIHANDLE (840) of type 790531 for thread 2144
MSI (s) (80!60) [10:43:54:123]: Closing MSIHANDLE (840) of type 790531 for thread 2144
MSI (s) (80!60) [10:43:54:133]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" unlock config -section:system.webServer/handlers'.
MSI (s) (80!60) [10:43:54:493]: Creating MSIHANDLE (841) of type 790531 for thread 2144
CAQuietExec: Unlocked section "system.webServer/handlers" at configuration path "MACHINE/WEBROOT/APPHOST".
MSI (s) (80!60) [10:43:54:503]: Closing MSIHANDLE (841) of type 790531 for thread 2144
MSI (s) (80!60) [10:43:54:503]: Closing MSIHANDLE (839) of type 790541 for thread 2144
MSI (s) (80:08) [10:43:54:513]: Closing MSIHANDLE (838) of type 790542 for thread 2116
Action ended 10:43:54: UnlockHandlers. Return value 1.
MSI (s) (80:44) [10:43:54:634]: Doing action: MigrateIIS7Cmd
Action 10:43:54: MigrateIIS7Cmd.
Action start 10:43:54: MigrateIIS7Cmd.
MSI (s) (80:44) [10:43:54:644]: PROPERTY CHANGE: Adding QtExecCmdLine property. Its value is '"C:\Windows\system32\inetsrv\appcmd" migrate config "Default Web Site/sdportal"'.
Action ended 10:43:54: MigrateIIS7Cmd. Return value 1.
MSI (s) (80:44) [10:43:54:654]: Doing action: MigrateIIS7
Action 10:43:54: MigrateIIS7. Migrating to IIS7
Action start 10:43:54: MigrateIIS7.
MSI (s) (80:44) [10:43:54:704]: Creating MSIHANDLE (842) of type 790542 for thread 2116
MSI (s) (80:E8) [10:43:54:704]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI7ADE.tmp, Entrypoint: CAQuietExec
MSI (s) (80!14) [10:43:54:714]: Creating MSIHANDLE (843) of type 790541 for thread 2068
MSI (s) (80!14) [10:43:54:724]: Creating MSIHANDLE (844) of type 790531 for thread 2068
MSI (s) (80!14) [10:43:54:724]: Closing MSIHANDLE (844) of type 790531 for thread 2068
MSI (s) (80!14) [10:43:54:724]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" migrate config "Default Web Site/sdportal"'.
MSI (s) (80!14) [10:43:55:755]: Creating MSIHANDLE (845) of type 790531 for thread 2068
CAQuietExec: Error 0x80070001: Command line returned an error.
MSI (s) (80!14) [10:43:55:765]: Closing MSIHANDLE (845) of type 790531 for thread 2068
MSI (s) (80!14) [10:43:55:765]: Creating MSIHANDLE (846) of type 790531 for thread 2068
CAQuietExec: Error 0x80070001: CAQuietExec Failed
MSI (s) (80!14) [10:43:55:775]: Closing MSIHANDLE (846) of type 790531 for thread 2068
MSI (s) (80!14) [10:43:55:775]: Closing MSIHANDLE (843) of type 790541 for thread 2068
MSI (s) (80:E8) [10:43:55:775]: Closing MSIHANDLE (842) of type 790542 for thread 2116
Action ended 10:43:55: MigrateIIS7. Return value 1.
Here's a follow up. I was able to get appcmd to work by requiring the installer be run as admin. Recently, I added an additional custom command which fails. Here's the relevant portion of the log. Note that the other appcmd.exe commands run fine. If I copy and past the failing appcmd from the log to a command line prompt, it works. Any thoughts?
MSI (s) (1C:B0) [15:56:46:510]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIB74D.tmp, Entrypoint: CAQuietExec
MSI (s) (1C!B8) [15:56:46:570]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" migrate config "Default Web Site/sdportal"'.
CAQuietExec: Error 0x80070001: Command line returned an error.
CAQuietExec: Error 0x80070001: CAQuietExec Failed
Action ended 15:56:47: MigrateIIS7. Return value 1.
MSI (s) (1C:14) [15:56:47:001]: Doing action: DisableRapidFailCmd
Action 15:56:47: DisableRapidFailCmd.
Action start 15:56:47: DisableRapidFailCmd.
MSI (s) (1C:14) [15:56:47:011]: PROPERTY CHANGE: Adding QtExecCmdLine property. Its value is '"C:\Windows\system32\inetsrv\appcmd" set apppool "WssAppPool" /failure.rapidFailProtection:false'.
Action ended 15:56:47: DisableRapidFailCmd. Return value 1.
MSI (s) (1C:14) [15:56:47:021]: Doing action: DisableRapidFail
Action 15:56:47: DisableRapidFail. Disabling Rapid Fail
Action start 15:56:47: DisableRapidFail.
MSI (s) (1C:30) [15:56:47:061]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIB988.tmp, Entrypoint: CAQuietExec
MSI (s) (1C!64) [15:56:47:141]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" set apppool "WssAppPool" /failure.rapidFailProtection:false'.
CAQuietExec: APPPOOL object "WssAppPool" changed
Action ended 15:56:47: DisableRapidFail. Return value 1.
MSI (s) (1C:14) [15:56:47:502]: Doing action: ConfigureAppPoolLoggingCmd
Action 15:56:47: ConfigureAppPoolLoggingCmd.
Action start 15:56:47: ConfigureAppPoolLoggingCmd.
MSI (s) (1C:14) [15:56:47:522]: PROPERTY CHANGE: Adding QtExecCmdLine property. Its value is '"C:\Windows\system32\inetsrv\appcmd" set config /section:applicationPools /[name='WssAppPool'].recycling.logEventOnRecycle:Memory,Schedule,Requests,Time,PrivateMemory'.
Action ended 15:56:47: ConfigureAppPoolLoggingCmd. Return value 1.
MSI (s) (1C:14) [15:56:47:522]: Doing action: ConfigureAppPoolLogging
Action 15:56:47: ConfigureAppPoolLogging. Configuring App Pool Logging
Action start 15:56:47: ConfigureAppPoolLogging.
MSI (s) (1C:C0) [15:56:47:562]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIBB7E.tmp, Entrypoint: CAQuietExec
MSI (s) (1C!A8) [15:56:47:602]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is '"C:\Windows\system32\inetsrv\appcmd" set config /section:applicationPools /[name='WssAppPool'].recycling.logEventOnRecycle:Memory,Schedule,Requests,Time,PrivateMemory'.
CAQuietExec: ERROR ( message:Unknown attribute ".recycling.logEventOnRecycle". Replace with -? for help. )
CAQuietExec: Error 0x80070585: Command line returned an error.
CAQuietExec: Error 0x80070585: CAQuietExec Failed

First, you cannot use CAQuietExec even if UAC is disabled, since it will not run with the correct rights.
Simply execute the appcmd without using CAQuietExec.
Secondly, here is how to do it correctly:
http://esmithy.net/2010/07/02/iis-configuration-with-wix-and-appcmd/
Copy/paste in case the blog disappears:
<InstallExecuteSequence><Custom Action="ConfigureAppPools" Before="InstallFinalize"><![CDATA[NOT Installed AND VersionNT64 >= 600]]></Custom></InstallExecuteSequence>
<CustomAction Id="ConfigureAppPools" Execute="deferred" Impersonate="no" Return="check" Directory="TARGETDIR" ExeCommand="[SystemFolder]inetsrv\appcmd set apppool /apppool.name:"[APPPOOLNAME]" /enable32BitAppOnWin64:true" />

This is what I found on a wix-users mail archive. It seems to be very similar problem. Try to define the custom action the way Phil suggests.

Related

HLK Strong Name Installation failed

There is a strong name validation failure when I install the prerelease HLK controller.
(21301.1000.210123-1645.rs_prerelease_amd64fre_HLK.iso)
Error log:
MSI (s) (8C:BC) [18:23:51:383]: Note: 1: 1708 MSI (s) (8C:BC)
[18:23:51:383]: Product: HLK Strong Name PreCondition Check --
Installation failed.
MSI (s) (8C:BC) [18:23:51:399]: Windows Installer installed the
product. Product Name: HLK Strong Name PreCondition Check. Product
Version: 10.1.21301.1000. Product Language: 1033. Manufacturer:
Microsoft Corporation. Installation success or error status: 1603.
MSI (s) (8C:BC) [18:23:51:399]: Deferring clean up of packages/files,
if any exist MSI (s) (8C:BC) [18:23:51:399]: MainEngineThread is
returning 1603 MSI (s) (8C:80) [18:23:51:399]: RESTART MANAGER:
Session closed. MSI (s) (8C:80) [18:23:51:399]: No System Restore
sequence number for this installation.
Run commands as Administrator.
Following steps to manually clear and add workable registry value
reg DELETE "HKLM\Software\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Microsoft\StrongName\Verification\*,*" /f
reg DELETE "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification" /f
reg ADD "HKLM\Software\Wow6432Node\Microsoft\StrongName\Verification\*,*" /f

How to register assembly using custom action in WIX toolset

My Wix toolset installer installs many files, but only one of these I would like to register for COM interop. I have tried the heat automatic registration but can't get it to work, so am falling back to what I used to do in installshield which is run a custom action at the end of installation to register using regasm.
This is failing for reasons I don't understand.
My Product.wxs file registers the action as follows:
<InstallExecuteSequence>
<Custom Action="RegisterAddIn" After="InstallFiles">NOT REMOVE</Custom>
</InstallExecuteSequence>
Then creates the action here:
<Fragment>
<CustomAction Id ="RegisterAddIn" Directory ="INSTALLFOLDER" Execute="immediate" ExeCommand="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "[INSTALLFOLDER]Aeolus.Excel.Addin.dll"" Return ="check"/>
</Fragment>
On running this installer I get the error
"A program run as part of setup did not finish as expected."
Extract from the msiexec log doesn't shown below.
CustomAction RegisterAddIn returned actual error code 100 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (54:38) [12:40:54:765]: Note: 1: 1722 2: RegisterAddIn 3: C:\Program Files (x86)\Aeolus\ 4: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "C:\Program Files (x86)\Aeolus\Aeolus.Excel.Addin.dll"
MSI (s) (54:38) [12:40:54:765]: Note: 1: 2205 2: 3: Error
MSI (s) (54:38) [12:40:54:765]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1722
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RegisterAddIn, location: C:\Program Files (x86)\Aeolus\, command: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "C:\Program Files (x86)\Aeolus\Aeolus.Excel.Addin.dll"
MSI (s) (54:38) [12:40:56:746]: Note: 1: 2205 2: 3: Error
MSI (s) (54:38) [12:40:56:746]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (54:38) [12:40:56:746]: Product: Aeolus -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action RegisterAddIn, location: C:\Program Files (x86)\Aeolus\, command: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "C:\Program Files (x86)\Aeolus\Aeolus.Excel.Addin.dll"
Editing the .msi file with Orca, I have this entry in the table which looks correct to me:
[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "[INSTALLFOLDER]Aeolus.Excel.Addin.dll"
If I remove these custom actions, run my installer, then run this in a command prompt (run as administrator):
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "C:\Program Files (x86)\Aeolus\Aeolus.Excel.Addin.dll"
It registers fine. if not run as administrator it fails of course. Can I assume any custom actions will be run as administrator?
In case anyone else has similar issues, I managed to fix it. It turned out to be a permission issue. I was assuming that the installer and all custom actions ran as administrator but actually you have to tell it to run at that level of permission.
So I needed to make 3 fixes.
1. Request elevated permission in package definintion:
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" AdminImage="yes"/>
Set "Execute" to "deferred" and "Impersonate" to "no" in custom action definition:
<CustomAction Id ="RegisterAddIn" Directory ="INSTALLFOLDER" Execute="deferred" ExeCommand="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319\regasm /codebase /tlb "[INSTALLFOLDER]Aeolus.Excel.Addin.dll"" Return ="check" Impersonate="no"/>
Then it all runs as expected.

Jboss Datagrid server leveldb cache lock - Resource temporarily unavailable

I am running 2 instances of Jboss Datagrid server in RHEL in distributed mode. I am using leveldb cache store as my level 2 cache. Both of these instance should use the same leveldb cache store path and should write the key/value to this path.
/shared/usr/local/leveldb.
here is my configuration
(There is a softlink created inside the data directory so that the leveldb path is pointed to the same shared directory in both servers).
I am getting the following error on the second instance (first instance is comping up without any issues). I am using shared="true" in the configuration which should allow both datagrid servers to access the same cache store.
2016-12-05 13:15:19,077 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.datagrid-infinispan.clustered.mycache: org.jboss.msc.service.StartException in service jboss.datagrid-infinispan.clustered.mycache: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.start() on object of type PersistenceManagerImpl
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:172)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:864)
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:633)
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:622)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:547)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:238)
at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:877)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:637)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:587)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:452)
at org.infinispan.manager.impl.AbstractDelegatingEmbeddedCacheManager.getCache(AbstractDelegatingEmbeddedCacheManager.java:133)
at org.infinispan.server.infinispan.SecurityActions$5.run(SecurityActions.java:130)
at org.infinispan.server.infinispan.SecurityActions$5.run(SecurityActions.java:127)
at org.infinispan.security.Security.doPrivileged(Security.java:76)
at org.infinispan.server.infinispan.SecurityActions.doPrivileged(SecurityActions.java:63)
at org.infinispan.server.infinispan.SecurityActions.startCache(SecurityActions.java:135)
at org.jboss.as.clustering.infinispan.subsystem.CacheService.start(CacheService.java:86)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
... 3 more
Caused by: org.infinispan.commons.CacheException: Unable to start cache loaders
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)
... 21 more
Caused by: org.infinispan.commons.CacheConfigurationException: Unable to open database
at org.infinispan.persistence.leveldb.LevelDBStore.start(LevelDBStore.java:108)
at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:141)
... 26 more
Caused by: org.fusesource.leveldbjni.internal.NativeDB$DBException: IO error: lock /shared/usr/local/leveldb/data/mycache/LOCK: Resource temporarily unavailable
at org.fusesource.leveldbjni.internal.NativeDB.checkStatus(NativeDB.java:200)
at org.fusesource.leveldbjni.internal.NativeDB.open(NativeDB.java:218)
at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:168)
at org.infinispan.persistence.leveldb.LevelDBStore.openDatabase(LevelDBStore.java:153)
at org.infinispan.persistence.leveldb.LevelDBStore.start(LevelDBStore.java:104)
... 27 more
The LevelDB cache store cannot be shared, because LevelDB itself is not meant to be shared. I've created an issue to ensure that such mistakes can be prevented during configuration validation: https://issues.jboss.org/browse/ISPN-7286

Web app setup on Windows 2003 fails with error 1615

I'm trying to install a .NET 3.5 web application I on a Win 2003 server with IIS6. The application installed fine a few versions ago and the old msi still works. As far as I know nothing has changed with the installer apart from a version number, one more dll in the application and the ProductCode of the setup project. However, the latest msi stops with the message:
The installer was interrupted before <ApplicationName> could be
installed. You need to restart the installer to try again.
The log contains this error:
MSI (c) (B8:0C) [23:12:38:964]: Doing action: WEBCA_GatherAppPools
MSI (c) (B8:0C) [23:12:38:964]: Note: 1: 2205 2: 3: ActionText
Action start 23:12:38: WEBCA_GatherAppPools.
MSI (c) (B8:0C) [23:12:38:964]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WEBCA_GatherAppPools'
MSI (c) (B8:88) [23:12:38:995]: Invoking remote custom action. DLL: C:\DOCUME~1\had012SA\LOCALS~1\Temp\1\MSIA0.tmp, Entrypoint: GatherAppPools
INFO : [10/14/2011 23:12:39:042] [GatherAppPools ]: Custom Action is starting...
INFO : [10/14/2011 23:12:39:042] [GatherAppPools ]: CoInitializeEx - COM initialization Apartment Threaded...
MSI (c) (B8!84) [23:12:39:042]: Note: 1: 2205 2: 3: ComboBox
MSI (c) (B8!84) [23:12:39:042]: Note: 1: 2228 2: 3: ComboBox 4: INSERT INTO `ComboBox` (`Property`,`Order`,`Value`,`Text`) VALUES (?, ?, ?, ?) TEMPORARY
ERROR : [10/14/2011 23:12:39:042] [GatherAppPools ]: FAILED: -2147023281
ERROR : [10/14/2011 23:12:39:042] [GatherAppPools ]: Custom Action failed with code: '1615'
INFO : [10/14/2011 23:12:39:042] [GatherAppPools ]: Custom Action completed with return code: '1615'
Action ended 23:12:39: WEBCA_GatherAppPools. Return value 3.
This page says error 1615 is an SQL syntax error but the action is a standard MS action so I can't do much about. Does anyone have any idea how to fix this?
Thanks.
UPDATE: I've tried creating a new web app in Visual Studio 2008 and a setup project for it and that installer does not work either so I suspect it's something with my Visual Studio. I can't think of what though so I still need help...
UPDATE 2: Curiouser and curiouser... a colleague compiled the code without making any changes and the installer works. Now the question becomes what has happened to my VS2008 and how can I fix it?
could be a change in the projects database structure.
Possibly you have a database with an older version of the Combobox table from previous versions.
Try deleting the db before preforming a clean install of the application.

CDI (Weld) / Seam 3 Persistence module / Glassfish 3 - Unexplainable exception when starting server

I am using Weld, Jboss' implementation of CDI. JPA/Hibernate for persistence. For something different I am giving it a crack on Glassfish 3 which I have not used before. I am using Maven for dependency management.
As CDI doesn't have transaction management included out of the box, I decided to use the Seam 3 Persistence module instead of rolling my own. Now, I am well aware that this is only in Alpha at the moment so maybe I am asking for trouble. I'm hoping someone else has seen this and can either help me fix it or at least let me know why I'm getting the problems that I am.
So, before adding the persistence module, everything builds and runs fine. I can open the homepage of the app fine. However, when I add the Seam 3 persistence module to my pom.xml, the application throws an exception when starting up. The only difference between working and not working is the one dependency I am adding to the pom.xml
The dependency I am adding to my pom.xml is:
<dependency>
<groupId>org.jboss.seam.persistence</groupId>
<artifactId>seam-persistence-impl</artifactId>
<version>3.0.0.Alpha1</version>
</dependency>
I added this dependency based on the instructions at http://seamframework.org/Seam3/PersistenceModule . I'm aware that when clicking on the documentation from this page it mentions a couple of other dependencies but I get the same problem when adding them as well. This is the dependency that I have narrowed the problem down to.
So, after adding the dependency above and starting the server I get the following on startup:
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Grizzly Framework 1.9.18-o started in: 113ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 33ms listening on port 4848
INFO: Grizzly Framework 1.9.18-o started in: 76ms listening on port 8181
INFO: Starting Grizzly Framework 1.9.18-o - Thu Oct 28 23:06:04 BST 2010
INFO: Grizzly Framework 1.9.18-o started in: 10ms listening on port 3700
INFO: Starting Grizzly Framework 1.9.18-o - Thu Oct 28 23:06:04 BST 2010
INFO: Grizzly Framework 1.9.18-o started in: 7ms listening on port 7676
INFO: The Admin Console is already installed, but not yet loaded.
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(4429ms) startup services(1530ms) total(5959ms)
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Grizzly Framework 1.9.18-o started in: 16ms listening on port 8080
INFO: Binding RMI port to *:8686
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://192.168.1.73:8686/jndi/rmi://192.168.1.73:8686/jmxrmi
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /Applications/NetBeans/glassfish-3.0.1/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /var/folders/Q0/Q00qqJF1Gi8VesnYN54iM++++TI/-Tmp-/fileinstall-2957414086269585283, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /var/folders/Q0/Q00qqJF1Gi8VesnYN54iM++++TI/-Tmp-/fileinstall--8933010182761076907, felix.fileinstall.filter = null}
INFO: Started bundle: file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.scr.jar
INFO: Started bundle: file:/Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed /Applications/NetBeans/glassfish-3.0.1/glassfish/modules/autostart/org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = /Applications/NetBeans/glassfish-3.0.1/glassfish/domains/domain1/autodeploy/bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = /var/folders/Q0/Q00qqJF1Gi8VesnYN54iM++++TI/-Tmp-/fileinstall-9012588867170808207, felix.fileinstall.filter = null}
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Portable JNDI names for EJB EjbSynchronizations : [java:global/com.coffeesnobs_web_war_1.0-SNAPSHOT/EjbSynchronizations, java:global/com.coffeesnobs_web_war_1.0-SNAPSHOT/EjbSynchronizations!org.jboss.seam.persistence.transaction.LocalEjbSynchronizations]
INFO: WELD-000900 1.0.1 (SP3)
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
SEVERE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Exception #0 :null
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception #0 :null
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:45)
at org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:44)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:61)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:88)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:134)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:377)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:165)
... 30 more
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 14ms listening on port 8181
As you can see, there really isn't much to go on.
Have you seen this exception before? Do you have any idea what is causing it? And finally, do you know how to fix it?
I've been seeing this too. I increased the loggin on Glassfish and found the following.
FINER: loadClass(org.jboss.logging.MessageLogger)
FINER: Delegating to classloader1 org.glassfish.internal.api.DelegatingClassLoader#6f9240a4
FINER: Searching local repositories
FINER: findClass(org.jboss.logging.MessageLogger)
FINER: findClassInternal(org.jboss.logging.MessageLogger)
FINER: --> Passing on ClassNotFoundException
SEVERE: Exception while loading the app
org.glassfish.deployment.common.DeploymentException: Exception #0 :null
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:637)
Caused by: org.jboss.weld.exceptions.DefinitionException: Exception #0 :null
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:45)
at org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:44)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:61)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:88)
at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:134)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:377)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:165)
... 30 more
It looks like there is a JBoss logging dependency problem. MessgeLogger is a new class in the jboss logging framework that the new Seam extensions appear to be using.
I added the following to my pom
<dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logging</artifactId>
<version>1.0.2.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
<version>2.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.0.0.Beta4</version>
</dependency>
This seems to have fixed the missing class but now I get a NPE.
Caused by: java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.jboss.logging.Log4jLogger.<init>(Log4jLogger.java:35)
at org.jboss.logging.Log4jLoggerProvider.getLogger(Log4jLoggerProvider.java:33)
at org.jboss.logging.Logger.getLogger(Logger.java:2164)
at org.jboss.slf4j.JBossLoggerFactory.getLogger(JBossLoggerFactory.java:66)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:246)
at org.hibernate.search.util.LoggerFactory.make(LoggerFactory.java:38)
at org.hibernate.search.store.FSDirectoryProvider.<clinit>(FSDirectoryProvider.java:55)
I think it's a log4j config problem on Glassfish.
It turns out it was a bug with the versions and combination of technologies we were using. We are now using the final version of Jboss 6 and the beta version of the Seam Persistence Module and all seems to be working ok.

Resources