-
Aug 31st, 2010, 06:33 PM
#1
Redeploying a Grails app
Hi there,
I have been trying to use the "Redeploy" functionality and I am having problems. The problem is that after I upload the new war file and redeploy my app, I get the following exception: "java.lang.IllegalArgumentException: object is not an instance of declaring class" when I go to the URL -- the application starts fine.. it's when I try and hit the web site...
According to the official Grails FAQs:
Q: When deploying to my hosting ISP Tomcat, I'm getting an error along the lines of "org.springframework.beans.factory.BeanCreationExc eption" or "org.hibernate.PropertyAccessException: IllegalArgumentException", originally caused by an "java.lang.IllegalArgumentException: object is not an instance of declaring class".
This is caused by a difference in timestamps between files inside your war file and your Tomcat server, and is triggered by timezone differences. After deploying the war, a simple:
cd webapps find mygrailsappli -exec touch {} ;
and restarting Tomcat will solve the problem. If you can't access the host via a login shell of some sort, then you'll probably need to change the timestamps on your WAR file to match your server before deploying it.
So after redeploying my app, I attempt to run touch {} ; on the exploded war directory in webapps and restart the tcServer... this does not work. Also, I attempted to change the timestamps of my war file before uploading it to Cloud Foundry from MST to EDT (matching the EC2 instance's time zone)... and this does not work.
What does work: Delete the exploded war directory in webapps after Redeploying the app and then restarting the tcServer service...
Has anyone came across this or found a better solution...???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules