Connecting DB2/as400 to Rapid Analytics using jt400 driver
JayCarr
New Altair Community Member
So, I got RA up and running in Ubuntu Linux. Everything seems to be working correctly so far, but for some reason I can't add a connection for our as400s...
I followed the directions in this post as closely as I could:
http://rapid-i.com/rapidforum/index.php/topic,4437.0.html
I ended up putting the jt400.jar into //server/default/lib
I put the db2-400-ds.xml into //server/default/deploy
And it had this text in it (schema, username and password redacted, they are correct in my implementation)
What am I doing wrong? I did change the .xml file a bit so that the connection string more closely matched the working string I have in RapidMiner (after trying it the standard way first), but other than that I feel like I followed the instructions to the letter...
I followed the directions in this post as closely as I could:
http://rapid-i.com/rapidforum/index.php/topic,4437.0.html
I ended up putting the jt400.jar into //server/default/lib
I put the db2-400-ds.xml into //server/default/deploy
And it had this text in it (schema, username and password redacted, they are correct in my implementation)
After doing all of this I go into RapidAnalytics at "localhost:8080" and sign in. I go to Administration > Data Connections > Create New Connection Entry. When I go to the drop down for the different DBs though my DB2/400 doesn't show up?
<datasources>
<local-tx-datasource>
<jndi-name>DB2-400</jndi-name>
<connection-url>jdbc:as400:*********;prompt=false;extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>*******</user-name>
<password>*******</password>
<min-pool-size>0</min-pool-size>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>DB2/400</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
What am I doing wrong? I did change the .xml file a bit so that the connection string more closely matched the working string I have in RapidMiner (after trying it the standard way first), but other than that I feel like I followed the instructions to the letter...
0
Answers
-
Anyone? Please? This is really kind of a show stopper as far as using RA...0
-
Did you restart RapidAnalytis after adding the .jar and the configuration XML?0
-
Firstly, I captured the actual message that comes up when I put the jt400.jar in the bin and put db2-400-ds.xml into deploy. Rapid Analytics (or specifically, JBoss) pops this out:
This, btw, is from a clean install of both MySQL and Rapid Analytics. I went ahead and restarted the server after this, it's worth noting that the start up took much longer than the 55 seconds or so I'm used to, it took about twice as long.
19:10:04,000 INFO [com.arjuna.ats.arjuna] ARJUNA-12296 ExpiredEntryMonitor running at Thu, 25 Jul 2013 19:10:04
01:57:12,321 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2-400' to JNDI name 'java:DB2-400'
After all of that, on a clean install of MySQL and a clean install of Rapid Analytics, the driver is still not showing up. Everything is still configured as specified...0 -
Not sure if this will help but this is what I had to do to get the DB2 connection to work:
In C:\RapidAnalytics\server\default\deploy there is a file called RapidAnalytics-CE-1.3.012.ear. Copy this to your own PC and open it using 7-zip. In the /lib/ sub directory open the rapidminer.jar then in com/rapidminer/resources you will find a file called jdbc_properties.xml. Edit this and add the following to the bottom.
<driver dbnameseparator="/" defaultport="50000" driver_jar="C:\Program Files\IBM\SQLLIB\java\db2java.zip" drivers="COM.ibm.db2.jdbc.app.DB2Driver" name="DB2" urlprefix="jdbc:db2:"/></drivers>
Save this – repackage the zip and put it back on the server. Restart the server. In the database connections on the web interface DB2 will now appear as a drop down in the database types. You can configure this using the same technique as the ODBC bridge. Just enter the the DSN name, user name and password.
0