0 Replies Latest reply on Oct 30, 2002 3:56 AM by eitan

    Running chapter 8 examples failed

      After reading the fix for the compilation error in the chapter 8 example 3, I successfully built the examples. However, when I run ex1, it fails immediately (on Solaris 8, jboss 3.0.2 and 3.0.3).

      The command line I use is: ant -Dchap=8 -Dex=1 run-example

      The server side messages are:
      09:35:42,359 INFO [MainDeployer] Undeploying file:/usr/local/jboss-3.0.2/server/default/deploy/chap8-ex1.jar
      09:35:42,361 INFO [EjbModule] Stopping
      09:35:42,363 INFO [EjbModule] Stopped
      09:35:42,366 INFO [SecurityConfig] Stopping
      09:35:42,368 INFO [SecurityConfig] Stopped
      09:35:42,369 INFO [EjbModule] Destroying
      09:35:42,415 INFO [EjbModule] Remove JSR-77 EJB Module: jboss.management.single:J2EEApplication= ,J2EEServer=Single,j2eeType=EJBModule,name=chap8-ex1.jar
      09:35:42,418 INFO [EjbModule] Destroyed
      09:35:42,420 INFO [SecurityConfig] Destroying
      09:35:42,421 INFO [SecurityConfig] Destroyed
      09:35:42,425 INFO [MainDeployer] not deleting localUrl, it is null or not a copy: file:/usr/local/jboss-3.0.2/server/default/tmp/deploy/server/default/deploy/chap8-ex1.jar/59.chap8-ex1.jar-contents/chap8-ex1.sar
      09:35:42,426 INFO [MainDeployer] Undeployed file:/usr/local/jboss-3.0.2/server/default/tmp/deploy/server/default/deploy/chap8-ex1.jar/59.chap8-ex1.jar-contents/chap8-ex1.sar
      09:35:42,428 INFO [MainDeployer] Cleaned Deployment file:/usr/local/jboss-3.0.2/server/default/deploy/chap8-ex1.jar
      09:35:42,429 INFO [MainDeployer] Undeployed file:/usr/local/jboss-3.0.2/server/default/deploy/chap8-ex1.jar
      09:35:42,430 INFO [MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.0.2/server/default/deploy/chap8-ex1.jar
      09:35:42,527 INFO [SecurityConfig] Creating
      09:35:42,527 INFO [SecurityConfig] Created
      09:35:42,850 INFO [EjbModule] Creating
      09:35:42,906 INFO [EjbModule] Deploying EchoBean
      09:35:42,979 INFO [SecurityProxyInterceptor] Initialized SecurityProxy=org.jboss.chap8.ex1.EchoSecurityProxy@5b8520
      09:35:42,988 INFO [EjbModule] Created
      09:35:42,990 INFO [SecurityConfig] Starting
      09:35:42,994 INFO [SecurityConfig] Using JAAS AuthConfig: jar:file:/usr/local/jboss-3.0.2/server/default/tmp/deploy/server/default/deploy/chap8-ex1.jar/60.chap8-ex1.jar-contents/chap8-ex1.sar!/META-INF/login-config.xml
      09:35:43,034 INFO [SecurityConfig] Started
      09:35:43,036 INFO [EjbModule] Starting
      09:35:43,168 INFO [EjbModule] Started
      09:35:43,169 INFO [MainDeployer] Deployed package: file:/usr/local/jboss-3.0.2/server/default/deploy/chap8-ex1.jar
      09:36:04,294 ERROR [SecurityInterceptor] Authentication exception, principal=null
      09:36:04,295 ERROR [LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Authentication exception, principal=null
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:173)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:300)
      at org.jboss.ejb.Container.invoke(Container.java:738)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:370)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      at sun.rmi.transport.Transport$1.run(Transport.java:152)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      at java.lang.Thread.run(Thread.java:484)

      And the client side messages are:
      Buildfile: build.xml

      validate:

      fail_if_not_valid:

      init:
      [echo] Using jboss.dist=/usr/local/jboss

      compile:
      [javac] Compiling 1 source file to /home/eitan/work/jboss_examples/output/classes

      run-example:

      prepare:

      chap8-ex1-sar:

      chap8-ex1-jar:

      run-example1:
      [copy] Copying 1 file to /usr/local/jboss/server/default/deploy
      [echo] Waiting for 20 seconds for deploy...
      [java] Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      [java] java.rmi.ServerException: EJBException:; nested exception is:
      [java] javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      [java] Authentication exception, principal=null
      [java] java.rmi.ServerException: EJBException:; nested exception is:
      [java] javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      [java] Authentication exception, principal=null
      [java] javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
      [java] Authentication exception, principal=null
      [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      [java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
      [java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)
      [java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
      [java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)
      [java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      [java] at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      [java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      [java] at $Proxy0.create(Unknown Source)
      [java] at org.jboss.chap8.ex1.ExClient.main(ExClient.java:20)
      [java] java.lang.SecurityException: Authentication exception, principal=null
      [java] <<no stack trace available>>
      [java] Java Result: 1

      BUILD SUCCESSFUL
      Total time: 29 seconds


      Can someone please help me with this? I thought book examples should run out of the box.