<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Where to place a sqlInitFile in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/where-to-place-a-sqlinitfile/m-p/319575#M6576</link>
    <description>&lt;P&gt;Hi members,&lt;/P&gt;
&lt;P&gt;I followed this: &lt;A href="http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration" target="test_blank"&gt;http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration&lt;/A&gt;  and I added the proper sentence in the default-repository-config.xml to load my own sqlInitFile (mods.sql.txt in this case).&lt;/P&gt;
&lt;P&gt;I've to add some SQL statements to create some stored procedures we need in our Nuxeo Platform. One is a modified version of nx_update_read_acls. I prefer to add a new txt with these statements and do not modify the sqlserver.sql.txt in nuxeo-core-storage-sql-6.0.jar.&lt;/P&gt;
&lt;P&gt;I've added the txt (mods.sql.txt) to the nuxeo-core-storage-sql-6.0.jar in the proper subfolder, and when I restart Nuxeo I get errores in the server.log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;org.nuxeo.ecm.core.storage.StorageException: java.io.IOException: Cannot open: mods.sql.txt
	at org.nuxeo.ecm.core.storage.sql.jdbc.SQLInfo.&amp;lt;init&amp;gt;(SQLInfo.java:153)
	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCBackend.initializeModel(JDBCBackend.java:189)
	at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.initRepository(RepositoryImpl.java:309)
	at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.getConnection(RepositoryImpl.java:292)
	at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.initialize(ManagedConnectionFactoryImpl.java:291)
	at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:186)
	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:49)
	at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where do I have to place this SQL txt?&lt;/P&gt;
&lt;P&gt;Thank you,
Gabriel&lt;/P&gt;</description>
    <pubDate>Wed, 04 Feb 2015 18:22:34 GMT</pubDate>
    <dc:creator>gsc_</dc:creator>
    <dc:date>2015-02-04T18:22:34Z</dc:date>
    <item>
      <title>Where to place a sqlInitFile</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/where-to-place-a-sqlinitfile/m-p/319575#M6576</link>
      <description>&lt;P&gt;Hi members,&lt;/P&gt;
&lt;P&gt;I followed this: &lt;A href="http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration" target="test_blank"&gt;http://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration&lt;/A&gt;  and I added the proper sentence in the default-repository-config.xml to load my own sqlInitFile (mods.sql.txt in this case).&lt;/P&gt;
&lt;P&gt;I've to add some SQL statements to create some stored procedures we need in our Nuxeo Platform. One is a modified version of nx_update_read_acls. I prefer to add a new txt with these statements and do not modify the sqlserver.sql.txt in nuxeo-core-storage-sql-6.0.jar.&lt;/P&gt;
&lt;P&gt;I've added the txt (mods.sql.txt) to the nuxeo-core-storage-sql-6.0.jar in the proper subfolder, and when I restart Nuxeo I get errores in the server.log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;org.nuxeo.ecm.core.storage.StorageException: java.io.IOException: Cannot open: mods.sql.txt
	at org.nuxeo.ecm.core.storage.sql.jdbc.SQLInfo.&amp;lt;init&amp;gt;(SQLInfo.java:153)
	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCBackend.initializeModel(JDBCBackend.java:189)
	at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.initRepository(RepositoryImpl.java:309)
	at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.getConnection(RepositoryImpl.java:292)
	at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.initialize(ManagedConnectionFactoryImpl.java:291)
	at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:186)
	at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:49)
	at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where do I have to place this SQL txt?&lt;/P&gt;
&lt;P&gt;Thank you,
Gabriel&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 18:22:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/where-to-place-a-sqlinitfile/m-p/319575#M6576</guid>
      <dc:creator>gsc_</dc:creator>
      <dc:date>2015-02-04T18:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Where to place a sqlInitFile</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/where-to-place-a-sqlinitfile/m-p/319576#M6577</link>
      <description>&lt;P&gt;If I'm not mistaken the SQL init file should be placed at the root of the JAR if you only specify a filename in the &lt;CODE&gt;&amp;lt;sqlInit&amp;gt;&lt;/CODE&gt; element.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2015 11:10:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/where-to-place-a-sqlinitfile/m-p/319576#M6577</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2015-02-09T11:10:26Z</dc:date>
    </item>
  </channel>
</rss>

