facebook

websphere 5.1 remote deployment using MyEclipse

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #265377 Reply

    shirodkar4
    Member

    i am trying remote deployment on Websphere 5.1 server using Myeclipse 5.1.0 plugin.

    as informed earlier in the forum topic which i had posted by the same name i have created a network share of the remote websphere AppServer directory on the remote machine using samba tools.

    i configured the websphere connector in MyEclipse with the AppServer directory of websphere on the remote machine.
    I deployed a EAR on the remote machine websphere using MyEclipse deployment window.

    i then installed the ear from the admin console from the remote server.
    i started the application and it just worked fine.

    now i made some changes in the jsp (like adding text to the jsp).

    now when i tried to redeploy the ear using the MyEclipse deployment window it gives me an error.

    here is what the error looks like.
    —————————————————-

    DeployTestEAR could not be redeployed because it could not be completely removed from the the undeployment phase. the most common cause of the problem is attempting to redeploy while the server is running which has locked one or more files

    to correct the deployment you will need to stop the server and then redeploy the project before restarting the server.

    ——————————————————

    i don’t get this error when i follow the same procedure using MyEclipse websphere connector configured for my local machine c:\\programfiles\websphere\appserver
    folder .

    it is not possible(feasible) to stop and restart the remote server each time a change is made ( actually i am not allowed to stop the server as there are others using the server at the same time)

    please do help me.

    [/url]

    #265428 Reply

    Riyad Kalla
    Member

    You shouldn’t actually need to stop and restart the server if you use an exploded deployment, as soon as you save the file, the new file is deployed out to the deployment location by MyEclipse for you, so you should be able to hit Refresh and see the changes if you have WebSphere setup to notice changes.

    #265440 Reply

    shirodkar4
    Member

    i have used the exploded mode for deployment. but the .ear folder seems to be locked once the application is deployed and started on websphere and my eclipse simply dosent take changes done after deployment and throws the error i pasted above in my previous post.

    can you clarify what exactly you mean by refreshing.? is it the refreshing done in MyEclipse. and what do you mean by having websphere setup(actually the setup(installation) is already on the network share).

    #265461 Reply

    Riyad Kalla
    Member

    i have used the exploded mode for deployment. but the .ear folder seems to be locked once the application is deployed and started on websphere and my eclipse simply dosent take changes done after deployment and throws the error i pasted above in my previous post.

    That error only occurs when you try and force a redeployment. What I was saying is that if you use an exploded deployment, your changes are automatically and immediately placed on the server as soon as you save the file. There is no need to open back up the deployment dialog and hit “Redeploy”.

    #265506 Reply

    shirodkar4
    Member

    if i make changes in the jsp and save them as predicted by you the jsp file should be automatically redeployed once i save the changes.
    but this dosen’t seem to happen as the changes don’t show up when i run the application on websphere 9080 port.

    i really appreciate the prompt and quick replies i get in this forum.
    thanks everyone.

    and i am eagerly looking forward to help.

    #265519 Reply

    Riyad Kalla
    Member

    if i make changes in the jsp and save them as predicted by you the jsp file should be automatically redeployed once i save the changes.
    but this dosen’t seem to happen as the changes don’t show up when i run the application on websphere 9080 port.

    Hmm, ok well after you make a change to a file (for example, type some text in like “THIS IS A TEST” then save it) try and go out to the deployed location of the file, under your WebSphere install, and find the JSP in there. Then open it in a normal text editor, like Notepad, do you see your text? (“THIS IS A TEST”). If you do, then the problem is we need to configure WebSphere to recognize the changes and recompile the JSP pages.

    #265524 Reply

    shirodkar4
    Member

    as mentioned i made changes to jsp(i.e. added text to jsp) i then saved the changes in my eclipse . i then went to the deployment location and checked the jsp file in the text editor. the changes which i made ( i.e. the text which i added to the jsp) was not updated there at the deployment location

    what can be the problem?

    please help.

    #265530 Reply

    Riyad Kalla
    Member

    Oh I see, thank you for checking that for me.

    Can you send me a screenshot of your deployment window and can you check your log file (<workspace dir>\.metadata\.log) near the end and see if there are any exceptions during the deployment steps that might explain why it’s failing?

    #265613 Reply

    shirodkar4
    Member

    here is the .log file output in .metadata folder.

    —————————————————————————————————————-

    !ENTRY com.genuitec.eclipse.ast.deploy.core 1 0 2007-02-05 10:54:46.719
    !MESSAGE Error updating deployed resource L/DeployTest/WebRoot/index.jsp
    !STACK 0
    java.io.FileNotFoundException: \\appserver\installedApps\einstein\DeployTestEAR.ear\DeployTest.war\index.jsp (Access is denied)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.commons.io.FileUtils.doCopyFile(FileUtils.java:562)
    at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:544)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.copyFile(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.copyFileToDirectory(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.copyFileToDirectory(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.Deployment.resourceChanged(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.ProjectDeltaVisitor.visit(Unknown Source)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:55)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.webProjectBuildDelta(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.webProjectBuildDelta(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.buildDelta(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.build(Unknown Source)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

    ————————————————————————————————————————

    looks like the file is not getting updated.

    please help.

    [/img]

    #265617 Reply

    Riyad Kalla
    Member

    Odd… it’s possible that WebSphere locks the files it has compiled and therefore the deployment cannot success. When it says access is denied, is there the potential of any permissions being the problem? For example, where your workspace lives or where the project is being deployed to?

    Otherwise I would say it’s a read-lock on the resource. One way to test this is to stop the app server, then do a Redeploy and if it works, then the problem is a read-lock. If that doesn’t work either, then it’s possible your install or deployment locations have issues with certai permissions?

    The reason it could be permissions it because it looks like you are deploying to a networks share.

    #265643 Reply

    shirodkar4
    Member

    there are no problems with the permissions to access the network share folder(\\apserver). I have full access to the folder and this is proved by the fact that i can deploy applications to the \\Appserver\installedApps\einstien directory before installing them through admin console.

    i think you are right when you say that websphere engages a read lock on the deployed folder once the application.

    as you predicted i can make changes to the deployed application once the remote server is restarted. this means the problem is with the read-lock engaged by websphere.

    how do i handle this problem of read-lock?

    at the same time let me tell that it is not possible for us to restart the server for every single application we deploy since there are many users running many applications at the same time on the same server.

    please help.

    #265660 Reply

    Riyad Kalla
    Member

    It’s hard to say… some servers (like Tomcat) offer settings to purposefully avoid read-locks on JARs and other resources. You might check your server and see if you can set it to run in “Development mode” or something similar that might be more liberal with the read-locks.

    #265695 Reply

    shirodkar4
    Member

    i appreciate all the prompt and very very helpful replies i get here.

    can you please give some more detailed information on how do i configure my Websphere server for development mode(so as to handle read locks).

    #265726 Reply

    Riyad Kalla
    Member

    No I’m sorry, I would provide that information if I had it, but I just don’t know enough about Websphere in order to answer that question effectively.

    Sorry

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: websphere 5.1 remote deployment using MyEclipse

You must be logged in to post in the forum log in