Pages

Tuesday, June 9, 2009

OSB 10.3.1 with Database adapter

With the OSB 10.3.1 release we can use the JCA Database adapter in our processes. In this blog I will show you, what steps are needed to make this work.
First we need to create a XA thin JDBC datasource in the WLS console of the OSB Server.
Next step is to configure the DB resource adapter. Go to deployments in the WLS Console of the OSB Server, where we select the DbAdapter deployment.

Go to Outbound Connection Pools Tab under Configuration and select the already created connectionfactory and press New.
Select the ConnectionFactory
The JNDI Name is the same as the EIS name which you need to provide in the DB adapter service. ( We will do this in JDeveloper 10.1.3.4 ) . In my case eis/DB/xxxxx

Now we only have to provide the XAdatasource with as value the just created datasource
Restart the OSB server.

Switch to JDeveloper 10.1.3.4 where we will create a new ESB project. ( I will create a new ESB Project for every DB adapter, This will make deployment a little bit easier). Add a new DB adapter in the ESB overview.

Now we have to provide the EIS jndi name, this must match with the JNDI EIS name in the DB resource adapter configuration ( which we created in the WLS console on the OSB server)



Complete the DB adapter configuration




We need this WSDL in the OSB, This WSDL contains the EIS JNDI name and the wanted operation.

We need the toplink classes in the OSB server so we need to make a jar deployment profile.


Start the Oracle Workshop where we make a new folder (with the name of the DB adapter service) in your project. Import the jar and the WSDL's / XSD of the JDeveloper ESB project.
Create a new Business Service and use the WSDL of your DB adapter service.


Provide the JCA name, in my case jca://eis/DB/xxxxx

In the JCS Transport Configuration Tab we only need to add the toplink_mapping.xml ( Do this add the toplink xml section)
Deploy the project to the OSB Server.
Last step is to test the Business Service with a valid xml.

check for errors in the WLS Console output window.

