3 Replies Latest reply on Mar 5, 2002 1:10 PM by Adrian Brock

    ClassPathExtension problem: MalformedObjectNameException

    Thomas Schwob Newbie

      Hi everybody,

      I added an extension to my classpath which is an existing directory containing JAR files.

      On startup of JBoss I get always as MalformedObjectNameException for the defined directory name.

      I configured the following way:





      When defining the directory as a relative path to the jboss.conf (this works as JBoss is installed on the same partition/drive) as "../../../MyCompany/projects/lib/" then everything works fine.

      Anybody has an ideay why I get the exception? A similar fully-qualified directory entry for Tomcat integration ("file:/D/tomcat/lib") works correctly reading all Jar files contained in there.

      In the end my application is not installed on the same drive as JBoss so I need a full-qualified path.

      Any help much appreciated.

      Regards,
      Thomas Schwob

        • 1. Re: ClassPathExtension problem: MalformedObjectNameException
          Adrian Brock Master

          I think it is because the ClassPathExtension MBean
          adds the url to the MBean's ObjectName.

          ObjectNames in JMX are not allowed to contain a ":"
          except to specify the domain. Looks like you'll
          have to use the relative path.

          The Tomcat classpath extensions are not exposed for
          management in JMX.

          With the JBoss approach, you can add new classpath
          elements at runtime using a JMX adaptor such as the one
          at http://localhost:8082

          NOTE: There is no support for removing elements of the
          classpath at unregistration. You'll have to wait for
          3.0 and a better method.

          Regards,
          Adrian

          • 2. Re: ClassPathExtension problem: MalformedObjectNameException
            Thomas Schwob Newbie

            Then why does the Tomcat ClassPathExtension in my jboss.conf






            work? This entry I have modified from the downloaded JBoss-2.4.4_Tomcat-3.2.3.zip where it originally had a relative path and it works.

            Even if your answer would be right, I would have to conclude, that it is not possible under Windows to have JBoss installed on one drive (actually all my runtime software shares one partition) and having the data on another drive - which frankly is a complete absurd restriction regarding partitioning of my OS.

            Working with relative pathes under Unix this would not be a problem, but how to change to another drive on a Windows OS without using ':' in the path?

            Cheers,
            Thomas

            • 3. Re: ClassPathExtension problem: MalformedObjectNameException
              Adrian Brock Master

              Apologies I didn't read your question very well :-(

              You are correct. That will teach me to reply from
              memory :-)

              The ClassPathExtension MBean has two constructors.
              [pre]
              // Constructors --------------------------------------------------
              public ClassPathExtension(String url)
              {
              this(url, url);
              }

              public ClassPathExtension(String url, String name)
              {
              this.name = name;
              this.url = url;
              }
              [/pre]
              The second form allows you to create an alias for the
              url to avoid the ":" problem.
              In your example "Tomcat" is added to the ObjectName
              instead of the url.

              Regards,
              Adrian