geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Sisson <jrsis...@gmail.com>
Subject Connector plan deployment issue on 1.1
Date Tue, 11 Apr 2006 13:54:28 GMT
I tried deploying a plan I had adapted from 1.0 to 1.1 and got some 
schema validation errors (shown below).

I wanted to give the plan a configId and specify a parentId of the 
system-database.  I first tried defining the new configId element inside 
an environment element.  I also tried without an environment element.

I noticed that the configId and dependencies I specified are duplicated 
in two places (see the dep: and con: namespaces) in the plan that was 
dumped to the terminal.

Is this a bug?

John

===========Plan Source================

<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1" >

<!--    <environment> -->
        <configId>
            <groupId>com.acme.mydatabase</groupId>
            <artifactId>${pom.artifactId}</artifactId>
            <version>${pom.currentVersion}</version>
            <type>car</type>
        </configId>

        <dependencies>
            <dependency>
                <groupId>geronimo</groupId>
                <artifactId>system-database</artifactId>
                <version>${geronimo_version}</version>
                <type>car</type>
                <!-- <import></import> -->
            </dependency>
        </dependencies>
   
<!--    </environment> -->

    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>jdbc/DB</name>
                    <config-property-setting 
name="UserName">blah</config-property-setting>
                    <config-property-setting 
name="Password">blah</config-property-setting>
                    <config-property-setting 
name="DatabaseName">DB</config-property-setting>
                    <config-property-setting 
name="CreateDatabase">true</config-property-setting>
                    <connectionmanager>
                        <xa-transaction>
                            <transaction-caching/>
                        </xa-transaction>
                        <single-pool>
                            <max-size>100</max-size>
                            <min-size>0</min-size>
                            
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
               
                  <connectiondefinition-instance>
                    <name>jdbc/DB2</name>
                    <config-property-setting 
name="UserName">blah</config-property-setting>
                    <config-property-setting 
name="Password">blah</config-property-setting>
                    <config-property-setting 
name="DatabaseName">DB2</config-property-setting>
                    <config-property-setting 
name="CreateDatabase">true</config-property-setting>
                    <connectionmanager>
                        <xa-transaction>
                            <transaction-caching/>
                        </xa-transaction>
                        <single-pool>
                            <max-size>100</max-size>
                            <min-size>0</min-size>
                            
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>

                <connectiondefinition-instance>
                    <name>jdbc/DB3</name>
                    <config-property-setting 
name="UserName">blah</config-property-setting>
                    <config-property-setting 
name="Password">blah</config-property-setting>
                    <config-property-setting 
name="DatabaseName">DB3</config-property-setting>
                    <config-property-setting 
name="CreateDatabase">true</config-property-setting>
                    <connectionmanager>
                        <xa-transaction>
                            <transaction-caching/>
                        </xa-transaction>
                        <single-pool>
                            <max-size>100</max-size>
                            <min-size>0</min-size>
                            
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                            <idle-timeout-minutes>30</idle-timeout-minutes>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
       
    </resourceadapter>

</connector>

=========Dumped Plan===============

Caused by: org.apache.xmlbeans.XmlException: Invalid deployment 
descriptor: 
[/home/sissonj/OpenSourceJava/asf/geronimo/branches/1.1/configs/my-database/target/plan/plan.xml:57:

error: cvc-complex-type.2.4a: Expected element 
'resourceadapter@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1' 
instead of 
'configId@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1' here in 
element connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1, 
/home/sissonj/OpenSourceJava/asf/geronimo/branches/1.1/configs/my-database/target/plan/plan.xml:63:

error: cvc-complex-type.2.4a: Expected element 
'resourceadapter@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1' 
instead of 
'dependencies@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1' here 
in element connector@http://geronimo.apache.org/xml/ns/j2ee/connector-1.1]
Descriptor: <xml-fragment 
xmlns:con="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
  <!--<environment>-->
  <dep:environment 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:configId>
      <dep:groupId>com.acme.mydatabase</dep:groupId>
      <dep:artifactId>my-database</dep:artifactId>
      <dep:version>3.4</dep:version>
      <dep:type>car</dep:type>
    </dep:configId>
    <dep:dependencies>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>j2ee-server</dep:artifactId>
        <dep:version>1.1-SNAPSHOT</dep:version>
        <dep:type>car</dep:type>
      </dep:dependency>
      <dep:dependency>
        <dep:groupId>geronimo</dep:groupId>
        <dep:artifactId>geronimo-derby</dep:artifactId>
        <dep:version>1.1-SNAPSHOT</dep:version>
        <dep:type>jar</dep:type>
        <dep:import>classes</dep:import>
      </dep:dependency>
      <dep:dependency>
        <dep:groupId>org.apache.derby</dep:groupId>
        <dep:artifactId>derby</dep:artifactId>
        <dep:version>10.1.1.0</dep:version>
        <dep:type>jar</dep:type>
        <dep:import>classes</dep:import>
      </dep:dependency>
      <dep:dependency>
        <dep:groupId>org.apache.derby</dep:groupId>
        <dep:artifactId>derbynet</dep:artifactId>
        <dep:version>10.1.1.0</dep:version>
        <dep:type>jar</dep:type>
        <dep:import>classes</dep:import>
      </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <con:configId>
    <con:groupId>com.acme.mydatabase</con:groupId>
    <con:artifactId>my-database</con:artifactId>
    <con:version>3.4</con:version>
    <con:type>car</con:type>
  </con:configId>
  <con:dependencies>
    <con:dependency>
      <con:groupId>geronimo</con:groupId>
      <con:artifactId>system-database</con:artifactId>
      <con:version>1.1-SNAPSHOT</con:version>
      <con:type>car</con:type>
      <!--<import></import>-->
    </con:dependency>
  </con:dependencies>
  <!--</environment>-->
  <con:resourceadapter>
    <con:outbound-resourceadapter>
      <con:connection-definition>
        
<con:connectionfactory-interface>javax.sql.DataSource</con:connectionfactory-interface>
        <con:connectiondefinition-instance>
          <con:name>jdbc/DB</con:name>
          <con:config-property-setting 
name="UserName">blah</con:config-property-setting>
          <con:config-property-setting 
name="Password">blah</con:config-property-setting>
          <con:config-property-setting 
name="DatabaseName">DB</con:config-property-setting>
          <con:config-property-setting 
name="CreateDatabase">true</con:config-property-setting>
          <con:connectionmanager>
            <con:xa-transaction>
              <con:transaction-caching/>
            </con:xa-transaction>
            <con:single-pool>
              <con:max-size>100</con:max-size>
              <con:min-size>0</con:min-size>
              
<con:blocking-timeout-milliseconds>5000</con:blocking-timeout-milliseconds>
              <con:idle-timeout-minutes>30</con:idle-timeout-minutes>
              <con:match-one/>
            </con:single-pool>
          </con:connectionmanager>
        </con:connectiondefinition-instance>
        <con:connectiondefinition-instance>
          <con:name>jdbc/DB2</con:name>
          <con:config-property-setting 
name="UserName">blah</con:config-property-setting>
          <con:config-property-setting 
name="Password">blah</con:config-property-setting>
          <con:config-property-setting 
name="DatabaseName">DB2</con:config-property-setting>
          <con:config-property-setting 
name="CreateDatabase">true</con:config-property-setting>
          <con:connectionmanager>
            <con:xa-transaction>
              <con:transaction-caching/>
            </con:xa-transaction>
            <con:single-pool>
              <con:max-size>100</con:max-size>
              <con:min-size>0</con:min-size>
              
<con:blocking-timeout-milliseconds>5000</con:blocking-timeout-milliseconds>
              <con:idle-timeout-minutes>30</con:idle-timeout-minutes>
              <con:match-one/>
            </con:single-pool>
          </con:connectionmanager>
        </con:connectiondefinition-instance>
        <con:connectiondefinition-instance>
          <con:name>jdbc/DB3</con:name>
          <con:config-property-setting 
name="UserName">blah</con:config-property-setting>
          <con:config-property-setting 
name="Password">blah</con:config-property-setting>
          <con:config-property-setting 
name="DatabaseName">DB3</con:config-property-setting>
          <con:config-property-setting 
name="CreateDatabase">true</con:config-property-setting>
          <con:connectionmanager>
            <con:xa-transaction>
              <con:transaction-caching/>
            </con:xa-transaction>
            <con:single-pool>
              <con:max-size>100</con:max-size>
              <con:min-size>0</con:min-size>
              
<con:blocking-timeout-milliseconds>5000</con:blocking-timeout-milliseconds>
              <con:idle-timeout-minutes>30</con:idle-timeout-minutes>
              <con:match-one/>
            </con:single-pool>
          </con:connectionmanager>
        </con:connectiondefinition-instance>
      </con:connection-definition>
    </con:outbound-resourceadapter>
  </con:resourceadapter>
</xml-fragment>
        at 
org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConversionUtils.java:602)
        at 
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.createModule(ConnectorModuleBuilder.java:226)
        ... 80 more


Mime
View raw message