Thank you Forrest, I tried your suggestion, but I got the following error:

E:\workload\geronimo>deploy --user system --password manager deploy
E:\workload\dayTrader3.0-Beta\javaee6\assemblies\da
ytrader-ear\target\daytrader-ear-3.0-beta-1.ear
E:\workload\dayTrader3.0-Beta\javaee6\plans\src\main\resources\daytrader
-db2-xa-plan.xml
Using GERONIMO_HOME:   E:\workload\geronimo
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\Program Files\Java\jdk1.7.0\jre
2012-07-09 15:48:57,937 ERROR [DeployTool] Error:
org.apache.geronimo.common.DeploymentException: Operation failed:
com/ibm/db2/jcc/DB2XADataSource
        at
org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:168)
        at
org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)
        at
org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
        at
org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)
        at
org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:65)
        at
org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
        at
org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)

I am not sure if I missed anything in the plan.xml file, could you please
help to take a look? thank you very much!
2012/6/14 Forrest Xia <[email protected]>

> You need to use a command like this to deploy ear:
>
> deploy --user system --password manager deploy
> E:\workload\dayTrader3.0-Beta\
> javaee6\assemblies\daytrader-ear\target\daytrader-ear-3.0-beta-1.ear
> path2db_plan.xml
>
> The path2db_plan.xml is to be replaced by plan files generated from folder
> https://svn.apache.org/repos/asf/geronimo/daytrader/tags/daytrader-3.0-beta-1/javaee6/plans/src/main/resources/
> .
>
> Good luck!
>
> On Thu, Jun 14, 2012 at 5:15 PM, Jing Xu <[email protected]> wrote:
>
>> Hello everyone, could someone please give me some suggestions on this
>> problem?
>>
>>
>> ---------- Forwarded message ----------
>> From: Jing Xu <[email protected]>
>> Date: 2012/6/12
>> Subject: Problem of deploying dayTrader
>> To: [email protected]
>>
>>
>> Hi everybody,
>>
>> I am trying to deploy dayTrader(3.0 beta-1) into Geromino server(3.0
>> beta-1), but I found the instructions is a little out of date.
>>
>>
>> https://cwiki.apache.org/GMOxDOC22/daytrader-a-more-complex-application.html
>> Building Daytrader
>>
>> Once all the sources get checked out the next step is to build Daytrader.
>> Daytrader requires Maven 2 for building the binaries.
>>
>> From the *<daytrader_home>* directory run the following command.
>>
>> *mvn install*
>>
>> This process will take a couple of minutes. The binaries will be
>> generated in the corresponding *target* directory for each of the
>> modules in the *modules* directory.
>> But I can not find this directory after build, there is only one ear file
>> at
>> $DAYTRADER_HOME\javaee6\assemblies\daytrader-ear\target\daytrader-ear-3.0-beta-1.ear,
>> and when I was trying to deploy this file, one error was hit, can someone
>> please give me some advices? I am using db2 data source, not sure if there
>> should be any more config. Any reply will be very appreciated.
>>
>> E:\workload\geronimo-tomcat7-javaee6-3.0-beta-1\bin>deploy --user system
>> --password manager deploy
>> E:\workload\dayTrader3.0-Beta\javaee6\assemblies\daytrader-ear\target\daytrader-ear-3.0-beta-1.ear
>> Using GERONIMO_HOME:   E:\workload\geronimo-tomcat7-javaee6-3.0-beta-1
>> Using GERONIMO_TMPDIR: var\temp
>> Using JRE_HOME:        C:\Program Files\Java\jdk1.7.0\jre
>> 2012-06-12 12:53:23,968 ERROR [DeployTool] Error:
>> org.apache.geronimo.common.DeploymentException: Unable to deploy
>> daytrader-ear-3.0-beta-1.ear: Unable to resolve resource reference
>> 'java:comp/env/jdbc/TradeDataSource' (Could not find resource
>> 'jdbc/TradeDataSource'.  Perhaps it has not yet been configured, or your
>> application does not have a dependency declared for that resource module?
>> Search conducted in current module and dependencies:
>> [all: org.apache.geronimo.configs/j2ee-server//car]
>> [all: org.apache.geronimo.configs/openjpa2/3.0-beta-1/car]
>> [all: org.apache.geronimo.configs/axis//car]
>> [all: org.apache.geronimo.configs/axis2//car]
>> [classes: org.apache.geronimo.configs/openejb//car]
>> [all: org.apache.geronimo.configs/j2ee-corba-yoko/3.0-beta-1/car]
>> [all: org.apache.geronimo.modules/geronimo-bval//jar]
>> [all: org.apache.geronimo.configs/tomcat7/3.0-beta-1/car]
>> [all: org.apache.geronimo.configs/myfaces/3.0-beta-1/car]
>> [all: org.apache.geronimo.modules/geronimo-openejb//jar]
>> [all: org.apache.openwebbeans/openwebbeans-impl//jar]
>> [all: org.apache.openwebbeans/openwebbeans-web//jar]
>> [all: org.apache.geronimo.configs/system-database//car]
>> [all: org.apache.geronimo.configs/tomcat7//car]
>> [all: org.apache.geronimo.configs/wink/3.0-beta-1/car]
>> [all: org.apache.geronimo.configs/openjpa2//car]
>> )
>>         at
>> org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)
>>         at
>> org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)
>>         at
>> org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)
>>         at
>> org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
>>         at
>> org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)
>>         at
>> org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:65)
>>         at
>> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>>         at
>> org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)
>>
>> --
>> Thanks,
>> Best wishes,
>>
>> Jing Xu (徐晶)
>>
>> -----------------------------------------------------------------------------
>> E-Mail: [email protected]
>> QQ: 451590076
>> MSN: [email protected]
>>
>>
>>
>>
>> --
>> Thanks,
>> Best wishes,
>>
>> Jing Xu (徐晶)
>>
>> -----------------------------------------------------------------------------
>> E-Mail: [email protected]
>> QQ: 451590076
>> MSN: [email protected]
>>
>>
>
>
> --
> Thanks!
>
> Regards, Forrest
>
>


-- 
Thanks,
Best wishes,

Jing Xu (徐晶)
-----------------------------------------------------------------------------
E-Mail: [email protected]
QQ: 451590076
MSN: [email protected]
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!-- $Rev: 555467 $ $Date: 2007-07-11 22:39:14 -0400 (Wed, 11 Jul 2007) $ -->

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0";>
    <environment>
        <moduleId>
            <groupId>org.apache.geronimo.daytrader</groupId>
            <artifactId>daytrader</artifactId>
            <version>${project.version}</version>
            <type>car</type>
        </moduleId>
        <!--
         **
         ** The following section describes what other modules this application has dependencies on.  Since we will be 
         ** accessing our tables using the internal Derby database we need the system-database dependency.  Also, JPA is 
         ** used as a persistence mechanism so we have a dependency on the openjpa module as well.  
         **
         ** The dependency on Yoko is required but should be supplied by default.  This is just silly.
        -->
        <dependencies>
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>openjpa2</artifactId>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.configs</groupId>
                <artifactId>j2ee-corba-yoko</artifactId>
                <type>car</type>
            </dependency>
            <dependency>
                <groupId>com.ibm.db2</groupId>
                <artifactId>db2jcc</artifactId>
                <version>10.1</version>
                <type>jar</type>
            </dependency>
            <dependency>
                <groupId>com.ibm.db2</groupId>
                <artifactId>db2jcc_license_cu</artifactId>
                <version>10.1</version>
                <type>jar</type>
            </dependency>
        </dependencies>
    </environment>

    <!--
     **
     **  DayTrader Web War Module Definition  
     **
    -->
    <module>
        <web>web.war</web>
        <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
            <service-ref>
                <service-ref-name>service/Trade</service-ref-name>
                <port>
                    <port-name>TradeWSServices</port-name>
                    <protocol>http</protocol>
                    <host>localhost</host>
                    <port>8080</port>
                    <uri>/daytrader/services/TradeWSServices</uri>
                </port>
            </service-ref>
        </web-app>
    </module>


    

    <ext-module>
        <connector>TradeDataSource</connector>
        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
            <dep:groupId>org.tranql</dep:groupId>
            <dep:artifactId>tranql-connector-db2-xa</dep:artifactId>
            <dep:type>rar</dep:type>
        </external-path>
        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>


            <resourceadapter>
                <outbound-resourceadapter>
                    <connection-definition>
                        <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                        <connectiondefinition-instance>
                            <name>jdbc/TradeDataSource</name>
                            <config-property-setting name="UserName">trade</config-property-setting>
                            <config-property-setting name="Password">trade</config-property-setting>
                            <config-property-setting name="PortNumber">60015</config-property-setting>
                            <config-property-setting name="ServerName">localhost</config-property-setting>
                            <config-property-setting name="DatabaseName">tradedb</config-property-setting>
                            <config-property-setting name="DriverType">4</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/NoTxTradeDataSource</name>
                            <config-property-setting name="UserName">trade</config-property-setting>
                            <config-property-setting name="Password">trade</config-property-setting>
                            <config-property-setting name="PortNumber">60015</config-property-setting>
                            <config-property-setting name="ServerName">localhost</config-property-setting>
                            <config-property-setting name="DatabaseName">tradedb</config-property-setting>
                            <config-property-setting name="DriverType">4</config-property-setting>
                            <connectionmanager>
                                <no-transaction/>
                                <single-pool>
                                    <max-size>10</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>
    </ext-module>


    <ext-module>
        <connector>TradeJMS</connector>
        <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
            <dep:groupId>org.apache.geronimo.modules</dep:groupId>
            <dep:artifactId>geronimo-activemq-ra</dep:artifactId>
            <dep:type>rar</dep:type>
        </external-path>
        <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";>

            <resourceadapter>
                <!-- how to connect to the JMS Server -->
                <resourceadapter-instance>
                    <resourceadapter-name>TradeJMSResources</resourceadapter-name>
                    <config-property-setting name="ServerUrl">tcp://localhost:61616</config-property-setting>
                    <config-property-setting name="UserName">not needed</config-property-setting>
                    <config-property-setting name="Password">not needed</config-property-setting>
                    <workmanager>
                        <gbean-link>DefaultWorkManager</gbean-link>
                    </workmanager>
                </resourceadapter-instance>
                <!-- defines a ConnectionFactory -->
                <outbound-resourceadapter>
	                    <connection-definition>
                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
                        <connectiondefinition-instance>
                            <name>jms/QueueConnectionFactory</name>
                            <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
                            <connectionmanager>
                                <xa-transaction>
                                    <transaction-caching/>
                                </xa-transaction>
                                <single-pool>
                                    <max-size>50</max-size>
                                    <min-size>0</min-size>
                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                                    <idle-timeout-minutes>0</idle-timeout-minutes>
                                    <match-one/>
                                </single-pool>
                            </connectionmanager>
                        </connectiondefinition-instance>
                    </connection-definition>
                    <connection-definition>
                        <connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
                        <connectiondefinition-instance>
                            <name>jms/TopicConnectionFactory</name>
                            <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface>
                            <connectionmanager>
                                <xa-transaction>
                                    <transaction-caching/>
                                </xa-transaction>
                                <single-pool>
                                    <max-size>50</max-size>
                                    <min-size>0</min-size>
                                    <blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                                    <idle-timeout-minutes>0</idle-timeout-minutes>
                                    <match-one/>
                                </single-pool>
                            </connectionmanager>
                        </connectiondefinition-instance>
                    </connection-definition>
                </outbound-resourceadapter>
            </resourceadapter>

            <adminobject>
                <adminobject-interface>javax.jms.Topic</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQTopic</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>jms/TradeStreamerTopic</message-destination-name>
                    <config-property-setting name="PhysicalName">TradeStreamerTopic</config-property-setting>
                </adminobject-instance>
            </adminobject>

            <adminobject>
                <adminobject-interface>javax.jms.Queue</adminobject-interface>
                <adminobject-class>org.activemq.message.ActiveMQQueue</adminobject-class>
                <adminobject-instance>
                    <message-destination-name>jms/TradeBrokerQueue</message-destination-name>
                    <config-property-setting name="PhysicalName">TradeBrokerQueue</config-property-setting>
                </adminobject-instance>
            </adminobject>

        </connector>
    </ext-module>
</application>

Reply via email to