[ https://issues.apache.org/jira/browse/WICKET-3907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065979#comment-13065979 ]
Adriano dos Santos Fernandes edited comment on WICKET-3907 at 7/15/11 2:49 PM: ------------------------------------------------------------------------------- IMHO the warning is at wrong place. After it, things goes well as in previous versions. So I believe this warning shouldn't be logged. BTW, if I try to access /test/nonExistingClass, and even if there is no resource mounted, it logs an warning. I think it just need to return a HTTP 404. was (Author: asfernandes): IMHO the warning is at wrong place. After it, things goes well as in previous versions. So I believe this warning shouldn't be logged. BTW, if I try to access /test/nonExistingClass, and even if there is no resource mounter, it logs an warning. I thing it just need to return a HTTP 404. > Mounted resources sharing a parent URL with mounted pages makes wicket log > warnings for valid resources > ------------------------------------------------------------------------------------------------------- > > Key: WICKET-3907 > URL: https://issues.apache.org/jira/browse/WICKET-3907 > Project: Wicket > Issue Type: Bug > Components: wicket-core > Affects Versions: 1.5-RC5.1 > Reporter: Adriano dos Santos Fernandes > > Say you mount a resource (ResourceMapper) in /test/nonClassName and mount a > package (MountMapper) in /test. > When you try to access /test/nonClassName, wicket tries the MountMapper (as > its compatibility score is higher) and tries to load the class nonClassName. > Here are the relevant code paths: > AbstractClassResolver: > // synchronize on the only class member to load only one class at a time and > // prevent LinkageError. See above for more info > synchronized (classes) > { > clazz = Class.forName(className, false, getClassLoader()); > if (clazz == null) > { > throw new ClassNotFoundException(className); > } > } > classes.put(className, new WeakReference<Class<?>>(clazz)); > WicketObjects: > public static <T> Class<T> resolveClass(final String className) > { > Class<T> resolved = null; > try > { > if (Application.exists()) > { > resolved = (Class<T>)Application.get() > .getApplicationSettings() > .getClassResolver() > .resolveClass(className); > } > if (resolved == null) > { > resolved = (Class<T>)Class.forName(className, false, > Thread.currentThread() > .getContextClassLoader()); > } > } > catch (ClassNotFoundException cnfx) > { > log.warn("Could not resolve class [" + className + "]", cnfx); > } > return resolved; > } > ResourceMapper: > public int getCompatibilityScore(Request request) > { > return 0; // pages always have priority over resources > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira