Hi,

Attached is the trace. Let me work on a unit test case which uses Oracle
as db.

Thanks,
Virag

On 6/28/13 12:10 PM, "J Grassel" <fyrew...@gmail.com> wrote:

>Would it be possible to provide a zip with a unit test for the issue?
>And in the meantime, can you provide an openjpa trace (a full trace,
>including sql)?  A trace would give me a head start before trying out a
>junit.
>
>Thanks!
>
>On Jun 28, 2013, at 1:49 PM, Virag Kothari <vi...@yahoo-inc.com> wrote:
>
>> Hi Jody,
>> 
>> Thanks for the reply.
>> Attached is the schema dump for the table. The schema generator tool
>>does
>> map 
>> the sla_xml column to varchar2(4000). So it seems to honor the @length
>> annotation.
>> The code where we define the JPA annotations for this table are at
>> 
>>https://svn.apache.org/repos/asf/oozie/trunk/core/src/main/java/org/apach
>>e/
>> oozie/WorkflowActionBean.java
>> and 
>> 
>>https://svn.apache.org/repos/asf/oozie/trunk/core/src/main/java/org/apach
>>e/
>> oozie/client/rest/JsonWorkflowAction.java
>> 
>> Thanks,
>> Virag
>> 
>> On 6/28/13 10:29 AM, "Jody Grassel" <fyrew...@gmail.com> wrote:
>> 
>>> Hey there.  The @Length annotation should only be used by OpenJPA as an
>>> instruction to the schema generator tool, the runtime relies on the
>>> database to enforce the maximum length of a given column - which may or
>>> may
>>> not throw an Exception given the configured behavior of the database.
>>> 
>>> Would you be willing to provide a unit test and a schema dump of your
>>> table
>>> from the database?
>>> 
>>> On Friday, June 28, 2013, Virag Kothari wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Can anyone please reply?
>>>> 
>>>> In summary, two questions
>>>> 
>>>> Having (@length=4000) is not working when using Oracle db. I see the
>>>> schema maps to varchar2(4000) but the openjpa insert accepts max 1000
>>>> chars
>>>> (throws ORA-24816 which is strange). It is not an Oracle issue as I
>>>> tried
>>>> inserting in Oracle directly and anything less than 4000 chars works.
>>>> Can
>>>> someone explain why openjpa allows only 1000 chars even if the length
>>>>is
>>>> set higher?
>>>> 
>>>> Is it possible to arrange the columns in a particular order (order
>>>> defined
>>>> in java file or based on some other order) so all lob's can be at the
>>>> end?
>>>> We require this if we face ORA-24816
>>>> 
>>>> Thanks,
>>>> 
>>>> Virag
>>>> 
>>>> 
>>>> 
>>>> 
>>>> From: Virag Kothari <vi...@yahoo-inc.com <javascript:;><mailto:
>>>> vi...@yahoo-inc.com <javascript:;>>>
>>>> Date: Monday, June 24, 2013 1:35 PM
>>>> To: "users@openjpa.apache.org <javascript:;><mailto:
>>>> users@openjpa.apache.org <javascript:;>>"
>>>> <users@openjpa.apache.org<javascript:;>
>>>> <mailto:users@openjpa.apache.org <javascript:;>>>
>>>> Subject: Re: ORA-24816 - column ordering during inserts
>>>> 
>>>> Hi,
>>>> 
>>>> An update:
>>>> 
>>>> It seems the problem is something else.
>>>> In our code, we have defined the length as 4000.
>>>> 
>>>>    @Basic
>>>> 
>>>>    @Column(name = "sla_xml", length = 4000)
>>>> 
>>>>    private String slaXml = null;
>>>> 
>>>> However, if this column has more than 1000 characters, it complains
>>>>with
>>>> the below ORA-24816.
>>>> 
>>>> With less than 1000 characters, it works.
>>>> 
>>>> Also, I see in the oracle schema that the column is mapped as
>>>>varchar2.
>>>> 
>>>> So even though the length is defined as 4000, why does openjpa refuse
>>>>to
>>>> accept more than 1000 characters?
>>>> 
>>>> Can anyone help me to figure this out?
>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> Virag
>>>> 
>>>> 
>>>> 
>>>> 
>>>> From: Virag Kothari <vi...@yahoo-inc.com <javascript:;><mailto:
>>>> vi...@yahoo-inc.com <javascript:;>>>
>>>> Date: Friday, June 21, 2013 8:01 PM
>>>> To: "users@openjpa.apache.org <javascript:;><mailto:
>>>> users@openjpa.apache.org <javascript:;>>"
>>>> <users@openjpa.apache.org<javascript:;>
>>>> <mailto:users@openjpa.apache.org <javascript:;>>>
>>>> Subject: ORA-24816 - column ordering during inserts
>>>> 
>>>> Hi,
>>>> 
>>>> We are using Open JPA 2.2.2 in Oozie project.
>>>> 
>>>> We have a mixture of lob and varchar in our tables. We
>>>> recently converted few of lob's to varchar (4000).
>>>> Now sometimes, we are seeing the following error while inserting in
>>>> table:
>>>> 
>>>> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException:
>>>>ORA-24816:
>>>> Expanded non LONG bind data supplied after actual LONG or LOB column
>>>> 
>>>> It seems that ORA-24816 happens when lob's are not at the end of the
>>>> insert/update list.
>>>> 
>>>> 2 questions:
>>>> 
>>>>  1.
>>>> 
>>>> Is it possible to arrange the columns in a particular order (order
>>>> defined
>>>> in java file or based on some other order) so we can have all lob's at
>>>> the
>>>> end?
>>>> 
>>>>   2. We never encountered this error before even though we had 6 lobs
>>>> and
>>>> almost dozen of varchars in our table.  We converted 3 lobs to
>>>> varchar2(4000) and started seeing this issue intermittently. Does
>>>>anyone
>>>> suspect that this conversion from lob to varchar has a role to play?
>>>> 
>>>> Thanks,
>>>> 
>>>> Virag
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>> 
>> <wf_action_schema.txt>
>

<openjpa-2.2.2-r422266:1468616 fatal store error> 
org.apache.openjpa.persistence.RollbackException: The transaction has been 
rolled back.  See the nested exceptions for details on the errors that occurred.
FailedObject: org.apache.oozie.WorkflowActionBean@7c39aa6
        at 
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:594)
        at org.apache.oozie.service.JPAService.execute(JPAService.java:222)
        at 
org.apache.oozie.command.wf.SignalXCommand.execute(SignalXCommand.java:332)
        at 
org.apache.oozie.command.wf.SignalXCommand.execute(SignalXCommand.java:66)
        at org.apache.oozie.command.XCommand.call(XCommand.java:280)
        at 
org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: <openjpa-2.2.2-r422266:1468616 fatal general error> 
org.apache.openjpa.persistence.PersistenceException: The transaction has been 
rolled back.  See the nested exceptions for details on the errors that occurred.
FailedObject: org.apache.oozie.WorkflowActionBean@7c39aa6
        at 
org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2347)
        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2184)
        at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2082)
        at 
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:2000)
        at 
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
        at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1524)
        at 
org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:933)
        at 
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:570)
        ... 8 more
Caused by: <openjpa-2.2.2-r422266:1468616 fatal general error> 
org.apache.openjpa.persistence.PersistenceException: ORA-24816: Expanded non 
LONG bind data supplied after actual LONG or LOB column
 {prepstmnt 1127653999 INSERT INTO WF_ACTIONS (id, conf, console_url, cred, 
data, error_code, error_message, external_child_ids, external_id, 
external_status, name, retries, stats, tracker_uri, transition, type, 
user_retry_count, user_retry_interval, user_retry_max, bean_type, end_time, 
execution_path, last_check_time, log_token, pending, pending_age, signal_value, 
sla_xml, start_time, status, wf_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) 
0000000-130629004717981-oozie-oozi-W@map_reduce_1, (Reader) 
java.io.StringReader@5b1cd8cc, (null) null, (String) null, (null) null, (null) 
null, (null) null, (Clob) oracle.sql.CLOB@5bc935cc, (null) null, (null) null, 
(String) map_reduce_1, (int) 0, (Clob) oracle.sql.CLOB@55ca6954, (null) null, 
(null) null, (String) map-reduce, (int) 0, (int) 10, (int) 0, (String) 
WorkflowActionBean, (null) null, (String) /, (null) null, (null) null, (int) 1, 
(Timestamp) 2013-06-29 01:09:02.312, (null) null, (String) <sla:info 
xmlns:sla="uri:oozie:sla:0.1">
  <sla:app-name>${v1}</sla..., (null) null, (String) PREP, (String) 
0000000-130629004717981-oozie-oozi-W]} [code=24816, state=99999]
FailedObject: org.apache.oozie.WorkflowActionBean@7c39aa6
        at 
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4962)
        at 
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4922)
        at 
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
        at 
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
        at 
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:144)
        at 
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.batchOrExecuteRow(BatchingPreparedStatementManagerImpl.java:99)
        at 
org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:83)
        at 
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:100)
        at 
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:88)
        at 
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:550)
        at 
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:107)
        at 
org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
        at 
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:105)
        at 
org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:78)
        at 
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:732)
        at 
org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
        ... 15 more
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-24816: 
Expanded non LONG bind data supplied after actual LONG or LOB column
 {prepstmnt 1127653999 INSERT INTO WF_ACTIONS (id, conf, console_url, cred, 
data, error_code, error_message, external_child_ids, external_id, 
external_status, name, retries, stats, tracker_uri, transition, type, 
user_retry_count, user_retry_interval, user_retry_max, bean_type, end_time, 
execution_path, last_check_time, log_token, pending, pending_age, signal_value, 
sla_xml, start_time, status, wf_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(String) 
0000000-130629004717981-oozie-oozi-W@map_reduce_1, (Reader) 
java.io.StringReader@5b1cd8cc, (null) null, (String) null, (null) null, (null) 
null, (null) null, (Clob) oracle.sql.CLOB@5bc935cc, (null) null, (null) null, 
(String) map_reduce_1, (int) 0, (Clob) oracle.sql.CLOB@55ca6954, (null) null, 
(null) null, (String) map-reduce, (int) 0, (int) 10, (int) 0, (String) 
WorkflowActionBean, (null) null, (String) /, (null) null, (null) null, (int) 1, 
(Timestamp) 2013-06-29 01:09:02.312, (null) null, (String) <sla:info 
xmlns:sla="uri:oozie:sla:0.1">
  <sla:app-name>${v1}</sla..., (null) null, (String) PREP, (String) 
0000000-130629004717981-oozie-oozi-W]} [code=24816, state=99999]
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219)
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:195)
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:59)
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1134)
        at 
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:275)
        at 
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1792)
        at 
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:268)
        at 
org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:119)
        ... 26 more

Reply via email to