3 Replies Latest reply on Dec 20, 2007 10:55 AM by Pete Muir

    Integration test -  PROVIDER_URL not provided in jndi.proper

    Piotr Porzucek Newbie

      Hi,

      I'm using Seam 2.0.1.CR1. I've encountered a strange exception while running very simple integration test:

      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: menadzerKonta
       at org.jboss.seam.Component.newInstance(Component.java:1970)
       at org.jboss.seam.Component.getInstance(Component.java:1873)
       at org.jboss.seam.Component.getInstance(Component.java:1840)
       at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
       at (...)
       ... 36 more
      Caused by: java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties. Automatic discovery not implemented yet.
       at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
       at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
       at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
       at javax.naming.InitialContext.init(InitialContext.java:223)
       at javax.naming.InitialContext.<init>(InitialContext.java:197)
       at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
       at org.jboss.seam.util.Naming.getInitialContext(Naming.java:50)
       at org.jboss.seam.Component.instantiateSessionBean(Component.java:1287)
       at org.jboss.seam.Component.in


      I added an entry "java.naming.provider.url" in the jndi.properties but it resulted in other types of exceptions...

      Piotr

        • 2. Re: Integration test -  PROVIDER_URL not provided in jndi.pr
          Piotr Porzucek Newbie

          I've downgraded to 2.0.0.GA. However now I'm getting this exception:

          ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Described: name=ServerConfig state=PreInstall
          java.lang.NoClassDefFoundError: Lorg/jboss/system/server/BaseServerConfig;
           at java.lang.Class.getDeclaredFields0(Native Method)
           at java.lang.Class.privateGetDeclaredFields(Class.java:2232)
           at java.lang.Class.getDeclaredFields(Class.java:1715)
           at org.jboss.aop.ClassContainer$1.run(ClassContainer.java:100)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.jboss.aop.ClassContainer.populateFieldTable(ClassContainer.java:96)
           at org.jboss.aop.ClassContainer.createFieldTable(ClassConta
          


          Strange, but class jboss/system/server/BaseServerConfig doesn't exist in jboss-system.jar. My classpath looks like this:

          jboss-seam-2.0.0.GA/bootstrap/
          jboss-seam-2.0.0.GA/lib/test/*.jar
          jboss-seam-2.0.0.GA/lib/*.jar (apart from jboss-seam-ui.jar)
          compiled tests
          classpath for compiling tests

          What is wrong with my settings?

          Regards,
          Piotr


          • 3. Re: Integration test -  PROVIDER_URL not provided in jndi.pr
            Pete Muir Master

            OOps, I read you were using 2.0.0.CR1 ;)

            For 2.0.1.CR1 make sure you have updated your bootstrap and test jars as the test setup changed completely. Might even be worth trying to create a new project with seam-gen and dropping your tests into that.