users@jaxb.java.net

Re: Internal Error after migration to 1.0.1

From: Mark Brouwer <mark.brouwer_at_virgil.nl>
Date: Thu, 05 Jun 2003 23:46:51 +0200

Kohsuke Kawaguchi wrote:
>
> Mark Brouwer <mark.brouwer_at_virgil.nl> wrote:
> > I modified my build process to handle compiling a schema that imports
> > another schema. The application hasn't been changed except for replacing
> > the jar files. However all I get is this internal Error, see stacktrace
> > below. This error I never got before.
>
> Could you send me the schema so that I can investigate?
>

Of course, you have to fix the schemaLocation attribute <xsd:import
namespace=.../> in the seven-config.xsd so it points to the jsc.xsd.

I also included the binding files I used in the build process, which I
included as well, if you need more info please ask, for I really would
like to have this solved.

In the binding files you also have to modify the schemaLocations but
that I probably don't have to tell you :-) The xjc task being called for
building our container is create-config-model, and as you can see that
one depends on create-jsc-model. I did it like this to be able to get
the impl.runtime classes in the package of the classes being loaded
through the class loader that is the parent class loader of the class
loader that defines the classes of the config-model (the schema that
imports the jsc-model)
--
Mark Brouwer




<?xml version="1.0" encoding="UTF-8"?>
<!--
#
# $Header: //cheiron/seven/main/build/seven-config.xjb#1 $
#
# Copyright 2003 Virgil BV.
#
# author Mark Brouwer
# version $Revision: #1 $ $Date: 2003/03/24 $
#
-->
<bindings
        xmlns="http://java.sun.com/xml/ns/jaxb"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_1_0.xsd"
        version="1.0">

        <bindings schemaLocation="../src/org/cheiron/seven/plugins/config/xml/doc-files/schema/seven-config.xsd" node="/xsd:schema">

                <schemaBindings>
                        <package name="org.cheiron.seven.plugins.config.xml.model"/>
                </schemaBindings>

                <bindings node="//xsd:complexType[@name='jarserver']/xsd:attribute[@name='port']">
                        <property generateIsSetMethod="true"/>
                </bindings>

                <!--
                        resolve collision between XML name and Java keyword 'class'
                -->
                <bindings node="//xsd:complexType[@name='service-instance']/xsd:attribute[@name='class']">
                        <property name="className"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='throwable-filter']/xsd:attribute[@name='class']">
                        <property name="className"/>
                </bindings>

                <!--
                        convenience mappings
                -->
                <bindings node="//xsd:complexType[@name='logger']/xsd:sequence/xsd:choice[1]">
                        <property name="filters"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='logger']/xsd:sequence/xsd:choice[2]">
                        <property name="handlers"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='log-handler']/xsd:choice">
                        <property name="filters"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='join-scope']/xsd:sequence">
                        <property name="scopes"/>
                </bindings>
        </bindings>
</bindings>


<?xml version="1.0" encoding="UTF-8"?>
<!--
#
# $Header: //cheiron/seven/main/build/jsc.xjb#3 $
#
# Copyright 2003 Virgil BV.
#
# author Mark Brouwer
# version $Revision: #3 $ $Date: 2003/06/05 $
#
-->
<bindings
        xmlns="http://java.sun.com/xml/ns/jaxb"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_1_0.xsd"
        version="1.0">

        <bindings schemaLocation="schema/jsc.xsd" node="/xsd:schema">

                <schemaBindings>
                        <package name="org.cheiron.jsc.model"/>
                </schemaBindings>

                <!--
                        resolve collision between XML name and Java keyword 'class'
                -->
                <bindings node="//xsd:complexType[@name='service-def']/xsd:attribute[@name='class']">
                        <property name="className"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='principal']/xsd:attribute[@name='class']">
                        <property name="className"/>
                </bindings>
                <bindings node="//xsd:complexType[@name='permission']/xsd:attribute[@name='class']">
                        <property name="className"/>
                </bindings>
        </bindings>
</bindings>