1

Deploying Postgresql JDBC into JBoss 7.1.1 Final as a module according to the instructions given in How to connect Jboss-as-7.1.1 with Postgresql .

  1. Created the path $JBOSS_HOME/modules/org/postgresql/main
  2. In $JBOSS_HOME/modules/org/postgresql/main/modules.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.1" name="org.postgresql">
     <resources>
         <resource-root path="postgresql-9.2-1002.jdbc4.jar"/>
     </resources>
     <dependencies>
         <module name="javax.api"/>
         <module name="javax.transaction.api"/>
         <module name="javax.servlet.api" optional="true"/>
     </dependencies>
    </module>
    
  3. Into the same directory placed postgresql-9.2-1002.jdbc4.jar

  4. Opened jboss-cli by running $JBOSS_HOME/bin/jboss-cli --connect and ran the command:

    /subsystem=datasources/jdbc-driver=postgresql-driver:add(driver-name=postgresql-driver, driver-class-name=org.postgresql.Driver, driver-module-name=org.postgresql)
    

After it got this error:

    Failed to get the list of the operation properties: "JBAS010850: No
    handler for operation read-operation-description at address [
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "postgresql-driver") ]"
Community
  • 1
  • 1
Ars
  • 11
  • 1
  • 4
  • At what point do you get this error? Can you please show the full list of steps you've taken - you say you've followed my instructions, but haven't given enough detail for me to know at what point you're encountering an error or why. Also: PgJDBC version? JBoss AS 7 version? Please edit your question then follow up with a comment saying you've done so, so I'm notified. I'm going to bed now so won't respond for some hours. – Craig Ringer Feb 14 '13 at 15:08
  • ... and your full, exact JBoss version? Anyway, bed. – Craig Ringer Feb 14 '13 at 16:04
  • The jboss-cli command you have given is truncated. The real command is considerably longer. Could that be the issue? (Note that Stack Overflow displays long code sections with a horizontal scroll bar). – Craig Ringer Feb 14 '13 at 23:23
  • No, that's not the issue. It's just my mistake of editing this post. I've copied full command from your post and got that error above. – Ars Feb 15 '13 at 07:28
  • That's ... very odd. I don't know how that command could result in that error message. I can't reproduce the problem here so I'm not sure quite what could be going on. If you don't have any luck here, post on the JBoss Community forums and link back to this post from there. – Craig Ringer Feb 16 '13 at 03:50
  • Solved. It was my mistake. I did it in domaine mode. Tried in standalone and succeded! – Ars Feb 19 '13 at 21:10

1 Answers1

0

Try to define profile where you want to append a driver. This command appends a new driver in the full profile:

/profile=full/subsystem=datasources/jdbc-driver=postgresql-driver:add(driver-name=postgresql-driver, driver-class-name=org.postgresql.Driver, driver-module-name=org.postgresql)
ch.
  • 1
  • 2