1

We are trying to migrate my application from Websphere 6.1 to JBOSS server 7.1.0.

In my application we are using EJB2.0 and EJB JARs are generated by using IBM ejbdeploy.bat through an Ant script. Stub classes are created by ejbdeploy.bat for the EJB interfaces (we have only interfaces and bean class).

We are trying to use JBoss 7.1.0 server and not able to use ejbdeploy.bat file to generate the stub classes for the EJB interfaces.

How we can create stub classes in JBoss 7.1.0 server using an Ant script? Could you share the Ant build definition in XML?

The web.xml references certain EJBs such as:

<ejb-local-ref id="EJBlRef_00992"> 
    <ejb-ref-name>App/HSession</ejb-ref-name> 
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.proj.ejb.HSessionHome</local-home> 
    <local>com.proj.ejb.HSessionLocal</local>
    <ejb-link>HSession.jar#HSession</ejb-link>
</ejb-local-ref>
Steve C
  • 18,876
  • 5
  • 34
  • 37
Lakshman
  • 11
  • 4
  • JBoss has never needed stub classes (since before JBoss 3.x I think), it generates them for itself on the fly. Just leave this step out. – Steve C Feb 20 '18 at 03:25
  • Thank you sir. We are using EJB stateless session bean and EjbLocal interface.for this interface stub class reference (dynamically generated by ejbdeploy.bat ) is declared in the web.xml. So with this stub class only we are identifying the Queues. In jboss how to do this. Pls help to share the sample program if it possible. – Lakshman Feb 20 '18 at 13:30
  • You will need to show that declaration in your question so that we have more context – Steve C Feb 21 '18 at 05:35
  • App/HSession Session com.proj.ejb.HSessionHome com.proj.ejb.HSessionLocal HSession.jar#HSession this is the delcaration in my web.xml and com.proj.ejb.HSessionHome is the stub class which is dynamically generated and implements HSessionLocalHome(interface) using the ejbdeploy.bat file and the same reference (HSessionHome) has been used in other MDB's as well. – Lakshman Feb 21 '18 at 07:29
  • Now when i deploy this ear file in jboss server it's throwing HSessionHome class not found exception, bcoz there is no class available with this name. in HSession.jar we have only HSessionBean, HSessionLocal(interface) and HSessionLocalHome(interface). please help. – Lakshman Feb 21 '18 at 07:29
  • I see. This is a terminology problem. These classes that you reference are not "stubs". The stubs are the classes that implement these classes - which are actually interfaces. Do your EJBs contain references such as `@ejb.bean` inside javadoc comments? – Steve C Feb 21 '18 at 10:54
  • currently i am trying MDB in jboss server 7.1.0 GA. when i am deploying my MDB i am getting error and server is not started. please help. – Lakshman Feb 24 '18 at 05:36
  • 11:02:57,788 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "MDBExample.jar")]) - failure description: { "WFLYCTL0412: Required services that are not installed:" => ["jboss.ra.hornetq-ra"], "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"MDBExample.jar\".component.MessageMDBSample.CREATE is missing [jboss.ra.hornetq-ra]"] } – Lakshman Feb 24 '18 at 05:36
  • 11:02:57,808 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "MDBExample.jar" (runtime-name : "MDBExample.jar") 11:02:57,825 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.ra.hornetq-ra (missing) dependents: [service jboss.deployment.unit."MDBExample.jar".component.MessageMDBSample.CREATE] – Lakshman Feb 24 '18 at 05:36
  • That is a completely different issue that you should ask in a new question – Steve C Feb 25 '18 at 06:05

0 Answers0