掲示板

No Employee exists with the key {emailaddress=test@liferay.com}

11年前 に anand gopalan によって更新されました。

No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
I put the break point below line

com.bc.od.model.Employee empDetails = EmployeeLocalServiceUtil.findByEmailAddress(user.getEmailAddress());

but it is not break any where, it means it will not hit the EmployeePortlet.java. My assumption is I misplaced java file?. plz see the screenshot

I am getting error in the console


Inside do view method
Inside do view() try
06:30:28,760 WARN [EmployeePersistenceImpl:479] No Employee exists with the key {emailaddress=test@liferay.com}
com.bc.od.NoSuchEmployeeException: No Employee exists with the key {emailaddress=test@liferay.com}
at com.bc.od.service.persistence.EmployeePersistenceImpl.findByEmailAddress(EmployeePersistenceImpl.java:482)


Vishal, siby and other do you have any idea. Please help me.

添付ファイル:

11年前 に anand gopalan によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
For your information:

In both User_ & Employee Table has email address=test@liferay.com.


In other portlet I can able to fetch the all employees record. So Problem In condition only.

com.bc.od.model.Employee empDetails = EmployeeLocalServiceUtil.findByEmailAddress(user.getEmailAddress());
thumbnail
11年前 に Bart Simpson によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿
What is the finder you have used ? set
hibernate.show_sql=true
in your portal-ext.properties and check the query being generated. You should start debugging your code!!
11年前 に anand gopalan によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
Hello Bart,


I will check your suggestion and mean while I have attached the document(Screenshot). in below thered.
it will help you to where i did the mistake.

http://www.liferay.com/community/forums/-/message_boards/message/17229492
11年前 に anand gopalan によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
What is the finder you have used ? set
hibernate.show_sql=true
in your portal-ext.properties and check the query being generated.


Hello Bart,

I didn't find any where in this location (liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\webapps\MyEmployeLeave-portlet\WEB-INF\classes)portal-ext.properties file in my portlet.

I need to generate myself. Please send your comments.
11年前 に anand gopalan によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
Hello Bart,

sorry i forget inform about finder method,
below onle i am using
<!-- Finder methods -->
<finder name="EmailAddress" return-type="Employee">
<finder-column name="emailAddress" />
</finder>
thumbnail
11年前 に Vishal Panchal によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 289 参加年月日: 12/05/20 最新の投稿
anand gopalan:
I put the break point below line

com.bc.od.model.Employee empDetails = EmployeeLocalServiceUtil.findByEmailAddress(user.getEmailAddress());

but it is not break any where, it means it will not hit the EmployeePortlet.java. My assumption is I misplaced java file?. plz see the screenshot

I am getting error in the console


Inside do view method
Inside do view() try
06:30:28,760 WARN [EmployeePersistenceImpl:479] No Employee exists with the key {emailaddress=test@liferay.com}
com.bc.od.NoSuchEmployeeException: No Employee exists with the key {emailaddress=test@liferay.com}
at com.bc.od.service.persistence.EmployeePersistenceImpl.findByEmailAddress(EmployeePersistenceImpl.java:482)


Vishal, siby and other do you have any idea. Please help me.



Hi anand,

I checked your attached file It looks everything right.
But have you ever tried below code by using any other emailAddress..?
EmployeeLocalServiceUtil.findByEmailAddress(user.getEmailAddress());

and one thing I doubt that in your database Employee table the field name you gave is emailaddress ,try to change it to emailAddress and
than clear database cache from control panel > serverAdministration
and try again.


hope it will work.

Thanks & Regards,
Vishal R. Panchal

添付ファイル:

11年前 に anand gopalan によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 442 参加年月日: 12/03/02 最新の投稿
Hello Vishal,

I have done as per your suggestion.
But it gives same error.
11年前 に Siby Mathew によって更新されました。

RE: No Employee exists with the key {emailaddress=test@liferay.com}

Expert 投稿: 268 参加年月日: 11/03/04 最新の投稿
Hi Anand,
As per your attachment here , you dont have primary="true" for your empId.
Please add that and rebuild your services.

Thanks,
Siby