You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Janne Savukoski <ja...@savukoski.name> on 2007/03/21 09:30:12 UTC

[B cannot be cast to QName

Hi,

I'm getting this most blocking openjpa datatype recognition/parsing
error which I can't get around; the log snippet can be found below.
Anyone has any ideas if the problem is in my settings or in the
dao-jpa?

Btw., why it takes 20sec for a committed message exchange to actually
start processing? As in below the corresponding ODE_MESSAGE etc.
inserts were committed 09:56:37. The quartz seems to be just sitting
there a while. I haven't yet profiled the situation as I guess someone
here already has the answer?

Best, janne


09:56:56,192 | INFO  | pool-20-thread-1 | JobRunShell              |
org.quartz.core.JobRunShell     208 | Job
DEFAULT.bjlegq3v0drmtwckvf3xjk threw a JobExecutionException:
org.quartz.JobExecutionException:
org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
<0|false|0.9.7-incubating-SNAPSHOT>
org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
to javax.xml.namespace.QName [See nested exception:
org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
<0|false|0.9.7-incubating-SNAPSHOT>
org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
to javax.xml.namespace.QName]
        at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(QuartzSchedulerImpl.java:353)
        at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(QuartzSchedulerImpl.java:367)
        at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(JobImpl.java:32)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
* Nested Exception (Underlying Cause) ---------------
org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
<0|false|0.9.7-incubating-SNAPSHOT>
org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
to javax.xml.namespace.QName
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:321)
        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:384)
        at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(QuartzSchedulerImpl.java:351)
        at org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(QuartzSchedulerImpl.java:367)
        at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(JobImpl.java:32)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)
Caused by: <0|false|0.9.7-incubating-SNAPSHOT>
org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
to javax.xml.namespace.QName
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:854)
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:748)
        at org.apache.openjpa.kernel.DelegatingBroker.find(DelegatingBroker.java:169)
        at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:346)
        at org.apache.ode.dao.jpa.BPELDAOConnectionImpl.getMessageExchange(BPELDAOConnectionImpl.java:127)
        at org.apache.ode.bpel.engine.BpelEngineImpl.getMessageExchange(BpelEngineImpl.java:143)
        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:279)
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:311)
        ... 8 more
Caused by: java.lang.ClassCastException: [B cannot be cast to
javax.xml.namespace.QName
        at org.apache.ode.dao.jpa.MessageExchangeDAOImpl.pcReplaceField(MessageExchangeDAOImpl.java)
        at org.apache.openjpa.kernel.StateManagerImpl.replaceField(StateManagerImpl.java:2868)
        at org.apache.openjpa.kernel.StateManagerImpl.storeObjectField(StateManagerImpl.java:2322)
        at org.apache.openjpa.kernel.StateManagerImpl.storeField(StateManagerImpl.java:2418)
        at org.apache.openjpa.kernel.StateManagerImpl.storeField(StateManagerImpl.java:731)
        at org.apache.openjpa.kernel.StateManagerImpl.store(StateManagerImpl.java:727)
        at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(HandlerFieldStrategy.java:171)
        at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:785)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:830)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:782)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:333)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:252)
        at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:108)
        at org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:54)
        at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:873)
        at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:831)
        ... 15 more
09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
cheduler.quartz.JTAJobRunShell   95 | UserTransaction marked for
rollback only.
09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
cheduler.quartz.JTAJobRunShell  113 | Rollbacking transaction.
09:56:56,202 | DEBUG | pool-20-thread-1 | JobStoreJTA              |
l.scheduler.quartz.JobStoreJTA 1181 | triggeredJobComplete:
trigger=Trigger 'DEFAULT.bjlegq3v0drmtwckvf3xjk.trigger':
triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar:
'null' misfireInstruction: 0 nextFireTime: null,
jobName=DEFAULT.bjlegq3v0drmtwckvf3xjk, triggerInstCode=3

Re: [B cannot be cast to QName

Posted by Matthieu Riou <ma...@gmail.com>.
That's committed. Thanks again for the debugging.

On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
>
> Ah, and I guess I'll leave it for you to commit the changes to those
> three other DAOs. :) (forgot to explicit in the last mail..)
>
> On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
> > Great! Works like a charm! (I fixed also the PartnerLinkDAOImpl,
> > FaultDAOImpl, and MessageDAOImpl accordingly.)
>

Re: [B cannot be cast to QName

Posted by Janne Savukoski <ja...@savukoski.name>.
Ah, and I guess I'll leave it for you to commit the changes to those
three other DAOs. :) (forgot to explicit in the last mail..)

On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
> Great! Works like a charm! (I fixed also the PartnerLinkDAOImpl,
> FaultDAOImpl, and MessageDAOImpl accordingly.)

Re: [B cannot be cast to QName

Posted by Janne Savukoski <ja...@savukoski.name>.
Great! Works like a charm! (I fixed also the PartnerLinkDAOImpl,
FaultDAOImpl, and MessageDAOImpl accordingly.) Now I advanced to some
good ol' nupos (npes), but these are probably related to my process.
Yup, funny that those blobs worked with derby. But yeah, strings are
more nice databasewise.

The delay however is still there, and I was thinking if it could be
that quartz checks the QRTZ_TRIGGERS before the insert gets committed.
I'll try to look into that after these nupos..


On 3/21/07, Matthieu Riou <ma...@gmail.com> wrote:
> I just fixed the QName mapping in the MessageExchange DAO. This type isn't
> supported as is by OpenJPA so we usually persist it as a String but there
> was still some QNames fields hanging around. Those gets persisted as blobs
> which isn't quite right. The strange thing is it should have worked in the
> same way on Derby and MySQL, the object should just have been serialized.
>
> Anyway try an update and update the schema, we'll see how it goes.
>
> Thanks,
>
> Matthieu
>
> On 3/21/07, Janne Savukoski < janne@savukoski.name> wrote:
> > Hi,
> >
> > Ok, I was kind of expecting that. Feels a bit that yet another
> > component tries to be too smart, but I guess OpenJPA has legitimate
> > reasons for that infererence.
> >
> > I'm generating the schemas with the mappingtool -ant task, both
> > attached. I haven't yet compared those with the derby-schemas, but I
> > guess that's my next step. Of course, all help is very much
> > appreciated.
> >
> > The three retries take only a 1/10sec total, but I'll try to find out
> > what's causing the delay as soon as I'll get the system working, if it
> > still occurs.
> >
> > br, janne
> >
> >
> > From: "Matthieu Riou" <ma...@gmail.com>
> >
> > > I don't have your problem with OpenJPA datatypes but it's most probably
> > > related to your database schema. I think OpenJPA does some type
> inference
> > > depending on the type of the column you read from and if the type
> inferred
> > > doesn't match with the one in your object... Anyway how did you generate
> the
> > > MySQL schema? Could you send it so I can check what could be wrong with
> it?
> > >
> > > Also for the 20s delay it's possibly a consequence of the exception.
> When a
> > > commit goes wrong we have some retry logic happening. What you see is
> > > probably the last retry. Make sure that you don't have another
> transaction
> > > before that started right away but failed as well.
> > >
> > > Cheers,
> > > Matthieu
> > >
> > > On 3/21/07, Janne Savukoski < janne@savukoski.name> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I'm getting this most blocking openjpa datatype recognition/parsing
> > > > error which I can't get around; the log snippet can be found below.
> > > > Anyone has any ideas if the problem is in my settings or in the
> > > > dao-jpa?
> > > >
> > > > Btw., why it takes 20sec for a committed message exchange to actually
> > > > start processing? As in below the corresponding ODE_MESSAGE etc.
> > > > inserts were committed 09:56:37. The quartz seems to be just sitting
> > > > there a while. I haven't yet profiled the situation as I guess someone
> > > > here already has the answer?
> > > >
> > > > Best, janne
> > > >
> > > >
> > > > 09:56:56,192 | INFO  | pool-20-thread-1 | JobRunShell              |
> > > > org.quartz.core.JobRunShell     208 | Job
> > > > DEFAULT.bjlegq3v0drmtwckvf3xjk threw a JobExecutionException:
> > > > org.quartz.JobExecutionException:
> > > >
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > > org.apache.openjpa.persistence.PersistenceException :
> [B cannot be cast
> > > > to javax.xml.namespace.QName [See nested exception:
> > > >
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > > org.apache.openjpa.persistence.PersistenceException:
> [B cannot be cast
> > > > to javax.xml.namespace.QName]
> > > >         at
> > > >
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > > > QuartzSchedulerImpl.java:353)
> > > >         at
> > > >
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > > > QuartzSchedulerImpl.java:367)
> > > >         at
> org.apache.ode.bpel.scheduler.quartz.JobImpl.execute (
> > > > JobImpl.java:32)
> > > >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> > > >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > > > ThreadPoolExecutor.java :885)
> > > >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > > > ThreadPoolExecutor.java:907)
> > > >         at java.lang.Thread.run(Thread.java:619)
> > > > * Nested Exception (Underlying Cause) ---------------
> > > >
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > > org.apache.openjpa.persistence.PersistenceException:
> [B cannot be cast
> > > > to javax.xml.namespace.QName
> > > >         at
> org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > > > BpelEngineImpl.java:321)
> > > >         at
> org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob (
> > > > BpelServerImpl.java:384)
> > > >         at
> > > >
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > > > QuartzSchedulerImpl.java:351)
> > > >         at
> > > >
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > > > QuartzSchedulerImpl.java:367)
> > > >         at
> org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> > > > JobImpl.java:32)
> > > >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> > > >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > > > ThreadPoolExecutor.java:885)
> > > >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run (
> > > > ThreadPoolExecutor.java:907)
> > > >         at java.lang.Thread.run(Thread.java:619)
> > > > Caused by: <0|false|0.9.7-incubating-SNAPSHOT>
> > > > org.apache.openjpa.persistence.PersistenceException :
> [B cannot be cast
> > > > to javax.xml.namespace.QName
> > > >         at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:854)
> > > >         at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java
> :748)
> > > >         at
> org.apache.openjpa.kernel.DelegatingBroker.find(
> > > > DelegatingBroker.java:169)
> > > >         at
> org.apache.openjpa.persistence.EntityManagerImpl.find(
> > > > EntityManagerImpl.java :346)
> > > >         at
> org.apache.ode.dao.jpa.BPELDAOConnectionImpl.getMessageExchange
> > > > (BPELDAOConnectionImpl.java:127)
> > > >         at
> org.apache.ode.bpel.engine.BpelEngineImpl.getMessageExchange
> (
> > > > BpelEngineImpl.java:143)
> > > >         at
> org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(
> > > > BpelProcess.java:279)
> > > >         at
> org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob (
> > > > BpelEngineImpl.java:311)
> > > >         ... 8 more
> > > > Caused by: java.lang.ClassCastException: [B cannot be cast to
> > > > javax.xml.namespace.QName
> > > >         at
> org.apache.ode.dao.jpa.MessageExchangeDAOImpl.pcReplaceField
> (
> > > > MessageExchangeDAOImpl.java)
> > > >         at
> org.apache.openjpa.kernel.StateManagerImpl.replaceField(
> > > > StateManagerImpl.java:2868)
> > > >         at
> org.apache.openjpa.kernel.StateManagerImpl.storeObjectField
> (
> > > > StateManagerImpl.java:2322)
> > > >         at
> org.apache.openjpa.kernel.StateManagerImpl.storeField(
> > > > StateManagerImpl.java:2418)
> > > >         at
> org.apache.openjpa.kernel.StateManagerImpl.storeField (
> > > > StateManagerImpl.java:731)
> > > >         at
> org.apache.openjpa.kernel.StateManagerImpl.store(
> > > > StateManagerImpl.java:727)
> > > >         at
> org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load
> (
> > > > HandlerFieldStrategy.java:171)
> > > >         at
> org.apache.openjpa.jdbc.meta.FieldMapping.load(
> > > > FieldMapping.java:785)
> > > >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load (
> > > > JDBCStoreManager.java:830)
> > > >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> > > > JDBCStoreManager.java:782)
> > > >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState
> > > > (JDBCStoreManager.java:333)
> > > >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(
> > > > JDBCStoreManager.java:252)
> > > >         at
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize
> (
> > > > DelegatingStoreManager.java:108)
> > > >         at
> org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > > > ROPStoreManager.java:54)
> > > >         at
> org.apache.openjpa.kernel.BrokerImpl.initialize
> (BrokerImpl.java
> > > > :873)
> > > >         at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:831)
> > > >         ... 15 more
> > > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > > > cheduler.quartz.JTAJobRunShell   95 | UserTransaction marked for
> > > > rollback only.
> > > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > > > cheduler.quartz.JTAJobRunShell   113 | Rollbacking transaction.
> > > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JobStoreJTA              |
> > > > l.scheduler.quartz.JobStoreJTA 1181 | triggeredJobComplete:
> > > > trigger=Trigger '
> DEFAULT.bjlegq3v0drmtwckvf3xjk.trigger':
> > > > triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar:
> > > > 'null' misfireInstruction: 0 nextFireTime: null,
> > > > jobName= DEFAULT.bjlegq3v0drmtwckvf3xjk, triggerInstCode=3
> >
> >
>
>


