Select to view content in your preferred language

Geoportal: A database communication error has occur

6474
11
05-24-2011 01:56 PM
Mirza_MuhammadWaqar
Emerging Contributor
HI

Whenever I try to login with admin, publisher or registereduser in geoportal the following error displays:
"A database communication error has occur."

What am I missing?

Thanks

Mirza Waqar
0 Kudos
11 Replies
Stefanobruscoli
Emerging Contributor
hello
with same problem I've solved:
replacing the username="geoportal" property by user="geoportal" in geoportal.xml
0 Kudos
Mirza_MuhammadWaqar
Emerging Contributor
Well i changed it... But still error is same...
When i try to login through administrator or publisher account i got the following error, "    Your username or password was not valid, please try again... " and when i try to login through user account i got "A database communication error has occur", initially i see geoportal user in oracle don't have DBA rights in database now i update it, but still getting same error, its my term project, and tomorrow i have show fully functional geoportal, I am worried, it will not complete till tomorrow, kindly reply fast.
0 Kudos
CliveReece
Esri Contributor
The 'geoportal' user that one uses in the jdbc configuration in geoportal.xml is ONLY for giving the geoportal web app communication with the database (via jdbc).  The 'geoportal' user is a database account, not an LDAP account.

When logging into the geoportal through the web browser interface, you must use an LDAP account.

To separate out LDAP problems from JDBC or database problems in your environment, you might want to try configuring geoportal to simple authentication (see page 2 and page 24-25 of http://sourceforge.net/projects/geoportal/files/Documents/Geoportal/1.0/GeoportalServer_Installation...).

The purpose of using simple authentication (even if temporarily) is to bypass the LDAP, thus trying to isolate whether the problems you are seeing are related to the database/jdbc side of things, or the LDAP side of things.
0 Kudos
Mirza_MuhammadWaqar
Emerging Contributor
yes i am using LDAP accounts... but it giving the same error... What could be reason for this error.. I check my gpt.xml file and geoportal.xml file both are apparently seems to be OK... I dont know where is the problem...
0 Kudos
CliveReece
Esri Contributor
hard to say.  I provided one suggestion above that you might try to help isolate the issue. 

I suspect a problem with your database and/or jdbc setup, since you are getting a "database communication" error.  If it was a problem with LDAP, I would expect to see errors like "cannot connect to LDAP" or "cannot authenticate user", etc.
0 Kudos
Mirza_MuhammadWaqar
Emerging Contributor
thanks for reply now i setup geoportal with simple athentication, and sucessfully login... When i click on administrator tab, new page open and following error occur, "A database communication error has occur", my geoportal.xml file is as follows...

I am using Oracle 10 g Express Edition...
----------------------------------------------------------------------------------------------



<!-- Context configuration file for the Geoportal Web App -->


<Context docBase="Geoportal" path="C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\geoportal" debug="0" reloadable="true" crossContext="true">
  

<Resource name="jdbc/gpt" auth="Container" type="oracle.jdbc.pool.OracleDataSource" factory="oracle.jdbc.pool.OracleDataSourceFactory"
driverClassName="oracle.jdbc.driver.OracleDriver"


              
              url="jdbc:oracle://localhost:1158:XEl"
              user="geoportal"
              password="geoportalpwd"
              maxActive="20"
              maxIdle="10"
              maxWait="-1" />
</Context>
0 Kudos
CliveReece
Esri Contributor
Well for one thing, you are deviating from the documented pre-installation requirements (https://sourceforge.net/apps/mediawiki/geoportal/index.php?title=Preinstallation) by attempting to use Tomcat 7.0 and Oracle Express Edition.

To troubleshoot your issue with the database and/or jdbc, I would NOT rely on web app messages, but scrutinize your log file messages.

To begin with that:  stop Tomcat, clean out the log files, start Tomcat but do nothing (i.e. do not connect to the web app), wait until the gpt.log stabilizes in size, then inspect the log file.  If you see an error, try to understand what it is telling you is wrong.  If you do not see an error, then open a browser and start interacting with the geoportal until you generate an error in the log file.  Then go back and troubleshoot the error from the log file.
0 Kudos
Mirza_MuhammadWaqar
Emerging Contributor
thanks dear for your reply, now i am using oracle 10 g enterprise edition,
i just stop apache tomcat, and delete all log files, after starting apache tomcat, when i just open "gpt.2011-05-27.log", i notice the following warrning, "WARNING: [SYNCHRONIZER] Error fetching next task, java.sql.SQLException: Invalid Oracle URL specified"...

In my geoportal.xml file i provide the following url, url="jdbc:oracle://localhost:1158/em"

can you tell me, is it correct or not?
waiting for your reply
thanks in advance
0 Kudos
CliveReece
Esri Contributor
sorry, there is no way that i can know your database machine name, port, or SID.

If you want to check if your jdbc connection settings work (outside of the log file messages), try using a third party tool like dbVisualizer.
0 Kudos