Solved

Running AS/400 Program Remotely Connection gets Hang!

Posted on 2008-06-16
4
284 Views
Last Modified: 2008-09-30
Hi Experts!
I am using jsp  to connect DB2 Universal database for iseries, but my application is hanging while trying to connect to the 400. No exception is returned - it just sits there. I have no real knowledge of the 400 side of things so I don't know how to log user activity to see what is going wrong or anything.

I have checked with debugging on the line connection1 = d.connect(o,p,"xxxxx"); it gets hanged. please help me out of this problem.


Connection connection1 = null;

		 

		

	     AS400JDBCDriver d = new AS400JDBCDriver();

	     Properties p = new Properties();

	

	     AS400 o = new AS400("HOSTSEVRENAME");

	

	     p.put("user", "USERNAME");

	     p.put("password", "PASSWORD");

	     try

	     {

	    	 connection1 = d.connect(o,p,"LIB");

//on this line the application gets hang
 

	     }

	     catch(SQLException sr)

	     {

	    	 try

	    	 {

	    		 connection1.close();

	    	 }

	         catch(Exception e)

	         {

	        	 response.sendRedirect(response.encodeRedirectURL("login.jsp?action=efailed_" + e.getMessage()));

	         }

	         response.sendRedirect(response.encodeRedirectURL("login.jsp?action=srfailed_" + sr.getMessage()));

	     }

Open in new window

0
Comment
Question by:vikasbapat
4 Comments
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 500 total points
Comment Utility
Hi Vikasbapat,

Did you include the jar files util400.jar and jt400.jar? You need them both.
What will you do with the "LIB" in the connect? using the library list require "*LIBL"

If we don't get more info, we can't really help more I think, but in the mean time, check these examples,
I think it will help you a lot.

http://www.code400.com/viewsamples.php?lang_id=19

Regards,
Murph

0
 
LVL 37

Expert Comment

by:momi_sabag
Comment Utility
are you sure that the session can be made on the network ? maybe some ports are blocked
what do you mean by hang? when does it unhang and what message do you receive?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now