-- 
Janne Savukoski ++ Xernel Oy
+358.40.5684246 (mobile)
janne@savukoski.name (email & im)

Re: [B cannot be cast to QName

Posted by Matthieu Riou <ma...@gmail.com>.
I just fixed the QName mapping in the MessageExchange DAO. This type isn't
supported as is by OpenJPA so we usually persist it as a String but there
was still some QNames fields hanging around. Those gets persisted as blobs
which isn't quite right. The strange thing is it should have worked in the
same way on Derby and MySQL, the object should just have been serialized.

Anyway try an update and update the schema, we'll see how it goes.

Thanks,
Matthieu

On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
>
> Hi,
>
> Ok, I was kind of expecting that. Feels a bit that yet another
> component tries to be too smart, but I guess OpenJPA has legitimate
> reasons for that infererence.
>
> I'm generating the schemas with the mappingtool -ant task, both
> attached. I haven't yet compared those with the derby-schemas, but I
> guess that's my next step. Of course, all help is very much
> appreciated.
>
> The three retries take only a 1/10sec total, but I'll try to find out
> what's causing the delay as soon as I'll get the system working, if it
> still occurs.
>
> br, janne
>
>
> From: "Matthieu Riou" <ma...@gmail.com>
>
> > I don't have your problem with OpenJPA datatypes but it's most probably
> > related to your database schema. I think OpenJPA does some type
> inference
> > depending on the type of the column you read from and if the type
> inferred
> > doesn't match with the one in your object... Anyway how did you generate
> the
> > MySQL schema? Could you send it so I can check what could be wrong with
> it?
> >
> > Also for the 20s delay it's possibly a consequence of the exception.
> When a
> > commit goes wrong we have some retry logic happening. What you see is
> > probably the last retry. Make sure that you don't have another
> transaction
> > before that started right away but failed as well.
> >
> > Cheers,
> > Matthieu
> >
> > On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
> > >
> > > Hi,
> > >
> > > I'm getting this most blocking openjpa datatype recognition/parsing
> > > error which I can't get around; the log snippet can be found below.
> > > Anyone has any ideas if the problem is in my settings or in the
> > > dao-jpa?
> > >
> > > Btw., why it takes 20sec for a committed message exchange to actually
> > > start processing? As in below the corresponding ODE_MESSAGE etc.
> > > inserts were committed 09:56:37. The quartz seems to be just sitting
> > > there a while. I haven't yet profiled the situation as I guess someone
> > > here already has the answer?
> > >
> > > Best, janne
> > >
> > >
> > > 09:56:56,192 | INFO  | pool-20-thread-1 | JobRunShell              |
> > > org.quartz.core.JobRunShell     208 | Job
> > > DEFAULT.bjlegq3v0drmtwckvf3xjk threw a JobExecutionException:
> > > org.quartz.JobExecutionException:
> > > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > > to javax.xml.namespace.QName [See nested exception:
> > > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > > to javax.xml.namespace.QName]
> > >         at
> > > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > > QuartzSchedulerImpl.java:353)
> > >         at
> > > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > > QuartzSchedulerImpl.java:367)
> > >         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> > > JobImpl.java:32)
> > >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> > >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > > ThreadPoolExecutor.java:885)
> > >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > > ThreadPoolExecutor.java:907)
> > >         at java.lang.Thread.run(Thread.java:619)
> > > * Nested Exception (Underlying Cause) ---------------
> > > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > > <0|false|0.9.7-incubating-SNAPSHOT>
> > > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > > to javax.xml.namespace.QName
> > >         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > > BpelEngineImpl.java:321)
> > >         at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(
> > > BpelServerImpl.java:384)
> > >         at
> > > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > > QuartzSchedulerImpl.java:351)
> > >         at
> > > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > > QuartzSchedulerImpl.java:367)
> > >         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> > > JobImpl.java:32)
> > >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> > >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > > ThreadPoolExecutor.java:885)
> > >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > > ThreadPoolExecutor.java:907)
> > >         at java.lang.Thread.run(Thread.java:619)
> > > Caused by: <0|false|0.9.7-incubating-SNAPSHOT>
> > > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > > to javax.xml.namespace.QName
> > >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java
> :854)
> > >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java
> :748)
> > >         at org.apache.openjpa.kernel.DelegatingBroker.find(
> > > DelegatingBroker.java:169)
> > >         at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > > EntityManagerImpl.java:346)
> > >         at
> org.apache.ode.dao.jpa.BPELDAOConnectionImpl.getMessageExchange
> > > (BPELDAOConnectionImpl.java:127)
> > >         at
> org.apache.ode.bpel.engine.BpelEngineImpl.getMessageExchange(
> > > BpelEngineImpl.java:143)
> > >         at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(
> > > BpelProcess.java:279)
> > >         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > > BpelEngineImpl.java:311)
> > >         ... 8 more
> > > Caused by: java.lang.ClassCastException: [B cannot be cast to
> > > javax.xml.namespace.QName
> > >         at
> org.apache.ode.dao.jpa.MessageExchangeDAOImpl.pcReplaceField(
> > > MessageExchangeDAOImpl.java)
> > >         at org.apache.openjpa.kernel.StateManagerImpl.replaceField(
> > > StateManagerImpl.java:2868)
> > >         at org.apache.openjpa.kernel.StateManagerImpl.storeObjectField
> (
> > > StateManagerImpl.java:2322)
> > >         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> > > StateManagerImpl.java:2418)
> > >         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> > > StateManagerImpl.java:731)
> > >         at org.apache.openjpa.kernel.StateManagerImpl.store(
> > > StateManagerImpl.java:727)
> > >         at
> org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(
> > > HandlerFieldStrategy.java:171)
> > >         at org.apache.openjpa.jdbc.meta.FieldMapping.load(
> > > FieldMapping.java:785)
> > >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> > > JDBCStoreManager.java:830)
> > >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> > > JDBCStoreManager.java:782)
> > >         at
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState
> > > (JDBCStoreManager.java:333)
> > >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(
> > > JDBCStoreManager.java:252)
> > >         at org.apache.openjpa.kernel.DelegatingStoreManager.initialize
> (
> > > DelegatingStoreManager.java:108)
> > >         at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > > ROPStoreManager.java:54)
> > >         at org.apache.openjpa.kernel.BrokerImpl.initialize(
> BrokerImpl.java
> > > :873)
> > >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java
> :831)
> > >         ... 15 more
> > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > > cheduler.quartz.JTAJobRunShell   95 | UserTransaction marked for
> > > rollback only.
> > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > > cheduler.quartz.JTAJobRunShell  113 | Rollbacking transaction.
> > > 09:56:56,202 | DEBUG | pool-20-thread-1 | JobStoreJTA              |
> > > l.scheduler.quartz.JobStoreJTA 1181 | triggeredJobComplete:
> > > trigger=Trigger 'DEFAULT.bjlegq3v0drmtwckvf3xjk.trigger':
> > > triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar:
> > > 'null' misfireInstruction: 0 nextFireTime: null,
> > > jobName=DEFAULT.bjlegq3v0drmtwckvf3xjk, triggerInstCode=3
>
>

