You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by "VARIN, FRANCIS A." <FV...@AMICA.com> on 2006/03/22 16:36:56 UTC

Configurint Geronimo to use DB2

  

We are in the process of trying to configure Geronimo to access DB2 as
the database manager of choice. We currently have this mechanism
functioning properly using WSAD and WAS. We are trying to migrate over
to using Eclipse and Geronimo as a development environment. We are
running into issues with trying to get Geronimo to configure the
datasource for DB2. We have reviewed and attempted the following
tutorials. 

 

http://www-128.ibm.com/developerworks/opensource/library/os-ag-jdbc/

http://opensource2.atlassian.com/confluence/oss/display/GERONIMO/Configu
ring+DB2+Datasource

 

 

Here is a sample datasource that we are trying to use: 

<?xml version="1.0" encoding="UTF-8"?>

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

  version="1.5" 

  configId="WebDataSources"  

  parentId="org/apache/geronimo/Server">

 

<dependency>

  <uri>

    db2/jars/db2java.zip

  </uri>

</dependency>

 

<resourceadapter>

  <outbound-resourceadapter>

    <connection-definition>

      <connectionfactory-interface> 

        javax.sql.DataSource 

      </connectionfactory-interface>

      <connectiondefinition-instance>

        <name>MakeModel</name>

        <config-property-setting name="USERID"> 

          ecom1 

        </config-property-setting>

        <config-property-setting name="PASSWORD"> 

          ecom1 

        </config-property-setting>

        <config-property-setting name="Driver"> 

          COM.ibm.db2.jdbc.app.DB2Driver

        </config-property-setting>

        <config-property-setting name="ConnectionURL">

           jdbc:db2:VINDB

        </config-property-setting>

        <config-property-setting name="CommitBeforeAutocommit"> 

           false 

        </config-property-setting>

        <config-property-setting name="ExceptionSorterClass"> 

           org.tranql.connector.NoExceptionsAreFatalSorter

        </config-property-setting>

 

        <connectionmanager>

          <local-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>

 

        <global-jndi-name> 

          VINDB

        </global-jndi-name>

 

      </connectiondefinition-instance>

    </connection-definition>

  </outbound-resourceadapter>

</resourceadapter>

</connector>

 

 

 

When we try to use the deploy tool we get the following response: 

C:\Program Files\Geronimo\geronimo-1.0>java -jar bin\deployer.jar
db2-plan.xml repository\tranql\rars\tranql-connector-1.0-SNAPSHOT.rar

 

    Error: No such command: 'db2-plan.xml'

 

 

What would be really helpful is if anyone has successfully integrated
Geronimo and DB2 to share their experiences and/or configuration we
really would appreciate any help we can get here. We need to get by this
issue but, are running out of things to try. 

 

 

Francis A. Varin, M.S. 
IT Architect II 
Corporate Information Systems 
Amica Mutual Insurance Company 
1-800-652-6422 ext. 24536  
http://www.amica.com <http://www.amica.com/>  

 



Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
Thanks Paul, we gave your suggestion a try and it got us by our initial
error. We also checked the tutorial in the links I provided. Sure enough,
they are incorrect. 

We are now receiving an exception on our license key. We are using DB2
connect middleware to handle the actual connection to our mainframe based
databases and we are now trying to get that to function. Interestingly, WSAD
must handle all of this under the covers. Our challenge is to get the
connection to function through Geronimo. Here is the message that we get
when we try to connect to the datasource: 

com.ibm.db2.jcc.c.SqlException: The version of the IBM Universal JDBC driver
in use is not licensed for connectivity to z/OS databases.  To connect to
this DB2 server, please obtain a licensed copy of the IBM DB2 Universal
Driver for JDBC and SQLJ.  An appropriate license file db2jcc_license_*.jar
for this target platform must be installed to the application classpath. 
Connectivity to z/OS databases is enabled by any of the following license
files: { db2jcc_license_cisuz.jar }

            at com.ibm.db2.jcc.c.o.cb(o.java:2953)

            at com.ibm.db2.jcc.c.o.bb(o.java:2899)

            at com.ibm.db2.jcc.a.b.bb(b.java:508)

            at com.ibm.db2.jcc.a.b.<init>(b.java:289)

            at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:162)

            at
org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.attemptConnect(DatabasePoolPortlet.java:797)

            at
org.apache.geronimo.console.databasemanager.wizard.DatabasePoolPortlet.processAction(DatabasePoolPortlet.java:321)

            at
org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:229)

            at
org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:158)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

            at
org.apache.pluto.core.PortletServlet.service(PortletServlet.java:153)

            at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

            at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

            at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)

            at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)

            at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)

            at
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)

            at
org.apache.pluto.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:68)

            at
org.apache.pluto.PortletContainerImpl.processPortletAction(PortletContainerImpl.java:164)

            at
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.processPortletAction(PortletContainerWrapperImpl.java:82)

            at org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

            at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

            at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

            at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

            at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

            at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)

            at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:272)

            at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:46)

            at
org.apache.geronimo.tomcat.valve.PolicyContextValve.invoke(PolicyContextValve.java:50)

            at
org.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53)

            at
org.apache.geronimo.tomcat.valve.ComponentContextValve.invoke(ComponentContextValve.java:47)

            at
org.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60)

            at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

            at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

            at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

            at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)

            at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

            at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

            at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

            at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

            at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

            at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

            at java.lang.Thread.run(Thread.java:534)


--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3538603
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Paul McMahan <pa...@gmail.com>.
On 3/22/06, VARIN, FRANCIS A. <FV...@amica.com> wrote:

> When we try to use the deploy tool we get the following response:
>
> C:\Program Files\Geronimo\geronimo-1.0>java -jar bin\deployer.jar db2-plan.xml repository\tranql\rars\tranql-connector-1.0-SNAPSHOT.rar
>
>
>
>     Error: No such command: 'db2-plan.xml'

I believe that you accidentally left out the word "deploy" in the
command between the jar file name and "db2-plan.xml".   i.e. it should
read

C:\Program Files\Geronimo\geronimo-1.0>java -jar bin\deployer.jar
deploy db2-plan.xml
repository\tranql\rars\tranql-connector-1.0-SNAPSHOT.rar

(The "deploy" command may seem redundant since the jar is named
deployer.jar but in fact it can do more things with components besides
deploying them, such as undeploy, start, stop, etc.  For more
information type "java -jar deployer.jar help")

Best wishes,
Paul

Re: Configurint Geronimo to use DB2

Posted by Paul McMahan <pa...@gmail.com>.
Fran,  thank you for sharing your experience with us and I'm glad to
hear that your persistence has finally paid off.  We're especially
grateful for the feedback you have provided after having been through
the process now (the hard way).  For the problems you had with the db
wizard there is some hope that configuring a datasource which requires
multiple jars will be easier in the future when the following JIRA is
integrated (probably in the upcoming 1.1 release):
http://issues.apache.org/jira/browse/GERONIMO-1524

For the documentation I think you would agree that what's available is
valuable but some clarification might be in order  Your input would be
especially helpful here.  If you create an account on the wiki server
(click "sign up" in the top right corner, takes about 1 min) then you
can make changes directly to the page.  Or please feel free to send
your suggestions to the list and we'll incorporate them.

Best wishes,
Paul


On 3/23/06, Fran Varin <FV...@amica.com> wrote:
>
> First of all, I would like to thank all of those who took the time to respond
> to my post. Your input was very helpful and much appreciated.
>
> At this point I have been able to connect to a DB2 database! I think the
> issues were largely due to a learning curve with using Geronimo. I took a
> step back this morning and installed a copy of WAS-CE along side of my
> Geronimo installation. My rationale was that WAS-CE is based on Geronimo and
> perhaps the DB2 integration was streamlined somewhat. That proved to be an
> incorrect assumption on my part. I reviewed the article from my second link
> in this post again and upon this review with fresh eyes finally understood
> what was really the issue.
>
> Here was the process:
> 1) Copy the DB2 drivers to the "repository" directory within the server
> folder structure.
>     - I had to create the following "db2\jars" within the repository folder.
> 2) Rename the driver jars as described in the named tutorials
>     - Be sure to have the correct "license" jars, there are three (not all
> may be needed) and the DB2 doc describes the use of each
> 3) Start the server and launch the admin console.
> 4) Select database pool and configure according to the tutorial.
>     - In the case of using db2 connect its important to review the
> attributes necessary for connecting to that server.
>     - HERE IS WHERE I WENT WRONG...The database pool "wizard" is a tool that
> creates the deployment descriptor. For some reason this was lost on me and
> my understanding was that the descriptor needed to be created separately
> from using the wizard. I saw the wizard as an additional step in configuring
> the datasource.
>    - The tutorial indicates that the exception indicating that the missing
> license jar is "normal" and instructs you to select the "skip test and view"
> button. When you do that you are supposed to see the generated deployment
> descriptor xml. However, this facility seems to be broken...I sawa a blank
> edit box. So rather than copy that xml and edit it to add the dependencies
> (for the license jars), I used the xml directly from the sample and modified
> it to match the datasource connection I needed. This little "issue" with the
> wizard and the exception was what sent me down a bad road initially. It
> seemed we were running into some kind of license violation. It was not
> obvious that the license jars needed to be added manually to the descripor
> as dependencies.
>    - Next, I saved the deployment xml to the "bin" directory of the server
> and launced the deployment tool exactly as stated in the tutorial from the
> command line. Worked great...
>    - I then went back to the admin console and was able to see my datasource
> "running". Selecting edit I was able to view the definitions I had made and
> could possibly change them there.
>
> Whew...I'm calling this one done for now. Hopefully, that will get us over
> the hump.
>
> It seems that the wizard needs some work...documenation could be better as
> well. However, it is new and the learning experience was interesting.
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3555010
> Sent from the Apache Geronimo - Users forum at Nabble.com.
>
>

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
First of all, I would like to thank all of those who took the time to respond
to my post. Your input was very helpful and much appreciated. 

At this point I have been able to connect to a DB2 database! I think the
issues were largely due to a learning curve with using Geronimo. I took a
step back this morning and installed a copy of WAS-CE along side of my
Geronimo installation. My rationale was that WAS-CE is based on Geronimo and
perhaps the DB2 integration was streamlined somewhat. That proved to be an
incorrect assumption on my part. I reviewed the article from my second link
in this post again and upon this review with fresh eyes finally understood
what was really the issue. 

Here was the process: 
1) Copy the DB2 drivers to the "repository" directory within the server
folder structure. 
    - I had to create the following "db2\jars" within the repository folder.
2) Rename the driver jars as described in the named tutorials 
    - Be sure to have the correct "license" jars, there are three (not all
may be needed) and the DB2 doc describes the use of each
3) Start the server and launch the admin console. 
4) Select database pool and configure according to the tutorial. 
    - In the case of using db2 connect its important to review the
attributes necessary for connecting to that server. 
    - HERE IS WHERE I WENT WRONG...The database pool "wizard" is a tool that
creates the deployment descriptor. For some reason this was lost on me and
my understanding was that the descriptor needed to be created separately
from using the wizard. I saw the wizard as an additional step in configuring
the datasource. 
   - The tutorial indicates that the exception indicating that the missing
license jar is "normal" and instructs you to select the "skip test and view"
button. When you do that you are supposed to see the generated deployment
descriptor xml. However, this facility seems to be broken...I sawa a blank
edit box. So rather than copy that xml and edit it to add the dependencies
(for the license jars), I used the xml directly from the sample and modified
it to match the datasource connection I needed. This little "issue" with the
wizard and the exception was what sent me down a bad road initially. It
seemed we were running into some kind of license violation. It was not
obvious that the license jars needed to be added manually to the descripor
as dependencies. 
   - Next, I saved the deployment xml to the "bin" directory of the server
and launced the deployment tool exactly as stated in the tutorial from the
command line. Worked great...
   - I then went back to the admin console and was able to see my datasource
"running". Selecting edit I was able to view the definitions I had made and
could possibly change them there. 

Whew...I'm calling this one done for now. Hopefully, that will get us over
the hump. 

It seems that the wizard needs some work...documenation could be better as
well. However, it is new and the learning experience was interesting. 
--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3555010
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by David Carew <dc...@gmail.com>.
It appears you're using the Type 2 DB2 JDBC Driver. I think that's
deprecated so I would avoid using it. I would recommmend using the DB2 Type
4 JDBC Driver. Here's an example of a plan that I embedded in my
geronimo-application.xml file. Note that I renamed the DB2 jars to
db2jcc-8.2.jar and db2jcc_license_cu-8.2.jar after putting them in
${GERONIMO_HOME}/repository/db2/jars. Hope this helps.

 <ext-module>
        <connector>WebBankDataSource</connector>
        <external-path>tranql/tranql-connector/1.1/rar</external-path>
        <connector
            xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
            configId="WebBankDB2Pool"
            parentId="geronimo/j2ee-server/1.0/car">

    <dependency>
        <uri>db2/db2jcc/8.2/jar</uri>
    </dependency>
    <dependency>
        <uri>db2/db2jcc_license_cu/8.2/jar</uri>
    </dependency>

       <resourceadapter>
       <outbound-resourceadapter>

          <connection-definition>
           <connectionfactory-interface>
            javax.sql.DataSource
           </connectionfactory-interface>
        <connectiondefinition-instance>
           <name>WebBankDB2Pool</name>
            <config-property-setting name="UserName">
                your_userid
            </config-property-setting>
            <config-property-setting name="Password">
                your_password
            </config-property-setting>
            <config-property-setting name="Driver">
                com.ibm.db2.jcc.DB2Driver
            </config-property-setting>
            <config-property-setting name="ConnectionURL">
                jdbc:db2://localhost:50000/your_db
            </config-property-setting>

            <config-property-setting name="CommitBeforeAutocommit">
                true
            </config-property-setting>
            <config-property-setting name="ExceptionSorterClass">
                org.tranql.connector.NoExceptionsAreFatalSorter
            </config-property-setting>
            <connectionmanager>
                <local-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>

Re: Configurint Geronimo to use DB2

Posted by Hernan Cunico <hc...@gmail.com>.
Hi Francis,
A first comment would be on how you are trying to deploy. The command syntax is as follows:

   java -jar deployer.jar <general_options> <command> <command_options>

For <general_options> you would normally specify user and password, for example:

   --user system --password manager

For <command>, if you are deploying, you would use:

   deploy


For this <command> in particular you would specify the deployment plan and module to deploy, for 
example:

   <deploymentPlan_home>\db2_plan.xml ..\repository\tranql\rars\tranql-connector-1.1.rar

The entire command syntax in your case would be as follows (this comand should be in one line)

C:\Program Files\Geronimo\geronimo-1.0\bin>java -jar deployer.jar --user system --password manager 
deploy <deploymentPlan_home>\db2_plan.xml ..\repository\tranql\rars\tranql-connector-1.1.rar


If you are using Apache Geronimo v1.0 then you should not have any *SNAPSHOT* named files, the 
article in developerWorks refers to a pre-release M3 and up, not v1.0.

Second comment, your deployment plan will fail to deploy. Initially you are adding the wrong driver 
file and second you are not including the license jars.

I would suggest you take a closer look at the "Configure DB2 Datasource" document 
(http://opensource2.atlassian.com/confluence/oss/display/GERONIMO/Configuring+DB2+Datasource), the 
instructions are simple, easy to follow and IT WORKS! Follow those steps, you should have it running 
in less than 5 mins.

Additionally you may want to look at the "Deployer tool" article 
(http://opensource2.atlassian.com/confluence/oss/display/GERONIMO/Deployer+tool)

Let me know if you still have problems following the article (I trust you will not have any :) )

Cheers!
Hernan

VARIN, FRANCIS A. wrote:
> We are in the process of trying to configure Geronimo to access DB2 as 
> the database manager of choice. We currently have this mechanism 
> functioning properly using WSAD and WAS. We are trying to migrate over 
> to using Eclipse and Geronimo as a development environment. We are 
> running into issues with trying to get Geronimo to configure the 
> datasource for DB2. We have reviewed and attempted the following tutorials.
> 
>  
> 
> http://www-128.ibm.com/developerworks/opensource/library/os-ag-jdbc/
> 
> http://opensource2.atlassian.com/confluence/oss/display/GERONIMO/Configuring+DB2+Datasource
> 
>  
> 
>  
> 
> Here is a sample datasource that we are trying to use:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector"
> 
>   version="1.5"
> 
>   configId="WebDataSources" 
> 
>   parentId="org/apache/geronimo/Server">
> 
>  
> 
> <dependency>
> 
>   <uri>
> 
>     db2/jars/db2java.zip
> 
>   </uri>
> 
> </dependency>
> 
>  
> 
> <resourceadapter>
> 
>   <outbound-resourceadapter>
> 
>     <connection-definition>
> 
>       <connectionfactory-interface>
> 
>         javax.sql.DataSource
> 
>       </connectionfactory-interface>
> 
>       <connectiondefinition-instance>
> 
>         <name>MakeModel</name>
> 
>         <config-property-setting name="USERID">
> 
>           ecom1
> 
>         </config-property-setting>
> 
>         <config-property-setting name="PASSWORD">
> 
>           ecom1
> 
>         </config-property-setting>
> 
>         <config-property-setting name="Driver">
> 
>           COM.ibm.db2.jdbc.app.DB2Driver
> 
>         </config-property-setting>
> 
>         <config-property-setting name="ConnectionURL">
> 
>            jdbc:db2:VINDB
> 
>         </config-property-setting>
> 
>         <config-property-setting name="CommitBeforeAutocommit">
> 
>            false
> 
>         </config-property-setting>
> 
>         <config-property-setting name="ExceptionSorterClass">
> 
>            org.tranql.connector.NoExceptionsAreFatalSorter
> 
>         </config-property-setting>
> 
>  
> 
>         <connectionmanager>
> 
>           <local-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>
> 
>  
> 
>         <global-jndi-name>
> 
>           VINDB
> 
>         </global-jndi-name>
> 
>  
> 
>       </connectiondefinition-instance>
> 
>     </connection-definition>
> 
>   </outbound-resourceadapter>
> 
> </resourceadapter>
> 
> </connector>
> 
>  
> 
>  
> 
>  
> 
> When we try to use the deploy tool we get the following response:
> 
> C:\Program Files\Geronimo\geronimo-1.0>java -jar bin\deployer.jar 
> db2-plan.xml repository\tranql\rars\tranql-connector-1.0-SNAPSHOT.rar
> 
>  
> 
>     Error: No such command: 'db2-plan.xml'
> 
>  
> 
>  
> 
> What would be really helpful is if anyone has successfully integrated 
> Geronimo and DB2 to share their experiences and/or configuration we 
> really would appreciate any help we can get here. We need to get by this 
> issue but, are running out of things to try.
> 
>  
> 
>  
> 
> *Francis A. Varin, M.S.* 
> *IT Architect II* 
> Corporate Information Systems
> Amica Mutual Insurance Company
> 1-800-652-6422 ext. 24536 
> http://www.amica.com <http://www.amica.com/>
> 
>  
> 
> ------------------------------------------------------------------------
> 
> * **********************************************************
> This email and any files transmitted with it are confidential and
> intended
> solely for the use of the individual or entity to whom they are
> addressed.
> If you have received this email in error please notify
> postmaster@amica.com
> and the sender of the message. Thank you.
> ********************************************************** *
> 

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
That sounds reasonable. Our DBA did mention that WebSphere uses a driver that
is different than the ones that we have been discussing in this thread. We
have been trying to pursue that as well but, not having much luck since that
driver is located in a .zip file. The Geronimo admin console wants to see a
jar file. 

We've tried repackaging that .zip as a .jar but, we receive the message that
the jar does not contain the specified driver yet we can see it in the .jar. 
--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3541064
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Paul McMahan <pa...@gmail.com>.
I'm not entirely familiar with how DB2 connect works but it may be
that you need to configure your datasource to connect to a different
host and/or port number than the db2 instance running on your
mainframe server.  i.e. you might be inadvertently bypassing your DB2
connect and going straight to the mainframe.  Just a thought.

Best wishes,
Paul

On 3/22/06, Fran Varin <FV...@amica.com> wrote:
>
> Yes, we did add those entries. What we're really confused about is that the
> java drivers supplied by the DB2 install are contained in a .zip file. These
> are different from the ones mentioned in the tutorial and is also the
> version that contains the driver that we reference for using DB2 connect.
> However, we cannot seem to configure Geronimo using this driver. We've event
> packaged the content of the .zip as a .jar and that does not resolve the
> issue.
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3540585
> Sent from the Apache Geronimo - Users forum at Nabble.com.
>
>

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
I don't disagree...I'm trying to sort all of this out. I did a search on my
machine and found multiple copies of the DB2 jar files. Essentially, they
are present in the DB2 client installation, WSAD, and Eclipse. 

WSAD seems to be quite a different animal so, I figure there is no telling
what IBM did internally to get this to work. Inside of WSAD is the only
place on my workstation that has a copy of the "cisuz" license jar. Its
difficult to know which set to use, what they should be renamed to and if
there is any significant difference at all. 
--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3551291
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Hernan Cunico <hc...@gmail.com>.
As far as I know, db2jcc_license_cisuz.jar is the DB2 license for DB2 ESE and DB2 Connect. 
db2jcc_license_cisuz.jar has to be used along with db2jcc_license_cu.jar

I understand you may not have a lic to directly connect to zOS but you should have a lic to connect 
to DB2 Connect (which is db2jcc_license_cisuz.jar)

Cheers!
Hernan

Fran Varin wrote:
> I have the following: 
> 
> db2jcc.jar
> db2jcc_license_cu.jar
> 
> 
> 1) We copied and renamed those into the appropriate Geronimo directory
> 2) Initially able to connect but received an exception basically saying we
> need to have the correct license key file in order to connect to zOS. 
> 3) Our DBA informed us that we are NOT licensed for directo connect to zOS,
> that we use DB2 Connect and need to connect through that facility. 
> 4) We are in the process of trying to figure that out. 
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3541011
> Sent from the Apache Geronimo - Users forum at Nabble.com.
> 
> 

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
I have the following: 

db2jcc.jar
db2jcc_license_cu.jar


1) We copied and renamed those into the appropriate Geronimo directory
2) Initially able to connect but received an exception basically saying we
need to have the correct license key file in order to connect to zOS. 
3) Our DBA informed us that we are NOT licensed for directo connect to zOS,
that we use DB2 Connect and need to connect through that facility. 
4) We are in the process of trying to figure that out. 
--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3541011
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Hernan Cunico <hc...@gmail.com>.
don't you have these files in the <sqllib_home>\java ?

db2jcc.jar
db2jcc_license_cisuz.jar
db2jcc_license_cu.jar

You should not have to extract these files from any zip, in fact there should be more jar files in 
that directory.

If you try to repackage these files in a zip or jar it will still not work.

Cheers!
Hernan

Fran Varin wrote:
> Yes, we did add those entries. What we're really confused about is that the
> java drivers supplied by the DB2 install are contained in a .zip file. These
> are different from the ones mentioned in the tutorial and is also the
> version that contains the driver that we reference for using DB2 connect.
> However, we cannot seem to configure Geronimo using this driver. We've event
> packaged the content of the .zip as a .jar and that does not resolve the
> issue. 
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3540585
> Sent from the Apache Geronimo - Users forum at Nabble.com.
> 
> 

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
Yes, we did add those entries. What we're really confused about is that the
java drivers supplied by the DB2 install are contained in a .zip file. These
are different from the ones mentioned in the tutorial and is also the
version that contains the driver that we reference for using DB2 connect.
However, we cannot seem to configure Geronimo using this driver. We've event
packaged the content of the .zip as a .jar and that does not resolve the
issue. 
--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3540585
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Hernan Cunico <hc...@gmail.com>.
Once you copy those files in the ...db2/jars directory then you need to add them to the deployment 
plan, here is an excerpt

<?xml version="1.0" encoding="UTF-8"?>
<connector
	configId="user/database-pool-DB2_Test/1/car"
	xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0">

		<dependency>
			<uri>db2/db2jcc/8.1.8/jar</uri>
		</dependency>

		<dependency>
			<uri>db2/db2jcc_license_cu/8.1.8/jar</uri>
		</dependency>

		<dependency>
			<uri>db2/db2jcc_license_cisuz/8.1.8/jar</uri>
		</dependency>

