- This topic has 11 replies, 4 voices, and was last updated 14 years, 1 month ago by
jkennedy.
-
AuthorPosts
-
buchenbergMemberI 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?
March 18, 2011 at 4:33 pm #315339
buchenbergMemberHas 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?
March 19, 2011 at 1:34 am #315340
Glen IhrigMemberI’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
March 19, 2011 at 2:26 am #315341
buchenbergMemberThanks 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.
March 19, 2011 at 2:28 am #315342
buchenbergMemberBtw, my Maven build creates a perfect .war in the target folder.
March 21, 2011 at 7:33 am #315364
buchenbergMemberSo are maven builds not supported in MyEclipse for deployment?
March 21, 2011 at 10:26 am #315381
Jared RodriguezMember@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?
April 12, 2011 at 8:10 pm #315973
buchenbergMemberSorry 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>April 12, 2011 at 8:11 pm #315974
buchenbergMemberSorry 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>April 12, 2011 at 9:06 pm #315975
buchenbergMemberI’m installing version 9 now to see if there is an improvement.
April 13, 2011 at 2:34 am #315982
buchenbergMemberI’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.
May 25, 2011 at 11:56 am #317028
jkennedyMemberThanks for including your resolution here for others who may have the same issue, we appreciate it.
Jack
-
AuthorPosts