<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Deployment issues with Postgres + Jboss Configuration
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/minikjboss">Mini K</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/557516#557516">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello everyone,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This might be repeated question, but I spend almost more than a day to find the right answer over this forum and after removing, changing, editing almost everything, I decided to ask you again!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Postgres : 8.4</strong></p><p><strong>Jboss: 5.1 GA</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Following are the steps I did to configure Postgres into Jboss:</strong></p><p><strong>1) Added postgres-ds.xml into the JBOSS\default\server\deploy folder</strong></p><p>The code looks like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;datasources&gt;<br/>&#160; &lt;local-tx-datasource&gt;<br/>&#160;&#160;&#160; &lt;jndi-name&gt;DefaultDS&lt;/jndi-name&gt;<br/>&#160;&#160;&#160; &lt;connection-url&gt;jdbc:postgresql://localhost:5432/testdatabase&lt;/connection-url&gt;<br/>&#160;&#160;&#160; &lt;driver-class&gt;org.postgresql.Driver&lt;/driver-class&gt;<br/>&#160;&#160;&#160; &lt;user-name&gt;postgres&lt;/user-name&gt;<br/>&#160;&#160;&#160; &lt;password&gt;admin&lt;/password&gt;<br/>&#160;&#160;&#160; &lt;new-connection-sql&gt;select 1&lt;/new-connection-sql&gt;<br/> &lt;!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --&gt;<br/> &lt;metadata&gt;<br/> &lt;type-mapping&gt;PostgreSQL 8.0&lt;/type-mapping&gt;<br/> &lt;/metadata&gt;<br/>&#160; &lt;/local-tx-datasource&gt;<br/>&lt;/datasources&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>2) Added the postgresql-persistence-service.xml file <span style="text-decoration: underline;">from </span>JBOSS\docs\examples\jms <span style="text-decoration: underline;">to</span> JBOSS\server\default\deploy\messaging folder. Did no changes in this file. </strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>3) Remove JBOSS\default\server\deploy\ hsqldb-ds.xml and JBOSS\server\default\deploy\messaging \ hsqldb-persistence-service.xml</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>4) Edited JBOSS\server\default\conf \ login-config.xml file by removing </strong></p><p>&lt;application-policy name="HsqlDbRealm"&gt;<br/>&#160;&#160;&#160; &lt;authentication&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; flag="required"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name="principal"&gt;sa&lt;/module-option&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name="userName"&gt;sa&lt;/module-option&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name="password"&gt;&lt;/module-option&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module-option name="managedConnectionFactoryName"&gt;jboss.jca:service=LocalTxCM,name=DefaultDS&lt;/module-option&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;/login-module&gt;<br/>&#160;&#160;&#160; &lt;/authentication&gt;<br/>&#160; &lt;/application-policy&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>5) Edited JBOSS\server\default\conf \ standardjbosscmp-jdbc.xml file by adding this line</strong></p><p>&lt;datasource-mapping&gt;PostgreSQL 8.0&lt;/datasource-mapping&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>6) Lastly, the most important is added the postgres driver at JBOSS\server\default\lib\ postgresql-8.4-701.jdbc4.jar </strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>The datasource name is : DefaultDS</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>After doing the above steps I get the following exception:</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>======================================================================</p><p>ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>DEPLOYMENTS MISSING DEPENDENCIES:<br/>&#160; Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")<br/>&#160; Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")<br/>&#160; Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")<br/>&#160; Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")<br/>&#160; Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")<br/>&#160; Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:<br/>&#160;&#160;&#160; Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **")</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>DEPLOYMENTS IN ERROR:<br/>&#160; Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **</p><p> ======================================================================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have attached the detailed error log in this discussion as well.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I did read in some random discussions that I can remove the ejb3-timer file, which I tried but still I was getting more deployment errors. I think I am just missing the last step, but still dont know what it is.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Can someone please help me out with this? And also provide a clear answer so that it can help others as well.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance,</p><p>Mini</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/557516#557516">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>