1 Reply Latest reply on Apr 9, 2013 7:45 AM by daedlus

    Hello World Example

    daedlus

      Hi ,

      i have deployed the hello world rar example and i see the HelloWorldManagedConnectionFactory binded to jndi and is available using name

      java:/eis/HelloWorld

       

       

      I have a simple ejb bean in which i look up this using below code:

       

       

      @Resource(mappedName = "java:/eis/HelloWorld")

         private HelloWorldConnectionFactory connectionFactory;

       

       

      i get below error

       

       

      Caused by: javax.ejb.EJBException: java.lang.ClassCastException: org.jboss.jca.samples.helloworld.HelloWorldConnectionFactoryImpl cannot be cast to org.jboss.jca.samples.helloworld.HelloWorldConnectionFactory
      Caused by: java.lang.ClassCastException: org.jboss.jca.samples.helloworld.HelloWorldConnectionFactoryImpl cannot be cast to org.jboss.jca.samples.helloworld.HelloWorldConnectionFactory"}}

       

      what could be wrong? :s

        • 1. Re: Hello World Example
          daedlus

          I missed the jboss-deployment-structure.xml in ejb jar deployment that contained the dependency on the deployed rar!

          It works after i add this xml file