[jboss-jira] [JBoss JIRA] Created: (JBAS-5316) scanforMappings can't get URLs from BaseClassLoader

Shelly McGowan (JIRA) jira-events at lists.jboss.org
Sun Mar 16 22:38:51 EDT 2008


scanforMappings can't get URLs from BaseClassLoader
---------------------------------------------------

                 Key: JBAS-5316
                 URL: http://jira.jboss.com/jira/browse/JBAS-5316
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Shelly McGowan
         Assigned To: Ales Justin
             Fix For: JBossAS-5.0.0.CR1


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 at 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) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list