[jira] [Commented] (NETBEANS-3554) problematic jaxb constellation (package-info.java)
[ https://issues.apache.org/jira/browse/NETBEANS-3554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998983#comment-16998983 ] Tobias Warneke commented on NETBEANS-3554: -- At least I found a bug, that seems to fit to my problem. > problematic jaxb constellation (package-info.java) > -- > > Key: NETBEANS-3554 > URL: https://issues.apache.org/jira/browse/NETBEANS-3554 > Project: NetBeans > Issue Type: Bug > Components: platform - JDK Problems >Affects Versions: 10.0, 11.1 >Reporter: Tobias Warneke >Priority: Major > > I don't know, if this is a bug. At least it is a problem, I cannot solve. > I implemented a JAXB serializable class (named "configuration") with XmlRoot > – annotation. Addionaly there is a package-info.java file, to config a > package wide schema. There are running at least 20 unit tests covering all > kinds of marshalling / unmarshalling things. > So this is build using maven and it builds/compiles/runs fine using JDK 8 - > 13. As dependencies I use version 2.3.0 of jaxp-api, jaxb-impl, ... This is > not a Netbeans module. > A minimal XML would look like: > {{}} > {{http://gingko.de/prjsetup/schema";>}} > {{ }} > {{}} > > So here comes the problem. If I use this JAR within a Netbeans platform > application, all runs fine using JDK 8. But using a higher JDK version, it > seems as if the *package-info.java* is skipped and opening such an XML file > results in: > {{javax.xml.bind.UnmarshalException: unexpected element > (URI:"http://gingko.de/prjsetup/schema";, lokal:"configuration"). Expected > elements are > <{}configuration>,<{}geoLayer>,<{}solution>,<{}solutionRevision>}} > So somehow the information from the *package-info.java* file is not > considered. > By the way this JAR is used from a Netbeans module. The complete package is > public using a wrapper Netbeans module. > In which direction should I investigate further? Is this a simple > configuration problem? -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Commented] (NETBEANS-3554) problematic jaxb constellation (package-info.java)
[ https://issues.apache.org/jira/browse/NETBEANS-3554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989481#comment-16989481 ] Tobias Warneke commented on NETBEANS-3554: -- I debugged the initialization of the JAXBContext. There in typeMap all known classes are listed. Using JDK 8 all classes have schemas attached. Using JDK 13 within this Netbeans constellation have not. > problematic jaxb constellation (package-info.java) > -- > > Key: NETBEANS-3554 > URL: https://issues.apache.org/jira/browse/NETBEANS-3554 > Project: NetBeans > Issue Type: Bug > Components: platform - JDK Problems >Affects Versions: 10.0, 11.1 >Reporter: Tobias Warneke >Priority: Major > > I don't know, if this is a bug. At least it is a problem, I cannot solve. > I implemented a JAXB serializable class (named "configuration") with XmlRoot > – annotation. Addionaly there is a package-info.java file, to config a > package wide schema. There are running at least 20 unit tests covering all > kinds of marshalling / unmarshalling things. > So this is build using maven and it builds/compiles/runs fine using JDK 8 - > 13. As dependencies I use version 2.3.0 of jaxp-api, jaxb-impl, ... This is > not a Netbeans module. > A minimal XML would look like: > {{}} > {{http://gingko.de/prjsetup/schema";>}} > {{ }} > {{}} > > So here comes the problem. If I use this JAR within a Netbeans platform > application, all runs fine using JDK 8. But using a higher JDK version, it > seems as if the *package-info.java* is skipped and opening such an XML file > results in: > {{javax.xml.bind.UnmarshalException: unexpected element > (URI:"http://gingko.de/prjsetup/schema";, lokal:"configuration"). Expected > elements are > <{}configuration>,<{}geoLayer>,<{}solution>,<{}solutionRevision>}} > So somehow the information from the *package-info.java* file is not > considered. > By the way this JAR is used from a Netbeans module. The complete package is > public using a wrapper Netbeans module. > In which direction should I investigate further? Is this a simple > configuration problem? -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists