Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jaxb maven plugin and handle javax and jakarta namespaces #6736

Merged
merged 2 commits into from Dec 9, 2023

Conversation

matthiasblaesing
Copy link
Contributor

Closes: #6534

@matthiasblaesing matthiasblaesing added Java EE/Jakarta EE [ci] enable enterprise job ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Nov 21, 2023
@matthiasblaesing matthiasblaesing added this to the NB21 milestone Nov 21, 2023
@matthiasblaesing
Copy link
Contributor Author

I intent to merge this by next week, so if anyone wants to object, please do so now.

@mbien
Copy link
Member

mbien commented Nov 29, 2023

I tested with a fresh user config and a plain maven project and the wizard (using remote xsd file) seems to require the EE cluster to be enabled, otherwise pressing finish won't do anything. It will log this exception quietly:

java.io.IOException: JAXB compiler is not available for this project.
	at org.netbeans.modules.xml.jaxb.ui.JAXBWizardIterator.instantiate(JAXBWizardIterator.java:160)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:223)
	at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:135)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1605)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
	at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)

might be some ergonomics issue?

edit: worked fine post manual activation
edit2: NB doesn't seem to have xsd file templates. It was likely part with the visual XML modules which were never donated (forgot the actual name of the feature, but it could visualize xsds etc).

@matthiasblaesing
Copy link
Contributor Author

Thanks for testing. This behavior is not new (reproducible on NB19) and in review kind of expected. The maven schema compiler module is provided by maven.jaxws, which is part of the enterprise cluster. The module also actually uses the java ee modules and thus can't be moved to java cluster (where the caller is located).

@mbien
Copy link
Member

mbien commented Dec 3, 2023

right, its not a regression. Its just that having no user feedback (not even an exception dialog) after pressing finish isn't ideal.

Maybe we should use Exceptions.printStackTrace() for now and update the message slightly to inform the user that enabling a cluster might help?

@matthiasblaesing
Copy link
Contributor Author

I updated the wizard to reflect the problem to the user. Once this stage is reached, the user can't rescue the process, so it is IMHO not a problem, that you can't get back.

image

That is how far I'm willing to go.

Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! Thanks for the user notification change, fairly elegant solution IMO, I mainly suggested to not suppress the exception and update the msg a little bit - but this is better.

@matthiasblaesing matthiasblaesing merged commit 5eea0b6 into apache:master Dec 9, 2023
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java EE/Jakarta EE [ci] enable enterprise job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New JAXB Binding wizard doesn't work with JDK17 and JakartaEE 10
2 participants