Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2126

Patch fixing a Nullpointer in dependency-triggered redeployment of WAR's

XMLWordPrintable

    • Icon: Patch Patch
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.0.3RC1
    • Deployers
    • None
    • Windows 2000, JDK 1.5.0_04

      I have a Web-Application with dependencies to a Datasource and want the WebApp
      to be redeployed when the *-ds.xml file is changed.

      So I injected the Dependencies in the jboss-web.xml:

      <jboss-web>
      <depends>jboss.jca:name=TranstoolDS,service=DataSourceBinding</depends>
      <depends>jboss.jca:name=TranstoolDS,service=LocalTxCM</depends>
      <depends>jboss.jca:name=TranstoolDS,service=ManagedConnectionFactory</depends>
      <depends>jboss.jca:name=TranstoolDS,service=ManagedConnectionPool</depends>
      </jboss-web>

      When i change the ds.xml-File Jboss tries to redeploy the war-file, but
      finishes with an exception (stacktrace is appended at the end):

      So i got to have a look to org/jboss/web/WebModule.java and found the lines 63-71

      63: public synchronized void startModule()
      64: throws DeploymentException
      65:

      { 66: // Get the war URL 67: URL warURL = di.localUrl != null ? di.localUrl : di.url; 68: WebApplication webApp = deployer.start(di); 69: di.context.put(AbstractWebContainer.WEB_APP, webApp); 70: container.addDeployedApp(warURL, webApp); 71: }

      this.di becomes null on destroy in the following piece of code (line 54-59)

      54: protected void destroyService()
      55:

      { 56: this.di = null; 57: this.container = null; 58: this.deployer = null; 59: }

      So i commented out the lines 56-58

      54: protected void destroyService()
      55:

      { 56:// this.di = null; 57:// this.container = null; 58:// this.deployer = null; 59: }

      and recompile JBoss 4.0.3 RC1. And now, it works like expected!

              Unassigned Unassigned
              mkelc Marian Kelc (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified