1 Reply Latest reply on Jun 8, 2004 5:31 AM by marcma

    ServiceBindingManager/XSLTFileDelegate/tomcat50

    marcma Newbie

      Hi All.

      I am using jboss-3.2.4, Windows XP, java 1.4.2_03

      When trying to use the ServiceBindingManager with the simple-bindings.xml to change the ports for Tomcat 50 I get the following exception:

      [org.jboss.services.binding.XSLTFileDelegate] Error while transforming xml
      javax.xml.transform.TransformerException: java.net.MalformedURLException

      Just using simple-bindings.xml and jboss-service.xml under jbossweb-tomcat50.sar/META-INF (as is) does not do the trick at all. No exception, but no transformation / port binding either.

      The XSLTFileDelegate section for tomcat in the simple-bindings.xml goes for the attribute ConfigFile which does not exist in the jboss-service.xml under jbossweb-tomcat50.sar/META-INF. After adding this attribute and setting it to a propper value the ServiceBindingManager seems to get one step further in the whole process. But than the exception mentioned above occurs.

      Any Ideas? Help is appreciated.

      I used simple-bindings.xml as is in 3.2.4
      I used jboss-service.xml for tomcat 50 as is in 3.2.4 plus

       <attribute name="ConfigFile">${jboss.server.home.dir}/deploy/jbossweb-tomcat50.sar/META-INF/server.xml
       </attribute>
      

      I used the server.xml from tomcat 50 as ist but copied it to
      META-INF. Otherwise tomcat would use the server.xml without transformation. It should use ${jboss.server.home.dir}/tmp/serverxxx.xml after the transformation of the ServiceBindingManager.

      The complete Stacktrace:

      2004-06-08 10:08:25,683 DEBUG [org.jboss.services.binding.ServiceBindingManager] applyServiceConfig, server:localdevelflip;serviceName:jboss.web:service=WebServer
      2004-06-08 10:08:25,699 DEBUG [org.jboss.services.binding.XSLTFileDelegate] configName = ConfigFile
      2004-06-08 10:08:25,699 DEBUG [org.jboss.services.binding.XSLTFileDelegate] serviceName = jboss.web:service=WebServer
      2004-06-08 10:08:25,699 DEBUG [org.jboss.services.binding.XSLTFileDelegate] oldValue = C:\production\ejbcontainer\jboss\jboss-3.2.4\jboss-3.2.4\server\all/deploy/jbossweb-tomcat50.sar/META-INF/server.xml
      2004-06-08 10:08:25,699 DEBUG [org.jboss.services.binding.XSLTFileDelegate] targetFile: C:\production\ejbcontainer\jboss\jboss-3.2.4\jboss-3.2.4\server\all\tmp\server22149.xml
      2004-06-08 10:08:25,699 TRACE [org.jboss.services.binding.XSLTFileDelegate] XSL text:
       <xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      
       <xsl:output method="xml" />
       <xsl:param name="port"/>
      
       <xsl:variable name="portAJP" select="$port - 71"/>
       <xsl:variable name="portHttps" select="$port + 363"/>
      
       <xsl:template match="/">
       <xsl:apply-templates/>
       </xsl:template>
      
       <xsl:template match = "Connector">
       <Connector>
       <xsl:for-each select="@*">
       <xsl:choose>
       <xsl:when test="(name() = 'port' and . = '8080')">
       <xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'port' and . = '8009')">
       <xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'redirectPort')">
       <xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
       </xsl:when>
       <xsl:when test="(name() = 'port' and . = '8443')">
       <xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
       </xsl:when>
       <xsl:otherwise>
       <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
       </xsl:otherwise>
       </xsl:choose>
       </xsl:for-each>
       <xsl:apply-templates/>
       </Connector>
       </xsl:template>
      
       <xsl:template match="*|@*">
       <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>
       </xsl:copy>
       </xsl:template>
       </xsl:stylesheet>
      
      2004-06-08 10:08:25,886 ERROR [org.jboss.services.binding.XSLTFileDelegate] Error while transforming xml
      javax.xml.transform.TransformerException: java.net.MalformedURLException
       at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:741)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
       at org.jboss.services.binding.XSLTFileDelegate.applyConfig(XSLTFileDelegate.java:127)
       at org.jboss.services.binding.ServiceBindingManager.applyServiceConfig(ServiceBindingManager.java:174)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:427)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:160)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
       at org.jboss.system.ServiceController.install(ServiceController.java:198)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:367)
       at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
       at org.jboss.Main.boot(Main.java:144)
       at org.jboss.Main$1.run(Main.java:389)
       at java.lang.Thread.run(Thread.java:534)
      Caused by: java.net.MalformedURLException
       at java.net.URL.<init>(URL.java:571)
       at java.net.URL.<init>(URL.java:434)
       at java.net.URL.<init>(URL.java:383)
       at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
       at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:495)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:658)
       ... 96 more
      ---------
      java.net.MalformedURLException
       at java.net.URL.<init>(URL.java:571)
       at java.net.URL.<init>(URL.java:434)
       at java.net.URL.<init>(URL.java:383)
       at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
       at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:495)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:658)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
       at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
       at org.jboss.services.binding.XSLTFileDelegate.applyConfig(XSLTFileDelegate.java:127)
       at org.jboss.services.binding.ServiceBindingManager.applyServiceConfig(ServiceBindingManager.java:174)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:427)
       at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:160)
       at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
       at org.jboss.system.ServiceController.install(ServiceController.java:198)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.install(Unknown Source)
       at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:367)
       at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
       at org.jboss.Main.boot(Main.java:144)
       at org.jboss.Main$1.run(Main.java:389)
       at java.lang.Thread.run(Thread.java:534)
      




        • 1. Re: ServiceBindingManager/XSLTFileDelegate/tomcat50
          marcma Newbie

          Hi.

          Ok, sorry, my mistake.

          The default settings shipped with jboss-3.2.4
          do the trick.

          But why the exception when adding the attribute ConfigFile to
          the jboss-service.xml. Isn't this attribute supposed to point out
          a location of a config file that ought to be parsed and transformed?

          I have tried almost all possibilities of the URL syntax.
          Not a single one did it.

          What do you expect as the value of the attribute ConfigFile?
          The XSLTFileDelegate seems to be rather new so I could not find any docs
          relating to it.

          Cheers
          Marc