[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4817) WTP EAR deployers don't work correctly when using some classpath containers (Maven, for instance)

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Tue Aug 25 09:29:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12482617#action_12482617 ] 

Snjezana Peco commented on JBIDE-4817:
--------------------------------------

You have to use the latest m2eclipse because it fixes the deployment issue described in JBIDE-4736.
I can't reproduce the NPE that you got. When I close the booking project, I get the following NPE:

java.lang.NullPointerException
at org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory.getModule(SingleDeployableFactory.java:176)
at org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory$FileDeletionListener.visit(SingleDeployableFactory.java:272)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
at org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory$FileDeletionListener.resourceChanged(SingleDeployableFactory.java:253)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:313)
at org.eclipse.core.internal.resources.Workspace.checkpoint(Workspace.java:367)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:265)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:308)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:220)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

However, it isn't important here. Are you using the latest JBoss Tools trunk?

Both of the files you attached have incorrectly deployed the WEB-INF/lib directory. They are in the EAR's root directory instead of in the booking.war directory (https://bugs.eclipse.org/bugs/show_bug.cgi?id=247090). If you add
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
to the booking/.settings/org.eclipse.wst.common.component  file, booking.war/WEB-INF/lib will be created correctly.
This problem isn't related to m2eclipse.

m2eclipse configurators update a project when importing the project, changing pom.xml, calling Maven>Update Project Configuration. Sometimes they are called when closing/opening the project, starting Eclipse, etc.  m2eclipse WTP Web configurator  tries to remove and add web module facet. Since jsf facet exists in  seam project, this won't succeed. As a result, m2eclipse creates line "<wb-resource deploy-path="/" source-path="/src/main/webapp"/>'.  However, this bug fixes the wtp deployment bug.

> Aside from a few errors in the html (not closing tags etc)
these errors are errors in our XHTML validator and you can avoid them by disabling it. They aren't related to this bug.

PS
I have changed the resource folder from src/resources to src/main/resources. This will probably to fix JavaModel error you faced.

> WTP EAR deployers don't work correctly when using some classpath containers (Maven, for instance)
> -------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-4817
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4817
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS, UpStream
>    Affects Versions: 3.1.0.M2
>            Reporter: Snjezana Peco
>            Assignee: Rob Stryker
>         Attachments: fixed.out, unfixed.out
>
>
> Try the example described in https://jira.jboss.org/jira/browse/JBIDE-4736?focusedCommentId=12482337#action_12482337
> If you try to deploy the booking-ear application, libraries in booking/WEB-INF/lib won't be deployed.
> booking/.settings/org.eclipse.wst.common.component contains the following:
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>     <wb-module deploy-name="booking">
>         <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
>         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/resources"/>
>         <property name="context-root" value="booking"/>
>         <property name="java-output-path"/>
>     </wb-module>
> </project-modules>
> if you call Maven>Update Project Configuration, booking/.settings/org.eclipse.wst.common.component will look as follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
>     <wb-module deploy-name="booking">
>         <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
>         <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/resources"/>
>         <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
>         <property name="context-root" value="booking"/>
>         <property name="java-output-path"/>
>     </wb-module>
> </project-modules>
> the libraries in booking/WEB-INF/lib will be deployed correctly.
> The problem exists when using JBoss Tools servers as well as using JBoss WTP Generic servers.
> The problem doesn't exist when using Export>Java EE>EAR File.
> PS
> The WEB-INF/lib directory and the required libraries are unnecessary added to the EAR's root directory, but this issue is fixed with the patch attached to https://bugs.eclipse.org/bugs/show_bug.cgi?id=247090.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list