This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 480469 - Neon: cannot create XDoclet EJB
Summary: Neon: cannot create XDoclet EJB
Status: RESOLVED WORKSFORME
Alias: None
Product: WTP EJB Tools
Classification: WebTools
Component: jst.ejb (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: jst.ejb CLA
QA Contact: Kaloyan Raev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 480744
  Show dependency tree
 
Reported: 2015-10-22 20:37 EDT by Dimitar Giormov CLA
Modified: 2015-10-27 05:48 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitar Giormov CLA 2015-10-22 20:37:23 EDT
While executing the scenario for: WTP Smoke Test Results R380 10222015

I stumbled upon an issue where I cannot create EJB project on Eclipse Neon.
Actually everything looks ok, servlets are generated ok.
The structure of the annotated bean is fine.
The XDoclet builder states that the build has completed successfully, but from the logs in the console it looks like the xdoclet has not found the annotated bean.

Scenario to reproduce:

1. Setup Xdoclet in Windows>Preferences
2. Create EJB Project with version 2.1 using java 1.4 for java facet.
3. Create EJB Session bean.

result no interfaces are generated or ejb-jar artefacts are generated.
Comment 1 Dimitar Giormov CLA 2015-10-26 09:30:28 EDT
So what I have found so far:

1. XDoclet preferences are changes so all tasks are turned off (Preferences > XDoclet > ejbdoclet)
2. While creating Session bean the ejb-jar.xml is actually generated on the root level of the project instead in META-INF folder

Enabling the ejbdoclet tasks solves the generation issue
Comment 2 Chuck Bridgham CLA 2015-10-26 10:34:33 EDT
So why did xdoclet preferences change in Neon?  Another followup would be the wizard should recognize if generators are turned off - and turn on manually
Comment 3 Dimitar Giormov CLA 2015-10-26 11:23:03 EDT
Hi Chuck,

it turns out that the preferences did not change, well sort of.

Actually the preferences for XDoclet use some old way of storing data, which looks like is no longer supported in the platform. 
What I have found out till now is that in Mars there is a class org.eclipse.core.internal.preferences.legacy.InitLegacyPreferences, which will call and initialize the XDoclet default preferences, where in Neon there is no such functionality. 

Unfortunately this means that we have to migrate the preferences.
I can take the task, but it will take a while. (hopefully till the end of the week)

best regards,
Dimitar
Comment 4 Dimitar Giormov CLA 2015-10-27 05:43:44 EDT
I have now checked that indeed the org.eclipse.core.internal.preferences.legacy.InitLegacyPreferences was deleted, but it was recently reverted, so the class will be again present and functional in newer platform builds.

http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=4f7d6025ec1edb3aa3be58ea49385ae95e65b338

So I will open enhancement for migrating the preference store of the xdoclet bundle.
Since the logic will work again next week.

Kind regards,
Dimitar