- This topic has 11 replies, 3 voices, and was last updated 20 years, 10 months ago by
Riyad Kalla.
-
AuthorPosts
-
I am using MyEclipse 3.8 on Eclipse 3.0RC1.
I can deploy a web app succesfully the first time on to my WebLogic 7 server, but when I try to redeploy the application I get the following message everytime:
“Deployment is out of date due to changes in the underlying project contents. You’ll need to manually ‘Redeploy’ the project to update the deployed archive”
Has anyone come across this issue? Not sure why it is a problem since the server is started in development mode and after the app is packaged it just has to be copied out to the apps directory in weblogic and the server will automatically redeploy the app. Does MyEclipse do something different or am I misunderstanding? I really don’t want to have to shut down the server and restart everytime I need to make a deployment.
Thanks,
Gordon
Riyad KallaMemberGordon,
Correct me if I’m wrong but:-
1) You are using package deployment
2) You get this popup when you click the “Redeploy” button from the deployment tool?…it just has to be copied out to the apps directory in weblogic and the server will automatically redeploy the app.
When you hit Redeploy, ignoring the error message that pops up, if you watch your console window, do you see output from WebLogic redeploying the application? Or does it not do anything with it and you HAVE to restart the server in order for your changes to take?
I ask because sometimes we get feedback from the app server that isn’t entirely correct, and it will actually continue to function just fine if you ignore warnings (in this case I’m referring to ‘out of sync’ errors from the debugging of applications).
Riyad,
Yes on both (1) & (2).
The message appears in the Deployment Status window and there is a window that flashes open and closes rapidly so I don’t get a chance to read that, but the server does not do anything with it. It doesn’t even copy the new package out to the applications directory on Weblogic. This works fine for a new deployment.
My colleague can get this to work without any problems, the only difference between his machine and mine is that he is using XP Pro. and I am using Win2000 Pro. Could this be a problem?
Thanks,
Gordon
Riyad KallaMember…he is using XP Pro. and I am using Win2000 Pro. Could this be a problem?
It could be, but I don’t think its likely (unless there is some other side effect that is occuring due to the diff in OSs)
and there is a window that flashes open and closes rapidly so I don’t get a chance to read that,
This is indicative of the deployment failing immediately.
but the server does not do anything with it. It doesn’t even copy the new package out to the applications directory on Weblogic.
Correct, the deployment is totally failing.
The problem sounds exactly like a locked file. The deployment tool is not able to delete the old JAR and copy the new one in because WebLogic has an open file handle against it (maybe it opened up a stream to it when it unzipped it originally and didn’t close it). Anyway its not releasing the file, so the deployment tool cannot deploy a new copy. This *might* be the difference you and your coworker are seeing betweek 2k and XP Pro. However, file locks will usually time out after a while as well, so its possible that he could be developing/deploying every 30mins and not see anything while you may developing/deploying much more often.
As far as the file locking issue goes, there is nothing we can do to avoid it, we tried to make the deployment tool more informative and helpful instead of just failing silently like it did in the past, but the rest is up to the app server.
Is it possible to change the deployment strategy of applications to WebLogic by using the WebLogic.admin tool to deploy apps, I have used this through ANT succesfully without this problem? If this is not possible I will revert to using Ant to build and deploy my applications to Webogic.
Gordon
Scott AndersonParticipantGordon,
Can you check your log file at <workspace>/.metadata/.log and see if there are any entries that look suspicious?
Scott,
I don’t see any .log file, there is a .lock file which is 0 bytes.
As a work around, I can get the app to redeploy if I first open up the WebLogic console and undeploy the app and then click redeploy through eclipse, then I have to hit deploy in the console to make it work. It does look like WebLogic holds on to the file once it is deployed, but it doesn’t appear to do this in XP, seems kind of strange.
Gordon
Scott AndersonParticipantGordon,
I was suspecting some sort of file locking issue was the culprit. Have you thought about changing your deployment type to exploded? That way it will always stay in sync and it should avoid any locking issues. By the way, in my experience the locks seem to time out after a minute or so, but I know that can be irritating. Unfortunately, there’s nothing we can really do if a server locks files. I think you’ll find that exploded deployment is really much more convenient. Then, when you want to force WebLogic to do a full reload of your applications, simply touch a file called WEB-INF/REDEPLOY in your WEB-INF directory.
Scott,
Deploying as exploded works perfectly, thanks for the suggestion. Is there an option to build the application as a package but don’t deploy, so that it can be deployed on to a production server? If not I guess I can delete the exploded version and build a packaged version.
Thanks,
Gordon
Riyad KallaMemberIf not I guess I can delete the exploded version and build a packaged version.
Yep, this is the way to do it currently. We don’t allow multiple deployments per project yet.
I have just discovered why I wasn’t able to redeploy using a packaged archive.
If you already previously have the application deployed through the WebLogic console and then deploy the application using Eclipse and then try to redeploy it won’t work, it will complain as I have mentioned previously. But if you make sure the deployment is not currently deployed in WebLogic and deploy initially using Eclipse then Eclipse never complains about redeploying and it works perfectly.
I can’t exlpain why deploying through the console would have such an effect, other than it is having file lock issues.
I guess this solves my issue. Thanks Scott and Riyad for you help.
Gordon
Riyad KallaMemberGlad its working, and also thank you for the followup. This thread will serve to help someone else on WebLogic I’m sure.
-
AuthorPosts