Commits

mrdon  committed e1ac547

Added forced loading of class to catch noclassdef errors, better logging

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1198e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 2577b98

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

                                 ctype = ClassLoaderUtil.loadClass(type, getClass());
                             }
                             if ("true".equals(onlyStatic)) {
+                                // Force loading of class to detect no class def found exceptions
+                                cimpl.getDeclaredClasses();
+                                
                                 containerBuilder.injectStatics(cimpl);
                             } else {
                                 if (containerBuilder.contains(ctype, name)) {
                                     throw new ConfigurationException("Bean type "+ctype+" with the name "+
                                             name+" has already been loaded by "+loc, child);
                                 }
+                                
+                                // Force loading of class to detect no class def found exceptions
+                                cimpl.getDeclaredConstructors();
+                                
+                                if (LOG.isDebugEnabled()) {
+                                    LOG.debug("Loaded type:"+type+" name:"+name+" impl:"+impl);
+                                }
                                 containerBuilder.factory(ctype, name, cimpl, scope);
                             }
                             loadedBeans.put(ctype.getName()+name, child);