I get a NullPointerEx when ADF tries to get Entity Cache

Hello! I'm using ADF JDeveloper 11.1.2.1.0.
I'm having a hard time tracing back a bug I'm experiencing. When I try to commit some data that involves setting properties across many view links and entities, I get a weird error near the end:
<22/05/2012 12:20:49,208> <SEVERE> <BaseLoggerImpl> <logException> java.lang.NullPointerException
at oracle.jbo.server.EntityImpl.getEntityCache(EntityImpl.java:4665)
     at oracle.jbo.server.EntityImpl.getAttributeInternal(EntityImpl.java:3371)
     at br.com.cds.gtj.gco.model.gco.entity.MovimentoMaterialImpl.getConsultaUltmSeqcMovmMaterialView(MovimentoMaterialImpl.java:647)
     at br.com.cds.gtj.gco.model.gco.entity.MovimentoMaterialImpl.getUltmSeqcMovmMatl(MovimentoMaterialImpl.java:676)
     at br.com.cds.gtj.gco.model.gco.entity.NotaFiscalPedidoImpl.recebeNotaFiscalPedido(NotaFiscalPedidoImpl.java:1208)
Whats really curious about this error is that, if I try the commit operation again right after getting the nullpointerexception, everything goes smoothly and the process is completed. What could cause this kind of error, and why would a second try make it work?
Thanks in advance,
Daniel

It's a very simple VO. It has a query that returns a value I need from the database. I could very well solve this by making a procedure with this query and programmatically executing this procedure from the entity X, but I'm interested in figuring why this is happening and what am I doing wrong.
I will paste the query here, but I suspect my problem is with the entity. I tried creating other view accessors and tried calling their "get" methods, and none of them can return the RowSet, all ending on the same error in the stack trace: EntityCache -> NullPointerException.
Heres the query:
SELECT
MAX(MovimentoMaterial.SEQC_MOVM_MATL) AS UltmSeqc
FROM
MOVIMENTO_MATERIAL MovimentoMaterial
WHERE
MovimentoMaterial.ALMX_MOVM_MATL = :varAlmxMovmMatl AND
MovimentoMaterial.CODG_GRPO_MATL_MOVM_MATL = :varCodgGrpoMatlMovmMatl AND
MovimentoMaterial.CODG_SUBS_MATL_MOVM_MATL = :varCodgSubsMatlMovmMatl AND
MovimentoMaterial.NUM_SEQC_MATL_MOVM_MATL = :varNumSeqcMatlMovmMatl
My objective is to set the bind Variables in this query, and get the value for UltmSeqc, which I will use for future procedures.
Being so, I tried to get the rowset, and from it execute the setNamedBindVariable stuff to get the result from this query. Why can't I get a RowSet from this view, given that I created it's accessor inside the entity X?

Similar Messages

Maybe you are looking for

  • HT204053 I want to connect my Apple account any Claude

    I want to connect my Apple account any Claude stolen iPhone 5s

  • When will Elements and Lightroom support the RAW files from the Olympus em5 Mark 2 camera?

    Camera was launched in Feb 15. As far as I understand, neither product will open the RAW files for some months. When will that be, does anyone know?

  • Import from Olympus E-PL1?

    How do I adjust my easy setup before importing from my Olympus E-PL1 camera? The manual says it's a HD(720p)camera, but I can't find a good setting. The movies look good in the viewer but blurry and bad after exporting. Any tips?

  • Query between schemas

    We are migrating our application from SQL Server 2005 to ORacle 9i. We used to have queries that extracted data between different databases in SQL Server, we've encountered problems doing the same in ORacle. What used to be separate Databases in SQL

  • How can I easily rearrange photos in iWeb?

    I am trying to rearrange photos on my iWeb pages and seem to have no control over where they land when I drag and drop them. I have several pics on one page and cannot see them all on my screen (G4 17"). Is there a way to view them all so I can see w