[JBoss-dev] [JBoss JIRA] Commented: (JBAS-11) Error redeploying dependent war
[ http://jira.jboss.com/jira/browse/JBAS-11?page=comments#action_12315852 ] Scott M Stark commented on JBAS-11: --- That really is not the correct fix. This method should really be removing the war dependency from the service in addition to nulling out all of these variables as the war has been undeployed and should no longer be usable. The redeployment of the properties service would then have no dependent war to start. What is really needed is a redeploy notion that would recycle the dependent deployments, but such a notion does not exist. Error redeploying dependent war --- Key: JBAS-11 URL: http://jira.jboss.com/jira/browse/JBAS-11 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Versions: JBossAS-4.0.0 Final Reporter: bern Assignee: Scott M Stark This is a taken from the forum post from octopus see http://www.jboss.org/index.html?module=bbop=viewtopict=56015. I have a deployed webapp which depends on some mbean (having depends clause in jboss-web.xml). When mbean is being redeployed it causes redeploying this webapp which finishes with NPE in WebModule.java This bug reproduced in both jboss 4.0.0 and 3.2.6 Simple test case: Create sample service in /deploy, for example test-properties-service.xml Code: server mbean code=org.jboss.varia.property.SystemPropertiesService name=test:service=SystemProperties !-- Set propertuies using the properties file style. -- attribute name=Properties /attribute /mbean /server Create sample war which depends on this service, for example Code: test.war | WEB-INF | web.xml jboss-web.xml | META-INF where web.xml Code: web-app /web-app jboss-web.xml Code: jboss-web dependstest:service=SystemProperties/depends /jboss-web now both test-properties-service.xml and test.war placed in /deploy and deployed successfully. Now update test-properties-service.xml (edit-save, touch, etc) jboss will try to redeploy test.war with following result: Code: 13:22:33,483 DEBUG [MainDeployer] Undeploying file:/C:/Cluster/jboss-3.2.6/server/all/deploy/test-pr operties-service .xml 13:22:33,483 DEBUG [SARDeployer] undeploying document file:/C:/Cluster/jboss-3.2.6/server/all/deploy /test-properties -service.xml 13:22:33,499 DEBUG [SARDeployer] stopping mbean test:service=SystemProperties 13:22:33,499 DEBUG [ServiceController] stopping service: test:service=SystemProperties 13:22:33,514 DEBUG [ServiceController] stopping dependent services for: test:service=SystemPropertie s depende nt services are: [ObjectName: jboss.web.deployment:war=test.war,id=-1080743623 state: RUNNING I Depend On: test:service=SystemProperties Depends On Me: ] 13:22:33,530 DEBUG [ServiceController] stopping service: jboss.web.deployment:war=test.war,id=-10807 43623 13:22:33,530 DEBUG [ServiceController] stopping dependent services for: jboss.web.deployment:war=tes t.war,id=-1080743623 dependent services are: [] 13:22:33,546 DEBUG [WebModule] Stopping jboss.web.deployment:war=test.war,id=-1080743623 13:22:33,546 INFO [TomcatDeployer] undeploy, ctxPath=/test, warUrl=file:/C:/Cluster/jboss-3.2.6/ser ver/all/tmp/deploy/tm p45130test.war/ 13:22:33,577 DEBUG [Context] Stopping 13:22:33,577 DEBUG [Context] Stopping filters 13:22:33,577 DEBUG [Context] Stopping filter 'CommonHeadersFilter' 13:22:33,592 DEBUG [Context] Processing standard container shutdown 13:22:33,608 DEBUG [Context] Sending application stop events 13:22:33,624 DEBUG [Context] resetContext jboss.web:j2eeType=WebModule,name=//localhost/test,J2EEApp lication=none,J2EESer ver=none [EMAIL PROTECTED] 13:22:33,624 DEBUG [Context] Stopping complete 13:22:33,639 DEBUG [WebModule] Stopped jboss.web.deployment:war=test.war,id=-1080743623 13:22:33,639 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceController,type= org.jboss.system.ServiceMBean.stop,sequenceNumber=225,timeStamp=10993981536 39,message=null,userD ata=jboss.web.deployment:war=test.war,id=-1080743623] 13:22:33,655 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceController,type= org.jboss.system.ServiceMBean.stop,sequenceNumber=226,timeStamp=10993981536 55,message=null,userD ata=test:service=SystemProperties] 13:22:33,671 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceDeployer,type=org.jboss.deployment.SubDeployer.stop,sequenceNumber=114,timeStamp=10993981536 71,message=null,userD [EMAIL PROTECTED] {
[JBoss-dev] [JBoss JIRA] Commented: (JBAS-11) Error redeploying dependent war
[ http://jira.jboss.com/jira/browse/JBAS-11?page=comments#action_12315811 ] commented on JBAS-11: --- I found a fix for this issue. In the method destroyService of the class org.jboss.web.WebModule, a number of member variables are set null and this shouldn't be done. So I did this change: protected void destroyService() { // this.di = null; // this.container = null; // this.deployer = null; } This is apparently enough to solve the problem. Error redeploying dependent war --- Key: JBAS-11 URL: http://jira.jboss.com/jira/browse/JBAS-11 Project: JBoss Application Server Type: Bug Components: Web (Tomcat) service Versions: JBossAS-4.0.0 Final Reporter: Assignee: Scott M Stark This is a taken from the forum post from octopus see http://www.jboss.org/index.html?module=bbop=viewtopict=56015. I have a deployed webapp which depends on some mbean (having depends clause in jboss-web.xml). When mbean is being redeployed it causes redeploying this webapp which finishes with NPE in WebModule.java This bug reproduced in both jboss 4.0.0 and 3.2.6 Simple test case: Create sample service in /deploy, for example test-properties-service.xml Code: server mbean code=org.jboss.varia.property.SystemPropertiesService name=test:service=SystemProperties !-- Set propertuies using the properties file style. -- attribute name=Properties /attribute /mbean /server Create sample war which depends on this service, for example Code: test.war | WEB-INF | web.xml jboss-web.xml | META-INF where web.xml Code: web-app /web-app jboss-web.xml Code: jboss-web dependstest:service=SystemProperties/depends /jboss-web now both test-properties-service.xml and test.war placed in /deploy and deployed successfully. Now update test-properties-service.xml (edit-save, touch, etc) jboss will try to redeploy test.war with following result: Code: 13:22:33,483 DEBUG [MainDeployer] Undeploying file:/C:/Cluster/jboss-3.2.6/server/all/deploy/test-pr operties-service .xml 13:22:33,483 DEBUG [SARDeployer] undeploying document file:/C:/Cluster/jboss-3.2.6/server/all/deploy /test-properties -service.xml 13:22:33,499 DEBUG [SARDeployer] stopping mbean test:service=SystemProperties 13:22:33,499 DEBUG [ServiceController] stopping service: test:service=SystemProperties 13:22:33,514 DEBUG [ServiceController] stopping dependent services for: test:service=SystemPropertie s depende nt services are: [ObjectName: jboss.web.deployment:war=test.war,id=-1080743623 state: RUNNING I Depend On: test:service=SystemProperties Depends On Me: ] 13:22:33,530 DEBUG [ServiceController] stopping service: jboss.web.deployment:war=test.war,id=-10807 43623 13:22:33,530 DEBUG [ServiceController] stopping dependent services for: jboss.web.deployment:war=tes t.war,id=-1080743623 dependent services are: [] 13:22:33,546 DEBUG [WebModule] Stopping jboss.web.deployment:war=test.war,id=-1080743623 13:22:33,546 INFO [TomcatDeployer] undeploy, ctxPath=/test, warUrl=file:/C:/Cluster/jboss-3.2.6/ser ver/all/tmp/deploy/tm p45130test.war/ 13:22:33,577 DEBUG [Context] Stopping 13:22:33,577 DEBUG [Context] Stopping filters 13:22:33,577 DEBUG [Context] Stopping filter 'CommonHeadersFilter' 13:22:33,592 DEBUG [Context] Processing standard container shutdown 13:22:33,608 DEBUG [Context] Sending application stop events 13:22:33,624 DEBUG [Context] resetContext jboss.web:j2eeType=WebModule,name=//localhost/test,J2EEApp lication=none,J2EESer ver=none [EMAIL PROTECTED] 13:22:33,624 DEBUG [Context] Stopping complete 13:22:33,639 DEBUG [WebModule] Stopped jboss.web.deployment:war=test.war,id=-1080743623 13:22:33,639 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceController,type= org.jboss.system.ServiceMBean.stop,sequenceNumber=225,timeStamp=10993981536 39,message=null,userD ata=jboss.web.deployment:war=test.war,id=-1080743623] 13:22:33,655 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceController,type= org.jboss.system.ServiceMBean.stop,sequenceNumber=226,timeStamp=10993981536 55,message=null,userD ata=test:service=SystemProperties] 13:22:33,671 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source =jboss.system:service =ServiceDeployer,type=org.jboss.deployment.SubDeployer.stop,sequenceNumber=114,timeStamp=10993981536 71,message=null,userD [EMAIL PROTECTED] { url=file:/C:/Cluster/jboss-3.2.6/server/all/deplo y/test-propertie s-service.xml } deployer: