Hi Guys,

I am trying to create a DB when I deploy a web application. I have the
following db pool xml:

<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>
   <dep:environment xmlns:dep="
http://geronimo.apache.org/xml/ns/deployment-1.2";>
       <dep:moduleId>
           <dep:groupId>console.dbpool</dep:groupId>
           <dep:artifactId>InventoryPool</dep:artifactId>
           <dep:version>1.0</dep:version>
           <dep:type>rar</dep:type>
       </dep:moduleId>
       <dep:dependencies>
           <dep:dependency>
               <dep:groupId>org.apache.geronimo.configs</dep:groupId>
               <dep:artifactId>system-database</dep:artifactId>
               <dep:type>car</dep:type>
           </dep:dependency>
       </dep:dependencies>
   </dep:environment>
   <resourceadapter>
       <outbound-resourceadapter>
           <connection-definition>
               <connectionfactory-interface>javax.sql.DataSource
</connectionfactory-interface>
               <connectiondefinition-instance>
                   <name>InventoryPool</name>
                   <config-property-setting name="Password"/>
                   <config-property-setting
name="DatabaseName">InventoryDB</config-property-setting>
                   <config-property-setting
name="CreateDatabase">true</config-property-setting>
                   <config-property-setting name="UserName"/>
                   <connectionmanager>
                       <local-transaction/>
                       <single-pool>
                           <max-size>10</max-size>
                           <min-size>0</min-size>
                           <match-one/>
                       </single-pool>
                   </connectionmanager>
               </connectiondefinition-instance>
           </connection-definition>
       </outbound-resourceadapter>
   </resourceadapter>
</connector>

BUT, I get the following error when I attempt to deploy it

   Error: Unable to distribute inventory-ear-2.0-SNAPSHOT.ear: The plan
   is trying to set attributes: [DatabaseName, CreateDatabase]

   Known attributes:

   [GAttributeInfo: name=connectionFactoryInterface
   type=java.lang.String persistent=true manageable=true readable=true
   writable=false getterName=getConnectionFactoryInterface
   setterName=null]

   [GAttributeInfo: name=resourceAdapterWrapper
   type=org.apache.geronimo.connector.ResourceAdapterWrapper
   persistent=false manageable=false readable=true writable=false
   getterName=getResourceAdapterWrapper setterName=null]

   [GAttributeInfo: name=Driver type=java.lang.String persistent=true
   manageable=true readable=true writable=true getterName=null
   setterName=null]

   [GAttributeInfo: name=eventProvider type=boolean persistent=false
   manageable=false readable=true writable=false
   getterName=isEventProvider setterName=null]

   [GAttributeInfo: name=configProperties type=java.util.Map
   persistent=false manageable=false readable=true writable=false
   getterName=getConfigProperties setterName=null]

   [GAttributeInfo: name=UserName type=java.lang.String persistent=true
   manageable=true readable=true writable=true getterName=null
   setterName=null]

   [GAttributeInfo: name=statisticsProvider type=boolean
   persistent=false manageable=false readable=true writable=false
   getterName=isStatisticsProvider setterName=null]

   [GAttributeInfo: name=classLoader type=java.lang.ClassLoader
   persistent=false manageable=false readable=false writable=false
   getterName=null setterName=null]

   [GAttributeInfo: name=kernel type=org.apache.geronimo.kernel.Kernel
   persistent=false manageable=false readable=false writable=false
   getterName=null setterName=null]

   [GAttributeInfo: name=managedConnectionFactoryClass
   type=java.lang.String persistent=true manageable=true readable=true
   writable=false getterName=getManagedConnectionFactoryClass
   setterName=null]

   [GAttributeInfo: name=connectionFactory type=java.lang.Object
   persistent=false manageable=false readable=true writable=false
   getterName=getConnectionFactory setterName=null]

   [GAttributeInfo: name=stateManageable type=boolean persistent=false
   manageable=false readable=true writable=false
   getterName=isStateManageable setterName=null]

   [GAttributeInfo: name=connectionImplClass type=java.lang.String
   persistent=true manageable=true readable=true writable=false
   getterName=getConnectionImplClass setterName=null]

   [GAttributeInfo: name=Password type=java.lang.String persistent=true
   manageable=true readable=true writable=true getterName=null
   setterName=null]

   [GAttributeInfo: name=connectionFactoryImplClass
   type=java.lang.String persistent=true manageable=true readable=true
   writable=false getterName=getConnectionFactoryImplClass
   setterName=null]

   [GAttributeInfo: name=abstractName
   type=org.apache.geronimo.gbean.AbstractName persistent=false
   manageable=false readable=false writable=false getterName=null
   setterName=null]

   [GAttributeInfo: name=objectName type=java.lang.String
   persistent=false manageable=false readable=true writable=false
   getterName=getObjectName setterName=null]

   [GAttributeInfo: name=connectionInterface type=java.lang.String
   persistent=true manageable=true readable=true writable=false
   getterName=getConnectionInterface setterName=null]

   [GAttributeInfo: name=ExceptionSorterClass type=java.lang.String
   persistent=true manageable=true readable=true writable=true
   getterName=null setterName=null]

   [GAttributeInfo: name=ConnectionURL type=java.lang.String
   persistent=true manageable=true readable=true writable=true
   getterName=null setterName=null]

   [GAttributeInfo: name=implementedInterfaces type=[Ljava.lang.String;
   persistent=true manageable=true readable=true writable=false
   getterName=getImplementedInterfaces setterName=null]

   [GAttributeInfo: name=connectionManagerContainer
   type=java.lang.Object persistent=false manageable=false
   readable=true writable=false
   getterName=getConnectionManagerContainer setterName=null]

   [GAttributeInfo: name=CommitBeforeAutocommit type=java.lang.Boolean
   persistent=true manageable=true readable=true writable=true
   getterName=null setterName=null]

I seems as though these attributes (CreateDatabase and DatabaseName) are not
valid, however I have seen them mentioned in multiple posts. I would
appreciate any help.

Thanks,
Viet Nguyen

Reply via email to