facebook

Unreliable WAR Deployment to Tomcat

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

    donpark
    Member

    I am not sure if this problem is specific to Tomcat or not but when I deploy a web project as WAR file, one or more of following problems occur:

    1. Jar files for referenced projects, generated automatically under Smart deployment mode, are missing the “.jar” at the end which leads to class not found exception when the webapp starts.

    2. Deployer gets confused when new jars are added to a project after initial deployment so that deployed webapp will be updated with new jars and Redeploy doesn’t either. Workaround is to deploy fresh via Remove followed by Add.

    3. Not all jars are copied to deployed webapp’s WEB-INF/lib directory. Redeploying has higher chance of this problem. Fresh deployment sometimes will work but not always, leaving the webapp with only part of the jars needed.

    My guess is that there is a general problem with webapp library jar deployment code which causes these problems. Odd thing is that #2 and #3 error is unpredictable. NOTE that these problems existed for past couple of years. It’s just that I use exploded deployment during development then made up for the bugs manually for deployment.

    #272273 Reply

    Riyad Kalla
    Member

    1. Do these projects have dots in their names? Like “my.project”? That will cause MyEclipse to dork up the extensions… it’s actually a *feature* to support custom extensions, but in some cases it back fires. We are working on fixing that.

    2. Very strange… a “Redeploy” won’t work, but physically Remove/Add dpeloyment works?

    3. If your app server is running AND you are on Windows this is due to file locks. Your app server shouldn’t be running when you are deploying/redeploying an app. (especially redeploying)

    4. I think your app server is running… the code is pretty stead-fast and has been “in the field” for years now… but that’s not to say something else couldn’t be happening, like your actual file system comming out of sync with your project contents and not being refreshed… that can screw up a deployment too.

    #272620 Reply

    donpark
    Member

    Well, at least I now know why jar extension name is missing. Thx.

    #273013 Reply

    Joel Wilson
    Member

    I am having a similar problem to what is being described in this thread. I have a Web app project that uses an EJB3 project.

    What happens or doesn’t happen is that when I deploy it doesn’t output the compiles results of the EJB project into the Web project; I’ve only tried Exploded deployment.
    I have another Java project that is a dependency of both, it will be included just fine but not the EJB; any ideas how to fix that?

    #273040 Reply

    Riyad Kalla
    Member

    jesfrk7,
    The problem is that a you need to create a top-level Enterprise Application Project, and make your Web and EJB projects modules of it, then deploy that. You cannot actually deploy a Web Project that depends on an EJB3 project without an EAR project… the Java EE specs require a top-level EAR module, and that’s what the “Enterprise Application Project” represents.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Unreliable WAR Deployment to Tomcat

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