[ 
https://issues.apache.org/jira/browse/XMLBEANS-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to