<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Wrong schema referenced in Service Builder portlet</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111742416" />
  <subtitle>Wrong schema referenced in Service Builder portlet</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=111742416</id>
  <updated>2026-04-03T21:27:55Z</updated>
  <dc:date>2026-04-03T21:27:55Z</dc:date>
  <entry>
    <title>RE: Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111816852" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111816852</id>
    <updated>2018-12-14T18:38:48Z</updated>
    <published>2018-12-14T18:38:48Z</published>
    <summary type="html">Thanks VERY much!  Until someone else confirms it or it is confirmed
from an LR staff member, you just think you are doing it wrong!  So,
your confirmation is really good news (in a way)&lt;br /&gt;
&lt;br /&gt;
 I reverted back to my LR 7 GA5 instance only because it was simpiler
for now.  I'd rather be on the latest version when I decide to
&amp;quot;jump&amp;quot; but since LR7 GA5 CE has been so stable for me, I stuck there.&lt;br /&gt;
&lt;br /&gt;
 I'll follow the progress and if do find some way to work around it,
I'll let you know.</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2018-12-14T18:38:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111814307" />
    <author>
      <name>Christophe Cariou</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111814307</id>
    <updated>2018-12-14T13:54:27Z</updated>
    <published>2018-12-14T13:54:27Z</published>
    <summary type="html">I've created a jira : &lt;a href="https://issues.liferay.com/browse/LPS-88444"&gt;https://issues.liferay.com/browse/LPS-88444&lt;/a&gt;</summary>
    <dc:creator>Christophe Cariou</dc:creator>
    <dc:date>2018-12-14T13:54:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111813267" />
    <author>
      <name>Christophe Cariou</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111813267</id>
    <updated>2018-12-14T13:15:03Z</updated>
    <published>2018-12-14T13:15:03Z</published>
    <summary type="html">Perhaps linked to this : &lt;a href="https://issues.liferay.com/browse/LPS-85212"&gt;https://issues.liferay.com/browse/LPS-85212&lt;/a&gt;</summary>
    <dc:creator>Christophe Cariou</dc:creator>
    <dc:date>2018-12-14T13:15:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111812586" />
    <author>
      <name>Christophe Cariou</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111812586</id>
    <updated>2018-12-14T13:08:38Z</updated>
    <published>2018-12-14T13:08:38Z</published>
    <summary type="html">&lt;p&gt;Hi Pete,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I have the same issue : service builder with external datasource
  define by JNDI. Worked in 7.1 GA1 and failed in GA2.&lt;/p&gt;
&lt;p&gt;I confirm that the services are lookin towards the portal database
  and not the external one.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I was hoping that using a portal-ext.properties would resolved the
  trouble but your post indicate that the trouble is also present.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I generate a simple new service builder and it doesn't change
  anything. Very bad, as I have to choose a version of Liferay for a
  starting project.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If I found any clue I will post here (and if you find a solution,
  please give advice too).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Christophe&lt;/p&gt;</summary>
    <dc:creator>Christophe Cariou</dc:creator>
    <dc:date>2018-12-14T13:08:38Z</dc:date>
  </entry>
  <entry>
    <title>RE: Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111759508" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111759508</id>
    <updated>2018-12-08T18:31:53Z</updated>
    <published>2018-12-08T18:31:53Z</published>
    <summary type="html">&lt;p&gt;Replying to your own post is the kiss of death because there will be
  an assumption that the problem was responded to and solved. It isn't.
  I am just documenting what I have tried.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I walked through the instructions found &lt;a
  href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/connecting-service-builder-to-external-databases"&gt;here&lt;/a&gt;
  in detail, multiple times with no joy. I was encouraged for a short
  time when I used the portal-ext.properties approach to configure the
  JNDI connection because when I deployed the module I saw that the
  dialect for the database loaded whereas when I use the
  context.xml/server.xml I did NOT see the dialect statement appear when
  the module was deployed. It is almost as though the database
  connection is ignored when the JNDI connection is through the
  context/server xml approach. In any case, using the
  portal-ext.properties approach and deploying the module and seeing
  that the correct dialect was being loaded didn't resolve the problem.
  I still saw the same error looking the file table in the wrong schema.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Is anyone out there using JNDI to connect service builder modules to
  external databases in 7.1.1 and have success? It is almost as though
  this scenario hasn't been tested or used because it clearly isn't
  working. I can't imagine that this isn't an issue with other folks
  taking this approach. I'd sure like to hear of a success story and how
  it was accomplished.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Pete&lt;/p&gt;
&lt;br /&gt;
  </summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2018-12-08T18:31:53Z</dc:date>
  </entry>
  <entry>
    <title>Wrong schema referenced in Service Builder portlet</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111742415" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=111742415</id>
    <updated>2018-12-05T21:57:12Z</updated>
    <published>2018-12-05T21:57:12Z</published>
    <summary type="html">&lt;p&gt;I am moving some code from a working 7.0 GA5 environment to 7.1.1 GA2
  and facing more hurdles than I expected.  The latest is that after
  building a service builder module and deploying the jars, it appears
  that it is looking for the tables in the base Liferay MySQL database. 
  The service builder data-source value point to a JNDI resource that is
  properly configured in server.xml and context.xml and spring-ext.xml. 
  The code was orginally imported from a 7.0 workspace (mistake...) so I
  went ahead and created a pristine service builder module project and
  then just copied the service.xml file from my working 7.0 module.&lt;br /&gt;
  &lt;br /&gt; After building and deploying the modules I went over to jsonws
  api panel and ran one of the API's.  I get an
  error:  'lportal711.person' doesn't exist  &lt;br /&gt;
  &lt;br /&gt; The table is in a different database on a different server as
  defined in server.xml ( it's in an Aurora DB in AWS).  lportal711 is
  the local database for this particular instance of Liferay.   So, is
  there an issue with JNDI connections for the 7.1.1 service builder? 
  Snippets are:&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;spring-ext.xml:&lt;br /&gt;
  &lt;br /&gt;  &amp;lt;bean
  class=&amp;quot;com.liferay.portal.dao.jdbc.spring.DataSourceFactoryBean&amp;quot; &lt;br /&gt;
       id=&amp;quot;liferayDataSourceFactory&amp;quot;&amp;gt;&lt;br /&gt;      
  &amp;lt;property name=&amp;quot;propertyPrefix&amp;quot; value=&amp;quot;custom.&amp;quot;
  /&amp;gt;&lt;br /&gt;      &amp;lt;property name=&amp;quot;properties&amp;quot;&amp;gt;&lt;br /&gt;  
        &amp;lt;props&amp;gt;&lt;br /&gt;                &amp;lt;prop
  key=&amp;quot;custom.jndi.name&amp;quot;&amp;gt;jdbc/BSFAurora_data&amp;lt;/prop&amp;gt;&lt;br /&gt;
         &amp;lt;/props&amp;gt;&lt;br /&gt;      &amp;lt;/property&amp;gt;&lt;br /&gt;
   &amp;lt;/bean&amp;gt; &lt;br /&gt;  &lt;br /&gt;  &amp;lt;bean
   class=&amp;quot;org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy&amp;quot; &lt;br /&gt;
       id=&amp;quot;liferayDataSource&amp;quot;&amp;gt;&lt;br /&gt;       &amp;lt;property
  name=&amp;quot;targetDataSource&amp;quot;
  ref=&amp;quot;liferayDataSourceFactory&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;/bean&amp;gt;&lt;br /&gt;  &amp;lt;alias alias=&amp;quot;BSFAurora_data&amp;quot;
  name=&amp;quot;liferayDataSource&amp;quot; /&amp;gt;&lt;br /&gt;
  &lt;br /&gt;  And in the service.xml:&lt;br /&gt;
  &lt;br /&gt;         &amp;lt;entity name='Person' table='Person'
  local-service='true' remote-service='true' data-source='BSFAurora_data'&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;And server.xml:&lt;/p&gt;
&lt;p&gt;    &amp;lt;Resource name=&amp;quot;jdbc/BSFAurora_data&amp;quot;&lt;br /&gt;          
      auth=&amp;quot;Container&amp;quot; &lt;br /&gt;              
  type=&amp;quot;javax.sql.DataSource&amp;quot; &lt;br /&gt;  &lt;br /&gt;              
  factory=&amp;quot;org.apache.tomcat.jdbc.pool.DataSourceFactory&amp;quot;&lt;br /&gt;
                testWhileIdle=&amp;quot;true&amp;quot;&lt;/p&gt;
&lt;p&gt;.........[other connection stuff here]&lt;/p&gt;
&lt;p&gt;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;And context.xml:&lt;br /&gt;
  &lt;br /&gt;     &amp;lt;ResourceLink global=&amp;quot;jdbc/BSFAurora_data&amp;quot;
  name=&amp;quot;jdbc/BSFAurora_data&amp;quot; type=&amp;quot;javax.sql.DataSource&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;This configuration works fine in LR7.0 GA5 on Tomcat 8 and I checked
  to see if there were breaking changes with JNDI in the LR7.1 docs and
  also in the Tomcat 9 changes.  Nothin....&lt;br /&gt;
  &lt;br /&gt; Ideas here?  The whole move to 7.1.1 has been about as painful
  as the 6.0.6 to 7.0 move was...I thought the big challenges were
  behind me....&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2018-12-05T21:57:12Z</dc:date>
  </entry>
</feed>
