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

Canonical paths enforced inconsistently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • No Release
    • JBossAS-4.0.4.GA
    • Deployers
    • None
    • Linux/Unix

    • Compatibility/Configuration
    • Workaround Exists
    • Hide

      At least, avoid JBAS deployments with symlinks between $JBOSS_HOME and $JBOSS_HOME/server/$CONFIG/tmp.
      Avoid symlinks in general?

      Show
      At least, avoid JBAS deployments with symlinks between $JBOSS_HOME and $JBOSS_HOME/server/$CONFIG/tmp. Avoid symlinks in general?

      DeploymentInfo objects are created with file-URLs without previously canonicalizing the file's path.
      If the original URL wasn't canonical (e.g. with Linux/Unix symlinks involved), this discrepancy leads to failure of at least EjbUtil's resolution of ejb-link:
      The URL to be searched for among DeploymentInfos by the MBeanServer is constructed from the canonicalized path, but the DeploymentInfo which should be found has a
      non canonical file URL (i.e. without symlinks resolved).
      I have been able to provisionally solve this issue by patching EjbUtil to not invoke
      target = Strings.toURL(ourPath);
      (which directly or indirectly calls getCanonicalPath()) but a particular code fragment instead.
      This kind of solution surely isn't the right one. IMO, as the DeploymentInfo.url field is used as a key to the DeploymentInfo collections, this key should be always unique, i.e. canonicalized.
      My suggestion would be to change any DeploymentInfo instantiation AND any search for DeploymentInfo instances to use canonicalized file URLs.

        1. JBAS-3433-Case1.txt
          40 kB
        2. JBAS-3433-Case2.txt
          77 kB
        3. JBAS-3433-Case3.txt
          41 kB
        4. JBAS-3433-Case4.txt
          33 kB
        5. jboss4-4.0.4-ServerConfigImpl.patch
          7 kB

              dandread1@redhat.com Dimitrios Andreadis
              rapelh_jira Ralph Apel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: