[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-06-01 Thread PJ Fanning (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17545009#comment-17545009
 ] 

PJ Fanning commented on XMLBEANS-567:
-

thanks - added with 
https://github.com/apache/xmlbeans/commit/1604e0e7fcf74a3adb10a3f55ff0cbf86f22df93
 - I fixed the accidental change in ChildSolverCollectionStrategy in a 2nd 
commit

> 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
> Fix For: Version 5.1.0
>
> Attachments: xmlbeans-ie-tryout.tar, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-06-01 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17544973#comment-17544973
 ] 

Peter Keller commented on XMLBEANS-567:
---

This issue isn't quite dealt with yet - with more investigation I have realised 
that exception names need to be fully qualified as well:

{{--- 
a/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java}}
{{+++ 
b/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java}}
{{@@ -319,7 +319,7 @@ public class InterfaceExtensionImpl implements 
InterfaceExtension {}}
{{             _params = method.getParameters().stream().map(p -> 
p.getType().resolve().describe()).}}
{{                 
map(MethodSignatureImpl::replaceInner).toArray(String[]::new);}}
{{ }}
{{-            _exceptions = 
method.getThrownExceptions().stream().map(ReferenceType::asString).}}
{{+            _exceptions = method.getThrownExceptions().stream().map(e -> 
e.resolve().describe()).}}
{{                 
map(MethodSignatureImpl::replaceInner).toArray(String[]::new);}}
{{ }}
{{             _paramNames = method.getParameters().stream().map(p -> 
p.getNameAsString()).toArray(String[]::new);}}

 

> 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
> Fix For: Version 5.1.0
>
> Attachments: xmlbeans-ie-tryout.tar, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-23 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17540834#comment-17540834
 ] 

Peter Keller commented on XMLBEANS-567:
---

[~pj.fanning] My simple test case works fine for me with the new JAR. It 
doesn't work with my existing project that I would like to migrate from 3.1.0 
because of memory usage problems in JavaParser, but that is a completely 
separate issue of course.

> 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
> Fix For: Version 5.1.0
>
> Attachments: xmlbeans-ie-tryout.tar, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-21 Thread PJ Fanning (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17540401#comment-17540401
 ] 

PJ Fanning commented on XMLBEANS-567:
-

[~pakeller] [~dlastochkin] could you both try the xmlbeans 5.1.0-SNAPSHOT that 
contains the latest changes? 
https://ci-builds.apache.org/job/POI/job/POI-XMLBeans-DSL-1.8/lastSuccessfulBuild/artifact/build/libs/

I tested the POI build with this jar and it seemed ok.

I'm not sure it will be straightforward to improve unit test coverage of this 
scenario.

> 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
> Fix For: Version 5.1.0
>
> Attachments: xmlbeans-ie-tryout.tar, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-20 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17540185#comment-17540185
 ] 

Peter Keller commented on XMLBEANS-567:
---

Thanks for that. I'm optimistic that it is OK - the same technique is used for 
method parameters in the very next line of code after all.

> 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, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-20 Thread PJ Fanning (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17540115#comment-17540115
 ] 

PJ Fanning commented on XMLBEANS-567:
-

thanks - I added r1901084 - I'm not sure how good the test coverage is and we 
will need to see if this affects POI, etc. before deciding whether to keep the 
change

> 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, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-20 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17540105#comment-17540105
 ] 

Peter Keller commented on XMLBEANS-567:
---

OK - I decided to get my hands dirty, and take a closer look at the code. In my 
hands, the following patch makes xmlbeans-ie-tryout2 work:
{code:java}
diff --git 
a/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java 
b/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java
index 8c7a2056..2a0511c6 100755
--- a/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java
+++ b/src/main/java/org/apache/xmlbeans/impl/config/InterfaceExtensionImpl.java
@@ -324,7 +324,7 @@ public class InterfaceExtensionImpl implements 
InterfaceExtension {
             _signature = null;
 
             _name = method.getName().asString();
-            _return = replaceInner(method.getTypeAsString());
+            _return = replaceInner(method.getType().resolve().describe());
 
             _params = method.getParameters().stream().map(p -> 
p.getType().resolve().describe()).
                 
map(MethodSignatureImpl::replaceInner).toArray(String[]::new);{code}
The relevant generated code looks like this:

 
{noformat}
public class CustomerImpl extends 
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements 
com.example.easypo.Customer {
    private static final long serialVersionUID = 1L;
    public CustomerImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }
    /**
     * Implementation method for interface mypackage.CustomerFooHandler
     */
    public java.util.List getFoos() {
        return mypackage.CustomerFooHandler.getFoos(this);
    }
    /**
     * Implementation method for interface mypackage.CustomerFooHandler
     */
    public java.lang.String getFoo() {
        return mypackage.CustomerFooHandler.getFoo(this);
    }
{noformat}
I have never worked with JavaParser before, and I have no idea how general this 
patch is, but maybe this will help.

> 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, xmlbeans-ie-tryout2.tar
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-18 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538994#comment-17538994
 ] 

Peter Keller commented on XMLBEANS-567:
---

Many thanks for that, it is really helpful, but I am now hitting the second 
problem that the OP reported, which still persists. I have uploaded a second 
test case (xmlbeans-ie-tryout2.tar) where the interface extension now looks 
like this:

{{package mypackage;}}
{{import java.util.List;}}
{{public interface CustomerFoo {}}
{{String getFoo();}}
{{List getFoos();}}
{{}}}

Even though the interface handler imports {{{}java.util.List{}}}, the build 
test case now fails with:

{{Time to build schema type system: 0.942 seconds}}
{{Time to generate code: 0.078 seconds}}
{{/home/pkeller/Projects/Workflow/xmlbeans-upgrade/xmlbeans-ie-tryout2/build/java/com/example/easypo/impl/CustomerImpl.java:36:
 error: cannot find symbol}}
{{public List getFoos() {}}
{{^}}
{{symbol: class List}}
{{location: class CustomerImpl}}
{{1 error}}

{{BUILD FAILED}}

Declaring the handler method with the fully qualified name as:

{{public static java.util.List getFoos(XmlObject xo) {}}
{{...}}
{{}}}

This is of course sortable, but in my case that is a lot of code that will need 
changing to allow me to upgrade from XMLBeans 3.1.0. Is this how it is meant to 
be?

> 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
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-17 Thread Andreas Beeker (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538470#comment-17538470
 ] 

Andreas Beeker commented on XMLBEANS-567:
-

I've just updated the gradle build to export the necessary libs to build/libs.

So currently you need the following libs: 

(ant-1.10.12.jar)
(ant-launcher-1.10.12.jar)
guava-31.0.1-jre.jar
javaparser-core-3.24.0.jar
javaparser-symbol-solver-core-3.24.0.jar
javassist-3.28.0-GA.jar
log4j-api-2.17.2.jar
Saxon-HE-11.3.jar
xmlbeans-5.1.0-SNAPSHOT.jar
xmlresolver-4.2.0-data.jar
xmlresolver-4.2.0.jar

 

the java call from your shell script is the following - with the above 
xsdconfig:

{{$JAVA_HOME/bin/java -Xmx256m -classpath "$cp" 
org.apache.xmlbeans.impl.tool.SchemaCompiler  \}}
{{   -d $b/classes\}}
{{   -src $b/java \}}
{{   -out $jar \}}
{{   src/main XSD/EasyPO.xsd XSD/EasyPO.xsdconfig}}

 

> 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
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-17 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17538324#comment-17538324
 ] 

Peter Keller commented on XMLBEANS-567:
---

Many thanks for picking this up. My test case is based on the extension 
interface build procedure on the FAQ at 
https://cwiki.apache.org/confluence/display/XMLBEANS/ExtensionInterfacesFeature.
 It works with version 3.1.0. From what you have written, I understand that 
that procedure is outdated and not expected to work any longer, but I can't 
find any documentation or references to the new procedure that has replaced it. 
Has it been written up anywhere?

> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-16 Thread Andreas Beeker (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17537833#comment-17537833
 ] 

Andreas Beeker commented on XMLBEANS-567:
-

I haven't yet finished your test-case but here are a few findings:
 * add "src/main" to your first java call, you don't need the others two java 
calls
 * the extension xsdconfig wasn't used because it wasn't specified in your java 
invocation argument list. I've merged both xsdconfigs
 * the current version of javaparser-symbol-solver-core is now hard depending 
on guave because of some BuildCache. we need to export those lib/s now also to 
build/libs. I need to try to exclude the other not needed guave libs to stop 
dependency bloating ...
 * the namespace in the xsdconfig is outdated

This is my xsdconfig so far:

{{http://xml.apache.org/xmlbeans/2004/02/xbean/config;>}}
{{    }}
{{    http://xmlbeans.apache.org/samples/enumeration/schemaenum/easypo;>}}
{{        com.example.easypo}}
{{    }}
{{    }}
{{        }}
{{            
mypackage.CustomerFooHandler}}
{{        }}
{{    }}
{{}}

 

> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-16 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17537762#comment-17537762
 ] 

Peter Keller commented on XMLBEANS-567:
---

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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-16 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17537506#comment-17537506
 ] 

Peter Keller commented on XMLBEANS-567:
---

Test case uploaded. In the shell script test-ie.sh, just edit JAVA_HOME, VER 
and XMLBEANS_LIB to suit your particular circumstances. A successful run (with 
XMLBeans 3.1.0) produces the following output:

{{Time to build schema type system: 0.304 seconds}}
{{Time to generate code: 0.072 seconds}}
{{Time to compile code: 0.896 seconds}}
{{Compiled types to: build/libs/easypo.jar}}


{{Compiled interface extensions:}}
{{build/classes/mypackage}}
{{├── CustomerFoo.class}}
{{└── CustomerFooHandler.class}}

{{0 directories, 2 files}}

{{Time to build schema type system: 0.331 seconds}}
{{Time to generate code: 0.039 seconds}}

A failed run (with the current trunk) cannot find the compiled interface 
extensions, although the class files are present and on the "-cp" option 
specified to the SchemaCompiler:

{{ERROR StatusLogger Log4j2 could not find a logging implementation. Please add 
log4j-core to the classpath. Using SimpleLogger to log to the console...}}
{{Time to build schema type system: 0.447 seconds}}
{{Time to generate code: 0.085 seconds}}
{{Time to compile code: 0.969 seconds}}
{{Compiled types to: build/libs/easypo.jar}}


{{Compiled interface extensions:}}
{{build/classes/mypackage}}
{{├── CustomerFoo.class}}
{{└── CustomerFooHandler.class}}

{{0 directories, 2 files}}

{{ERROR StatusLogger Log4j2 could not find a logging implementation. Please add 
log4j-core to the classpath. Using SimpleLogger to log to the console...}}
{{easypo2.xsdconfig:4:51: error: Interface 'mypackage.CustomerFoo' not found.}}
{{easypo2.xsdconfig:4:51: error: Interface 'mypackage.CustomerFooHandler' not 
found.}}
{{Time to build schema type system: 0.517 seconds}}
{{BUILD FAILED}}

> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-05-16 Thread Peter Keller (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17537503#comment-17537503
 ] 

Peter Keller commented on XMLBEANS-567:
---

This problem is also preventing me from using XMLBeans versions later than 
3.1.0. I can confirm that version 4.0.0 is affected. A build from trunk (from 
GitHub FWIW) also doesn't help: the contents of the lib directory are:

{{javaparser-core-3.24.0.jar}}
{{javaparser-symbol-solver-core-3.24.0.jar}}
{{log4j-api-2.17.2.jar}}
{{xmlbeans-5.1.0-SNAPSHOT.jar}}
{{xmlbeans-5.1.0-SNAPSHOT-javadoc.jar}}
{{xmlbeans-5.1.0-SNAPSHOT-sources.jar}}

I'll upload a trivial test case

> 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-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2022-01-06 Thread Andreas Beeker (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17470246#comment-17470246
 ] 

Andreas Beeker commented on XMLBEANS-567:
-

I've fixed some disabled test regarding the extension interfaces. Beside the 
javaparser, you'll also need the javaparser-symbol-solver-core jar. Please try 
it again with the trunk version. If it doesn't work, please provide me the test 
files.

> 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
>
> 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.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2021-07-13 Thread Dmitry Lastochkin (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17379804#comment-17379804
 ] 

Dmitry Lastochkin commented on XMLBEANS-567:


Hi, [~pj.fanning]!

bq. Could you try v4.0.0 or v3.1.0 to see if they work? It would be useful if 
we could track down the version where these features stopped working.

Unfortunately, this will be problematic. 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|https://issues.apache.org/jira/browse/XMLBEANS-539?focusedCommentId=17111500=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17111500]).

> 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
>
> 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.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



[jira] [Commented] (XMLBEANS-567) Problems with XMLBeans Extension Interfaces Feature

2021-07-13 Thread PJ Fanning (Jira)


[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17379792#comment-17379792
 ] 

PJ Fanning commented on XMLBEANS-567:
-

[~dlastochkin] thanks for reporting this. XMLBeans 5.0.0 and 5.0.1 (latter just 
released) have big changes and may have inadvertently broken these features. 
Could you try v4.0.0 or v3.1.0 to see if they work? It would be useful if we 
could track down the version where these features stopped working.

> 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
>
> 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.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org