facebook

Deployment failed with web-project depends on java-project

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #286473 Reply

    rfuchs
    Member

    Hi,
    We are very very happy that maven2 is integrated in myeclipse now.
    But unfortunately it doesn’t work.

    Problem:
    Given a maven project in myeclipse that produces A.jar, and another maven project that produces B.war, and B.war depends on A.jar, a look in the package explorer will show a folder in the maven dependencies for A.jar. When this folder is the dependency, B.war will not deploy successfully.

    If you close the A.jar project, the folder dependency dissapears from the maven dependencies list for B.war and is replaced by the A.jar from the local repository. Now you can successfully deploy B.war.

    This is also an very old issue with deployment and maven dependencies.
    http://jira.codehaus.org/browse/MNGECLIPSE-323
    http://www.myeclipseide.com/PNphpBB2-viewtopic-t-16783-postdays-0-postorder-asc-start-0.html

    thank you for a hotfix or a workaround.
    rfuchs

    #286484 Reply

    This is a known issue in ME6.5. It is already fixed in ME 7.0 internal builds. We are really sorry for the inconvenience.

    #286488 Reply

    rfuchs
    Member

    Okay, thank you.
    When is the approx. release date for the ME 7.0?
    rfuchs

    #286508 Reply

    Loyal Water
    Member

    MyEclipse 7.0 is scheduled to be released in July.

    #287587 Reply

    Srinivasa
    Member

    Hi Nipun

    I have recently faced the same problem while deploying the war file build by MAVEN to Weblogic and when will be MyEclipse 7.0 will be available?

    What is the work around until then?

    #287590 Reply

    @skadiy000 wrote:

    Hi Nipun

    I have recently faced the same problem while deploying the war file build by MAVEN to Weblogic and when will be MyEclipse 7.0 will be available?

    What is the work around until then?

    The fix was included in MyEclipse 6.5.1.

    #287604 Reply

    Srinivasa
    Member

    Thanks Nipun. I have updated to 6.5.1 GA and still the problem exists.

    #287605 Reply

    @skadiy000 wrote:

    Thanks Nipun. I have updated to 6.5.1 GA and still the problem exists.

    Can you describe your problem? It may be a different one.

    #287606 Reply

    Srinivasa
    Member

    when I am compiling the web project, it is compiling fine and generating the WAR file. When I deploy to Weblogic 9,2, I am getting the following exception:

    Unresolved compilation problems: The import javax.servlet cannot be resolved The import javax.servlet cannot be resolved The import org.springframework cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved HttpSessionListener cannot be resolved to a type Log cannot be resolved to a type LogFactory cannot be resolved logger cannot be resolved HttpSessionEvent cannot be resolved to a type logger cannot be resolved HttpSessionEvent cannot be resolved to a type logger cannot be resolved logger cannot be resolved logger cannot be resolved logger cannot be resolved logger cannot be resolved

    #287608 Reply

    @skadiy000 wrote:

    when I am compiling the web project, it is compiling fine and generating the WAR file. When I deploy to Weblogic 9,2, I am getting the following exception:

    Unresolved compilation problems: The import javax.servlet cannot be resolved The import javax.servlet cannot be resolved The import org.springframework cannot be resolved The import org.apache cannot be resolved The import org.apache cannot be resolved HttpSessionListener cannot be resolved to a type Log cannot be resolved to a type LogFactory cannot be resolved logger cannot be resolved HttpSessionEvent cannot be resolved to a type logger cannot be resolved HttpSessionEvent cannot be resolved to a type logger cannot be resolved logger cannot be resolved logger cannot be resolved logger cannot be resolved logger cannot be resolved

    1. Can you describe your projects layout? I.e. “Web project A depends on library project B. Library project B depends on Spring”.
    2. Can you deploy it as packaged archive? Does Servers view show any errors/warnings?
    3. Can you deploy it to different server? I.e. preinstalled Tomcat.
    4. Can you check WEB-INF/lib and WEB-INF/classes folders of the deployed application and see if there are any jars there?

    I can’t understand why javax.servlet is missing since this should be provided by the servlet container. Can you deployed any other application there?

    #287609 Reply

    Srinivasa
    Member

    1. Webproject ‘MMS’ depends on two other java projects and those projects are as JAR files in Maven dependency folder.
    All supporting JAR files are in Maven dependency folder.
    2. Yes. I am generating a Mavane Packaged archive. When install on Weblogic 9.2, when the WAR is getting loaded, Weblogic is throwing the above exception.
    3. I did not try with Tomcat.
    4.When I check the WAR file I find that servlet-api-2.5.jar is not getting in to the WAR file for some reason.

    I tried adding it as an external JAR also and for some reason that particular JAR is not being pickedup into the WAR file.

    #287610 Reply

    @skadiy000 wrote:

    1. Webproject ‘MMS’ depends on two other java projects and those projects are as JAR files in Maven dependency folder.
    All supporting JAR files are in Maven dependency folder.

    What do you mean by “Maven dependency folder”? Did you use MyEclipse wizards to create the projects?

    @skadiy000 wrote:

    2. Yes. I am generating a Mavane Packaged archive. When install on Weblogic 9.2, when the WAR is getting loaded, Weblogic is throwing the above exception.

    Do you use “mvn package”? Did you try MyEclipse deployer to deploy as archive?

    @skadiy000 wrote:

    4.When I check the WAR file I find that servlet-api-2.5.jar is not getting in to the WAR file for some reason.

    I tried adding it as an external JAR also and for some reason that particular JAR is not being pickedup into the WAR file.

    You may notice that javax.servlet dependencies have “provided” scope. They do not get deployed since they should be provided by the application server, they should not be in WEB-INF/lib.
    But you can try to use default dependency scope for these and see if it works.

    #287611 Reply

    Srinivasa
    Member

    Yes. I used My Eclipse Wizards to create the WebProject(optional Maven Support). eclipse created a folder called .m2 and with pom.xml I could be able to create a repository folder into which all dependency JAR files are imported and placed.

    I used Maven Package to generate the WAR. How can I use MyEclipse developer to deploy the WAR?

    How can I use default dependency scope in MyEclipse?

    Thanks

    #287649 Reply

    Srinivasa
    Member

    Hi Eugene

    I changed the scope to default dependency for servlet-api.jar and still throwing the same error. Now I see servlet-api.jar in my web-inf/lib. But weblogic did not refer to it for some reason.

    Secondly when I generated a WAR file with MyEclipse 6.0 with a Maven plugin installed by me, it is working fine.

    FYI >> There is a point to note…..
    My Eclipse 6.0 is depending on jdtcore-3.1.0.jar where as MyEclipse 6.5.1 is using jdtcore-3.2.0.v_658.jar.

    This looks like a eclipse specific jar. I do not know wheter it makes any difference or not.

    Appreciate inputs from Eclipse team / expert.

    Thanks to a patient response to my questions.

    #287688 Reply

    Srinivasa
    Member

    Hi Eugene / Nipun

    Awaiting your review and inputs.

    Thanks

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Deployment failed with web-project depends on java-project

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