This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
8 Replies Last post: Mar 30, 2009 12:48 PM by RMullis  
Click to view RMullis's profile   10 posts since
Jan 30, 2009

Mar 18, 2009 1:06 PM

Connecting to an IBM i Database


I am just beginning the long journey to learning EGL. I have started by adapting one of the simple tutorials that does a customer search to use a database on our IBM i system. I have gotten to the point of testing my program using the Apache Tomcat server. When I run the program, I get the following error:

"EGL0509E Cannot connect to the default database. The name of the default database was not specified."

I have searched around, but can't find where to define the default database for my testing. I am sure it is something simple. Can anyone point me in the right direction?

Thanks in advance for your help.

Click to view Hsieh's profile   131 posts since
May 28, 2008
1. Mar 19, 2009 8:31 AM Up Image in response to: RMullis
Re: Connecting to an IBM i Database


Tell me if you are doing the test on debug or an application generated ? is J2EE ?

Hsieh

Click to view Hsieh's profile   131 posts since
May 28, 2008
4. Mar 20, 2009 9:59 PM Up Image in response to: RMullis
Re: Connecting to an IBM i Database

Rmullis,

Do you testing the EGL program generated to Java ? but it is a J2EE or not ?

Do you testing the EGL program from RBD Debug ?

Do you setting datasource and connection on web server ?

Which parameters do you have in the build descriptor ?


Click to view Steiner's profile   28 posts since
Jul 10, 2008
5. Mar 23, 2009 11:06 AM Up Image in response to: RMullis
Re: Connecting to an IBM i Database
That might be a tomcat problem, I think.

You have to define the DB connection in the context.xml of your tomcat.

Have a look here: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
Look for "JDBC Data Sources".
Click to view AndySteele's profile   274 posts since
Jun 10, 2008
7. Mar 23, 2009 4:33 PM Up Image in response to: RMullis
Re: Connecting to an IBM i Database
Hi,

just thought it would be worth pointing out that this subject was covered at length in a previous thread and has sample configurations etc. http://www-949.ibm.com/software/rational/cafe/message/1162

As to the question about library lists you will need to use a combination of the "libraries" and "naming" properties. There is a page in the IBM i InfoCenter that describes the combinations http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahh/jdbcliblistproperty.htm.

Andy

Updated thread ID
Bottom Banner