Insert failing

I have a JDO class which has a composite key
package com.yodlee.yde.persistence.configuration;
import java.util.List;
public class ConfigSession {
private String id;
private Long configId;
private String aSession;
private Long length;
private Long lastAccess;
private java.util.Date createDate;
private Long source;
private String sessionData;
private Long dbSessionId;
private Config configOfConfigId;
public ConfigSession() {
public String getId() {
return id;
public void setId(String id) {
this.id = id;
public Long getConfigId() {
return configId;
public void setConfigId(Long configId) {
this.configId = configId;
public String getASession() {
return aSession;
public void setASession(String aSession) {
this.aSession = aSession;
public Long getLength() {
return length;
public void setLength(Long length) {
this.length = length;
public Long getLastAccess() {
return lastAccess;
public void setLastAccess(Long lastAccess) {
this.lastAccess = lastAccess;
public java.util.Date getCreateDate() {
return createDate;
public void setCreateDate(java.util.Date createDate) {
this.createDate = createDate;
public Long getSource() {
return source;
public void setSource(Long source) {
this.source = source;
public String getSessionData() {
return sessionData;
public void setSessionData(String sessionData) {
this.sessionData = sessionData;
public Long getDbSessionId() {
return dbSessionId;
public void setDbSessionId(Long dbSessionId) {
this.dbSessionId = dbSessionId;
public Config getConfigOfConfigId() {
return configOfConfigId;
public void setConfigOfConfigId(Config configOfConfigId) {
this.configOfConfigId = configOfConfigId;
here is the package definition for it
<class name="ConfigSession">
<extension vendor-name="tt" key="table" value="COB_SESSIONS"/>
<extension vendor-name="tt" key="pk-column" value="ID"/>
<extension vendor-name="tt" key="pk-column" value="COBRAND_ID"/>
<extension vendor-name="tt" key="lock-column" value="none"/>
<extension vendor-name="tt" key="class-column" value="none"/>
<field name="id">
<extension vendor-name="tt" key="data-column" value="ID"/>
</field>
<field name="configId">
<extension vendor-name="tt" key="data-column"
value="COBRAND_ID"/>
</field>
<field name="aSession">
<extension vendor-name="tt" key="data-column"
value="A_SESSION"/>
</field>
<field name="length">
<extension vendor-name="tt" key="data-column"
value="LENGTH"/>
</field>
<field name="lastAccess">
<extension vendor-name="tt" key="data-column"
value="LAST_ACCESS"/>
</field>
<field name="createDate">
<extension vendor-name="tt" key="data-column"
value="CREATE_DATE"/>
</field>
<field name="source">
<extension vendor-name="tt" key="data-column"
value="SOURCE"/>
</field>
<field name="sessionData">
<extension vendor-name="tt" key="data-column"
value="SESSION_DATA"/>
</field>
<field name="dbSessionId">
<extension vendor-name="tt" key="data-column"
value="DB_SESSION_ID"/>
</field>
<field name="configOfConfigId">
<extension vendor-name="tt" key="data-column"
value="COBRAND_ID"/>
</field>
</class>
when i add a new object instance.. i.e an insert into the table, i get this
error.
javax.jdo.JDODataStoreException: [SQL=INSERT INTO COB_SESSIONS (COBRAND_ID,
SESSION_DATA, ID, DB_SESSION_ID, LAST_ACCESS, LENGTH, COBRAND_ID,
CREATE_DATE, COBRAND_ID, A_SESSION, SOURCE) VALUES (4, NULL, 'id 6', NULL,
NULL, NULL, 150, NULL, NULL, NULL, NULL)] ORA-00957: duplicate column name
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT INTO
COB_SESSIONS (COBRAND_ID, SESSION_DATA, ID, DB_SESSION_ID, LAST_ACCESS,
LENGTH, COBRAND_ID, CREATE_DATE, COBRAND_ID, A_SESSION, SOURCE) VALUES (4,
NULL, 'id 6', NULL, NULL, NULL, 150, NULL, NULL, NULL, NULL)] ORA-00957:
duplicate column name
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.insert(JDBCStoreMana
ger.java:302)
at
com.solarmetric.kodo.runtime.StateManagerImpl.storeFields(StateManagerImpl.j
ava:1136)
at com.solarmetric.kodo.runtime.PNewState.flush(PNewState.java:37)
at
com.solarmetric.kodo.runtime.StateManagerImpl.flush(StateManagerImpl.java:33
4)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManager
Impl.java:337)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManage
rImpl.java:245)
at TestConfigSession.main(TestConfigSession.java:51)
Obviously, the field cobrand_id is repeating.
Can you help me out with this?
Thanks,
Sushanto

It works. I changed the metadata.
But, on an inverse collection, The JDO returns an error. there seems to be a
basic error in defining the referencing. Can somebody help me out here?
javax.jdo.JDODataStoreException: [SQL=SELECT
COBRAND.CONFIGFEATURECOLLECTIONFORCONX FROM COBRAND WHERE COBRAND.COBRAND_ID
= 1] ORA-00904: invalid column name
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
COBRAND.CONFIGFEATURECOLLECTIONFORCONX FROM COBRAND WHERE COBRAND.COBRAND_ID
= 1] ORA-00904: invalid column name
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManage
r.java:247)
at
com.solarmetric.kodo.runtime.StateManagerImpl.isLoaded(StateManagerImpl.java
:580)
at
com.yodlee.yde.persistence.configuration.Config.jdoGetcom_yodlee_yde_persist
ence_configuration_Config_configFeatureCollectionForConfigId(Config.java)
at
com.yodlee.yde.persistence.configuration.Config.getConfigFeatureCollectionFo
rConfigId(Config.java:173)
at TestConfig.main(TestConfig.java:35)
The metadata concerned here is as follows:
<class name="Config" identity-type="application"
objectid-class="Config$Oid">
<extension vendor-name="tt" key="table" value="COBRAND"/>
<extension vendor-name="tt" key="lock-column" value="none"/>
<extension vendor-name="tt" key="class-column" value="none"/>
<field name="configId" primary-key="true">
<extension vendor-name="tt" key="data-column"
value="COBRAND_ID"/>
</field>
<field name="name">
<extension vendor-name="tt" key="data-column" value="NAME"/>
</field>
<field name="templateRootDir">
<extension vendor-name="tt" key="data-column"
value="TEMPLATE_ROOT_DIR"/>
</field>
<field name="loginName">
<extension vendor-name="tt" key="data-column"
value="LOGIN_NAME"/>
</field>
<field name="loginNameAsucase">
<extension vendor-name="tt" key="data-column"
value="LOGIN_NAME_ASUCASE"/>
</field>
<field name="password">
<extension vendor-name="tt" key="data-column"
value="PASSWORD"/>
</field>
<field name="loginFromYodlee">
<extension vendor-name="tt" key="data-column"
value="LOGIN_FROM_YODLEE"/>
</field>
<field name="useSiteFiltering">
<extension vendor-name="tt" key="data-column"
value="USE_SITE_FILTERING"/>
</field>
<field name="configLevel">
<extension vendor-name="tt" key="data-column"
value="COBRAND_LEVEL"/>
</field>
<field name="sessionId">
<extension vendor-name="tt" key="data-column"
value="SESSION_ID"/>
</field>
<field name="regInfoToUrl">
<extension vendor-name="tt" key="data-column"
value="REG_INFO_TO_URL"/>
</field>
<field name="host">
<extension vendor-name="tt" key="data-column" value="HOST"/>
</field>
<field name="updatePrefId">
<extension vendor-name="tt" key="data-column"
value="UPDATE_PREF_ID"/>
</field>
<field name="configParamCollectionForConfigId">
<collection element-type="ConfigParam"/>
<extension vendor-name="tt" key="inverse" value="configOfConfigId"/>
</field>
<field name="configMemCollectionForConfigId">
<collection element-type="ConfigMem"/>
<extension vendor-name="tt" key="inverse" value="configOfConfigId"/>
</field>
<field name="configFeatureCollectionForConfigId">
<collection element-type="ConfigFeature"/>
<extension vendor-name="tt" key="inverse" value="configId"/>
</field>
<field name="configSessionCollectionForConfigId">
<collection element-type="ConfigSession"/>
<extension vendor-name="tt" key="inverse" value="configOfConfigId"/>
</field>
</class>
<class name="ConfigFeature" identity-type="application"
objectid-class="ConfigFeature$Oid">
<extension vendor-name="tt" key="table" value="COB_FEATURE"/>
<extension vendor-name="tt" key="lock-column" value="none"/>
<extension vendor-name="tt" key="class-column" value="none"/>
<field name="configId" primary-key="true">
<extension vendor-name="tt" key="data-column"
value="COBRAND_ID"/>
</field>
<field name="featureId" primary-key="true">
<extension vendor-name="tt" key="data-column"
value="FEATURE_ID"/>
</field>
</class>
can you please help me out with this one?
Thanks,
Sushanto
"A. Abram White" <[email protected]> wrote in message
news:[email protected]...
Actually your problem is that you're not telling Kodo that you're using
application identity. The default behavior for persistent classes is to
use datastore identity, meaning the JDO implementation generates its own
unique id for each instance, one that is independent of the values of the
fields of your object.
In your case, the primary key is composed of 2 fields that exist in your
object; hence you want to use application identity. This involves
several changes to your JDO metadata. See the relevant jdo and user
guide documentation for details.
It may be possible to 'hack' it and use datastore identity but map the
primary key column to a field of your class, but this is not recommended,
and in any case will not work for compound primary keys.

Similar Messages

  • Insert failed in Java Proc

    Here is my class
    public static String OnlyInsert(
    int v_AccommodationVendorID,
    int v_AccommodationTypeID,
    int v_AccommodationRateTypeID,
    int v_PeakPrice
    ) throws SQLException
    String val = "yes";
    String x = "";
    String insSql = "";
    String tDate = "TO_DATE('02/02/2001', 'MM/DD/YYYY')";
    OracleDriver ora = new OracleDriver();
    conn = ora.defaultConnection();
    //insSql = "INSERT INTO Accommodation_Rate_Schedule (AccommodationVendorID, AccommodationTypeID, AccommodationRateTypeID, StartDate, Price) Values (" + v_AccommodationVendorID + "," + v_AccommodationTypeID + "," + v_AccommodationRateTypeID + ",TO_DATE('02/15/2001', 'MM/DD/YYYY')," + v_PeakPrice +")";
    try
    PreparedStatement pstmt = conn.prepareStatement
    ("INSERT INTO Accommodation_Rate_Schedule (AccommodationVendorID, AccommodationTypeID, AccommodationRateTypeID, StartDate, Price) Values "
    + "(?, ?, ?, ?, ?)");
    pstmt.setInt(1, v_AccommodationVendorID);
    pstmt.setInt(2, v_AccommodationTypeID);
    pstmt.setInt(3, v_AccommodationRateTypeID);
    pstmt.setString(4, tDate);
    pstmt.setInt(5, v_PeakPrice);
    pstmt.execute();
    if(! success)
    System.err.println("Insert failed");
    x = x + "failed sql" + insSql;
    else
    System.err.println("Insert is gooooooooood");
    x = x + "good sql" + insSql;
    catch (Exception e)
    System.err.println("exception caught" + e);
    x = x + "2" + e;
    return(val + "and " + x);
    Here is my function
    CREATE OR REPLACE FUNCTION ins_acc
    (id1 NUMBER,
    id2 NUMBER,
    id3 NUMBER,
    id4 NUMBER
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA
    NAME 'Accommodation.OnlyInsert(int, int, int, int)
    return java.lang.String';
    Every thing is fine till i use the following command
    select ins_acc(5, 1, 1, 100) from dual;
    I get the following error
    oracle.jdbc.driver.OracleSQLException: ORA-14551: cannot perform a DML operation inside a query
    Any one please
    Thanks
    null

    Dear Sir/Madam,
    Hi. I had a problem exactly like you.
    Your problem is for the following statement:
    select ... into ... from dual
    Here you are performing a select and then
    in your stored function you want to perform
    an insert. Oracle can not do such a thing.
    So you should convert your stored function
    to a stored procedure with an out parameter.
    Sincerely,
    Kaveh Mahdian

  • Hashtable insert failed. Load factor too high : Dot net 4.5

    I'm getting an exception “System.InvalidOperationException: Hashtable insert failed. Load factor too high.”
    My application is developed in VS2010 with 4.0 framework and it is working fine in our development environment (4.0 version ) (for 4.0 framework I'm able to find the hotfix and I've installed it in my development environment). In production environment
    framework is upgraded to 4.5 version and we often getting the mentioned exception.
    Application developed : windws 7 - 32 bit OS / vb.net 4.0
    Development environment (hotfix installed) :  windows server 2008 - 64 bit  / dotnet FW 4.0
    Prod Environment : windows server 2008 - 64 bit / dotnet FW 4.5 
    Kindly help me resolving this issue.
    Thanks.

    Hello,
    For this issue, we will focus on your new posted thread:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/a3feddfd-ff21-438c-9704-661375f096af/is-that-the-hot-fix-kb2803754-included-in-net-framework-451-version-4550938?forum=clr#a3feddfd-ff21-438c-9704-661375f096af
    >>Can you conform that the hot fix KB2803754 available in the version
    4.5.50938 (.NET Framework 4.5.1) ?
    You could do a test in the link above to check if the .NET 4.5.1 contians this KB(currently I do not have  an proper environment to test it).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQLException: Insert failed

    Hi,
    I am facing problem with inserting values into table.I am using Weblogic 8.1 sever with Oracle at backend.I have written 2 JSP's one is simple registeration form containing 48 values filled by the user.After filling values ,on click of Save button my second jsp comes up with JDBC connection & PreparedStatement.But, my SQL insert fails due to not connected with DB.I am putting some code of JSP,Plz,go through it & help me.
    <%
    String error;
    String forbazaar = request.getParameter("forbazaar");
    String section = request.getParameter("section");
    String region = request.getParameter("region");
    try
    Connection con =
    DriverManager.getConnection("weblogic.jdbc.oracle.OracleDriver:B2B ConnectionPool"); String sql = ("INSERT INTO PANT_VENDOR_APPLICATION VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
    PreparedStatement ps = con.prepareStatement(sql);
    ps.setString(1,forbazaar);
    ps.setString(2,section);
    ps.setString(3,region);
    ps.executeUpdate();
    ps.close();
    con.close();
    catch(SQLException sqle)
              error = "SQLException: Insert failed";
              throw new SQLException(error);
    %>
    Thanks.
    Vaish...

    Assuming that that is a proper URL, for your weblogic connection pool, your problem is not in this code. It's either in the place you set up the connection pool, the network (your program can't connect to the database), or the database itself (not running, for example).

  • DBAdapter insert failing in Fusion Middleware SOA Suite 11g

    Hi,
    I am trying a simple example of inserting into database using DBAdapter. Here is the log message and am unable to figure out the problem it says log at DBAdapter logs can someone tell me where does DBAdapter logs exists. I tried the select and it works fine some how insert is failing.
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [InsertNewEmployee.Emp].
    Caused by java.sql.SQLException: Cannot call rollback when using distributed transactions.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    oracle.fabric.common.FabricInvocationException: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [InsertNewEmployee.Emp].
    Caused by java.sql.SQLException: Cannot call rollback when using distributed transactions.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.EndpointInteractionException.getFabricInvocationException(EndpointInteractionException.java:75)
         at oracle.integration.platform.blocks.adapter.AdapterReference.getFabricInvocationException(AdapterReference.java:287)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:273)
         at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:142)
         at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:194)
         at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:204)
         at sun.reflect.GeneratedMethodAccessor771.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:71)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy210.post(Unknown Source)
         at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post2Mesh(MediatorServiceEngine.java:871)
         at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:200)
         at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:94)
         at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
         at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:47)
         at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:64)
         at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:121)
         at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:467)
         at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:366)
         at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:272)
         at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:138)
         at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:656)
         at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:482)
         at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:142)
         at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:194)
         at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:204)
         at sun.reflect.GeneratedMethodAccessor771.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy210.post(Unknown Source)
         at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:511)
         at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:376)
         at oracle.tip.adapter.file.inbound.Publisher.publishMessage(Publisher.java:377)
         at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.xlate(InboundTranslatorDelegate.java:455)
         at oracle.tip.adapter.file.inbound.InboundTranslatorDelegate.doXlate(InboundTranslatorDelegate.java:116)
         at oracle.tip.adapter.file.inbound.ProcessorDelegate.doXlate(ProcessorDelegate.java:252)
         at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:157)
         at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:349)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:77)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:171)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [InsertNewEmployee.Emp].
    Caused by java.sql.SQLException: Cannot call rollback when using distributed transactions.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:427)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:510)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:494)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:463)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:236)
         ... 50 more
    Caused by: BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    insert failed. Descriptor name: [InsertNewEmployee.Emp].
    Caused by java.sql.SQLException: Cannot call rollback when using distributed transactions.
    Please see the logs for the full DBAdapter logging output prior to this exception.  This exception is considered retriable, likely due to a communication failure.  To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml).  To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.  All properties are integers.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createRetriableException(DBResourceException.java:641)
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:610)
         at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:661)
         at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:255)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:310)
         ... 54 more
    Caused by: java.sql.SQLException: Cannot call rollback when using distributed transactions
         at weblogic.jdbc.wrapper.JTAConnection.rollback(JTAConnection.java:379)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicRollbackTransaction(DatabaseAccessor.java:1410)
         at oracle.toplink.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:581)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1401)
         at oracle.toplink.internal.sessions.AbstractSession.basicRollbackTransaction(AbstractSession.java:369)
         at oracle.toplink.threetier.ClientSession.basicRollbackTransaction(ClientSession.java:135)
         at oracle.toplink.internal.sessions.AbstractSession.rollbackTransaction(AbstractSession.java:3003)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4405)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.rollbackTransaction(UnitOfWorkImpl.java:4426)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1374)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1417)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1167)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:939)
         at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:203)
         ... 55 moreThanks

    CHeck this thread:
    BINDING.JCA-12510 JCA Resource Adapter location error in SOA 11g Suite
    Did you have set the correct parameters to the DBAdpater; it look lik it can not bind the parameters (BINDING JCA-12563).
    Marc

  • Row Insert Failed - Column name or number of supplied values does not match

    Hi ,
    I am trying add a new field to an existing table in MSSQL and access it in portlets,
    I added the new field in the table, and making necessary updations to the accessing java code seems to look fine. but when i insert the new rwo, fails with exception listed below.
    My code tidbits is as follows.
                   System.out.println("Column Location of outsidePhysician"+ aResultSet.findColumn("outsidePhysician")); // works and returns 24
                   if (anIntake.getOutsidePhysician() != null && !(anIntake.getOutsidePhysician().equals("")))
                        System.out.println("Now Alternate Physician will be added to resultset");
                        aResultSet.updateString(24, anIntake.getOutsidePhysician());
                        aResultSet.updateString("outsidePhysician",anIntake.getOutsidePhysician());
                        System.out.println("Now Alternate Physician already added to resultset"); // also printed
                   }else{
                        aResultSet.updateString(24, "new Physician");
                        aResultSet.updateString("outsidePhysician","new Physician");
                   //NOT NULL
                   aResultSet.insertRow(); // fails here
                   System.out.println("Inserted");
    The table has the right field name too, which is proved when i retrieve the fieldno, based on field name. I tried to delete the field and removing these changes work ok..
    Any ideas would be of help
    Thanks in Advance
    Usha
    [Microsoft][SQLServer 2000 Driver for JDBC]Row insert failed. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.executeStatement(Unknown Source) at com.microsoft.jdbc.base.BaseImplUpdatableResultSet.insertRow(Unknown Source) at com.microsoft.jdbc.base.BaseResultSet.insertRow(Unknown Source) at com.microsoft.jdbcx.base.BaseResultSetWrapper.insertRow(Unknown Source) at com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.insertRow(WSJdbcResultSet.java:2181) ... 14 more Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Insert Error: Column name or number of supplied values does not match table definition. at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) at com.microsoft.jdbc.base.BaseExce

    I haven't ever used that method of inserting rows, but from the example in the API documentation it looks to me like you have to callaResultSet.moveToInsertRow();before you callaResultSet.insertRow();Or are you just "inserting" the physician's name into existing rows of the database? If that's what you are doing then you need to callaResultSet.updateRow();Message was edited by:
    DrClap

  • "trigger to audit when insert fails"

    Hi all ,
    there was a qn thrown to me by my friend.
    the qn is " I am trying to insert into a table say tab1. i want to write a trigger which will audit the date and time of insert . I want the audit table to be populated even if the insert fails ".
    Is there an option to do so ..
    Please let me know asap.
    thanks
    harsha

    Berfore Insert row-level autonomous trigger can help:
    SQL> create table t (id number check (id < 10));
    Table created.
    SQL> create table t_aud (id number, ts# timestamp);
    Table created.
    SQL> create or replace trigger t_aud_tr
      2  before insert on t
      3  for each row
      4  declare
      5   pragma autonomous_transaction;
      6  begin
      7   insert into t_aud values(:new.id, systimestamp);
      8   commit;
      9  end;
    10  /
    Trigger created.
    SQL> insert into t values(1);
    1 row created.
    SQL> select * from t_aud;
            ID TS#
             1 18.08.05 12:57:19,781000
    SQL> insert into t values(20);
    insert into t values(20)
    ERROR at line 1:
    ORA-02290: check constraint (SCOTT.SYS_C008240) violated
    SQL> select * from t_aud;
            ID TS#
             1 18.08.05 12:57:19,781000
            20 18.08.05 12:57:40,125000Rgds.

  • "Refresh after" insert fails for DB-View with INSTEAD OF Triggers

    Hi,
    I have a database view with INSTEAD OF triggers defined for INSERT, UPDATE, DELETE.
    For some EO attributes the refresh after insert and update is defined.
    Posting to database fails.
    According to Database 9.2 Manual and a previous thread (BC4J and Updatable Views the RETURNING clause is not allowed for database views with INSTEAD OF triggers.
    Is there a workaround so the refresh after is done, but without the RETURNING feature?
    I only need to refresh some values. The PK i can set in the create method of the EO so refresh via a additional SELECT would be possible.
    If not Feature Request:
    Add the possibility to do the "refresh after ..." with a 2nd SELECT using the PK instead of using the RETURNING clause.
    Of course then it is not possible to set the PK in the database trigger. PK has to be set in the create method of the EO.
    Thanks,
    Markus
    GEMS IT

    Hi Markus,
    Turning on the stack trace (-Djbo.debugout put=Console - in the Project/runner) did help and I should have done it sooner. Turns out that when I constructed my EO based upon a database view - I should have left out the PKs of the base tables.
    In my case, I am using an "Instead Of Trigger" to populate a multi-table arrangement (parent - child - grandChild - greatGrandChild relationship) where all base tables are using dbSequence/dbTriggers.
    Final analysis - I would like to see BC4J handle this situation. I do not want to use View-Links and I should * not * have to resort to stored procedures and BC4J/doDML. If I construct a DB View this is participating in an parent - child - grandChild - greatGrandChild relationship that are using dbSequence/dbTriggers, then BC4J should be smart enough to construct VO knowing that I want to do insert, update, delete, selects - based upon this structure.
    Thanks Markus,
    Bill G...

  • PI JDBC INSERT Failed but message is registered as successful

    Dear all,
    We have a scenario where we send an IDOC with prices of several materials to PI and then using JDBC we send it to an SQL database. During the mapping, we create an INSERT statement for each segment of the IDOC .
    The problem is, that sometimes one or more insert statements may fail (the customer can see no new lines in the database), but in the monitoring everything seems ok . The message has a "processed successfully"  status so there is no way for the customer to know that something went wrong so each time they check the prices one by one .
    The strange part is that if they find a mistake, they just resend the same message and after one or two tries it works ! This indicates that the problem is not in the actual data but somewhere else (probably in the database ?) .
    So, one problem is why the data is not written and the second issue is why the message is logged as successful although one query has failed ,
    Thank you all for your help .

    Thank you for both for your quick response .
    Unfortunately this scenario is up and running for quite some time already and the customer does not want to change it . Also, I am not sure how I could make an Insert statement that would include many lines .
    Right now, the mapping produces the following result (I only post the first two statements, the actual number is around 500)
    <Statement><dbTableName action="INSERT">
    <table>min_sapsrs_price</table>
    <access><STAT>0</STAT><
    ACT_DATE>20100701</ACT_DATE>
    <MOD_DEL>MOD</MOD_DEL>
    <INTCODE>000000000014009003</INTCODE>
    </access>
    </dbTableName>
    </Statement>
    <Statement>
    <dbTableName action="INSERT">
    <table>min_sapsrs_price</table>
    <access><STAT>0</STAT>
    <ACT_DATE>20100701</ACT_DATE>
    <MOD_DEL>MOD</MOD_DEL>
    <INTCODE>000000000014009004</INTCODE>
    </access>
    </dbTableName>
    </Statement>
    could you please tell me how should I propose them to do it ?

  • Russian characterset insert fails..Request for guidance.

    Guys,
    I've been trying to insert the Russian character string "СТАВРОПОЛЬСКИЙ КР" into my database object-column defined as VARCHAR (25) -using GUI.
    The insert is failing, it doesn't give information about the cause of the failure though.
    Could somone guide me...Could it be becaz of the lenght of the string exceeding 25 characters?
    Is there a way that I can get the lenght of the string. Please note, it's Russian character string.
    Thank you All!!!
    -Bhagat

    Russian characters will be displayed as inverted questions "¿¿¿¿¿ ¿¿¿¿¿¿" in toad.
    So the query won't help determining the lenght of the string.
    -Bhagat

  • GetTransaction().validate();  - what happens if the Insert fails?

    Hi forum members,
    I am rookie in terms of development with ADF/Jdeveloper and I've got an error which I've traced to the following piece of code
    am.getTransaction().validate();
    am.getTransaction().postChanges();
    DBSequence newAdId = (DBSequence)newAssociatedDocument.getAttribute("AdId");
    int adId = newAdId.getSequenceNumber().intValue();
    return adId;
    "am" as you'd guess is an ApplicationModule
    The return value of "adId" is -1.
    The "ADID" in the database is controlled by a Pre-Insert Database trigger which fills it with a Primary Key value.
    Now, it sounds like the Insert of the Row fails somewhere and hence the "adID" is -1 as I've read that in Metalink. Like, DBSequence initially populates it with "-1" and then fills it (if the transaction is successful) with the actual ADID value that was inserted into the database (behind the scenes using the RETURNING INTO clause).
    But my question is How to Trap the Oracle Database Error that happens behind the scenes? Like it looks like the postChanges() is actually successful (no Exception raised, else it would have been cascaded back) and we actually get a "-1" returned to the Caller.
    Would I be able to do an Oracle Trace and detect the Oracle error?
    Thanks
    Ravi

    It is very important to backup your iPad before you prceed with update.
    Backup and Restore
    http://support.apple.com/kb/ht1766

  • Inserts Fail without Error Message

    I have a Java program which uses a Connection and Statement to insert records into the database. It has been working great. The last couple of days it has been failing, and no Exceptions are returned. I tried increasing the tablespace and it still randomly fails.
    Suggestions?
    try {
         conn = DBUtil.getConnection();
         s = conn.createStatement();
         res = s.executeUpdate(insertValue.toString());
    } catch (SQLException e)
    throw new SQLException("SQL Error in: " + e.toString() + " " +insertValue.toString());
    } catch (Exception e)
    throw new Exception("Error in: " + e.toString() + " " +insertValue.toString());
    }//catch

    Same thing happened to me. I called Apple and got some advice that worked. Make sure iDVD is not open at the time and be prepared to shutdown your computer after applying the following:
    1. Go to the your User>Library>Preferences folder. Find the file: com.apple.iDVD.plist and move it to your desktop.
    2. Go to the User>Library>Caches folder. Find the folder com.apple.iDVD and move it to your desktop. (These files will get recreated upon reopening iDVD, so they really aren't that important, but putting them on the desktop will allow you to reference them if need be)
    3. Then you shutdown your computer in order to rebuild the power settings.
    4. Unplug your computer from the power cord. Remove your battery. Then hold down the power button for 5 seconds
    5. Put the battery back in, plug back in the computer and turn back on the power
    6. Try burning your project again.
    This worked for me and the whole burn process went MUCH faster that before (meaning all the preceding rendering and preparation steps before the actual burn step also went much faster).
    Hope the same solution works for you!

  • Automatic row processing insert fail

    Hi all,
    Application Express 3.2.1.00.11
    Oracle Database 10g Release 10.2.0.3.0 - 64bit Production
    I am running into a problem where my automatic row processing will update and delete records but will not insert. I get the following error.
    ORA-44003: invalid SQL nameI disabled all triggers and added the appropriate fields to my form and manually entered correct data and am still having the issue. I can run a trace but only the dba has access to retrieve the file and he is gone. Any suggestions on where to start? i checked debug mode and it is definitely hanging on the ARP.
    Cheers,
    Tyson Jouglet

    All,
    Finally fixed it!!! So if you experience this problem, double check all of your item sources. I was upgrading a date column to a timezone column and subsecuently made it three different items. Long story less long, I left the original date item on the form and deleted the source column name but i forgot to change the item source from database column to something else. This will not effect how apex deletes or updates a record but it will not allow you to insert a new record. I know this is a user error, but maybe this could be added as a validation?
    Cheers,
    Tyson Jouglet

  • XML Document Insert fails : NULL is an invalid

    Hi,
    I am trying to inseert a valid Oracle Canonical XML document
    into my table . But i get the following error :
    2001-07-01 19:50:16,167 <ERROR>
    NULL is an invalid column name.</ERROR>
    The table definition is as follows :
    create or replace table Internal_Message_Impl (
    processId &ID_TYPE primary key,
    transactionHeader THeader_t,
    payloadCollection clob,
    manifest clob,
    messageHeader MessageHeader_t
    In my input XML document I have columns corresponding to the processId (primary
    key) and transactionHeader. But I don't any xml tags for the remaining columns.
    In the OracleSaveXML java API I am setting which columns should be inserted or
    updated :
    OracleXMLSave save = new OracleXMLSave(_conn, DB_TABLE_NAME);
    save.setIgnoreCase(true);
    // default Oracle Date format is 'MM/dd/yyyy HH:mm:ss' . See JDBC
    documentation on
    // java.text.SimpleDateFormat to get the list of valid date formats.
    // save.setDateFormat(java.lang.String mask);
    String[] columnNames = new String[3];
    columnNames[0] = IM_PRIMARY_KEY;
    columnNames[1] = TRANSACTION_HEADER_COLUMN_NAME;
    String[] keyColumnNames = new String[2];
    keyColumnNames[0] = IM_PRIMARY_KEY;
    save.setUpdateColumnList(columnNames);
    save.setKeyColumnList(keyColumnNames); // ignored in the case of insert and
    delete
    if(isNew()) {
    save.insertXML(oraXmlStr);
    } else {
    save.updateXML(oraXmlStr);
    Can somebody tell me whether this approach is o.k. ?
    Here is the xml document I am trying to insert :
    Oracle Canonical XML string for TransactionHeader :
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW>
    <processId>1</processId>
    <TransactionHeader>
    <process>
    <listId>-99</listId>
    <revisionId>-9</revisionId>
    <packetId>-9</packetId>
    </process>
    <providerId>10001</providerId>
    <serviceId>12</serviceId>
    <adapterId>-9</adapterId>
    <customerId>7</customerId>
    <transactionElement>
    <name/>
    <value>1</value>
    </transactionElement>
    <transactionKind>
    <tKind>
    <value>-9</value>
    <name/>
    </tKind>
    <subKind>
    <value>-9</value>
    <name/>
    </subKind>
    </transactionKind>
    <state>
    <code>
    <value>-9</value>
    <name/>
    </code>
    <subCode>
    <value>-9</value>
    <name/>
    </subCode>
    <value/>
    </state>
    <trackingNumber>7UDZED</trackingNumber>
    <controllerNumber/>
    <completionTime>2001-07-08T19:50:05</completionTime>
    <creationTime>2001-07-04T19:50:05</creationTime>
    </TransactionHeader>
    </ROW>
    </ROWSET>
    Appreciate any responses for this problem.
    Thanks
    Mahesh
    null

    Hallo,
    I have same problem but all parameters seems ok...
    <Table> is an invalid table element or appears in the wrong order.
    <variant>
      <Table xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" aid5:tablestyle="Art.-Table" aid:table="table" aid:trows="64" aid:tcols="7">
        <cell aid5:cellstyle="Art.-Cell" aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="58">
    I am using Indesign CC 2014

  • Jdbc insert fails with 01722: invalid number but sqlplus doesn't

    I am experiencing a 01722: invalid number on a remote system in Canada. Initially, I couldn't insert '0.0' into a number field, but after changing the ...Oracle/HOME0 ... registry value from ENGLISH_CANADA.WE8MSWIN1252 to AMERICAN_AMERICA.WE8MSWIN1252 and recycling the App Server (Oracle client) I was able to insert '0.0' into a number field.
    But my java app using JDBC had the same error "ORA-01722: invalid number" occurring for the same table and attribute -- only this time -- when I attempted to manually insert the same insert '0.0' into a number field -- it worked via SQLPlus.
    The NLS_Lang is set to AMERICAN_AMERICA.WE8MSWIN1252.
    I confirmed that the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ACP value is 1252.
    Assuming a theory that maybe it is a setting on the DB Server, I tried reproducing this problem locally in my lab configuration by setting the NLS_Lang registry value to ENGLISH_CANADA.WE8MSWIN1252. I used the same jdbc test app to issue the insert....but it worked.
    --- Any advice on what other configuration changes could influence the number data type or whether it is possibly a DB Server setting instead of client -- would be greatly appreciated.

    JDBC does not care about NLS_LANG. It takes the Java default locale, maps it to Oracle language/territory pair and sends to the server.
    Just try this:
    Statement stmt = conn.createStatement();
    stmt.execute( "ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,'" );
    or bind numeric datatypes.
    -- Sergiusz

  • DB Insert failed through JDBC Adapter

    Hi all,
    My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter. The XML arriving at JDBC adapter is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ns:MaterialDataUpdate_Msg xmlns:ns="http://acsis.com/ManufacturingManagement">
    <MaterialData>
    <TMP_MAT_SERIAL action="INSERT">
      <table>TMP_MAT_SERIAL</table>
      <access>
      <MATNO>0000000012</MATNO>
      <BATCH>32151</BATCH>
      <ITM_SERIAL>453176587769</ITM_SERIAL>
      <WEIGHT>12.34</WEIGHT>
      <T_TIME>2005-01-21 13:21:34.432</T_TIME>
      </access>
      </TMP_MAT_SERIAL>
      </MaterialData>
      </ns:MaterialDataUpdate_Msg>
    The connection to the database looks ok. My JDBC adapter config is pointing to "jdbc:microsoft:sqlserver://sapsrv03:1433;databaseName=JDE".
    In rwb, I got the following error:
    Unable to execute statement for table or stored procedure. "TMP_MAT_SERIAL" due to java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'TMP_MAT_SERIAL'.
    I have checked the database "JDE", and the table 'TMP_MAT_SERIAL' does exist.
    Does anyone have any idea about this error?
    Thanks a lot for helping!
    Hart

    Hi Hart Liu,
    My system is on the latest patches of XI3.0 SP9. I am trying to insert some records into a database through JDBC adapter.
    We have been facing with problem XSD structure in the jdbc side. We r manually created XSD structure. In the adapter engine we don’t have any action item. In u r mail
    U r structure contains action attribute.
    Can u plz help me out to generate the right XSD structure?
    We have one more doubt, is there any automatically structure-generated option? plz let us know.......
    We r waiting for u r reply....
    Plz help me!!!!!!!!
    Regards,
    Anil

Maybe you are looking for

  • Displaying Session Variable on Dashboard & creating presentation variable

    Hi. I read a bit more on mysupport and it seems that :xdo_user_roles somehow displayes all kind of roles not the ones that the user acutally belongs to. Now I wonder if I can use NQ_SESSION.GROUP in the BI Publisher data model. (A)I figured that I ca

  • Can't find dependent libraries

    Hi, I try to load a DLL, but I get an exception. public class JNIExportToX { // load library JNIExportToX into JVM static { System.loadLibrary( "JNIEXTERNAL" ); public native boolean EXTERNAL_ParametersChange(String param1); Caused by: java.lang.Unsa

  • How can I tell if I am getting a proper backup?

    I am a new Mac owner and have a Time Capsule for backups. How do I know/see my backups and or set the times for backup?

  • Can I download iOS 5 back on my iPhone 4S?

    I dont like the new update software of iOS 6 is there a way I can download iOS 5 back again on my iPhone 4S?

  • Flash player crashes all my browsers

    Hi, The problem appears on a new and clean XP SP3 (or SP2) installation. I changed my graphic card last week, no effects... There is a virus or something causing this kind of crashs? Maybe a trojan on my External hard drive, but nothing found after a