WFLYEJB0405:找不到类型为.... my ejb类名的接口的EJB [英] WFLYEJB0405: No EJB found with interface of type .... my ejb class name

查看:247
本文介绍了WFLYEJB0405:找不到类型为.... my ejb类名的接口的EJB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目是一个web应用程序,它运行在jboss EAP 7上,并在struts和spring中开发,它调用一个存在于jar文件中的ejb类,并且该jar文件位于构建路径中(我的主项目的lib文件夹) )我在web.xml中提到了类名。当我构建我的项目时,它显示如下错误,请帮助需要配置和我需要做什么。我的项目在Jboss EAP 7上

My project is a webapplication which is running on jboss EAP 7 and developed in struts and spring which calling a ejb class which is present in a jar file and that jar file is there in the build path (lib folder of my main project) and i mentioned the class name in web.xml. When i am building my project its showing below error please help where need to configure and what i need to do. my project is on Jboss EAP 7

注意: - 我的ejb类不是基于注释的。

Note:- My ejb class is not annotation based.

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEJB0405: No EJB found with interface of type 'common.ejb.service.BusinessServiceLocalHome' and name 'BusinessService.jar#BusinessService' for binding java:module/env/local/loan/BusinessService

web.xml: -

web.xml:-

<ejb-local-ref id="EJBLocalRef_1179231224570">
        <ejb-ref-name>local/Loan/BusinessService</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>common.ejb.service.BusinessServiceLocalHome</local-home>
        <local>common.ejb.service.BusinessServiceLocal</local>
        <ejb-link>BusinessService.jar#BusinessService</ejb-link>
</ejb-local-ref>


推荐答案

因为你只是在构建一个WAR文件,所以你可以删除:

Because you're only building a WAR file, you can remove:

 <ejb-link>BusinessService.jar#BusinessService</ejb-link>

此机制仅在多模块EAR文件中需要。 WAR文件中的所有jar都被视为同一Web模块的一部分。

This mechanism is only required in a multi-module EAR file. All jars in a WAR file are considered to be part of the same web module.

这篇关于WFLYEJB0405:找不到类型为.... my ejb类名的接口的EJB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