facebook

Redeployment failure with JBoss 4 [Closed]

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

    robinsingh
    Member

    ENVIRONMENT DETAILS:
    I have configured myEclipse with jboss 4.0 RC2
    on windows XP professional(SP2) using Java[TM] 2 Platform,
    Eclipse Platform
    Version: 3.0.0
    Build id: 200406251208
    jdk version(build 1.4.2_05-b04)
    myEclipse 3.8.2 GA

    Whenever i try to re-deploy/undeploy an already deployed Enterprise application earModule.ear(earModuleWeb.war and earmoduleEJB.jar)
    the following error MessageDialog shows up in the myEclipse deployment tool.
    Even when i try to remove the deployement same message appears.

    
     UnDeployment failure on Jboss4.
    File e:\jboss4\server\default\deploy\earmodule.ear\earmoduleWeb.war\WEB-**** 
    
    (i dont waht these stars stand for as i cannt re-size the Dialog box)   
    
    unable to be deleted.If a file is locked , you can wait until the lock times out to redeploy,
    or stop the server and redeploy,or manually remove the deployment at 
    E:\jboss4\server\default\deploy\earmodule.ear
    ******************************************************
    jboss Console output::
    ******************************
    18:22:29,118 ERROR [MainDeployer] Could not initialise deployment: file:/E:/jboss4/server/default/deploy/earmodule.ear/
    org.jboss.deployment.DeploymentException: No META-INF/application.xml found
            at org.jboss.deployment.EARDeployer.init(EARDeployer.java:119)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:799)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:736)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
            at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:236)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
            at $Proxy8.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:20
    4)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
    
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
    ************************
    

    everytime it happens , i end up shutting down the server, deleting the earmodule.ear from windows explorer and
    then restarting the jboss server. Then i can remove the deployed earmodule.ear from
    myEclipseIDE deploytool , and re deploy the earmodule.ear without any problem.
    But this extra time overhead coz of everytime having to re-start the jboss server..is really bothering
    me.
    kindly help.
    regards
    robin

    #218596 Reply

    Riyad Kalla
    Member

    Robin,
    The reason you are running into this problem is actually in this exception trace you gave… Windows has a file-locking mechanism based on many-readers single-writer, meaning that many processes can read a file at the same time, but only one can lock it for writing. When your application server (JBoss) reads your application, expands the EAR and loads up the JAR files for class resolution, it has “read locks” on the files… then when MyEclipse goes in and effectively attempts to delete all those files and write out new ones, the operation fails because the files are locked by a reader (JBoss). We try and work around this in MYEclipse by providing exploded deployment, where your entire app is copied out into the app serverer file by file, so when a single file changes, only that new file is copied out and your chances of running into write-locks are next to none. Although I don’t know if we support exploded deployments with EARs, let me check.

    #218609 Reply

    Riyad Kalla
    Member

    Yep we support exploded deployment with EARS, so you should be all set to use that, instead of keeping undeploying/redeploying your app.

    #218627 Reply

    robinsingh
    Member

    hi Riyad
    I am sorry I didnt get you on that..

    Yep we support exploded deployment with EARS, so you should be all set to use that, instead of keeping undeploying/redeploying your app.

    I still am gettting the same problem ..how does just talking to you and getting this reply ..all set me up for the exploded deployment-without having to undeploy/redeploy by app.server shutdown/startups.

    do i need to install something ..or what ?

    please help.
    robin

    #218629 Reply

    Riyad Kalla
    Member

    Robin,
    First read this section of our web quickstart: http://www.myeclipseide.com/images/tutorials/quickstarts/webprojects/#deploy_web_project, it will explain exploded deployment to you and how to use it. Then go ahead and shut down JBoss, remove your deployment of your EAR and then create a new deployment but this time selected “Exploded deployment”, then fire up JBoss. Now as you make changes to JSP files, Java files and resources in Eclispe, they will automatically be copied out into your (running) application server without you needing to go back to the deployment dialog, you can just keep working.

    The only thing you may need to make sure of is that JBoss or Tomcat (the servlet container in JBoss most likely) is setup to ‘reload’ updated resources… usually Tomcat has a default of 15 seconds or so that it will check your project for any files with newer timestamps then when it last loaded the file, and reload it if it does.

    #218661 Reply

    robinsingh
    Member

    hi ..
    to start from …i everytime do the exploded deployment..
    and the fact that myEclipse supports hotDeploy for the html,javascript and jsp files is known to me..and it works in this case as well.
    i can change the content of html file , save it ..then go and refresh the same page in the browser , it shows the changes ..i dont have to redeploy the project for this.

    but when ., say i add another EJB component…then i have to redeploy the project (wich essentially removes and deploys it again) that is what I AM NOT BEING ABLE TO DO. i simply shutdown the server, deploy the project from myEclipse and start the server. then without touching any file.. i try to remove the deployment/redeploy the deployment..hten i get this file lock message..
    the reason that i cannt resize that deploy tool window…i cannt read the whole message..it gets cut in between …
    but what i saw is it says something about web-inf/dow****
    i went to that directory and found this small .log file by the name of
    some download……log file which is being generated by an external component that i have added into the project..
    This is the only file present in the web-inf / that starts with dow***
    so i know this is the file..wich is being locked..and is stopping me everytime from redeploying…
    so in this case…wat wud you say… i have followed all the right instructions to add that component’s relevant .jar files into the web-inf/lib folder of my web-project and any other .jar files like jboss-all-client.jar
    are being referenced using the build path of my web project part of my earmodule.
    but still this file gets locked in such a way ..that it wont let me redeploy the project …that fact that its a log file…just 2 lines..saying some component initialised okay..is more irksome…it doesnt have any functionality taht i cannt do without …but is still giving me so much trouble for past so many days..
    kindly gimme some solution for this..!!!

    regards
    robin

    #218670 Reply

    Riyad Kalla
    Member

    Robin,
    Unfortunately there is no workaround for what you are trying to do. If you are trying to deploy core aspects of your application (EJBs) there is no simply easy way to do this except by shutting down the server and restarting it. Sorry for the inconvenience.

    #218682 Reply

    robinsingh
    Member

    Hi Riyad
    well i just heard back from that site that contributed that “external’ component and they have helped me resolve the problem on their end.
    i have changed the location where that download**.log file was being created..its now created at an external location and is now NOT creating any problem with undeployment.

    now the problem comes in your court again.
    i have this jboss-allclient.jar file in my build path ..
    that gets copied into the webmodule/web-inf/lib/ when i deploy ..just like the other jars..wich i have added directly into the web-inf/lib folder

    now when i try to undeploy the project …the reason for failure of undeployment comes that file-lock occurs while deleting of jboss-allclient.jar …

    in the window–> preferences->myeclipse->J2ee-> webproject deployment settings panel
    i have just set the default settings..

    it does mention something about actually “copying the dependent projects’ .jar files” into the web-inf/lib folder ..but i am not sure wich set of settingsf for these 3 properties on this panel will work out for me in this case.

    i am pretty sure..this is something you can provide me a getaround for .easily as it doesnt have anything to do with my “specific” application

    waiting.

    regards
    robin

    #218685 Reply

    Riyad Kalla
    Member

    Robin,
    I don’t understand your new question… the 3 features you are talking about are rules that the deployment tool will follow when deploying dependent JARs for your project… it can copy them into WEB-INF/lib for you or it can ignore them (for example if you manually deployed them to your application server already).

    The only workaround I can think is if you can put this jboss-allclient.jar file in some server-wide lib folder so it doesn’t get deployed by your app, and THEN change your deployment rules to “ignore” the external JARs… I think if you copy this file to your <jboss 4 dir>\lib directory and change the deployment rule for external libs to “ignore” then that might help you work around the file-locking issue since that JAR will no longer be deployed WITH your application…

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Redeployment failure with JBoss 4 [Closed]

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