Highlighted
Absent Member.
Absent Member.
202 views

Postgres adapter - how to from GenericDBAdapter

I need to create a Postgres DB-Adapter to integrate  Postgres table fields into a custom CIT.   I copied the db-adapter.zip file and edited the appropriate fields, saved the files and used Package Manager to create a separate packed and deployed it.  This all worked fine.      I modified the adapter.conf file to:    dal.use.persistence.xml=true

 

Here is my persistence.xml file

 

<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
<persistence-unit name="GenericDBAdapter"/>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
<!--The connection url"/-->
<property name="hibernate.connection.url" value="jdbc:postgresql://16.120.130.56:5432/IPTDB" />
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://16.120.130.56:5432/IPTDB" />
<!--DB login credentials"/-->
<property name="hibernate.connection.username" value="postgres" />
<property name="javax.persistence.jdbc.user" value="postgres" />
<property name="hibernate.connection.password" value="nnmP0stgr3S" />
<property name="javax.persistence.jdbc.password" value="nnmP0stgr3S" />
<property name="show_sql" value="true" />

</properties>
</persistence>

 

 

When I create the "integration point" the selection for DB type "must" be selected.  So I set the variables in the adapter to "postgresql" for lack of any other thought.   I have already "discovered" the postgres instance so I know UCMDB knows how to talk to it and also verified the credentials I entered work via the probe.   Log files are not showing me anything.   Please see the attached PDF files for greater detail of the errors.

 

0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Postgres adapter - how to from GenericDBAdapter

Per the Developer's Reference Guide:  The RDBMS supported by the generic database adapter are Oracle, Microsoft SQL Server, and MySQL.  If you want Postgres to be supported, and Enhancement Request should be logged.

 

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Postgres adapter - how to from GenericDBAdapter

I realize the "officially supported" DB's.   However, if you look further on page 195 of the Developer Refernece Guide, there is guidance there for using the persistence.xml file to configure the Hibernate Driver that HP uses from public domain to support other DB's.   I looked up the proper syntax for Postgres (as  was included in my first post) and it did not work.  Since the Hibernate Driver is what HP uses and they reference on page 195 to go to http://www.hibernate.org for the other classes that can be used to make other DB's work, and other pieces of UCMDB already work with Postgres, and the credentials section supports it,  and discovery works with it, and HP supports Postgres as UCMDB's main DB, it seems to me that I was missing something regarding my configuration?   

 

Here's what I really need from HP:   Further guidance on validating that this will or will not work with the correct mods to the appropriate configuration files that I may have missed?  Please see my previous post regarding the adapter.conf file.

 

The point I want to make is that Postgres is all over the place within UCMDB, so it just seems to me that this should work and I think I'm almost there.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Postgres adapter - how to from GenericDBAdapter

I understand, and yes, we do use Hibernate, but when I was writing a customer viewable class, I had questions (specifically about getting postgres to work) and could not.  R&D would not assist with this as it is not supported.  The first thing to get is the GDBA supported for Postgres.

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Postgres adapter - how to from GenericDBAdapter

Keith -

 

Ok...so I posted to this forum because I got a e-mail from David Trejos telling us about this special "Expert Day"  (June 23-24) where quote:

 

What is an Online Expert Day?
Online Expert Day is an event when HP product, R&D, and Support team members and other employees join our online forums to answer your toughest technical questions. Online Expert Days give you a chance to communicate directly with the HP Experts!

 

This is a "tough" technical question and I hope R&D would chime in here as the e-mail says they should be reading this?   

 

From what I can determine, the Hibernate stuff is very stable and used a lot so it just seems to me this is a fairly straight forward request?

 

Please help me understand.....

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Postgres adapter - how to from GenericDBAdapter

Indeed... we will see if R&D answers your question.  They are the only ones who might be able to.

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.