EJB lookup for Beans hosted on Wildfly 22.0 from tomcat 9 hosted webapp

42 views
Skip to first unread message

[ V ]

unread,
Oct 24, 2023, 7:36:04 AM10/24/23
to WildFly
I'm trying to work on a legacy app which has servelts and frontend web app hosted on tomcat and the EJB project(EAR) hosted on Wildfly 22.0. 

My EJB beans are getting properly registered on the deployment on Wildfly 22.0 and i'm able to do a EJB lookup from an independent client(Inlcuded jars : <EJB-app>-client.jar as well as jboss-client.jar from <wildfly-home>/bin/client)

But I'm facing issue in doing the EJB lookup from the tomcat app as it throws error for the interface FxEJB which has FxEJBBean as its EJB implementation.

javax.naming.NamingException: EJBCLIENT000037: Could not load ejb proxy class com.xxx.ejb.FxEJB [Root exception is java.lang.ClassNotFoundException:  com.xxx.ejb.FxEJB ]

The legacy web application pom had following jboss client bom, i've updated the old jboss client bom with the latest one as highlighted but it's still now working and throwing the same error :
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>${jboss-javaee-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
        <groupId>org.wildfly</groupId>
        <artifactId>wildfly-ejb-client-bom</artifactId>
        <version>22.0.0.Final</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>

<!-- <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-ejb-client-bom</artifactId>
<version>${jboss-as-ejb-client-bom-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency> -->
</dependencies>
</dependencyManagement>

Is there any other configuration that i need to check on tomcat side. The only difference i see between my client app and the tomcat app is that my client app has jboss-client.jar included directly from the wildfly 22.0 but in the tomcat web module I'm doing it through maven as shown above and probably mapping it to the wrong bom. Not sure of there are any other tomcat sepcific configurations invlolved, please suggest?

Regards, 
Vj

[ V ]

unread,
Oct 25, 2023, 1:35:43 PM10/25/23
to WildFly
Come on... Nobody knows here what could be the issue or there's not sufficient information in the thread? Please help. 

James Perkins

unread,
Oct 30, 2023, 2:42:04 PM10/30/23
to WildFly
I'm not an EJB expert, but it looks like you do not have the com.xxx.ejb.FxEJB on the client class path.
Reply all
Reply to author
Forward
0 new messages