[Apiman-user] failure with postgres as db

Tim Dudgeon tdudgeon.ml at gmail.com
Thu Oct 8 07:00:29 EDT 2015


I'm trying to deploy using postgres as the database, using instructions 
found here:
http://www.apiman.io/latest/production-guide.html#_connecting_to_the_database

I think I did things correctly, but I'm getting a failure to deploy the 
datasource as it can't find the postgres driver, even though it seems to 
have deployed OK.
Here is the apiman-ds.xml:

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
   <datasource jndi-name="java:jboss/datasources/apiman-manager" 
pool-name="apiman-manager-api" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://192.168.59.103:5432/apiman</connection-url>
<driver>postgresql-9.3-1102.jdbc41.jar_org.postgresql.Driver_9_3</driver>
     <pool>
       <max-pool-size>30</max-pool-size>
     </pool>
     <security>
       <user-name>apiman</user-name>
       <password>secret</password>
     </security>
   </datasource>
</datasources>

and this is what is deployed:

[jboss at 5b39dce15d98 deployments]$ ls -l
total 102664
-rw-r--r-- 1 jboss jboss     8869 Nov 21  2014 README.txt
-rw-r--r-- 1 root  root       542 Oct  8 10:09 apiman-ds.xml
-rw-r--r-- 1 jboss jboss      219 Oct  8 10:17 apiman-ds.xml.failed
-rwxr-xr-x 1 jboss jboss 19511221 Sep 10 11:28 apiman-es.war
-rw-r--r-- 1 jboss jboss       13 Sep 10 11:28 apiman-es.war.deployed
-rwxr-xr-x 1 jboss jboss 23949175 Sep 10 11:28 apiman-gateway-api.war
-rw-r--r-- 1 jboss jboss       22 Sep 10 11:28 
apiman-gateway-api.war.deployed
-rwxr-xr-x 1 jboss jboss 22778008 Sep 10 11:28 apiman-gateway.war
-rw-r--r-- 1 jboss jboss       18 Sep 10 11:28 apiman-gateway.war.deployed
-rwxr-xr-x 1 jboss jboss 27389167 Sep 10 11:27 apiman.war
-rw-r--r-- 1 jboss jboss       10 Sep 10 11:27 apiman.war.deployed
-rwxr-xr-x 1 jboss jboss 10850509 Sep 10 11:27 apimanui.war
-rw-r--r-- 1 jboss jboss       12 Sep 10 11:27 apimanui.war.deployed
-rw-r--r-- 1 root  root    592322 Oct  8 09:38 
postgresql-9.3-1102-jdbc41.jar
-rw-r--r-- 1 jboss jboss       30 Oct  8 09:38 
postgresql-9.3-1102-jdbc41.jar.deployed
[jboss at 5b39dce15d98 deployments]$ head apiman-ds.xml.failed
"{\"JBAS014771: Services with missing/unavailable dependencies\" => 
[\"jboss.data-source.java:jboss/datasources/apiman-manager is missing 
[jboss.jdbc-driver.postgresql-9_3-1102_jdbc41_jar_org_postgresql_Driver_9_3]\"]}"[jboss at 5b39dce15d98 
deployments]$


In the example found here:
https://github.com/apiman/apiman/blob/master/distro/wildfly8/src/main/resources/overlay/apiman/sample-configs/apiman-ds_postgresql.xml
the syntax is like this:

postgresql-9.3-1102.jdbc41.jar_org.postgresql.Driver_9_3
I think the . before jdbc41 should be a dash, like this:
postgresql-9.3-1102-jdbc41.jar_org.postgresql.Driver_9_3
but that doesn't work. And there is no class named Driver_9_3 in the 
org.postgresql package, so I thought it could need to be:
postgresql-9.3-1102-jdbc41.jar_org.postgresql.Driver
but that doesn't work either.

Any suggestions for what is needed here?


Tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20151008/12073d6c/attachment.html 


More information about the Apiman-user mailing list