This discussion is archived
4 Replies Latest reply: Feb 7, 2013 10:00 PM by user366389 RSS

SOA calling a MS SQL table to insert data/

user366389 Newbie
Currently Being Moderated
Hi
I have configured an XA Driver to insert the data to the table on MS SQL Server. When i execute the Flow with a SOAP UI. I was able to insert the data the MS SQL table . But at the end the transaction is rolled back.


My Request is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mvn="http://xmlns.oracle.com/MVNEIDM/MVNESelfRegistration/MVNESelfRegistration">
<soapenv:Header/>
<soapenv:Body>
<mvn:MVNESelfRegistrationRequest>
<mvn:subscriberId>12345</mvn:subscriberId>
<mvn:Keyword>456</mvn:Keyword>
<mvn:completionDt>2013-02-06T16:24:06.952</mvn:completionDt>
<mvn:expirationdt>2013-02-06T16:24:06.952</mvn:expirationdt>
</mvn:MVNESelfRegistrationRequest>
</soapenv:Body>
</soapenv:Envelope>


Erros on SOAP UI are :

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>[FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.SelfRegistration'.</faultstring>
<faultactor/>
<detail>
<exception/>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>

From Managed server log the error is


Form weblogic server : -
Error committing transaction:; nested exception is: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.SelfRegistration'. Error Code: 208


The process is completed with out any error but why it is rolling abck the transaction at the end. The object table was existing in the database and i mapped to the table for inserting the data from receive input variable to invoke input variable. BPEL Instance executed it till the end but at the end the transaction is rolled back.

Thanks,
Venu Raja
  • 1. Re: SOA calling a MS SQL table to insert data/
    vladodias Guru
    Currently Being Moderated
    Invalid object name 'dbo.SelfRegistration'
    I'm assuming you can see a SelfRegistration table in your database... So, I guess dbo is not the right schema name...
  • 2. Re: SOA calling a MS SQL table to insert data/
    user366389 Newbie
    Currently Being Moderated
    No The table is in schema dbo ... i am using the jedveloper 11.1.1.6.0
    While creating a db adapter in reference service-> i select the schema name dbo adn then table self registration. based on that i was doing my mapping..

    <adapter-config name="FiebelService" adapter="Database Adapter" wsdlLocation="FiebelService.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">

    <connection-factory location="eis/db/sql" UIConnectionName="generic JDBC" adapterRef=""/>
    <endpoint-interaction portType="FiebelService_ptt" operation="insert">
    <interaction-spec className="oracle.tip.adapter.db.DBWriteInteractionSpec">
    <property name="DescriptorName" value="FiebelService.Selfregistration"/>
    <property name="DmlType" value="insert"/>
    <property name="MappingsMetaDataURL" value="FiebelService-or-mappings.xml"/>
    <property name="DetectOmissions" value="true"/>
    <property name="GetActiveUnitOfWork" value="true"/>
    <property name="OutputCompletedXml" value="false"/>
    </interaction-spec>
    </endpoint-interaction>

    </adapter-config>


    this is my fiebel service -mappings.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <object-persistence xmlns="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eclipselink="http://www.eclipse.org/eclipselink/xsds/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="Eclipse Persistence Services - 2.1.3.v20110304-r9073">
    <name>FiebelService-OR</name>
    <class-mapping-descriptors>
    <class-mapping-descriptor xsi:type="object-relational-class-mapping-descriptor">
    <class>FiebelService.Selfregistration</class>
    <alias>dbo.SelfRegistration</alias>
    <primary-key>
    <field table="SelfRegistration" name="SRC_Key" xsi:type="column"/>
    </primary-key>
    <events/>
    <querying>
    <queries>
    <query name="FiebelServiceSelect" xsi:type="read-all-query">
    <reference-class>FiebelService.Selfregistration</reference-class>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    </queries>
    </querying>
    <attribute-mappings>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>srcKey</attribute-name>
    <field table="SelfRegistration" name="SRC_Key" xsi:type="column"/>
                   
    <attribute-classification>java.math.BigInteger</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>subscriberid</attribute-name>
    <field table="SelfRegistration" name="SubscriberId" xsi:type="column"/>
    <attribute-classification>java.lang.Integer</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>keyword</attribute-name>
    <field table="SelfRegistration" name="Keyword" xsi:type="column"/>
    <attribute-classification>java.lang.String</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>completiondt</attribute-name>
    <field table="SelfRegistration" name="CompletionDt" xsi:type="column"/>
    <attribute-classification>java.sql.Timestamp</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>expirationdt</attribute-name>
    <field table="SelfRegistration" name="ExpirationDt" xsi:type="column"/>
    <attribute-classification>java.sql.Timestamp</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>createdt</attribute-name>
    <field table="SelfRegistration" name="CreateDt" xsi:type="column"/>
    <attribute-classification>java.sql.Timestamp</attribute-classification>
    </attribute-mapping>
    <attribute-mapping xsi:type="direct-mapping">
    <attribute-name>createby</attribute-name>
    <field table="SelfRegistration" name="CreateBy" xsi:type="column"/>
    <attribute-classification>java.lang.String</attribute-classification>
    </attribute-mapping>
    </attribute-mappings>
    <descriptor-type>independent</descriptor-type>
    <caching>
    <cache-type>weak-reference</cache-type>
    <cache-size>-1</cache-size>
    <always-refresh>true</always-refresh>
    </caching>
    <remote-caching>
    <cache-type>weak-reference</cache-type>
    <cache-size>-1</cache-size>
    </remote-caching>
    <instantiation/>
    <copying xsi:type="instantiation-copy-policy"/>
    <tables>
    <table name="dbo.SelfRegistration"/>
    </tables>
    <structure>structureName</structure>
    </class-mapping-descriptor>
    </class-mapping-descriptors>
    <login xsi:type="database-login">
    <platform-class>org.eclipse.persistence.platform.database.SQLServerPlatform</platform-class>
    <user-name></user-name>
    <connection-url></connection-url>
    </login>
    </object-persistence>

    i dont find any find any problem in execution.. i was able to execute the composite only at the end the transaction is rolled back..
  • 3. Re: SOA calling a MS SQL table to insert data/
    vladodias Guru
    Currently Being Moderated
    I would start looking for database triggers relating to this table...
  • 4. Re: SOA calling a MS SQL table to insert data/
    user366389 Newbie
    Currently Being Moderated
    Thanks i got the resolution. yes the object was not found since there is a difference in Database name .... but still the flow is executed in green colour and at the end it throws an exception as rolling back transaction.

    Solution: I had a one linux server on which the databases are installed.

    I have two application say x and y but i created only one XA Datasource to ms sql server since host name / ip address /usrname/pwd are same. i thought i can use same data source adn connecton name . But there is a difference in database name liek ABS , ABS_C.. when i create two data sources for two different connection pools for two data sources it was working fine.


    Thanks,
    Venugopal SSSS Raja Patnaik

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points