Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection to AS400

Status
Not open for further replies.

pattys

Programmer
Dec 12, 2002
1
PE
I have WebSphere Studio Advanced Edition 3.5 for Windows 2000 and i'm trying to connect to as400 using com.ibm.as400.access.AS400JDBCDriver, when i create the sql i see data but when i run the servlet generated by Database Wizard, get an error: java.lang.NullPointerException!!!...

i've readen that have to change the servlet generated:

Original Servlet:
<?xml version=&quot;1.0&quot;?>
<!-- This file was generated by IBM WebSphere Studio using K:\Program Files\WebSphere\Studio35\BIN\GenerationStyleSheets\V3.5\JSP1.0\ServletModel\ServletConfig.xsl-->
<servlet>
<markup-language>
<ml-name>HTML</ml-name>
<ml-mime>text/html</ml-mime>
<page-list>
<default-page>
<uri>/Query1HTMLResults.jsp</uri>
</default-page>

</page-list>
</markup-language>
<code>Patty.Query1</code>
<init-parameter value=&quot;com.ibm.as400.access.AS400JDBCDriver&quot; name=&quot;driver&quot;/>
<init-parameter value=&quot;pwd&quot; name=&quot;password&quot;/>
<init-parameter value=&quot;jdbc:as400://xxx&quot; name=&quot;URL&quot;/>
<init-parameter value=&quot;user&quot; name=&quot;userID&quot;/>
<init-parameter value=&quot;jdbc/jdbcas400xxx&quot; name=&quot;dataSourceName&quot;/>
</servlet>

Changed Servlet:
<?xml version=&quot;1.0&quot;?>
<!-- This file was generated by IBM WebSphere Studio using K:\Program Files\WebSphere\Studio35\BIN\GenerationStyleSheets\V3.5\JSP1.0\ServletModel\ServletConfig.xsl-->
<servlet>
<markup-language>
<ml-name>HTML</ml-name>
<ml-mime>text/html</ml-mime>
<page-list>
<default-page>
<uri>/Query1HTMLResults.jsp</uri>
</default-page>

</page-list>
</markup-language>
<code>Patty.Query1</code>
<init-parameter value=&quot;com.ibm.db2.jdbc.app.DB2Driver&quot; name=&quot;driver&quot;/>
<init-parameter value=&quot;pwd&quot; name=&quot;password&quot;/>
<init-parameter value=&quot;jdbc:db2:xxx&quot; name=&quot;URL&quot;/>
<init-parameter value=&quot;user&quot; name=&quot;userID&quot;/>
<init-parameter value=&quot;jdbc/jdbcdb2xxx&quot; name=&quot;dataSourceName&quot;/>
</servlet>

i did it but doesn't work!!!

Anybody can help me?

Thanks in advance.
 
Hi,
we have a similar connection to an As400. what I needed to do was download the JTOpen toolbox from
I put this in the websphere\appserver\java (or jdk)folder. you will have to then add the path to the jt400.jar file in the command line for the jvm. This should be something like drive:\websphere\appserver\java\JTOpen\jt400.jar . Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top