New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

MySQL unable to connect though war file

Started by Vishnu Khatri, July 17, 2020, 05:50:58 PM

Previous topic - Next topic

Vishnu Khatri

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]