Re: [B cannot be cast to QName

Posted by Janne Savukoski <ja...@savukoski.name>.
Hi,

Ok, I was kind of expecting that. Feels a bit that yet another
component tries to be too smart, but I guess OpenJPA has legitimate
reasons for that infererence.

I'm generating the schemas with the mappingtool -ant task, both
attached. I haven't yet compared those with the derby-schemas, but I
guess that's my next step. Of course, all help is very much
appreciated.

The three retries take only a 1/10sec total, but I'll try to find out
what's causing the delay as soon as I'll get the system working, if it
still occurs.

br, janne


From: "Matthieu Riou" <ma...@gmail.com>

> I don't have your problem with OpenJPA datatypes but it's most probably
> related to your database schema. I think OpenJPA does some type inference
> depending on the type of the column you read from and if the type inferred
> doesn't match with the one in your object... Anyway how did you generate the
> MySQL schema? Could you send it so I can check what could be wrong with it?
>
> Also for the 20s delay it's possibly a consequence of the exception. When a
> commit goes wrong we have some retry logic happening. What you see is
> probably the last retry. Make sure that you don't have another transaction
> before that started right away but failed as well.
>
> Cheers,
> Matthieu
>
> On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
> >
> > Hi,
> >
> > I'm getting this most blocking openjpa datatype recognition/parsing
> > error which I can't get around; the log snippet can be found below.
> > Anyone has any ideas if the problem is in my settings or in the
> > dao-jpa?
> >
> > Btw., why it takes 20sec for a committed message exchange to actually
> > start processing? As in below the corresponding ODE_MESSAGE etc.
> > inserts were committed 09:56:37. The quartz seems to be just sitting
> > there a while. I haven't yet profiled the situation as I guess someone
> > here already has the answer?
> >
> > Best, janne
> >
> >
> > 09:56:56,192 | INFO  | pool-20-thread-1 | JobRunShell              |
> > org.quartz.core.JobRunShell     208 | Job
> > DEFAULT.bjlegq3v0drmtwckvf3xjk threw a JobExecutionException:
> > org.quartz.JobExecutionException:
> > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > <0|false|0.9.7-incubating-SNAPSHOT>
> > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > to javax.xml.namespace.QName [See nested exception:
> > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > <0|false|0.9.7-incubating-SNAPSHOT>
> > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > to javax.xml.namespace.QName]
> >         at
> > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > QuartzSchedulerImpl.java:353)
> >         at
> > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > QuartzSchedulerImpl.java:367)
> >         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> > JobImpl.java:32)
> >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > ThreadPoolExecutor.java:885)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > ThreadPoolExecutor.java:907)
> >         at java.lang.Thread.run(Thread.java:619)
> > * Nested Exception (Underlying Cause) ---------------
> > org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> > <0|false|0.9.7-incubating-SNAPSHOT>
> > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > to javax.xml.namespace.QName
> >         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > BpelEngineImpl.java:321)
> >         at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(
> > BpelServerImpl.java:384)
> >         at
> > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> > QuartzSchedulerImpl.java:351)
> >         at
> > org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> > QuartzSchedulerImpl.java:367)
> >         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> > JobImpl.java:32)
> >         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> > ThreadPoolExecutor.java:885)
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > ThreadPoolExecutor.java:907)
> >         at java.lang.Thread.run(Thread.java:619)
> > Caused by: <0|false|0.9.7-incubating-SNAPSHOT>
> > org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> > to javax.xml.namespace.QName
> >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:854)
> >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:748)
> >         at org.apache.openjpa.kernel.DelegatingBroker.find(
> > DelegatingBroker.java:169)
> >         at org.apache.openjpa.persistence.EntityManagerImpl.find(
> > EntityManagerImpl.java:346)
> >         at org.apache.ode.dao.jpa.BPELDAOConnectionImpl.getMessageExchange
> > (BPELDAOConnectionImpl.java:127)
> >         at org.apache.ode.bpel.engine.BpelEngineImpl.getMessageExchange(
> > BpelEngineImpl.java:143)
> >         at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(
> > BpelProcess.java:279)
> >         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> > BpelEngineImpl.java:311)
> >         ... 8 more
> > Caused by: java.lang.ClassCastException: [B cannot be cast to
> > javax.xml.namespace.QName
> >         at org.apache.ode.dao.jpa.MessageExchangeDAOImpl.pcReplaceField(
> > MessageExchangeDAOImpl.java)
> >         at org.apache.openjpa.kernel.StateManagerImpl.replaceField(
> > StateManagerImpl.java:2868)
> >         at org.apache.openjpa.kernel.StateManagerImpl.storeObjectField(
> > StateManagerImpl.java:2322)
> >         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> > StateManagerImpl.java:2418)
> >         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> > StateManagerImpl.java:731)
> >         at org.apache.openjpa.kernel.StateManagerImpl.store(
> > StateManagerImpl.java:727)
> >         at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(
> > HandlerFieldStrategy.java:171)
> >         at org.apache.openjpa.jdbc.meta.FieldMapping.load(
> > FieldMapping.java:785)
> >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> > JDBCStoreManager.java:830)
> >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> > JDBCStoreManager.java:782)
> >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState
> > (JDBCStoreManager.java:333)
> >         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(
> > JDBCStoreManager.java:252)
> >         at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> > DelegatingStoreManager.java:108)
> >         at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> > ROPStoreManager.java:54)
> >         at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java
> > :873)
> >         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:831)
> >         ... 15 more
> > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > cheduler.quartz.JTAJobRunShell   95 | UserTransaction marked for
> > rollback only.
> > 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> > cheduler.quartz.JTAJobRunShell  113 | Rollbacking transaction.
> > 09:56:56,202 | DEBUG | pool-20-thread-1 | JobStoreJTA              |
> > l.scheduler.quartz.JobStoreJTA 1181 | triggeredJobComplete:
> > trigger=Trigger 'DEFAULT.bjlegq3v0drmtwckvf3xjk.trigger':
> > triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar:
> > 'null' misfireInstruction: 0 nextFireTime: null,
> > jobName=DEFAULT.bjlegq3v0drmtwckvf3xjk, triggerInstCode=3

