[Apiman-user] failure with postgres as db
Tim Dudgeon
tdudgeon.ml at gmail.com
Thu Oct 8 08:29:14 EDT 2015
Thanks. That seem to have worked.
Tim
On 08/10/2015 13:17, Eric Wittmann wrote:
> Apparently you don't need the full driver name and version in the
> <driver> element. I was able to reproduce your result (the sample
> postgresql datasource file didn't work). I got it working by making
> the <driver> look like this:
>
> <driver>postgresql-9.3-1102-jdbc41.jar</driver>
>
> Could you give that a try and let me know how it goes? I can update
> the documentation and the sample config file if the above works OK for
> you.
>
> Thanks,
>
> Eric
>
> On 10/8/2015 7:00 AM, Tim Dudgeon wrote:
>> 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
>>
>>
>>
>> _______________________________________________
>> Apiman-user mailing list
>> Apiman-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>
More information about the Apiman-user
mailing list