Re: Could this cause a ClassNotFoundException?
laredotornado wrote:
Hi,
Currently I'm deploying a WAR file (to WebLogic 9) and I'm
encountering a ClassNotFoundException --
java.lang.ClassNotFoundException:
com.comcast.npsconfig.jsf.controllers.LoginSuccessServlet. However, I
have this class in the directory
WEB-INF/classes/com/comcast/npsconfig/jsf/controllers/
LoginSuccessServlet.class
One assumes that that directory is within the WAR, yes?
In a separate jar file within my WEB-INF/lib directory, I have classes
Also within the WAR, yes?
that are in the "com/comcast/npsconfig" namespace, even though there
is no "jsf" folder within there.
Namespaces, or more precisely, package names in Java do not use '/' notation
but '.' notation. There are no folders in namespaces.
Could this namespace collision explain why the ClassNotFoundException
is occurring?
There is no namespace collision there, so no.
Unless a JAR is sealed, one can assemble package elements from many different
parts of the classpath without conflict. However, in your case you don't even
have the same package in two places - one has
'com.comcast.npsconfig.jsf.controllers' and the other has
'com.comcast.npsconfig', a completely different package.
--
Lew