83 comments:

  1. Hi, thank you for these posts.

    I have a problem when trying to follow these steps. The WSDL generated in JDeveloper, for accessing the DB adapter, is invalid when imported into Workshop.

    It tells me that the WSDL is semantically invalid:
    "The operation '{http://xmlns.oracle.com/pcbpel/adapter/db/formation/}formationSelect' has an output message defined in the portType'{http://xmlns.oracle.com/pcbpel/adapter/db/formation/}formation_ptt' but not in the binding '{http://xmlns.oracle.com/pcbpel/adapter/db/formation/}formation_binding'."

    As a result, I can't use it to create the business service. Any idea ?

    Thank in advance.

    Julien

    ReplyDelete
  2. Hi Julien,

    Did you also import the dbadapter wsdl and the xsd

    the wsdl import these files

    thanks

    ReplyDelete
  3. zip wsdl and all referenced docs it references (see imports section) into one file, then import it as a zipped resource under a folder of your choice.
    next, when you will point on then newly imported wsdl and all subsequent resources will be picked up just fine.

    ReplyDelete
  4. Hi Julien, thanks for the guide...

    I'm just curious, what is the purpose of configuring the Data Source and Outbound Connection Pools in the WLServer?

    Considering that the connection string (to DB) is already set in the wsdl file.

    BR.

    ReplyDelete
  5. Hi, thanks for this tutorial.

    But I have the same problem as Julien.
    I've got exactly the same error. I imported the 2 wslds, the wsd, xml and the jar and I can't create my Business Service cause of the invalid wsdl.
    I also tried to zip the files but still the problem.

    Thanks for your help,
    Simon

    ReplyDelete
  6. Sorry, It works, I had the problem because I selected all options (inster, update, select ...). It works well if I select onlu Insert.

    Thanks again for this doc.
    Simn

    ReplyDelete
  7. Hi,

    The problem appears because in the definition wsdl, at the >portType<, you have an operation with >input< and >output<.
    But in the >binding< appears only the >input<.
    If you put and empty >output/< behind the >input< you never receive the error again.

    Juan Pablo

    ReplyDelete
  8. Hi,

    We are starting to work with oracle weblogic 10g because we want to migrate a ESB project using AQAdapter, DBAdapter done at 10 to JDeveloper oracle weblogic and we have the following doubts:

    * The only way to work with the adapters you present here in your blog? Ie, you may do so only with weblogic directly, without having to import anything?

    * On the other hand, perform the steps outlined in the blog, when you configure the business services not listed in the protocol of JCA options. What is this? we are doing wrong?

    * And finally, configuring the jndi server console leaves us the following exception:

    Message:
    handle must be specified
    Stack Trace: java.lang.IllegalArgumentException: handle must be specified at com.bea.console.actions.connector.ConnectorModuleOverviewAction.execute(ConnectorModuleOverviewAction.java:50) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97) at ...

    Thanks for your help and excuse our English

    ReplyDelete
  9. Hi


    * The only way to work with the adapters you present here in your blog? Ie, you may do so only with weblogic directly, without having to import anything?

    In the jdev releases you can do it all in jdeveloper ( not the 1st july release)

    * On the other hand, perform the steps outlined in the blog, when you configure the business services not listed in the protocol of JCA options. What is is? we are doing wrong?

    when you import a wsdl of esb project then the business service should detect the jca. are you using 10.3.1

    * And finally, configuring the jndi server console leaves us the following exception

    strange.

    hope this helps

    ReplyDelete
  10. Hi,

    I have some trouble to get the exemple with the database adapter to work. For the moment this is a showstopper -

    JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore. [Caused by: Unable to resolve
    'TestDS'. Resolved ''].
    See root exception for the specific exception. You may need to configure the con
    nection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deplo
    yments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Undantag
    [TOPLINK-7060] (Oracle TopLink - 10g Release 3 (10.1.3.4.0) (Build 080602)): or
    acle.toplink.exceptions.ValidationException
    Beskrivning av undantaget: Kan inte hΣmta datakΣllan [TestDS].
    Internt undantag: javax.naming.NameNotFoundException: Unable to resolve 'Test
    DS'. Resolved ''; remaining name 'TestDS'.

    As far as I can understand there is no oc4j-ra.xml file, but I have found a ra.xml and a weblogic-ra.xml. I have updated xADataSourceName to TestDS and restrarted the server but I still get JCA-11622.

    Do anyone have some ideas?

    //Math

    ReplyDelete
  11. Hi

    Did you make a datasource with testDS as jndi name and target this datasource on the osb server

    thanks

    ReplyDelete
  12. Thanks for your comment. I have found the problem and the issue is that I am not so familiar with WLS yet. I just had forgotten to do something obvious.

    //Math

    ReplyDelete
  13. Hi, thanks for ypur posts
    but i have a probleme in my application because i want to display a lattice in frame , in a jsf page and i don't know how!!

    i can send you my application, if you accept i just want to know your @mail.
    Please help me
    thanks

    ReplyDelete
  14. Ok , I don't know exactly what your problem is but you can send me your app to biemond at gmail dot com

    thanks

    ReplyDelete
  15. Hi!

    I have the following error when I start the workshop and the proxy service JCA Transport tab is blank.

    Error: An error occured while initializing transport fields: null

    java.lang.reflect.UndeclaredThrowableException
    at $Proxy19.getEditPage(Unknown Source)
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite.initCustomFields(TransportSpecificComposite.java:100)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createTransportArea(CustomAbstractResourceSpecificComposite.java:148)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createControls(CustomAbstractResourceSpecificComposite.java:141)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.createClient(CustomAbstractResourceSpecificComposite.java:133)
    at com.bea.alsb.ui.resources.common.custom.CustomAbstractResourceSpecificComposite.performDynamicUpdate(CustomAbstractResourceSpecificComposite.java:339)
    at com.bea.alsb.ui.resources.service.editor.TransportSpecificServiceEditorPage$TransportSpecificEditorComposite.performDynamicUpdate(TransportSpecificServiceEditorPage.java:183)
    at com.bea.alsb.ui.resources.service.TransportSpecificComposite$2.run(TransportSpecificComposite.java:240)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    ....

    Do you know this error? Can you help me, please?

    Thanks!

    ReplyDelete
  16. Hi,

    Did you use jdeveloper 10.1.3 to create the wsdl for the jca proxy service.

    and check your wsdl

    thanks

    ReplyDelete
  17. Edwin,

    Yes, I use Jdeveloper 10.1.3 and I don't find nothing strange in the wsdl. I can't know that is this error.

    Likewise thanks for your help!

    ReplyDelete
  18. Hi can you make a export and mail to biemond at gmail dot com

    thanks

    ReplyDelete
  19. Good Article! It helped me a lot.

    ReplyDelete
  20. Good article thanks!

    B.t.w. you probably want to configure the connection string within the WLS to be able to change this when the datasource changes.

    ReplyDelete
  21. I use that with Objetc Types but in the procedrue I recieve nulls in VARCHAR2 attributes. Any configuration in the database is required?

    ReplyDelete
  22. Hi

    I recieve nulls in VARCHAR2

    First you can take a look at the logging maybe this gives you a glue

    If the rest of the object type is correct then you can try to make a tar at metalink or post a question on the forum.

    thanks Edwin

    ReplyDelete
  23. Iam getting the following error

    JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by javax.resource.spi.InvalidPropertyException: Missing Property Exception.
    Missing Property: [DBManagedConnectionFactory.userName].
    Make sure the property is set in the interaction (activation) spec by editing its definition in the ws

    ReplyDelete
  24. Hi Edwin,

    I want to create a DBAdapter of type "Pool for New or Changed Records in a Table".

    But I cannot create a Business Services in OSB using a DBAdapter created of type Poll.

    Is possible to configure a DBAdapter of these type in OSB across BS?

    ReplyDelete
  25. Hi

    DBAdapter of type "Pool for New or Changed Records in a Table".
    Is possible to configure a DBAdapter of these type in OSB across BS?

    I don't know, I can't find anything in the release notes or the adapter chapter of jca dba adapter.
    just post a question on the soa forum or make a call at support.

    thanks Edwin

    ReplyDelete
  26. Hi Edwin,

    I found a JCA DBAdapter sample for OSB in http://www.oracle.com/technology/sample_code/products/osb/index.html

    The sample provides step by step instructions for creating a "Pool for New or Changed Records in a Table" which is done by configuring a OSB Proxy Services directly.

    Thanks

    ReplyDelete
  27. Hi Edwin,

    I developed a very simple proxy service which invokes a DBAdapter Business service. The service just retrieves data, there is no insert/update or delete operations.
    Everything is working fine, however the first request takes 90 seconds to give data back and it consumes 50% of the CPU. The following requests take less than 100ms. Even if the database has no records it takes 90 seconds. Oracle support said that this is working as designed, but we can't accept this as 90 seconds is beyond our SLA, and invoking a dummy request to warmup the server is not an option, as we have multiple managed servers in the same physical server, which means that after a server restart we would have all services running slow for at least 90 sec.
    Have you seen the above behaviour before?

    Regards,
    Fabio Douek.

    ReplyDelete
  28. Hi,

    I never heard this, very strange. I can imagine that this is no problem for Oracle because there is no error. Can you put on the jdbc trace in wls. Or use a different database or let OSB run on a different Operating System.

    let me know.

    ReplyDelete
  29. Hi Edwin, Thanks for the prompt answer. I already tried with Microsoft SQL Server and Oracle 11g. Tried OSB running on SUSE and Windows, and didn't make any difference. I ran thread dumps and OSB is consuming the CPU resources and the 90 seconds loading the classes. Even though OSB is not throwing an error I see this as an Oracle issue as it affects the application performance. Maybe for asynchronous processing (as the DBAdapter was ported from BPEL) it's not a big issue, but for synchronous calls there is a huge impact. I'm considering going back to the old implementation writing an XQuery to retrieve the data.

    I found interesting that you are not having the same issue... How long is taking for OSB give the response back (after a server restart) in your application?

    Regards,
    Fabio Douek.

    ReplyDelete
  30. Hi,

    a cold start of wls with osb 10.3 takes me 90 seconds. second time 45 ses, this is not strange soa 11g takes 5 min.

    by the way everything is running on my laptop

    ok , the first time (4kb ) is 10 sec , 2nd time is less then 1.

    I used a db adapter with 4 tables
    heavy load 2000kb first time 70 sec ( 6000 records )
    second time 7 sec

    what is your testcase and did you have a lot of project loaded in the osb.

    thanks

    ReplyDelete
  31. Hi,

    By the way can you add the toplink classes for your db adapter to your domain env script and second try to make a servlet which is loaded at startup which opens the datasource.

    lets see if this works.

    thanks

    ReplyDelete
  32. Hi Edwin,

    first of all, thanks for your help (and I'm not thinking about just this post)

    I would like to share with you this OSB scenario. Let's suppose we want to create a proxy service with two datebase update actions involved in its pipe line.
    Both insert actions must be coordinated in a single tx, so if the second fails, the first one should be rolled back. I think this scenario could be solved putting both actions into java code and using JDBC XA tools for the issue. Then you could call the java code into the pipe lie, but my question is: it's possible solve this scenario using so the DB Adapter for handling the XA tx?

    Thanks in advance.

    Jesus.

    ReplyDelete
  33. Hi,

    I won't do it in java, I don't what you need to do to make a global connection. Are you using JPA like eclipselink. Don't know if this will be part of the OSB Transaction.

    A database adapter and defined in a resource adapter with a XA JDBC datasource should do the trick for you, and do a service call out.

    thanks

    ReplyDelete
  34. Thanks for the helpful article, resources like this have been extremely helpful for someone like me who has been thrown in at the deep end with WLS/OSB.

    But, a question (you knew that was coming). I've happily exported the OSB config jar and imported it into another OSB deployment, but can you do the same thing for the JDBC data source and the DB adapter ConnectionFactory details?

    I manually created them, and I guess it's no major job (as long as you remember to do it before importing the OSB config), but is there a WLS export/import command that just takes across this stuff? I've been looking, but haven't seen anything as yet...

    ReplyDelete
  35. Hi,

    you are right datasources and resource adapters are not imported and that is normal because it works on the application server level. OSB projects uses these resources.

    but in WLS you can record your wls console actions , so the next time you can run these wlst scripts.
    or if you are a pro you can call the jdbc mbean from java or phyton.

    in OSB 11g and Soa 11g PS2 you can also script the resource adapters creation. this will be a new feature of wls 10.3.3.

    thanks

    ReplyDelete
  36. Hi there,

    I am trying to configure datasource in JBoss5 for Oracle11g. Follwing is the configuration I am using


    ejbPool_mssql4
    false

    false
    oracle.jdbc.xa.client.OracleXADataSource

    5
    20

    jdbc:oracle:thin:@10.4.50.23:1521:esp11g1
    dj_Emptoris
    dj_Emptoris
    org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter



    Oracle10g



    But somehow it's not working.

    ReplyDelete
  37. Hi Edwin,
    DB-Adapter Polls the records from table ,I want perform a physical delete after successfully transaction to destination Apps.

    Is this the best approach. Because if the transaction is failed the adapter has to roll back.

    Please advice.

    ReplyDelete
  38. Hi Edwin,
    DB-Adapter Polls the records from table ,I want perform a physical delete after successfully transaction to destination Apps.

    Is this the best approach. Because if the transaction is failed the adapter has to roll back.

    Please advice.

    ReplyDelete
  39. Hi Lara,

    You can use a Global Transaction ( XA in your resource adapters and use the xa jdbc driver ) like a two phase commit.

    Why don't you use an AQ Queue ,this still supports XA but you don't have to do a delete

    thanks

    ReplyDelete
  40. Hi Edwin,
    Many thanks. Another doubt, this might not related to DB-adapter.

    All our services been virtualize in OWSM, Is there any option to display or monitor the response messages in OWSM.

    For instance ServiceA push data to another application via OWSM. The response received back to ServiceA has to display on OWSM.
    Any idea Please.

    ReplyDelete
  41. Hi,

    in owsm 10.1.3 or that of fmw you can add a logging step or in 11g add a log policy in the management part
    Attach the policy named “oracle/log_policy”
    and you can see the messages in [Oracle Home]/user_projects/domains/[SOA Domain]/servers/[SOA Server]/logs/owsm/msglogging/diagnostic.log


    if this is in 11g and all apps are running on the same wls then wsm is not used. see this blog how to enable this http://ws-security.blogspot.com/2009/09/faq-owsm-11g-what-is-local-optimization.html

    thanks

    ReplyDelete
  42. Hi,
    I have a question, if the database is a MS-Access .mdb database, is it still possible to create the datasource connection with weblogic? the biggest problem for me is the MS-Access database doesn't have a port as Oracle Database.

    Best Regards

    Fei

    ReplyDelete
    Replies
    1. Hi Fei,
      Did you have any success to connect to MS Access through Oracle SOA ?
      Regards
      Aravind

      Delete
  43. Hi,

    ms access file is not really a program, you need to open it and then it is a db. You can only interact with odbc , this odbc driver will open the ms access file

    So db resource adapter uses jdbc and need to connect to it, it can't use odbc , maybe there is a jdbc / odbc convertor.

    thanks

    ReplyDelete
  44. Hi Edwin,

    First I would like to thank you for these posts. I have a questions

    Is there anyway I can create a database adapter using ANT?

    Thanks,
    Sami

    ReplyDelete
  45. Hi,

    yes with this post http://biemond.blogspot.com/2010/11/deploy-your-aq-db-or-jms-resource.html

    good luck

    ReplyDelete
  46. Just a question, what if in the cluster of two servers the datasource on one server is disabled by narrowing the target, would the DBAdapter on the NON-targeted server keep polling the non-existing datasource in vain?

    ReplyDelete
  47. Hi,

    the Proxy server uses the db resource adapter but this will give an error, the proxy won't start or is disabled.

    dont think it keeps trying, max the retries parameter in the wsdl/ jca file.

    thanks

    ReplyDelete
  48. Can JDeveloper oration be replaced by Eclipse (OSB Workbench) with some Eclipse plugin ?
    It would be nice to use only one tool.

    ReplyDelete
  49. Hi,

    in the next version, it will be all jdeveloper and not eclipse. Maybe not what you hoped for, but your problem will be solved.

    thanks

    ReplyDelete
  50. In latest OSB 11g the generated Business Service in Workbench doesn't show
    protocol JCA in Transport Configuration page.
    Allowed values are http (default),dsp,sp,soa.direct,ws.

    I thing that the protocol should be JCA and not http

    The test was done according to article
    http://blogs.oracle.com/middleware/2010/05/using_jca_adapter_with_osb_11113.html

    So, something is missing from my Workbench ?
    The version is oepe_11gR1PS2 with
    SOA plugin update.

    ReplyDelete
  51. Hi,

    Did you import the jca file from jdeveloper and on this file you can generate a proxy or business services.

    I think workbench takes a look at the wsdl and then enables the jca transport

    thanks

    ReplyDelete
  52. Hi

    JCA files generation is resolved.
    I hadan error in some files because
    of folder structure in Workbench.

    When deplying the application comes
    two exceptions:

    weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/db/DBManagedConnection

    javax.resource.ResourceException: java.lang.NoClassDefFoundError: oracle.tip.adapter.db.DBReadInteractionSpec

    When DBAdapter is started (Deployments//Configuration/OutboundConnectionPool) comes an exp:

    weblogic.application.ModuleException: weblogic.connector.exception.RAOutboundException:
    There are 1 nested errors: weblogic.connector.exception.RAOutboundException:
    Attempting to create a connection factory with a JNDI name that already exists:
    'eis/DB/ElectricWiringsConn1'

    => I have created a datasource with same JNDI-name as is configured to DBAdapter ConnectionPoolConfiguration.

    The JNDI connection is against
    Derby database in localhost.

    The platform is Win 7, where has
    been authorisation problems that
    might be one cause that the run from Eclipse cannot find the DBAdapter in ..\Oracle_OSB1\soa\connectors\DBAdapter.rar.

    Have I understood correctly that
    this DBAdapter.rar should be updated automatically wen DBAdapter is configured ?

    It's timestamp hasn't changed !

    ReplyDelete
  53. Hi,

    you should make a resource adapter plan once and in this plan you can define the EIS db connection, this is loaded by the dbadapter.

    ReplyDelete
  54. Hi,

    I have a requirement where
    1. I need to get the data from a local db
    2. need to get the data from client db
    3. compare both of them if they are not equal update the local db with client db data
    4. send an email to the specified people
    I have used the db adapter to get the data from local db and client db... but could anyone tell me how can i compare the values in osb(which option to use to compare the values) and how to use the update functionality in osb

    Thanks,
    vinay

    ReplyDelete
  55. Hi Edwin,

    I followed your steps, and with a bit of perseverance they worked - many thanks!

    I'm working with a stored procedure which returns a text column. When it reaches OSB it has been truncated to 4000 characters. Are you aware of how to remove this limit?

    Kind Regards,
    Rochelle

    ReplyDelete
  56. Hi,

    Do you see the whole value in sqlplus, do you return varchar2 or clob
    Did you do something special in OSB , a special datatype.

    if not then take a look at the toplink mapping and see there is a restriction.

    thanks

    ReplyDelete
  57. Hi Edwin,

    Do you know if it's possible to create multiple operations in 1 db adapter for example read, update, delete and a listener or do I have to create multiple db adapters then?

    Thanks in advance,
    Hugo

    ReplyDelete
  58. Hi,

    You can select more then one action on a db adapter, for example a query, insert, merge etc.

    But you can create a business service on this db adapter, but when you want to use it in a proxy service then you need to select the right operation.

    But reuse and multiple operations is possible

    Thanks

    ReplyDelete
  59. Hi Edwin,

    Do you know if it's possible to create multiple calls to stored procedures or functions in the same db adapter?

    Best regards.

    ReplyDelete
  60. Hi,

    yes you can add many operations like a select , merge etc to the db adapter.

    and in the business service you can select the right operation.

    thanks

    ReplyDelete
  61. Hi, Iam trying to follow this post, but in Eclipse, when I'm designing the bussiness service (right clicking at the jca file) the IDE doesn't let me choose the "jca" option in the transport protocol listbox, my question is... do you have any idea of how to solve it? thanks...

    ReplyDelete
  62. Hi, thanks for your post.
    Iam trying to follow the steps. Iam using Eclipse (ver 3.5.2). When I'm generating the JCA business service, the IDE doesn't let me choose the JCA transport protocol. I tried to import the plugins that contain the JCA protocol, but with any sucessfull result.
    Do you have any idea of the step Iam missing? thanks...

    ReplyDelete
  63. Hi Pino,

    are you using 10.3.1 or more recent one. 10.3.1 and 2 works with soa suite 10g and I think osb 11g or 10.3.3 works with Soa Suite 11g.

    in osb 11g you can select the imported jca and with the right mouse button, generate osb service. this will create a proxy or business service.

    the 10.3.1 proxy or business service tries to detect it by reading the wsdl and then enables the jca transport.

    thanks

    ReplyDelete
  64. Hi I have made JCA based proxy service which polls the data from database table A and put the polled records into the topic,there is another proxy service which polls the topic and invokes the business service which insert the records into the table B ,but reocrds are inserted twice at the same time
    Can you please tell me how can i resolve this problem ,I want the data to be inserted into table B only once

    ReplyDelete
    Replies
    1. Hi,

      do you have a cluster and do you use exactly once as QoS in the routing options. Why are you using a topic , does a Queue solves you problem.

      thanks

      Delete
  65. Hi I have a business service based on dbadapter wsdl and has insert, select and update operations. It is deployed on two managed severs (so two copies running). Result of which is that there are concurrency issues and data is updated simultaneously by multiple instances of business service into database. How can I make this business service as singleton?

    I tried throttling, also work manager and setting maxthread=1. I have made Qos=1 in routing options. But all these did not work.

    ReplyDelete
    Replies
    1. Hi,

      Can you tell me more, Why this service invoked twice. with http only one gets the request. How did you setup this. Also with t3 or EJB on a cluster only one gets the request.

      thanks

      Delete
  66. Hi Edwin,

    I'm wondering if is it possible de modify interaction spec properties via customization file or if is it possible to not override them when deploying the Database Adapter on the service Bus.

    The problem i can't automate the deployment of database adapter to my differents environments because my database schema (interaction spec property) is depending of the environment and i'm forced to post-configure this property after each deployment.

    Do you have an idea of how i can workaround this issue ?

    Thanks

    ReplyDelete
    Replies
    1. Hi,

      strange, so you say that you connect on dev to db schema aaaa and on prod to bbbb. Hopely not in one database

      maybe you can use 1 integration schema and this has private synomyms to the right environment. only works when you have different databases.

      thanks

      Delete
  67. Hi Edwin,

    I am getting the following error when i try to redeploy to existing plan, can you plz suggest

    An error occurred during activation of changes, please see the log for details.
    weblogic.connector.exception.RAOutboundException: There are 1 nested errors: weblogic.connector.exception.RAOutboundException: Attempting to create a connection factory with a JNDI name that already exists: 'jdbc/integrationdbcf'. at weblogic.connector.outbound.RAOutboundManager.createConnectionFactory(RAOutboundManager.java:453) at weblogic.connector.outbound.RAOutboundManager.initialize(RAOutboundManager.java:420) at weblogic.connector.outbound.RAOutboundManager.(RAOutboundManager.java:121) at weblogic.connector.common.RAInstanceManager.initialize(RAInstanceManager.java:1227) at weblogic.connector.common.RAInstanceManager.(RAInstanceManager.java:356) at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:198) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:518) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:649) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:54) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:44) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:209) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:749) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:160) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:47) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    ReplyDelete
    Replies
    1. Hi,

      Attempting to create a connection factory with a JNDI name that already exists: 'jdbc/integrationdbcf'.

      It looks like you got a JDBC xml definition in your deployment, it should be somewhere in the META-INF folder. Try to remove this and on the application level you can de-select JDBC synchronization.

      Thanks

      Delete
  68. Thank You, Edwin.

    Created new plan.xml file, it solved.

    ReplyDelete
  69. Caused by: BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by javax.resource.spi.InvalidPropertyException: Missing Property Exception.
    Missing Property: [ConnectionFactory> xADataSourceName or dataSourceName].
    You may have set a property (in _db.jca) which requires another property to be set also.
    Make sure the property is set in the interaction (activation) spec by editing its definition in _db.jca.
    .
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake.

    at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:698)
    at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:664)
    at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:317)
    at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:960)
    at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:379)
    at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:263)
    at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1154)
    at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:254)
    at oracle.tip.adapter.sa.impl.fw.wsif.jca.WSIFOperation_JCA.performOperation(WSIFOperation_JCA.java:535)
    ... 44 more


    help getting the error
    have already configured the dbadapter and the data source
    but dont know why
    thanks

    ReplyDelete
    Replies
    1. Hi,

      You are using a DataSource with XA or Not and using the Database resource adapter. the adapter has 2 fields one for XA and one for Not XA.

      you need to keep this in Sync, so decide for XA or Not and use the right field in the JDBC Datasource and the matching Resource Adapter entry.

      Thanks

      Delete
  70. Hello Edwin,
    Is there any way to limit the number of rows returned in each and ever cursor which is returned as part of response of the stored procedure executed via DB adapter?
    I tried MaxTransactionSize (used for polling the DB Table) but it dint work. Could you please suggest a solution ?

    Thanks
    Ram

    ReplyDelete
    Replies
    1. Hi,

      I think you need to changed the stored procedure. the DB adapter can not change the PLSQL.

      Thanks

      Delete
  71. H,

    Do you know how to pass db.jca.SqlString value dynamically from OSB.

    Thanks in Advance.

    ReplyDelete
    Replies
    1. Can you try to set it in the Transport Headers activity.

      Delete
  72. Hello Edwin,

    I am trying use DB adapter for update operation. Its a simple update on a row against a table which doesnt have primary key. What i would like to know is how to get the response from the update operation as to how many rows were updated.

    The scenario right now it the DB adapter returns success even when i run an update on a row which doesnt exist. So i would like to see if there is a zero row update on a call then i would like to raise an exception. I am using this DB adapter from OSB.

    Thanks,
    Anil.

    ReplyDelete
    Replies
    1. Hi,

      I know in eclipselink and also probably toplink you can do this
      Query query = this.getEntityManager().createNativeQuery(“update foo set bar = 1 where id = 21”);
      int affectedRows = query.executeUpdate();

      DB adapter uses TopLink so maybe you can read some DB adapter property

      Delete
  73. i am using db adapter with osb and xml which goes in the biz service has some header elements defined. these header elements are not getting returned in the response xml. pls suggest. in jms que we have correlation id like wise do we have smthng in db adapter

    ReplyDelete
    Replies
    1. Hi,

      Don't think so, JMS is totally different, this has messaging patterns but you can make your own DB package and use that to return some extra parameters.

      Thanks

      Delete