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

-dtd option #247

Closed
y2kenny opened this issue Jun 18, 2022 · 13 comments · Fixed by #500
Closed

-dtd option #247

y2kenny opened this issue Jun 18, 2022 · 13 comments · Fixed by #500
Assignees
Labels
bug-external Issue concerns an external dependency
Milestone

Comments

@y2kenny
Copy link

y2kenny commented Jun 18, 2022

When I try to parse a dtd (using sourceType dtd), I get the following error

org.xml.sax.SAXParseException: Are you trying to compile DTD? Support for DTD is experimental. You may enable it by using the -dtd option.

How do I pass the -dtd option to xjc via this plugin?

@stephan-vollmer
Copy link

I'm having the same issue (plugin version 0.15.1 with Java 11.0.16).

I tried to specify the -dtd argument, but the warning still appears:

<configuration>
    <generatePackage>...</generatePackage>
    <generateDirectory>${project.build.directory}/generated-sources/xjc1</generateDirectory>
    <schemaIncludes>
        <schemaInclude>filename.dtd</schemaInclude>
    </schemaIncludes>
    <markGenerated>true</markGenerated>
    <args>
        <arg>-dtd</arg>
    </args>
</configuration>

@gigermocas
Copy link

you have a schemaLanguage configuration option:

<schemaLanguage>dtd</schemaLanguage>

@y2kenny
Copy link
Author

y2kenny commented Sep 27, 2022

you have a schemaLanguage configuration option:

<schemaLanguage>dtd</schemaLanguage>

I have that but it did not remove the error.

@dkowis
Copy link

dkowis commented Oct 20, 2022

I have both dtd and tried the args bit, unfortunately it's not working.

@mattrpav
Copy link
Collaborator

There is a newer dtd dependency out there. I'm cutting a 0.15.2 first to try to clear up more critical issues than this WARN msg

@laurentschoelens
Copy link
Collaborator

@y2kenny / @stephan-vollmer : could you please provide an example file to test your issue ? Thanks

@y2kenny
Copy link
Author

y2kenny commented Jul 6, 2023

@y2kenny / @stephan-vollmer : could you please provide an example file to test your issue ? Thanks

This is the dtd file I have used before:
https://gerrit.googlesource.com/plugins/manifest-subscription/+/refs/heads/master/src/main/resources/schemas/manifest.dtd

@laurentschoelens
Copy link
Collaborator

Thanks for the quick reply, will look at this issue soon 😉

@laurentschoelens
Copy link
Collaborator

@y2kenny : found the culprit
A change has been made (maybe a typo in earlier version of xjc), that made schemaLanguage != XMLSCHEMA complains about DTD / WSDL generating code since it's "experimental".
See : eclipse-ee4j/jaxb-ri@94a5a1f

There's nothing (in my opinion) we can do to get rid of this message (it's just a warning for 'experimental' features that still exists in v4 of xjc, with more generation warning about rng / rnc files) and your classes are just generated fine (tested against current 2.0.3-SNAPSHOT).
@mattrpav : do you agree with me ?

@laurentschoelens
Copy link
Collaborator

Found this issue in jaxb-ri impl that was treated in main : eclipse-ee4j/jaxb-ri#1701
Asked if any backport for 2.3.x branch will be done.

@laurentschoelens
Copy link
Collaborator

@y2kenny : this should be fixed in 4.0.4 based-jaxb-tools and 2.3.9 based jaxb-tools since Lukas is doing some backports in EE8 branch of JAXB-RI
We should be able to test and validate it with jaxb-tools 2.X branch and then release a fixed version based on latest jaxb-ri

@laurentschoelens laurentschoelens added the bug-external Issue concerns an external dependency label Oct 9, 2023
@laurentschoelens
Copy link
Collaborator

@y2kenny / @stephan-vollmer / @dkowis / @gigermocas : sorry for the spam 😄 This was fixed in v4.0.2 of jaxb-tools

This will also be fixed in v2.0.10

@laurentschoelens laurentschoelens self-assigned this Feb 13, 2024
@laurentschoelens laurentschoelens added this to the 2.0.10 milestone Feb 13, 2024
@laurentschoelens laurentschoelens linked a pull request Feb 13, 2024 that will close this issue
@laurentschoelens
Copy link
Collaborator

Will be closed in next v2.x release. Fixed by #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-external Issue concerns an external dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants