4 Replies Latest reply on Jun 26, 2011 1:01 PM by imran_issufo

    Error occurred completing a transaction

    imran_issufo

      Hello people,

       

       

      Im using LCDS 3.1 with flash builder 4.5 and model driven development plugin.

      im getting this error everytime i Delete an item(record).

      Nothing happens when i Add (create), update items, everything works fine but when i Delete then i get this:

       

       

       

       

       

        Exception: flex.data.DataServiceException: Error occurred completing a transaction

              at flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1528)

              at flex.data.DataService.serviceTransactedMessage(DataService.java:970)

              at flex.data.DataService.serviceMessage(DataService.java:507)

              at flex.messaging.AsyncMessageBroker.in(AsyncMessageBroker.java:435)

              at flex.messaging.MessageContext.doIn(MessageContext.java:296)

              at flex.messaging.filters.AsyncMessageFilterChain.in(AsyncMessageFilterChain.java:206)

              at flex.messaging.MessageContext.doIn(MessageContext.java:296)

              at flex.messaging.AsyncMessageBroker$EndpointSplitter.in(AsyncMessageBroker.java:827)

              at flex.messaging.MessageContext.doIn(MessageContext.java:296)

              at flex.messaging.endpoints.BaseSocketServerEndpoint.in(BaseSocketServerEndpoint.java:463)

              at flex.messaging.MessageContext.doIn(MessageContext.java:296)

              at flex.messaging.endpoints.RTMPConnection.handleTCCommandIn(RTMPConnection.java:835)

              at flex.messaging.endpoints.RTMPConnection.in(RTMPConnection.java:985)

              at flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1072)

              at flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:610)

              at flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:125)

              at flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:864)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

              at java.lang.Thread.run(Unknown Source)

      Caused by: flex.data.adapters.AdapterException: The fill-contains-method for class null returned an error: null

              at flex.data.adapters.JavaAdapter.handleAdapterException(JavaAdapter.java:1335)

              at flex.data.adapters.JavaAdapter.invokeRefreshFillOperation(JavaAdapter.java:969)

              at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:628)

              at flex.data.DataServiceTransaction.rebuildSequenceIfNecessary(DataServiceTransaction.java:2 353)

              at flex.data.SequenceManager.getInterestedSubscribers(SequenceManager.java:3693)

              at flex.data.SequenceManager.getLeafInterestedSubscribers(SequenceManager.java:3608)

              at flex.data.SequenceManager.syncAndPushSequenceChanges(SequenceManager.java:3578)

              at flex.data.SequenceManager.manageSequence(SequenceManager.java:989)

              at flex.data.DataServiceTransaction.syncClients(DataServiceTransaction.java:1672)

              at flex.data.DataServiceTransaction.doCommit(DataServiceTransaction.java:1456)

              at flex.data.DataServiceTransaction.complete(DataServiceTransaction.java:1505)

              ... 19 more

      Caused by: java.lang.NullPointerException

              at fiber.core.impl.service.FilterFunctionsService.equals(FilterFunctionsService.java:154)

              at fiber.runtime.entity.TermEvaluator.visitInvocation(TermEvaluator.java:104)

              at fiber.core.impl.term.function.InvocationImpl.accept(InvocationImpl.java:164)

              at fiber.runtime.entity.TermEvaluator.evaluate(TermEvaluator.java:63)

              at fiber.data.assemblers.FiberAssembler.refreshFill(FiberAssembler.java:411)

              at flex.data.adapters.JavaAdapter.invokeRefreshFillOperation(JavaAdapter.java:918)

              ... 28 more

       

       

       

      regards

      Imraan

        • 1. Re: Error occurred completing a transaction
          imran_issufo Level 1

          Hello guys,

           

           

          any sugestion??? any solution for this?

           

           

          this is my view:

           

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"

             xmlns:s="library://ns.adobe.com/flex/spark"

             xmlns:mx="library://ns.adobe.com/flex/mx"

             xmlns:sct="sct.*"

             xmlns:forms="sct.forms.*"

             width="100%" height="100%">

          <fx:Script>

          <![CDATA[

          import mx.controls.Alert;

          import mx.events.FlexEvent;

          import mx.events.ListEvent;

           

          import spark.events.IndexChangeEvent;

           

          protected function dataGrid_creationCompleteHandler(event:FlexEvent):void

          {

          if(comboBox.selectedItem!=null)

          getByGrupoTreinamentoResult.token = treinamentoService.getByGrupoTreinamento( comboBox.selectedItem);

          }

           

          protected function comboBox_creationCompleteHandler(event:FlexEvent):void

          {

          getAllResult.token = grupoTreinamentoService.getAll();

          }

           

          protected function comboBox_changeHandler(event:IndexChangeEvent):void

          {

          if(comboBox.selectedItem!=null)

          getByGrupoTreinamentoResult.token = treinamentoService.getByGrupoTreinamento( comboBox.selectedItem);

          }

           

          ]]>

          </fx:Script>

          <fx:Declarations>

          <s:CallResponder id="getByGrupoTreinamentoResult"/>

          <sct:TreinamentoService id="treinamentoService"

          fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"/>

          <s:CallResponder id="getAllResult"/>

          <sct:GrupoTreinamentoService id="grupoTreinamentoService"

          fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"/>

          <!-- Place non-visual elements (e.g., services, value objects) here -->

          </fx:Declarations>

          <s:HGroup width="100%" height="100%">

          <s:VGroup>

          <s:HGroup>

          <s:Label text="Grupo de Treinamentos" />

          <s:ComboBox id="comboBox" change="comboBox_changeHandler(event)"

          creationComplete="comboBox_creationCompleteHandler(event)"

          labelField="nome">

          <s:AsyncListView list="{getAllResult.lastResult}"/>

          </s:ComboBox>

          </s:HGroup>

          <mx:DataGrid id="dataGrid"

          creationComplete="dataGrid_creationCompleteHandler(event)"

          dataProvider="{getByGrupoTreinamentoResult.lastResult}">

          <mx:columns>

          <mx:DataGridColumn dataField="codigo" headerText="codigo"/>

          <mx:DataGridColumn dataField="nome" headerText="nome"/>

          <mx:DataGridColumn dataField="descricao" headerText="descricao"/>

          <mx:DataGridColumn dataField="duracao" headerText="duracao"/>

          <mx:DataGridColumn dataField="validade" headerText="validade"/>

          </mx:columns>

           

          </mx:DataGrid>

          </s:VGroup>

          <forms:TreinamentoForm id="TreinamentoForm1"

             valueObject="{dataGrid.selectedItem as Treinamento}">

          </forms:TreinamentoForm>

          </s:HGroup>

          </mx:Canvas>

           

           

           

          I get this TRANSACTION error when i delete an record.

          BUT THE RECORD IS DELETED.

           

           

           

           

           

           

          Imraan

          • 2. Re: Error occurred completing a transaction
            svetlinK Level 1

            Hi, can you give us the model you are using and tell us which filters(fills) are being refreshed when you delete an item?

             

            The error comes from trying to execute the conditions of the fill on the server, in order to determine if the items in the fill need to be removed because of the delete operation. This all happens under the covers and is based on the filters you have defined in the model.

             

            I fixed the line that caused the NullPointerException for the next release, but I couldn't reproduce it even as it was before the fix. If you give us the model we may be able to suggest a workaround.

             

            Cheers,

            -Svetlin

            • 3. Re: Error occurred completing a transaction
              imran_issufo Level 1

              Hello Svetlin,

               

               

              here the video that i uploaded :

              http://www.youtube.com/watch?v=zBo9wMXph7g&feature=youtube_gdata

               

               

               

               

               

              Regards,

              Imraan

              • 4. Re: Error occurred completing a transaction
                imran_issufo Level 1

                Hello people,

                 

                 

                any sugestion?????

                Im steel stacked on this.

                 

                 

                 

                 

                 

                regards,

                Imraan