<!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;">
Could not enlist in transaction on entering meta-aware object! (Posgres + SQLite))
</h3>
<span style="margin-bottom: 10px;">
reply from <a href="http://community.jboss.org/people/fidox666">Fidox 666</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/558644#558644">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I think the error was as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1) Data source type "<strong>local-tx-datasource</strong>" does not support multiple data sources (sqlite and postgresql concurrent transactions). The solution here is to change the type of data source from "<em><strong>local-tx-datasource</strong></em>" to "<em><strong>xa-datasource</strong></em>"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>2) Also sqlite does not support "<em><strong>xa-datasource</strong></em>" type (specifically the problem with sqlite was that I could not find an sqlite implementation of the class "<em><p style="display: inline !important;"><strong>rg.postgresql.xa.PGXADataSource</strong><span style="font-style: normal;">", (*) maybe you can find one for mysql <span> :) </span> ), so I change the second data source database from sqlite to postgresql.</span></p></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This is my "old" data source file:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong style="font-weight: bold;"><em style="font-style: italic;"><datasources></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><!-- Postgresql --><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><local-tx-datasource><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><jndi-name>Postgres1DS</jndi-name><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><connection-url>jdbc:postgresql://localhost:5432/db0</connection-url><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><driver-class>org.postgresql.Driver</driver-class><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><user-name>user1</user-name><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><password>u1pass</password></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"></local-tx-datasource><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><!-- SQLite --><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><local-tx-datasource></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><jndi-name>Sqlite1DS</jndi-name><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><connection-url></em></strong><strong style="font-weight: bold;"><em style="font-style: italic;">jdbc:sqlite:${jboss.server.data.dir}${/}db1.db</em></strong><strong style="font-weight: bold;"><em style="font-style: italic;"></connection-url></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><driver-class>org.sqlite.JDBC</driver-class><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><user-name>user1</user-name><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><password>u1pass</password><br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><connection-property name="autoReconnect">true</connection-property><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"></local-tx-datasource></em></strong></p><p><strong style="font-weight: bold;"><em style="font-style: italic;"></datasources></em></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And this is the "new one":</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em style="font-style: italic;"><strong><datasources></strong></em></p><p><em style="font-style: italic;"><strong><!-- Postgresql --><br/></strong></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong> </p><p><em><div id="_mcePaste"><strong>   <xa-datasource></strong></div><div><span style="font-style: normal; font-weight: normal; "><em><div style="display: inline !important; "><span style="font-style: normal; font-weight: normal; "><em><div id="_mcePaste" style="display: inline !important; padding-left: 30px; "><strong><jndi-name></strong><em style="font-style: italic;"><strong>Postgres1DS</strong></em><strong></jndi-name></strong></div></em></span></div></em></span></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>       <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class></strong></div><div id="_mcePaste"><strong>       <xa-datasource-property name="ServerName">localhost</xa-datasource-property></strong></div><div id="_mcePaste"><strong>       <xa-datasource-property name="PortNumber">5432</xa-datasource-property></strong></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>       <xa-datasource-property name="DatabaseName"></strong><em style="font-style: italic;"><strong>db0</strong></em><strong></xa-datasource-property></strong></div><div id="_mcePaste"><strong>       <xa-datasource-property name="User">user1</xa-datasource-property></strong></div><div id="_mcePaste"><strong>       <xa-datasource-property name="Password">u1pass</xa-datasource-property></strong></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>       <track-connection-by-tx></track-connection-by-tx></strong></div><div id="_mcePaste"><strong>    </xa-datasource></strong></div><div> </div><strong><br/></strong></em></p><p><em><strong><!-- </strong><em style="font-style: italic;"><strong>Postgresql</strong></em><strong> --></strong></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong> </p><p><em><p><strong>    <xa-datasource><br/></strong></p><p><strong>       <jndi-name>Postgres2DS</jndi-name><br/></strong></p><p><strong>       <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class><br/></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-style: normal; font-weight: normal; "><strong><em> </em></strong></span> </p><em><p style="display: inline !important; "><strong>       <xa-datasource-property name="ServerName">localhost</xa-datasource-property><br/></strong></p></em><p><strong>       <xa-datasource-property name="PortNumber">5432</xa-datasource-property><br/></strong></p><p><strong>       <xa-datasource-property name="DatabaseName">db1</xa-datasource-property><br/></strong></p><p><strong>       <xa-datasource-property name="User">user1</xa-datasource-property><br/></strong></p><p><strong>       <xa-datasource-property name="Password">u1pass</xa-datasource-property><br/></strong></p><p><strong>       <track-connection-by-tx></track-connection-by-tx><br/></strong></p><p><strong> </xa-datasource><br/></strong></p><div> </div></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>So.. what I suggest you is to change the type of your data sources from "local-tx-datasource" to "xa-datasource", as I say (*).. you must to find a mysql implementation of the class "<em><p style="display: inline !important;"><strong>xa-datasource-class", </strong></p></em>and finally if you can not found this class, you should change the mysql database to postgresql.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I hope I have been clear enough, if you find another point of view for this problem please let me know, sorry for my poor english.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><div class="almost_half_cell" id="gt-res-content"><div dir="ltr"><span class="short_text" id="result_box"><span>Best regards..</span></span></div><div> </div><div><span class="short_text"><span>Fido</span></span></div></div><div id="dict"> </div></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </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/558644#558644">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>