Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Some EJBs only get published if project is open in eclipse(All other EJBs are correctly copied from local maven cache)
Some EJBs only get published if project is open in eclipse [message #1797037] Wed, 24 October 2018 10:40 Go to next message
Thomas Reinhardt is currently offline Thomas ReinhardtFriend
Messages: 2
Registered: October 2018
Junior Member
Hello,

TLDR: one of my ejb projects gets only deployed to wildfly if it is open in eclipse.

Full story:
I am on eclipse 2018-09.
I have about 100 projects in my workspace. All of them are maven projects and I use WildFly 13 as my server. One of them is an EAR and many of the others are EJB projects that should be deployed as part of that ear. Obviously I do not want to have all the projects open all the time. When I work on a feature I open only the relevant projects along with the EAR. The open projects get published on the server from the eclipse projects. The closed projects are copied from the local maven cache.
But one project gets never deployed when it is not open in eclipse. If it is open it behaves just as any other ejb I have there.
I don't know what is causing the problem exactly and my only workarounds are either manually copying the ejb from the local maven cache or just give in and open the project in eclipse.
The offending ejb project is similar to a dozen other ejb projects that work just fine.
Relevant facts I discovered so far:

1) EARProject->properties->deployment assembly always contains the correct path to the EJB - either as workspace project or as a file in the local maven cache
2) when I click on Servers/Wildfly13/Add and remove and select the EAR project and expand its contents it does show the EJB when it's open in eclipse and does not show it when it's not open.
3) EARProject->export->ear file always works correctly
4) a command line build obviously works correctly
5) cleaning the local maven cache (completely delete .m2 folder) has no impact
6) a new workspace has no impact
7) deleting all eclipse related files in all projects (.project, .settings etc) has no impact
8) doing 6+7 together has no impact
9) EARProject->javaee tools->update ear libraries has no impact (BTW: what is this supposed to do anyway?)
10) the eclipse log file (workspace/.metadata/.log) seems clean

#2 might or might not indicate that the server connector is at fault. I cross checked with another server (Basic/Deploy only) and got the same behavior. So maybe the connector is alright.

So. Any ideas what could causing that behavior? Or any test I could perform?
I highly suspect I am at fault myself but I just can not figure it out.

- Thomas
Re: Some EJBs only get published if project is open in eclipse [message #1828016 is a reply to message #1797037] Fri, 29 May 2020 08:21 Go to previous message
Thomas Reinhardt is currently offline Thomas ReinhardtFriend
Messages: 2
Registered: October 2018
Junior Member
It is much later and I got finally time to properly debug this behavior.

Short answer: it's a feature, the ejb in question did not contain any deployment descriptors (META-INF/ejb-jar.xml in my case). When I added the deployment descriptor everything works just fine.

Long answer: eclipse inspects modules that should be deployed on servers. Probably to handle modules different dependeing say WARs inside an EAR different from an EJB. I did not bother to check what is different for the modules. If the module is an open project in the workspace obviously everything is known from the project file, configured natures or other settings. If the module is not open only a compressed archive exists in the local maven cache and nothing is known about the nature of the archive. I guess eclipse could use information stored in the EAR project but I think it does not. Instead it looks for a bunch of deployment descriptors in the compressed archive and if it finds a valid one it decides what kind of archive it is.

The code is in
org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities.getJavaEEQuickPeek(IArchive)
from org.eclipse.jst.j2ee. git is git://git.eclipse.org/gitroot/jeetools/webtools.javaee.git

The deployment descriptors checked are
META-INF/application.xml
META-INF/application-client.xml
META-INF/ejb-jar.xml
WEB-INF/web.xml
META-INF/ra.xml
META-INF/web-fragment.xml

Version used for debugging:
<groupId>org.eclipse.webtools.javaee</groupId>
<artifactId>org.eclipse.jst.j2ee</artifactId>
<version>1.2.301-SNAPSHOT</version>
Previous Topic:How to fix strange character in Eclipse EE editor
Next Topic:SQL file
Goto Forum:
  


Current Time: Wed Apr 24 22:59:14 GMT 2024

Powered by FUDForum. Page generated in 0.03399 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top