-
1. Re: Package name conflicting with class name
wdfink Jun 20, 2012 3:54 PM (in response to lukascz)I'm not sure, but if you use Windows it might be an issue that the filesystem does not respect uppercase.
-
2. Re: Package name conflicting with class name
lukascz Jun 20, 2012 5:00 PM (in response to wdfink)I'm using MAC
-
3. Re: Package name conflicting with class name
kdolan1 Jun 25, 2012 12:33 PM (in response to lukascz)See also https://community.jboss.org/message/743677#743677. To that post, I attached a small sample app that demonstrates the issue.
-
4. Re: Package name conflicting with class name
syau Sep 23, 2012 10:52 PM (in response to lukascz)Lukas,
Did you find a fix for your problem? I'm getting the same in JSP - The import .... cannot be resolved error. I too have a package and class with same name and looks
like JBoss 7.1.1 couldn't import the correct file.
-
5. Re: Package name conflicting with class name
nickarls Sep 24, 2012 1:34 AM (in response to syau)I don't think it's an universal bug. JBVFS-170 appears closed (and included in 7.1.1.Final) and I just tried the same scenario (7.1.1.Final + Win + Java7) and had no problem deploying a WAR with a package name matching the name of a class...
-
6. Re: Package name conflicting with class name
syau Sep 24, 2012 6:50 PM (in response to nickarls)Nicklas,
I created a simple web app and recreated that problem. I have attached that web application.
Environment:
OS: Windows7 64 bit
JRE: Java 1.6.0_34 64 bit
JBoss: 7.1.1.Final - Standalone
-
webApp.war 2.6 KB
-
-
7. Re: Package name conflicting with class name
lukascz Sep 24, 2012 6:52 PM (in response to syau)I just renamed the package...
-
8. Re: Package name conflicting with class name
nickarls Sep 25, 2012 2:11 AM (in response to syau)Ah yes, it deployed fine but I got the error when accessing the context root (thus triggering the compile)
-
9. Re: Package name conflicting with class name
syau Sep 25, 2012 6:31 AM (in response to nickarls)Can you please be more specific?
'.. I got the error when accessing the context root ..', are you saying when you accessed,
http://localhost:8080/webApp/ - you got the compilation error, later when you accessed,
http://localhost:8080/webApp/index.jsp , it was OK. For information, I still get that error.
-
10. Re: Package name conflicting with class name
nickarls Sep 25, 2012 7:02 AM (in response to syau)Only tried the context root, I assumed if it didn't compile it was never going to be available.
-
11. Re: Package name conflicting with class name
sfcoy Sep 25, 2012 7:13 AM (in response to lukascz)Both Windows and MacOS use case-insensitive/case-preserving based file systems.
It is not possible to have two objects in a directory whose names differ only by character case on these operating systems.
-
12. Re: Package name conflicting with class name
syau Sep 26, 2012 1:00 AM (in response to sfcoy)This is how its available in the current windows environment (folder - package & file - class with same name) in Production and it works fine in Weblogic. What would be the best solution in
JBoss to fix this? Issue JBVFS-170 says '...When using JSP a class name Toto.class may hide a package toto. In AS5/6 it is fixed using -Djboss.vfs.forceCaseSensitive=true ... ' .
I tried adding -Djboss.vfs.forceCaseSensitive=true in the standalone.bat, but doesn't seem to work.
-
13. Re: Package name conflicting with class name
sfcoy Sep 26, 2012 3:05 AM (in response to syau)I don't think it has anything to do with VFS.
If you deploy your example as an exploded WAR you get the same problem, and I don't think VFS is involved in this case (standalone/tmp/vfs is not touched at all).
Seems like a jasper problem (aka Apache Tomcat).
It works on WebLogic because it does not use Tomcat as far as I know.
We should be able to test it by cranking up a Tomcat distribution and testing your example in it...
-
14. Re: Package name conflicting with class name
sfcoy Sep 26, 2012 3:44 AM (in response to sfcoy)Hmm.
Works fine in Tomcat 5.5.4 which I happened to have lying around.
Also works fine in Tomcat 7.0.30.
JBoss 7.1.1 appears to be using 7.0.3, but I suspect that theory has been blown out of the water.