...

Keep in mind the deployment is *MANUAL*, you may create a template through the Admin Console but 
then you need to create a file (a db2_plan.xml) and deploy it manually. Once deployed you don't have 
an option from the console yet to test an already existing pool.

Cheers!
Hernan



Fran Varin wrote:
> Hi Matt, 
> I'm not entirely sure what you are referring to when you say that I need to
> include the license JARS as "dependencies". We copied the following jars to 
> 
> C:\Apache\geronimo-tomcat-j2ee-1\geronimo-1.0\repository\db2\jars
> 
> db2jcc-8.1.7.jar
> db2jcc_license_c-8.1.7.jar
> db2jcc.license_cisuz-8.1.7.jar
> db2jcc_license_cu-8.1.7.jar
> 
> 
> 
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3539558
> Sent from the Apache Geronimo - Users forum at Nabble.com.
> 
> 

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
Hi Matt, 
I'm not entirely sure what you are referring to when you say that I need to
include the license JARS as "dependencies". We copied the following jars to 

C:\Apache\geronimo-tomcat-j2ee-1\geronimo-1.0\repository\db2\jars

db2jcc-8.1.7.jar
db2jcc_license_c-8.1.7.jar
db2jcc.license_cisuz-8.1.7.jar
db2jcc_license_cu-8.1.7.jar



--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3539558
Sent from the Apache Geronimo - Users forum at Nabble.com.


Re: Configurint Geronimo to use DB2

Posted by Matt Hogstrom <ma...@hogstrom.org>.
You'll need to include the license jars as dependencies as well.  Have you 
included them ?


Fran Varin wrote:
> Greeting Hernan! 
> Thanks for your reply, we found in the Universal DB documentation a table
> that describes the function of three different license files. We located
> those and placed copies in 
> 
> C:\Apache\geronimo-tomcat-j2ee-1\geronimo-1.0\repository\db2\jars
> 
> Our assumption is that we have located them in the correct place. When we go
> to the Geronimo Admin console to attempt to connect to the database we
> receive the exception and stack tract that I sent along on my initial reply. 
> 
> According to our DBA he indicated that we were not licensed to connect
> directly to zOS instead we had DB2 connect software that handled the
> connection for us. We found an IBM article that eluded to the same type of
> approach as well. 
> 
> The next question for us seems to be ... how can we accomplish a connection
> to the database through the db2 connect middleware? Clearly, it works since
> we currently connect WebSphere the same way. 
> 
> However, WSAD must be handling this "under the covers" somehow because there
> is no extensive configuration to have the WebSphere Test Environment (a
> watered down version os WAS that is part of WSAD) is able to handle it
> somehow. 
> 
> 
> --
> View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3538784
> Sent from the Apache Geronimo - Users forum at Nabble.com.
> 
> 
> 
> 

Re: Configurint Geronimo to use DB2

Posted by Fran Varin <FV...@AMICA.com>.
Greeting Hernan! 
Thanks for your reply, we found in the Universal DB documentation a table
that describes the function of three different license files. We located
those and placed copies in 

C:\Apache\geronimo-tomcat-j2ee-1\geronimo-1.0\repository\db2\jars

Our assumption is that we have located them in the correct place. When we go
to the Geronimo Admin console to attempt to connect to the database we
receive the exception and stack tract that I sent along on my initial reply. 

According to our DBA he indicated that we were not licensed to connect
directly to zOS instead we had DB2 connect software that handled the
connection for us. We found an IBM article that eluded to the same type of
approach as well. 

The next question for us seems to be ... how can we accomplish a connection
to the database through the db2 connect middleware? Clearly, it works since
we currently connect WebSphere the same way. 

However, WSAD must be handling this "under the covers" somehow because there
is no extensive configuration to have the WebSphere Test Environment (a
watered down version os WAS that is part of WSAD) is able to handle it
somehow. 


--
View this message in context: http://www.nabble.com/Configurint-Geronimo-to-use-DB2-t1324683.html#a3538784
Sent from the Apache Geronimo - Users forum at Nabble.com.