You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Peter Keller (Jira)" <ji...@apache.org> on 2022/05/16 20:02:00 UTC
[jira] [Comment Edited] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature
[ https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537762#comment-17537762 ]
Peter Keller edited comment on XMLBEANS-567 at 5/16/22 8:01 PM:
----------------------------------------------------------------
I have looked at some specific commits, and what I have found so far fits in with [~pj.fanning] 's comment above:
{quote}But I can say for sure that the described problems are the result of replacing JAM with JavaParser. This happened in XMLBEANS-539 (see comment).
{quote}
Building from the commit previous to the one where XMLBEANS-539 was applied [(522aeb6)|https://github.com/apache/xmlbeans/commit/522aeb623822fa43116c780b763dec71f4f15158] produces a build that handles interface extensions correctly. I can't build the next few commits (some requirement for Apache commons logging during the build process that I haven't figured out how to provide yet). The earliest commit that I have succeed in building from after 522aeb6 is [f4bde2c|https://github.com/apache/xmlbeans/commit/f4bde2c967bb04a5d00629cc88d823184d98463c] and this build cannot handle interface extensions.
If anyone is looking at this actively, I am in a position to rapidly test possible solutions and would be happy to help move things forwards.
was (Author: pakeller):
I have looked at some specific commits, and what I have found so far fits in with [~pj.fanning] 's comment above:
{quote}But I can say for sure that the described problems are the result of replacing JAM with JavaParser. This happened in XMLBEANS-539 (see comment).
{quote}
Building from the commit previous to the one where XMLBEANS-539 was applied [(522aeb6)|https://github.com/apache/xmlbeans/commit/522aeb623822fa43116c780b763dec71f4f15158] produces a build that handles interface extensions correctly. I can't build the next few commits (some requirement for Apache commons logging during the build process that I haven't figured out how to provide yet). The earliest commit that I have succeed in building from after 522aeb6 is [f4bde2c|https://github.com/apache/xmlbeans/commit/f4bde2c9967bb04a5d00629cc88d823184d98463c] and this build cannot handle interface extensions.
If anyone is looking at this actively, I am in a position to rapidly test possible solutions and would be happy to help move things forwards.
> Problems with XMLBeans Extension Interfaces Feature
> ---------------------------------------------------
>
> Key: XMLBEANS-567
> URL: https://issues.apache.org/jira/browse/XMLBEANS-567
> Project: XMLBeans
> Issue Type: Task
> Affects Versions: Version 5.0.0
> Reporter: Dmitry Lastochkin
> Priority: Major
> Attachments: xmlbeans-ie-tryout.tar
>
>
> Hello! In our project we are using [XMLBeans Extension Interfaces Feature|https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionInterfacesFeature]. When we compile the TypeSystem (using {{SchemaTypeSystemCompiler.compile}}), we add the jar with our extension classes to classpath parameter. In XMLBeans 2.4 it works perfectly. But when we updated to XMLBeans 5.0.0, we encountered the following error during an extensions validation:
> {code}
> Interface 'SomeInterface' not found."
> {code}
> As far as I understand, this is because {{org.apache.xmlbeans.impl.config.Parser}} does not search classes in classpath (only in files).
> When we added the sources of the extension interface to the parameters, TypeSystem compiled successfuly. But then we ran into another problem. When XMLBeans generates java files from XSD, it uses simple class names (instead of fully qualified names as it was in XMLBeans 2.4.0) for the classes that are used in methods of the extension interface (like parameters types or return types). And therefore the geneted files cannot be compiled if the extension classes are in a different package.
> Are those changes (ingorning classpath when searching for extenstions and using simple names for extenstion classes in code generation instead of fully qualified names) were made intentionally? Such limitations are hard to work around, making an upgrade from older XMLBeans version very complicated.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org