Re: [B cannot be cast to QName

Posted by Matthieu Riou <ma...@gmail.com>.
Hi Janne,

I don't have your problem with OpenJPA datatypes but it's most probably
related to your database schema. I think OpenJPA does some type inference
depending on the type of the column you read from and if the type inferred
doesn't match with the one in your object... Anyway how did you generate the
MySQL schema? Could you send it so I can check what could be wrong with it?

Also for the 20s delay it's possibly a consequence of the exception. When a
commit goes wrong we have some retry logic happening. What you see is
probably the last retry. Make sure that you don't have another transaction
before that started right away but failed as well.

Cheers,
Matthieu

On 3/21/07, Janne Savukoski <ja...@savukoski.name> wrote:
>
> Hi,
>
> I'm getting this most blocking openjpa datatype recognition/parsing
> error which I can't get around; the log snippet can be found below.
> Anyone has any ideas if the problem is in my settings or in the
> dao-jpa?
>
> Btw., why it takes 20sec for a committed message exchange to actually
> start processing? As in below the corresponding ODE_MESSAGE etc.
> inserts were committed 09:56:37. The quartz seems to be just sitting
> there a while. I haven't yet profiled the situation as I guess someone
> here already has the answer?
>
> Best, janne
>
>
> 09:56:56,192 | INFO  | pool-20-thread-1 | JobRunShell              |
> org.quartz.core.JobRunShell     208 | Job
> DEFAULT.bjlegq3v0drmtwckvf3xjk threw a JobExecutionException:
> org.quartz.JobExecutionException:
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> <0|false|0.9.7-incubating-SNAPSHOT>
> org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> to javax.xml.namespace.QName [See nested exception:
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> <0|false|0.9.7-incubating-SNAPSHOT>
> org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> to javax.xml.namespace.QName]
>         at
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> QuartzSchedulerImpl.java:353)
>         at
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> QuartzSchedulerImpl.java:367)
>         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> JobImpl.java:32)
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:885)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)
> * Nested Exception (Underlying Cause) ---------------
> org.apache.ode.bpel.iapi.Scheduler$JobProcessorException:
> <0|false|0.9.7-incubating-SNAPSHOT>
> org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> to javax.xml.namespace.QName
>         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> BpelEngineImpl.java:321)
>         at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(
> BpelServerImpl.java:384)
>         at
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.doExecute(
> QuartzSchedulerImpl.java:351)
>         at
> org.apache.ode.bpel.scheduler.quartz.QuartzSchedulerImpl.execute(
> QuartzSchedulerImpl.java:367)
>         at org.apache.ode.bpel.scheduler.quartz.JobImpl.execute(
> JobImpl.java:32)
>         at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:885)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)
> Caused by: <0|false|0.9.7-incubating-SNAPSHOT>
> org.apache.openjpa.persistence.PersistenceException: [B cannot be cast
> to javax.xml.namespace.QName
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:854)
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:748)
>         at org.apache.openjpa.kernel.DelegatingBroker.find(
> DelegatingBroker.java:169)
>         at org.apache.openjpa.persistence.EntityManagerImpl.find(
> EntityManagerImpl.java:346)
>         at org.apache.ode.dao.jpa.BPELDAOConnectionImpl.getMessageExchange
> (BPELDAOConnectionImpl.java:127)
>         at org.apache.ode.bpel.engine.BpelEngineImpl.getMessageExchange(
> BpelEngineImpl.java:143)
>         at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(
> BpelProcess.java:279)
>         at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(
> BpelEngineImpl.java:311)
>         ... 8 more
> Caused by: java.lang.ClassCastException: [B cannot be cast to
> javax.xml.namespace.QName
>         at org.apache.ode.dao.jpa.MessageExchangeDAOImpl.pcReplaceField(
> MessageExchangeDAOImpl.java)
>         at org.apache.openjpa.kernel.StateManagerImpl.replaceField(
> StateManagerImpl.java:2868)
>         at org.apache.openjpa.kernel.StateManagerImpl.storeObjectField(
> StateManagerImpl.java:2322)
>         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> StateManagerImpl.java:2418)
>         at org.apache.openjpa.kernel.StateManagerImpl.storeField(
> StateManagerImpl.java:731)
>         at org.apache.openjpa.kernel.StateManagerImpl.store(
> StateManagerImpl.java:727)
>         at org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy.load(
> HandlerFieldStrategy.java:171)
>         at org.apache.openjpa.jdbc.meta.FieldMapping.load(
> FieldMapping.java:785)
>         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> JDBCStoreManager.java:830)
>         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(
> JDBCStoreManager.java:782)
>         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState
> (JDBCStoreManager.java:333)
>         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(
> JDBCStoreManager.java:252)
>         at org.apache.openjpa.kernel.DelegatingStoreManager.initialize(
> DelegatingStoreManager.java:108)
>         at org.apache.openjpa.kernel.ROPStoreManager.initialize(
> ROPStoreManager.java:54)
>         at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java
> :873)
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:831)
>         ... 15 more
> 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> cheduler.quartz.JTAJobRunShell   95 | UserTransaction marked for
> rollback only.
> 09:56:56,202 | DEBUG | pool-20-thread-1 | JTAJobRunShell           |
> cheduler.quartz.JTAJobRunShell  113 | Rollbacking transaction.
> 09:56:56,202 | DEBUG | pool-20-thread-1 | JobStoreJTA              |
> l.scheduler.quartz.JobStoreJTA 1181 | triggeredJobComplete:
> trigger=Trigger 'DEFAULT.bjlegq3v0drmtwckvf3xjk.trigger':
> triggerClass: 'org.quartz.SimpleTrigger isVolatile: false calendar:
> 'null' misfireInstruction: 0 nextFireTime: null,
> jobName=DEFAULT.bjlegq3v0drmtwckvf3xjk, triggerInstCode=3
>