KnownUnknown
2014-05-22 22:00:42 UTC
I Refactor/Renamed domain classes and everything ran smoothly in the IDE
(with Tomcat plugin) before, during and after the task. But when I deployed
a WAR on local Tomcat, the app crashed.
Error: "grails Invocation of init method failed; nested exception is
java.lang.NoClassDefFoundError:com.<app>.<renamed_class>." This error
repeated with slashes instead of periods in the class name. (Again, the app
ran smoothly in the IDE).
Analysis (guesses): I ran "clean-all" and refreshed dependencies several
times. I also deleted Tomcat's temp and work folders and bounced the server.
All to no avail. I racked the internet's brain with countless searches...
and struck out. I finally stumbled across a list of class definitions in the
target path. It contained the old domain class names in a /classes/com/<app>
tree structure. Surely I had found the holy grail (bad pun intended) for
this particular problem!
Solution: I wiped out the .grails folder and refreshed dependencies again.
Now the domain classes in the target path are all correct. Interestingly,
the tree structure of that target path is now different. I suspect this is
because I recently installed an IDE upgrade(?) Ear-regardless, a deployed
WAR now brings me joy.
Questions: Was the stale class list in the target path a result of oversight
on my part? I used the "refactor / rename" command to perform the domain
class name changes, and clicked all boxes for the changes recommended by the
IDE. What else should I have done? Conversely, was the problem a result of
something other than oversight? i.e., should the refactor tool have renamed
the classes in the target path when it made other changes? Failing that,
should a "refresh dependencies" have updated the classes in the target path,
too?
Specs: The recent IDE upgrade now has me on v3.5.1.RELEASE, BuildID
201405030657. Grails is 2.2.4 and standalone Tomcat is 7.0.52. Don't know
if the IDE uses my Tomcat or the v6.0.37 or v7.0.42 in the GRAILS_HOME path.
--
View this message in context: http://grails.1312388.n4.nabble.com/After-domain-refactoring-java-lang-NoClassDefFoundError-on-local-Tomcat-tp4657001.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
(with Tomcat plugin) before, during and after the task. But when I deployed
a WAR on local Tomcat, the app crashed.
Error: "grails Invocation of init method failed; nested exception is
java.lang.NoClassDefFoundError:com.<app>.<renamed_class>." This error
repeated with slashes instead of periods in the class name. (Again, the app
ran smoothly in the IDE).
Analysis (guesses): I ran "clean-all" and refreshed dependencies several
times. I also deleted Tomcat's temp and work folders and bounced the server.
All to no avail. I racked the internet's brain with countless searches...
and struck out. I finally stumbled across a list of class definitions in the
target path. It contained the old domain class names in a /classes/com/<app>
tree structure. Surely I had found the holy grail (bad pun intended) for
this particular problem!
Solution: I wiped out the .grails folder and refreshed dependencies again.
Now the domain classes in the target path are all correct. Interestingly,
the tree structure of that target path is now different. I suspect this is
because I recently installed an IDE upgrade(?) Ear-regardless, a deployed
WAR now brings me joy.
Questions: Was the stale class list in the target path a result of oversight
on my part? I used the "refactor / rename" command to perform the domain
class name changes, and clicked all boxes for the changes recommended by the
IDE. What else should I have done? Conversely, was the problem a result of
something other than oversight? i.e., should the refactor tool have renamed
the classes in the target path when it made other changes? Failing that,
should a "refresh dependencies" have updated the classes in the target path,
too?
Specs: The recent IDE upgrade now has me on v3.5.1.RELEASE, BuildID
201405030657. Grails is 2.2.4 and standalone Tomcat is 7.0.52. Don't know
if the IDE uses my Tomcat or the v6.0.37 or v7.0.42 in the GRAILS_HOME path.
--
View this message in context: http://grails.1312388.n4.nabble.com/After-domain-refactoring-java-lang-NoClassDefFoundError-on-local-Tomcat-tp4657001.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email