2 Replies Latest reply on Apr 20, 2006 3:32 PM by clebert.suconic

    4.0.4.CR2: NullPointerException when EJB3 returns a value mo

    adogg

      Since I upgraded to 4.0.4.CR2, I'm having a problem calling a stateless EJB3 from inside a Quartz job via simple JNDI lookup code:

      public final void execute(final JobExecutionContext ctx) {

      InitialContext jndiCtx = new InitialContext();
      RemoteEJB3Interface ejb3 = (RemoteEJB3Interface) jndiCtx
      .lookup("the remote JNDI binding");

      String somedata = ejb3.method();
      }


      The lookup works correctly, and most method calls work correctly.
      But when I call a method that would return an unusually long string (specifically, more than 10240 characters) I get the following exception:


      java.lang.NullPointerException
      at org.jboss.serial.util.StringUtil.readString(StringUtil.java:247)
      at org.jboss.serial.objectmetamodel.DataContainer.readMyself(DataContainer.java:1257)
      at org.jboss.serial.objectmetamodel.DataContainer.loadData(DataContainer.java:1027)
      at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:83)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333)
      at org.jboss.serial.io.MarshalledObject.get(MarshalledObject.java:68)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
      at $Proxy70.getIndexAnalyzerConfiguration(Unknown Source)
      at com.bah.indexscheduler.IndexJobTestGetAnalyzerConfig.execute(IndexJobTestGetAnalyzerConfig.java:43)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)


      BUT if I use the local interface in lieu of the remote, everything is peachy. I realize that I should be using a local interface here and this post isn't really a question, just an observation. I assume this is an undocumented feature since 10240 seems to be a bit of a magic, undocumented number as far as I know. In any case, I didn't have this problem in 4.0.4RC1