3 Replies Latest reply on Feb 17, 2010 10:34 AM by hwangar

    Datasource problem with jBPM

    hwangar

      Hello everyone,


      I'm having a strange behaviour in my seam... this is my environment: I've currently a working seam-based web application with a certain database backend (i.e. java:/myAppDB).  I configurated jBPM to create its infrastructure in other database, for that I declared in my app-ds.xml a second datasource (java:mAppjBPMDB), leave in the root of the ear the hibernate.cfg.xml and jbpm.cfg.xml, and activate the component in components.xml.


      Everything seems to be ok but I receive an error of type:


      ERROR [DatasourceConnectionProvider] Could not find datasource: java:/mAppjBPMDB
      javax.naming.NameNotFoundException: mAppjBPMDB not bound



      After a bit of research, I realise looking at a normal startup of my app (with jBPM disabled) that the binding of my datasources to the JNDI tree occurs AFTER configuration of Seam and its components, so it's not possible for jBPM component get the datasource


      I could provide both logs (startup without and with jBPM) so you can see the my scenario:
        - you can see withBPM config, failing to find datasource here: http://pastebin.com/m1b660686
        - correct startup here: http://pastebin.com/m375d5802
          - as you can see at line 450 seam starts up
          - 712 main datasource is bound
          - 1009 teorically jbpm datasource is bound to jndi


      I'm totally blind, so if somebody could help me, I'll thank him forever :P


      Greetings and thanks in advance!
      Hwangar