Create db2 dataSource in WAS liberty profile -
i developing websphere 8.5 (for z/os), use liberty local development on windows machine. can't data source work.
i created following entry in server.xml define data source.
<library id="db2jcc2lib"> <fileset dir="c:\program files\ibm\sqllib\java"/><!--includes="db2jcc.jar db2jcc_license_cu.jar db2jcc_license_cisuz.jar"--> </library> <datasource id="xxdb" jndiname="jdbc/xxxx" type="javax.sql.connectionpooldatasource"> <jdbcdriver libraryref="db2jcc2lib" id="db2-driver" javax.sql.connectionpooldatasource="com.ibm.db2.jcc.db2connectionpooldatasource"/> <properties.db2.jcc drivertype="2" databasename="xxxx" portnumber="50000" user="xxxx" password="{aes}xxxx"/> </datasource>
when application initializes following error message:
[jcc][4038][12241][3.61.65] t2luw exception: sql30081n kommunikationsfehler. verwendetes kommunikationsprotokoll: "tcp/ip". verwendete kommunikations-api: "sockets". position, der der fehler erkannt wurde: "127.0.0.1". Übertragungsfunktion, die den fehler festgestellt hat: "connect". protokollspezifische(r) fehlercode(s): "10061", "", "". sqlstate=08001
i think message comes db2 driver, unfortunately didn't find way yet change english; think it's understandable english speakers.
i have odbc system datasource connects db2 v10 maintenance level 015 z/os. local db2 connect installation v9.7.300.3885.
in regular websphere working datasource has driver type 2, database name set odbc-name , port number 50000. server name not set (empty). classpath , implementation class same provided in server.xml
i have tried find, ideas?
note: can't make changes on db2 server , there no issue connecting database other tools , regular websphere. server name in websphere configuration empty, database name set. when tried set servername in server.xml localhost or db2 server got same result.
any appreciated!
edit: updated correct version information
edit 2: long works dont care type (2 or 4) of jdbc driver used. want point out again type 2 working on machine. tried type 4 , got following message:
[jcc][t4][2043][11550][3.61.65] exception java.net.connectexception: error opening socket server xxx/xxx.30.3.34 on port 50,000 message: connection refused: connect. errorcode=-4499, sqlstate=08001 dsra0010e: sql state = 08001, error code = -4,499
sorry, previous post ate xml. trying again:
you need type 4 datasource connect remote database server, i.e.,
<datasource id="xxdb" jndiname="jdbc/xxxx" type="javax.sql.xadatasource"> <properties.db2.jcc drivertype="4" servername="the.db2.host.com" portnumber="50000" user="xxxx" password="xxxx" databasename="loc1" currentsqlid="sysa"/> <jdbcdriver libraryref="db2jcc2lib"> </datasource>
type 2 local z/os connection database resource. windows, being remote z/os, requires use type 4 connection. type 4 requires both servername , portnumber specified. these not applicable on type 2 connection.
Comments
Post a Comment