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

scanforMappings can't get URLs from BaseClassLoader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • JBossAS-5.0.0.CR1
    • None
    • Deployers
    • None

      scanforMappings() method in trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java was changed around Beta3 to handle .hbm.xml files from ClassLoader URLs (JBAS-4242). The hibernate integration tests noted in that JIRA are failing to deploy in the latest trunk as the URLs can't be determined from the classloader which is a BaseClassLoader.

      URL[] urls;
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      if ( cl instanceof RepositoryClassLoader )

      { urls = ( ( RepositoryClassLoader ) cl ).getClasspath(); }

      else if ( cl instanceof URLClassLoader )

      { urls = ( ( URLClassLoader ) cl ).getURLs(); }

      else

      { throw new DeploymentException( "Unable to determine urls from classloader [" + cl + "]" ); }

      ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/NotBackedUp/smcgowan/TRUNK/trunk/testsuite/output/lib/hib-test.ear state=PostClassLoader mode=Manual requiredState=Real
      org.jboss.deployment.DeploymentException: Unable to determine urls from classloader [BaseClassLoader@1f6fa3f

      {vfsfile:/NotBackedUp/smcgowan/TRUNK/trunk/testsuite/output/lib/hib-test.ear}

      ]
      at org.jboss.hibernate.jmx.Hibernate.scanForMappings(Hibernate.java:272)
      at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:114)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:299)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

            ajustin@redhat.com Ales Justin
            smcgowan@redhat.com Shelly McGowan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: