0 Replies Latest reply on Nov 1, 2002 2:59 PM by Volkmar

    JNDI problem fixed, now security problem (probably)

    Volkmar Newbie

      Hi everyone,

      After some serious mucking about with an application client, I have gotten my test app to the point where:
      - I can deploy the 1 bean without any problems on JBoss
      - I don't get a 'xxx not bound' error any more as I did before when firing up the app client
      - I have included all the necessary paths/files/settings/etc. as far as I know

      Now when I try to run my exetremely test client, it bombs out with this:

      ~/jbossdeploy/jbosstest> java -jar JBTClient.jar
      Initial Context set with JBoss specifics...
      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/security/SecurityAssociation
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:72)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy0.create(Unknown Source)
      at TestClient.(TestClient.java:40)
      at TestClient.main(TestClient.java:58)

      However, searching the JBoss forums on this problem produced the hints by people that to fix this, they only needed to include the appropriate jar files from the $JBOSSHOME/client directory. Well, I have included ALL of them, to be on the safe side, but still get the error.
      Using JBoss 3.0.2.
      It actually fails on the same lines as before, but this time it doesn't say it is a 'comp not bound' error, but the above-mentioned, which leads me to believe that it's not really a security class not found error, but a JNDI lookup problem again, only "in disguise".

      Here si the test client:

      public class TestClient

      public TestClient()
      Properties p = new Properties();

      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");

      p.put(Context.PROVIDER_URL, "localhost:1099");

      Context initial = new InitialContext(p);

      System.err.println("Initial Context set with JBoss specifics...");

      Object obj = initial.lookup("ejb/TestCrap");

      TestBeanHome home = (TestBeanHome) PortableRemoteObject.narrow(obj, TestBeanHome.class);

      TestBean bean = home.create();

      System.err.println("Session Bean found ok");


      catch (Exception e)
      System.out.println("Exception: " + e.getMessage());


      public static void main(String[] args)
      TestClient testClient1 = new TestClient();


      Thanks for your patience.