Author Topic: MySQL unable to connect though war file  (Read 2205 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
MySQL unable to connect though war file
« on: July 17, 2020, 05:50:58 PM »
Hi Team,
In MySQL i have created a new user with host name as any host so that i can connect with mysql database remotely also.
With This i am able to successfully connect with remote MySQL which resides in VPS.
But my problem is that when i am deploying a war file in which when my application tries to connect with MySQL it is able to connect with db but not able to fetch the records from the same and gives exception as javax.persistence.NoResultException
Please suggest on configuration side do it need to do anything else so that application can connect and fetch the records

Below mentioned is my error logs.. thanks in advance..


Caused by: javax.persistence.NoResultException: No entity found for query
        at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:286) ~[hibernate-entitymanager-4.1.11.Final.jar:4.1.11.Final]
        at org.broadleafcommerce.profile.core.dao.RoleDaoImpl.readRoleByName(RoleDaoImpl.java:51) ~[broadleaf-profile-5.2.2-GA.jar:na]
        at org.broadleafcommerce.profile.core.dao.RoleDaoImpl$$FastClassBySpringCGLIB$$f1174773.invoke(<generated>) ~[broadleaf-profile-5.2.2-GA.jar:na]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[spring-core-4.3.10.RELEASE.jar:4.3.10.RELEASE]