facebook

Files missing from deployment

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #315267 Reply

    buchenberg
    Member

    I am attempting to deploy a web application to Tomcat using MyEclipse Spring 8.6. a few JAR’s and classes are missing under WEB-INF. The files are present in the build target folder. What would cause this behavior?

    #315339 Reply

    buchenberg
    Member

    Has anyone ever had this happen? It happens no matter what installation (win/mac). It happens with the same class files and JAR’s. For instance, a whole package of class files does not get deployed to the server. It happens with MyEclipse Tomcat or my own installation. I find all of the missing items in the Maven build folder, they just don’t deploy. Can anyone help?

    #315340 Reply

    Glen Ihrig
    Member

    I’ve seen similar things happen in generic Eclipse.

    Confirm Preferences > MyEclipse > Java Enterprise Project > Web Project > Deployment Tab – Library Deployment section has all boxes checked.

    I don’t use Maven so this may be off, but you might also check to see if your Maven Build folder is listed under (Right click your Project) > Properties > Java Build Path > Source tab and add it if not.

    Another thing to try, if this is not what you’re already doing. (Right click your Project) > Export > Export > Java EE > WAR file (MyEclipse), select your project and enter a destination for the .war. When the .war has been generated, open it with any zip editor and see if the missing files are present.

    Regards,

    -Glen

    #315341 Reply

    buchenberg
    Member

    Thanks for your reply, Glen. All boxes are checked in the Library Deployment section. My Java Build Path just includes my source folders and my default output is set to myapp\target\classes. After a build the classes folder contains everything as expected. When I export to war the WEB-INF/classes folder is empty. I figured out how to get the missing JAR’s from my other projects into the WEB-INF/lib directory. I just manually added them using “Add External JARs…” in the Libraries section of the Java Build Path dialog.

    #315342 Reply

    buchenberg
    Member

    Btw, my Maven build creates a perfect .war in the target folder.

    #315364 Reply

    buchenberg
    Member

    So are maven builds not supported in MyEclipse for deployment?

    #315381 Reply

    @buchenberg wrote:

    So are maven builds not supported in MyEclipse for deployment?

    Maven builds are definitely supported. The .JAR files and class files will not actually appear in the project directory. In eclipse, the server functionality usually has a staging area where the real directory structure is assembled for use by the server. That is where the .JAR files and class files will be placed. Are you using the built in MyEclipse tomcat server, or one that you added yourself? I believe that you can double click the serer to find out where the staging directory is located. This will vary on settings for the server and if you are using the MyEclipse server or one that you added. this can also change depending upon your project type. Are you using a MyEclipse web project, or a Dynamic Web project? You can tell this by r-click the project, going to properties, then project facets.

    BTW, which jars are actually missing?

    #315973 Reply

    buchenberg
    Member

    Sorry for the delay. I am using my own standard Tomcat 6.0.32. The behavior was exactly the same with the built in MyEclipse tomcat server. I’ve looked all over for the server “staging area” setting to no avail. The staging area should really be in my Maven target folder. Netbeans works well because it actually runs from the Maven build location and simply alters the Context element to point to it. Anything else is sort of redundant.

    I was able to get my missing .JAR files included by adding them to the Libraries section under the project Properties > Java Build Path. The .JAR files were the persistence and logic layers of my app and were included as Maven Dependencies already. Apparently, I have to (redundantly) add them using “Add JARs..” under Java Build Path. They show up just fine in my Maven build target folder.

    What is really odd is that I am also missing everything under WEB-INF/classes and can’t imagine why. Again, Maven has built the application just fine. I certainly appears that Eclipse does not have a sensible integration with the Maven build for the purpose of deployment. It’s a shame that I have to use the free Netbeans IDE to do any debugging on my app. I really dig Eclipse otherwise.

    I am using the latest MyEclipse for Spring and I do not have a “facets” section under project properties. I do have Natures if that what you mean:

    <natures>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.maven.ide.eclipse.maven2Nature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    <nature>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</nature>
    </natures>

    #315974 Reply

    buchenberg
    Member

    Sorry for the delay. I am using my own standard Tomcat 6.0.32. The behavior was exactly the same with the built in MyEclipse tomcat server. I’ve looked all over for the server “staging area” setting to no avail. The staging area should really be in my Maven target folder. Netbeans works well because it actually runs from the Maven build location and simply alters the Context element to point to it. Anything else is sort of redundant.

    I was able to get my missing .JAR files included by adding them to the Libraries section under the project Properties > Java Build Path. The .JAR files were the persistence and logic layers of my app and were included as Maven Dependencies already. Apparently, I have to (redundantly) add them using “Add JARs..” under Java Build Path. They show up just fine in my Maven build target folder.

    What is really odd is that I am also missing everything under WEB-INF/classes and can’t imagine why. Again, Maven has built the application just fine. I certainly appears that Eclipse does not have a sensible integration with the Maven build for the purpose of deployment. It’s a shame that I have to use the free Netbeans IDE to do any debugging on my app. I really dig Eclipse otherwise.

    I am using the latest MyEclipse for Spring and I do not have a “facets” section under project properties. I do have Natures if that what you mean:

    <natures>
    <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
    <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>org.maven.ide.eclipse.maven2Nature</nature>
    <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
    <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
    <nature>com.genuitec.eclipse.cross.easystruts.eclipse.easystrutsnature</nature>
    </natures>

    #315975 Reply

    buchenberg
    Member

    I’m installing version 9 now to see if there is an improvement.

    #315982 Reply

    buchenberg
    Member

    I’ve managed to figure this out based on another post.

    I changed all the output folder be WEB-INF/classes for the web project instead of target/classes.

    #317028 Reply

    jkennedy
    Member

    Thanks for including your resolution here for others who may have the same issue, we appreciate it.

    Jack

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Files missing from deployment

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