4 Replies Latest reply on Dec 21, 2005 3:50 PM by aguizar

    jBPM BPEL Hello example exception

    karmen38

      Hi,

      I am trying jBPM BPEL extension hello example. I successfully deployed BPEL extension with jBPM, generated database schema, asembled the example and deployed it both in the database and to the application server.

      However, the unit test fails (ant run-test). The test generates time out exception and JBoss log file gets the following entry:

      2005-12-16 17:09:21,734 DEBUG [org.jbpm.bpel.service.messager.PortHandler] retrieved port info: caller
      2005-12-16 17:09:27,843 DEBUG [org.jbpm.bpel.service.messager.PortHandler] sent request: id=ID:10-11347709678121, destination=QUEUE.testQueue, replyTo=QUEUE.JMS_TQ1, correlationId=null, _$partnerLinkId=20, _$operationName=sayHello
      2005-12-16 17:09:27,843 DEBUG [org.jbpm.bpel.service.messager.PortHandler] listening for response: JMS_TQ1
      2005-12-16 17:09:27,843 DEBUG [org.jbpm.bpel.service.messager.StartListener] received request: id=ID:10-11347709678121, destination=QUEUE.testQueue, replyTo=QUEUE.JMS_TQ1, correlationId=null, _$partnerLinkId=20, _$operationName=sayHello
      2005-12-16 17:09:28,062 ERROR [org.jbpm.bpel.service.messager.StartListener] could not deliver request
      java.lang.NullPointerException
       at org.jbpm.bpel.service.messager.OutstandingRequest$Key.hashCode(OutstandingRequest.java:96)
       at java.util.Hashtable.put(Hashtable.java:401)
       at org.jbpm.bpel.service.messager.MessagerSession.registerRequest(MessagerSession.java:79)
       at org.jbpm.bpel.service.messager.StartListener.onMessage(StartListener.java:99)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:707)
       at java.lang.Thread.run(Thread.java:595)
      


      I have the following environment:

      JDK 1.5
      JBoss 4.0.3 SP1
      jBPM starters kit 3.0.2
      jBPM BPEL Extension 1.0 alpha 3
      Oracle RDBMS 9i

      I tried to investigate the problem and came to the messageExchange attribute of the receive message which is null in my case but the OutstandingRequest.hashCode() expects it to be not null. I tried to define messageExchange attribute for receive and reply elements in hello.bpel but it does not compile (in accordance with XSD it should) claiming that this attribute is not allowed here. Since some people got through this hellow example I would guess that the problem may relate to Oracle as a back end database.

      Thank you for your assistance,
      Mark


        • 1. Re: jBPM BPEL Hello example exception
          karmen38

          To add to the previous post: everything works fine with the same configuraiton and PostgreSQL as a back end database. ant run-test works fine. It seems that it is Oracle issue. Maybe some mapping should be defined in JBoss data source configuration?

          Thank you,
          Mark

          • 2. Re: jBPM BPEL Hello example exception
            aguizar

            The attribute messageExchange was introduced in BPEL 2 to allow for distinguishing between overlapped message exhanges.

            The v1.1 schema allows for extensible attributes of other namespaces in the receive activity, which does not include local attributes. Therefore you can only use messageExchange if your document conforms to the v2 schema.

            BPEL 2 further states that "if the messageExchange attribute is not specified on a receive then its value is taken to be empty". This is the value receive activities from v1 documents use internally. Maybe the empty string is being saved as a SQL NULL in Oracle? I need to ask the JBoss QA team as I don't have Oracle in my dev machine (neither do I want to!).

            • 3. Re: jBPM BPEL Hello example exception
              karmen38

              Thank you for your reply. The field is definitelly NULL in Oracle since I saw this NULL in the database table. I think that Oracle represents any empty string as NULL. I thought that PostgreSQL does it as well but I might be wrong.

              Is it any workaround about it in jBPM BPEL / JBoss configuration?

              Thank you again,
              Mark

              • 4. Re: jBPM BPEL Hello example exception
                aguizar

                It is official - Oracle stores empty strings as NULL, even as of version 10g (see Nulls). MySQL and Hypersonic do not exhibit this behavior either. I don't think there is a workaround at the JDBC driver or Hibernate dialect levels, because they would need a way to distinguish between a NULL and an empty string.

                This pushes the problem up to the application level. I've filed BPEL-74 to track this issue.