# You have requested a non-existent service error in plugin.

**URL:** <https://forum.shopware.com/t/you-have-requested-a-non-existent-service-error-in-plugin/60579>\
**Category:** Plugins\
**Created:** [22. Juli 2019 um 14:02 UTC](https://forum.shopware.com/t/you-have-requested-a-non-existent-service-error-in-plugin/60579 "2019-07-22T14:02:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [22. Juli 2019 um 14:02 UTC](https://forum.shopware.com/t/you-have-requested-a-non-existent-service-error-in-plugin/60579/1 "2019-07-22T14:02:52Z")

</div>

I created a logger service for my plugin.

I added the following lines of code in&nbsp;&nbsp;Resources/services.xml file

service id=“abandoned\_cart\_notification.logger\_service” class=“HatslogicAbandonedCartNotification\Components\Services\LoggerService”  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; argument type=“service” id=“pluginlogger”  
&nbsp; &nbsp; &nbsp; &nbsp; service (I have removed the xml tags. beacuse it is not showing in the browser)

Then i added&nbsp;

use HatslogicAbandonedCartNotification\Components\LoggerServiceInterface;

and&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; /\*\* @var LoggerServiceInterface $loggerService \*/  
&nbsp; &nbsp; &nbsp; &nbsp; $loggerService = Shopware()-\>Container()-\>get(‘abandoned\_cart\_notification.logger\_service’);

in Tests\Functional\Components\Services\LoggerServiceTest.php file&nbsp;

When i execute the phpunit i got the following error&nbsp;

&nbsp;HatslogicAbandonedCartNotification\Tests\Functional\Components\Services\LoggerServiceTest::test\_warning\_adds\_line  
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service “abandoned\_cart\_notification.logger\_service”.

How I can fix this?

&nbsp;I am using shopware : 5.5.10 and&nbsp;PHPUnit 7.5.13.

Please help me.

&nbsp;
