Message Boards

Cannot use external database in ServiceBuilder project

Alla Sapozhnikova, modified 3 Years ago.

Cannot use external database in ServiceBuilder project

Junior Member Posts: 81 Join Date: 3/2/12 Recent Posts

Hi there,

https://liferay.dev/forums/-/message_boards/message/119429731

Created a project in Liferay DXP 7.2 SP9 using service builder. Used Liferay instaructions https://help.liferay.com/hc/en-us/articles/360032624712-Connecting-the-Data-Source-Using-Spring-Beans and David Nebinger's blog https://liferay.dev/blogs/-/blogs/liferay-7-service-builder-and-external-databases to connect to an external database.

Keep getting an error  : Class com.liferay.sample.service.impl.FooLocalServiceImpl is not assignable to specified service com.liferay.portal.aop.AopService

Does anyone know how to fix the problem?

 

Thank you.

Alla

thumbnail
Andre Kreienbring, modified 3 Years ago.

RE: Cannot use external database in ServiceBuilder project

Regular Member Posts: 152 Join Date: 12/18/06 Recent Posts

Hi, I don't know where the error comes from, but you can read this blog post I wrote.

 

In that post there's also another link to the documentation of the method I used to connect to an external DB.

Alla Sapozhnikova, modified 3 Years ago.

RE: RE: Cannot use external database in ServiceBuilder project

Junior Member Posts: 81 Join Date: 3/2/12 Recent Posts

Hi Andre,

 

I fixed the problem I had. It was just a leftover from a Service Builder generated part of the code. When I manually removed it, the problem was resolved.

Your post looks very interesting. Just wondering have you used Dymnamic queries for joins?

Thank you.

Alla

thumbnail
Andre Kreienbring, modified 3 Years ago.

RE: Cannot use external database in ServiceBuilder project

Regular Member Posts: 152 Join Date: 12/18/06 Recent Posts

At least I tried, but couldn't achive what I wanted. The Hybernate is terribly outdated. Newer versions have more possibilities...