Grails
  1. Grails
  2. GRAILS-5894

Integration Tests Grails Console fails looking up EJB3 components

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None
    • Environment:
      Grails 1.2.1 JDK 1.6.0_14, EJB3 on remote JBoss 4.0.5

      Description

      Integration Tests and grails console are failing with a javax.naming.NameNotFoundException.

      If I start the application with run-app it works. So only integration tests and console are not working with the same configuration.

      Btw, with Grail 1.1.1 it works so I guess something is broken in 1.2.

      Another note: I had change the app server back to jetty because startup script for tomcat had problems with my jbossall-client.jar (4.0.5) that I need to have in my libs directory for EJB3 lookups.

      Details:
      EJB lookup is configured in resources.groovy:
      ...
      jndiTemplateEJB3Server(org.springframework.jndi.JndiTemplate)

      { environment = [ "java.naming.factory.initial" : "org.jnp.interfaces.NamingContextFactory", "java.naming.provider.url" : "jnp://HOSTNAME:1099", "java.naming.factory.url.pkgs" : "org.jboss.naming.client"] }

      XXXServiceEjb(org.springframework.jndi.JndiObjectFactoryBean)

      { jndiName = "product/Ejbname/remote" jndiTemplate = ref(jndiTemplateEJB3Server) }

      I get this error (running test-app):
      Error executing script TestApp: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRemoteEjb': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name [product/Ejbname/remote] not bound; 0 bindings: []

      Thank you for your help.
      Alex

        Issue Links

          Activity

          Hide
          Alex added a comment - - edited

          JNDI look up error in integration tests and console was also reported here: http://jira.codehaus.org/browse/GRAILS-5726

          Update: Suggested workaround mentioned in GRAILS-5726 above also worked for me.

          Show
          Alex added a comment - - edited JNDI look up error in integration tests and console was also reported here: http://jira.codehaus.org/browse/GRAILS-5726 Update: Suggested workaround mentioned in GRAILS-5726 above also worked for me.

            People

            • Assignee:
              Unassigned
              Reporter:
              Alex
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Last Reviewed:

                Development