Domain design causing full object graph serialization

Hello,
I work on a project, based on 3-layer-architecture. We have rich client developed on swing, application server and we persist our domain objects in the database.
We map the domain objects using hibernate, send the same objects (means, we use POJOs and don't use DTO) via spring from application server to the server and visa versa in case the objects are to be saved, deleted etc.
We use an object identity store on the client side, in which all already loaded objects are stored.
My challenge is as follows:
- Since an object is stored in the object store, the same certain object is used in every GUI module. Imagine, we have customer, account and a list of transactions per account. In practice, let's say:
1 customer
2 accounts
1000 transactions per account which ever exist
- In one of the modules, the used loaded all list of transactions. So, at that moment, 1 customer object, 2 accounts and 2000 transaction objects are bound to each other via java references (object graph).
- On another module, the user wants to edit a very small attribute of customer object, say he corrects his birthday date and saves it.
- Saving operation sends the customer object to the server. But the problem is, a very big object graph hangs on this one little customer object and are serialized to the server, although the
service.save(customer);is called, and this costs extremely much time for our application.
boldSOLUTION:*bold* We solved the problem with a hack, as we used the serialization over XStream framework from Thoughtworks in xml-format. We could set a cut in the serialization and have serialized only the customer object for that use case.
So the problem for the save-use case was solved. This has a disadventage: the loading time (server-client (de-)serialization) using xml is longer than the java standard, especially remarkable if you load a big number of objects.
I've read many articles about the enterprise architectures which are related to domain objects, dto, serialization. It is not uncommon to avoid DTOs and use POJOs on the server and client as well, if the domain objects don't contain business logic. So, I just wonder, how the problem above should be solved smartly, if the non-DTO, say POJO alternative is chosen.
I appreciate your opinions.
I hope my question is not too long. Thanks in advance,
A sample code:
(The concrete case in our application requires the navigability from customer to account)
public class Customer implements Serializable {
     private Set<Account> acounts = new HashSet<Account>();
     // Getters, setters
public class Account implements Serializable {
     private Set<AccTransaction> acounts = new HashSet<AccTransaction>();
     // Getters, setters
public class AccTransaction implements Serializable {
     private String operation;
     private Timestamp timestamp;
     // Getters, setters
}Alper

acelik wrote:
Thanks for the quick answer.
The numbers are just wildly guesses, in order to keep the sample simple.
Actually we develop a system for automobile industry. So, instead of customer, you may think of a company, like Ford. Account would be then Fiesta. Instead of AccTransaction we may think a huge number of car pieces (clima, motor, radio, etc.).
So hierarchically we have
Company (Ford, Opel, etc)
Model (Fiesta, Astra, etc.)
Piece (1000 pieces per model, so Fiesta, Opel have 1000 different pieces each)
The problem is, if I loaded the Ford->Fiesta->1000x pieces for one view and then switch to another view. In the second view, I rename Fiesta to Fiesta II, and want to save this renaming operation using:
What exactly does that represent?
If you want to rename an existing car then you need logic to do exactly that. You do not copy the entire tree.
If however you do want to copy the entire tree then that is in fact what you must do. Although I seriously doubt that there is a valid business requirement for that. In terms of efficiency though you could write a proc that did that rather than propogating the tree.
Although further if you do in fact have two cars which use the same inventory item(s) then, again, you do not copy the entire tree because you are not creating a brand new inventory item. Instead you should only be pointing to an existing item.
I wonder how this problem is solved smartly, if you guys share domain objects between the client and server, and avoid DTO.The first step is to start with actual business requirements.

Similar Messages

  • A cycle is detected in the object graph.  This will cause an infinite loop.

    People,
    Looking for a little guidance.  Please point me in the correct direction if I am mistaken.  I am using Jersey 2.11 and generating JAXB definitions from XSD.
    I have a periodic exception that seems to be timing based.  If I change the timing of the message sent in anyway the error does not occur.  The other issue is that the cycle reported in the error changes some times, however, the cycles reported can not occur based on the XSD definition.  I have also dumped the message before sending and it definitely does not contain the cycle reported.
    In this specific scenario, I am sending a message of NotificationType which contains a list of DocumentType, however, DocumentType can never contain NotificationType so the following cycle is not possible:
    net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3]
    I am wondering if there could be a different reason for receiving the following exception?
    Thank you for the help,
    John
    [code]
    [ERROR] [08/22/2014 11:16:22.307] [NSI-DISCOVERY-akka.actor.default-dispatcher-4] [akka://NSI-DISCOVERY/user/discovery-notificationRouter/$c] HTTP 500 Internal Server Error
    javax.ws.rs.ProcessingException: HTTP 500 Internal Server Error
            at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
            at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
            at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:228)        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
            at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
            at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
            at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
            at net.es.nsi.pce.discovery.actors.NotificationActor.onReceive(NotificationActor.java:100)
            at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
            at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
            at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
            at akka.actor.ActorCell.invoke(ActorCell.scala:487)
            at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
            at akka.dispatch.Mailbox.run(Mailbox.scala:220)
            at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
            at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
            at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
            at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
            at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
    Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:152)
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:85)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
            at org.glassfish.jersey.filter.LoggingFilter.aroundWriteTo(LoggingFilter.java:293)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
            at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154)
            at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:503)
            at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:315)
            at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
            at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
            ... 22 more
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: An error occurred marshalling the object
    Internal Exception: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3]
            at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:403)
            at org.glassfish.jersey.message.internal.XmlJaxbElementProvider.writeTo(XmlJaxbElementProvider.java:139)
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:150)
            ... 33 more
    Caused by: Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: An error occurred marshalling the object
    Internal Exception: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3
            at org.eclipse.persistence.exceptions.XMLMarshalException.marshalException(XMLMarshalException.java:97)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:911)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:848)
            at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:401)
            ... 35 more
    Caused by: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3
            at org.eclipse.persistence.exceptions.XMLMarshalException.objectCycleDetected(XMLMarshalException.java:400)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:207)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshalSingleValue(XMLCompositeObjectMappingNodeValue.java:237)
            at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshal(XMLCompositeObjectMappingNodeValue.java:149)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
            at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
            at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:393)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:238)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshalSingleValue(XMLCompositeCollectionMappingNodeValue.java:321)
            at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshal(XMLCompositeCollectionMappingNodeValue.java:104)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:149)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
            at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
            at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:393)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:238)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:743)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:901)
            ... 37 more
    [/code]

    Unfortunately, even this thread is unanswered, i am closing the thread.as it it creating problems for further posting

  • EJB3 Entities + Web Services: A cycle is detected in the object graph

    I have a Java EE 5 application, using Glassfish v2. My ejb project consists of a handful of entity beans, session beans, and this problem arose when I added a new web service.
    Here is a simple scenario borrowed from another forum post with a similar problem:
    Let's say I have a web service called getVehicle(int vehicleId) that returns a Vehicle object.
    Vehicle has a java.util.Set of Wheel objects.
    The Wheel object has a reference to its owner (Vehicle).
    The issue is this bi-directional relationship causes a cycle that the JAX system doesn�t like.
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: org.test.Vehicle at 13c6308 -> org.test.Wheel at 15880be -> org.test.Vehicle at 13c6308
                  at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:282)
                  at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:110)
                  at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:178)
                  at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:299)
                  ... 54 more
    The one bit of information that I found that might fix this doesn't do much for me:
    https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html
    What options do I have to make my soap method work?
    Thanks,
    Hugh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    i have got the same issue�C
    how did you implement onCycleDetected method�H
    can you send your full code to my mail [email protected]
    thanks !

  • Windows Azure Active Directory MA - Maximum number of items that can be serialized or deserialized in an object graph is '500000'. Change the object graph or increase the MaxItemsInObjectGraph quota.

    Trying to use WAAD with FIM 2010 R2 SP1 (4.1.3496.0) and during export several objects cause a warning/info with:
    Maximum number of items that can be serialized or deserialized in an object graph is '500000'. Change the object graph or increase the MaxItemsInObjectGraph quota.
    I looked, this appears hard coded into the MA, anyone know what causes this? My best guess is something like a large group membership? Does anyone know what the limits around the WAAD MA are?
    Here is the indepth error logged during the failure:
    ProvisioningServiceAdapter::ExecuteWithRetry: Action: Export, Attempt: 0, Exception: Microsoft.Online.Coexistence.ProvisionRetryException: Unable to communicate with the Windows Azure Active Directory service. Tracking ID: e94e6020-8434-4aa7-9a29-b2edf7fe6b2e
    See the event log for more details. ---> System.ServiceModel.CommunicationException: There was an error while trying to serialize parameter http://schemas.microsoft.com/online/aws/change/2010/01:syncObjects. The InnerException message was 'Maximum number
    of items that can be serialized or deserialized in an object graph is '500000'. Change the object graph or increase the MaxItemsInObjectGraph quota. '.  Please see InnerException for more details. ---> System.Runtime.Serialization.SerializationException:
    Maximum number of items that can be serialized or deserialized in an object graph is '500000'. Change the object graph or increase the MaxItemsInObjectGraph quota.
       at System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(Int32 count)
       at WriteArrayOfstringToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
       at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type
    declaredType)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteSyncObjectGroupToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
       at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiType(XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle objectTypeHandle, Type objectType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle, Type
    declaredType)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
       at WriteArrayOfSyncObjectToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
       at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
       at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
       at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameterPart(XmlDictionaryWriter writer, PartInfo part, Object graph)
       --- End of inner exception stack trace ---
    Server stack trace:
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameterPart(XmlDictionaryWriter writer, PartInfo part, Object graph)
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameter(XmlDictionaryWriter writer, PartInfo part, Object graph)
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameters(XmlDictionaryWriter writer, PartInfo[] parts, Object[] parameters)
       at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeBody(XmlDictionaryWriter writer, MessageVersion version, String action, MessageDescription messageDescription, Object returnValue, Object[] parameters, Boolean
    isRequest)
       at System.ServiceModel.Dispatcher.OperationFormatter.OperationFormatterMessage.OperationFormatterBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.Message.OnWriteMessage(XmlDictionaryWriter writer)
       at System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message message, BufferManager bufferManager, Int32 initialOffset, Int32 maxSizeQuota)
       at System.ServiceModel.Channels.BinaryMessageEncoderFactory.BinaryMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
       at System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message)
       at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
       at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Online.Coexistence.Schema.IProvisioningWebService.Provision(SyncObject[] syncObjects)
       at Microsoft.Online.Coexistence.ProvisionHelper.InvokeAwsAPI[T](Func`1 awsOperation, String opsLabel)
       --- End of inner exception stack trace ---
       at Microsoft.Online.Coexistence.ProvisionHelper.CommunicationExceptionHandler(CommunicationException ex)
       at Microsoft.Online.Coexistence.ProvisionHelper.InvokeAwsAPI[T](Func`1 awsOperation, String opsLabel)
       at Microsoft.Azure.ActiveDirectory.Connector.ProvisioningServiceAdapter.<>c__DisplayClass1.<Export>b__0()
       at Microsoft.Azure.ActiveDirectory.Connector.ProvisioningServiceAdapter.ExecuteWithRetry(String actionName, Action action).

    Hi gdedshg,
    >>Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota
    When meet the above exception, please try to do the following configuration:
    On the server side:
    Add the following to the server's config file:
    <behaviors>
    <serviceBehaviors>
    <behavior name="MyServiceBehavior">
    <dataContractSerializer
    maxItemsInObjectGraph="2147483647" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
    And reference it in the service using the following code:
    <services>
    <service
    behaviorConfiguration="MyServiceBehavior"
    name="serviceName">……
    On the client side:
    Add the following: 
    <behaviors>
    <endpointBehaviors>
    <behavior name="MyClientbehavior">
    <dataContractSerializer
    maxItemsInObjectGraph="2147483647"/>
    </behavior>
    </endpointBehaviors>
    </behaviors>
     And reference it in the endpoint using the following code:
    <endpoint address="serviceAddress"
    behaviorConfiguration="MyClientbehavior"
    For more information, please try to refer to the following article:
    http://blog.aggregatedintelligence.com/2011/01/wcf-maxitemsinobjectgraph-error.html .
    Best Regards,
    Amy Peng
    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.

  • How to design a client object???

    hello,Michael Wooten
    thank for your help, now I know the list of Java data types for the parameters
    and return values, and their corresponding SOAP data types.
    but how to design a client object, f.e: this object is value Object in ejb, their
    have some gets and sets methods, these set methods, their return type is void
    in java, but now in web service,how to deal with these prolem?
    like ejb, we have ejb's design pattern, for web service, do we have their design
    pattern also?
    thanks :-)

    Hi littlehill,
    In general, you want to think of the input parameters (and return values) for
    a web service method as "hierarchical state", not objects :-)
    The main motivation for taking this approach is to reduce the likelihood of interoperability
    issues with other (noteably non-Java) SOAP packages. The JavaBean model provides
    a simple, easy to implement mechanism for creating "hierarchical state", because
    it allows nesting. Using this nested JavaBean approach, you should be able to
    create an object graph that represents your "value object", but again the key
    here is to not thinking of them (the value objects) as objects, but state ;-)
    Each SOAP (or Web Services) toolkit will have a different approach and API for
    writing SOAP clients, unless it supports JAX-RPC. This being the case, it is a
    bit difficult to come up with an "across the board" design for a web service client
    ;-) In the case of Java-based SOAP toolkits, most developers prefer to "stay in
    the object world" as opposed to dealing with XML parsing APIs. To accommodate
    this desire, most Java-based SOAP toolkits have a "XML-to-Java, Java-to-XML" type
    mapping mechanism to handle the complexities of this task. If you don't want to
    muck around with type mappings, you should look around for a product that can
    generate Java classes from XML Schema, and vis-versa. WLS 7.0 does a better good
    of this than WLS 6.1, so you might want to check it out. I've also had a fair
    amount of success with the Exolab Castor data binding package (http://castor.exolab.org/sourcegen.html).
    It has a very comprehensive implementation of "XML Schema Part 1: Structures"
    and "XML Schema Part 2: Datatypes", is open-source, and works quite well. When
    you get down to it, a good XML Schema processor is key to saving yourself lots
    of frustration and coding.
    Regards,
    Mike Wooten
    "littlehill lee" <[email protected]> wrote:
    >
    hello,Michael Wooten
    thank for your help, now I know the list of Java data types for the parameters
    and return values, and their corresponding SOAP data types.
    but how to design a client object, f.e: this object is value Object in
    ejb, their
    have some gets and sets methods, these set methods, their return type
    is void
    in java, but now in web service,how to deal with these prolem?
    like ejb, we have ejb's design pattern, for web service, do we have their
    design
    pattern also?
    thanks :-)

  • JPA:A cycle is detected in the object graph

    HI Friends,
    I am facing bit too many errors while working with JPA.unfortunately we dont have proper examples which can provided  clarity.
    Here in my case : I have Two Entities
    One to One bidirectional.
      EMPLOYEE
      CUBICLE.
    Employee.java
    @Entity
    @Table(name = "CS1_EMPLOYEE")
    public class Employee {
         @Id
         private int id;
         private String name;
        @OneToOne(cascade=CascadeType.ALL)
        private Cubicle cubicle;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public Cubicle getCubicle() {
              return cubicle;
         public void setCubicle(Cubicle assignedCubicle) {
              this.cubicle = assignedCubicle;
    Cubicle.java
    @Entity
    @Table(name = "CS1_CUBICLE")
    public class Cubicle {
         @Id
         private int id;
         private String cubeName;
         // Bidirectional
         @OneToOne(mappedBy="cubicle",cascade=CascadeType.ALL)
         private Employee employee;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getCubeName() {
              return cubeName;
         public void setCubeName(String cubeName) {
              this.cubeName = cubeName;
         public Employee getEmployee() {
              return employee;
         public void setEmployee(Employee residentEmployee) {
              this.employee = residentEmployee;
    *sql file*
    CREATE TABLE "CS1_EMPLOYEE"
        "ID"           Integer    NOT NULL,
        "NAME"         Varchar (12) UNICODE,
        "CUBICLE_ID"   Integer,
        PRIMARY KEY ("ID")
    CREATE TABLE "CS1_CUBICLE"
    "ID"          Integer    NOT NULL,
        "CUBENAME"      Varchar (12) UNICODE,
        PRIMARY KEY ("ID")
    Session Bean(EJB)
    when i test this method i am gettig the error(Method In Bean)
    public Cubicle findCubicleById(int id)
         String jpql = "select c from Cubicle c where c.id = " +id;
             Query q = em.createQuery(jpql);
             Cubicle c = (Cubicle)q.getSingleResult();
             return c;
    error
    [com.sun.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: com.sap.com.jpacasestudy1.model.Employee@1ae5bf7 -> com.sap.com.jpacasestudy1.model.Cubicle@75e38d -> com.sap.com.jpacasestudy1.model.Employee@1ae5bf7])->com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException: Connection IO Exception. Check nested exception for details. (Exception; nested exception is:  javax.xml.bind.MarshalException
    I am unable to trace what the error is.Any help from SDN Experts?
    Regards
    Chandra Dasari
    Edited by: chandra shekar dasari on Jul 16, 2009 1:48 PM:ver1te
    Edited by: chandra shekar dasari on Jul 16, 2009 1:49 PM:code re

    Unfortunately, even this thread is unanswered, i am closing the thread.as it it creating problems for further posting

  • Progress bars objects not serializable message iat application runtime

    I am getting errors for the beans that have to do with progress bars. It says these objects are not serializable.
    When I try to implement serializable I still get that error. What do I need to do?
    I have 3 progress bars in view scope.
    SEVERE: ADFc: Scope object serialization failed (object not serializable), scope='viewScope[page.jsf]', objectKey='progressBarSampleBean',

    Hi,
    if you get this error then because you referenced a JSF component binding from a managed bean that is not in request scope. By definition, JSF components are not designed for this and instead ensure their component state is handled within a state token for high availability. The error message states you have the bean referenced in viewScope, which however you should not do. Use request scope
    Frank

  • 'One' To 'Many' relationship, (with the 'One' shared between persistance object graphs)

    Hi,
    I'm relatively new to JDO. So I need some verification on my program design.
    When creating a new Persistence Object I'm using a 'Builder' design pattern
    to check the database for an object that equals the new objects bean
    parameters(Via a JDOQL query). If it finds a matching one it loads it
    otherwise it creates a new instance.
    This way I have common objects between Persistence Object graphs. And there
    is not repeated common objects in the database.
    Is there a better way?
    regards
    Graham Cruickshanks

    // Doesn't workWhat does not work? What error do you get?
    You need to use "join" to define a join.
    CriteriaQuery<Competence> cq = cb.createQuery(Competence.class);
    Root<Competence> competence = cq.from(Competence.class);
    Join<CompetenceName> name = competence.join(Competence_.competenceNames);
    cq.orderBy(cb.asc(name.get(CompetenceName_.name));
    The "fetch" will do a fetch join, if you also wish to load the data in the same query.
    James : http://www.eclipselink.org

  • Transferring object graph over RMI

    Hi all,
    I'm designing a client-server thingy, and am intending it to communicate over RMI. I'm currently designing a filter mechanism to let the client see a certain subset of the state (essentially an object graph), manipulate this, and transfer updates of it back to the server, which then are propagated to the other clients and so on.
    Any tips and tricks to take into account when transfering interconnected objects over RMI? (They don't need remove references, apart from the state transfer process, all local references are sufficient.) Also, I'd like to not transfer the entire "graph", only updates to it as they happen.
    I have a couple of ideas, I'd just like to hear your input before I dwelve more into the mechanics of them..
    Thanks!
    /C

    Go for it.
    Just think clearly about where the objects exist, and what get's transferred:
    o What objects are on the clients?.
    o What is a shared remote object?
    o What objects get passed from client to server? What objects are returned to clients?

  • Is there any need to create schema in unvierse designer of business objects

    HI this is sridhar
    is there any need to create schema in unvierse designer of business objects xi r2,  when i integrated sap bi data into business objects,i,e i have fetched sap-bi/bw data to business objects universe
    please help me

    I don't see what is wrong with
    <jsp:useBean id="tabsConfigurator" class="com.mypackage.TabLayoutConfiguratorImpl"/>
    The class has a no-args constructor at least. The useBean tag will work with it. Probably.
    But still, some code just can't be translated into scriptless JSTL.
    Calling methods which take parameters is one of those things.
    In this case you probably want to write a custom tag to work with your tabs
    I would probably look at using custom tags like this:
    <%@ taglib prefix="tab" uri="/WEB-INF/TabLayout.tld"%>
    // tab to create the configurator.
    // either export it as a var, or use other tags only nested within this one
    // so you can get access to the configurator.
    <tab:configure var="configurator">
      <tab:render configurator="${configurator}" tab="${tab}">
    </tab:configure>I don't know exactly what the scriptlet code will be doing. But I think a custom taglib would be the only way to eliminate scriptlet code that you have here.

  • Code 91 - Caused Error: (Object variable or With block variable not set)

    Hi,
    We are using FDM 9.3.1. We have enabled batch processing.
    We are having following process being followed
    - Batch Loader script will pull the data from dwh table for each entity, scenario, year and period
    - Batch processing is set to serial and processlevel set to Up-To-Check
    - We had following five files created for Location - EMAFF100
    i. 1_EMAFF100_ACT_May-2011_RR.txt
    ii. 1_EMAFF100_ACT_Jun-2011_RR.txt
    iii. 1_EMAFF100_ACT_Jul-2011_RR.txt
    iv. 1_EMAFF100_ACT_Aug-2011_RR.txt
    v. 1_EMAFF100_ACT_Sep-2011_RR.txt
    Batch loader process completed the processing for May - 2011, Jul - 2011, Aug-2011, Sep-2011.
    But for Jun 2011 it has given the following error in the 'tbatchinformation' table and failed at import stage.
    40751.6239236111 1_EMAFF100_ACT_JUN-2011_RR.TXT 2 2 91-Object variable or With block variable not set
    When we checked the view error log from tool menu we found following
    ** Begin FDM Runtime Error Log Entry [2011-07-27-14:58:29] **
    ERROR:
    Code......................................... 91
    Description.................................. File [1_EMAFF100_ACT_Jun-2011_RR.txt] Caused Error: (Object variable or With block variable not set)
    Procedure.................................... clsBatchLoader.mFileCollectionProcess
    Component.................................... upsWBatchLoaderDM
    Version...................................... 931
    Thread....................................... 5600
    IDENTIFICATION:
    User......................................... ncreighton
    Computer Name................................ HYAPSDEV1
    App Name..................................... EMATTEST
    Client App................................... WebClient
    CONNECTION:
    Provider..................................... ORAOLEDB.ORACLE
    Data Server..................................
    Database Name................................ hydev_serv
    Trusted Connect.............................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location..................................... EMAFF100
    Location ID.................................. 762
    Location Seg................................. 16
    Category..................................... ACT
    Category ID.................................. 13
    Period....................................... Jun - 2011
    Period ID.................................... 30/06/2011
    POV Local.................................... False
    Language..................................... 1033
    User Level................................... 1
    All Partitions............................... False
    Is Auditor................................... False
    We then re submitted data for Jun period and saw batch process got successfully completed and June data got imported successfully and also rest other processes got through.
    Can any one provide exact cause for this error? As we have automated the data load from DWH to FDM And then to HFM. Hence when such error comes it disturbs lot of processing there on. Appreciate your early response.
    Thanks in advance.

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Finding the Text of SQL Query causing Full Table Scans

    Hi,
    does anyone have a sql script, that shows the complete sql text of queries that have caused a full table scan?
    Please also let me know as to how soon this script needs to be run, in the sense does it work only while the query is running or would it work once it completes (if so is there a valid duration, such as until next restart, etc.)
    Your help is appreciated.
    Thx,
    Mayuran

    Finding the Text of SQL Query Causing Full Table Scan

  • Bug in Java objects not serializable

    I plan to use the latest version TopLink 10.1.3.1.0 with Oracle Database 10g (10.2.x).
    Do I still have to use the “Type Conversion” mapping as I had to do in order to address the reported non-serializable bug exiting in TopLink (9.0.4.5). See the link for the bug description:
    http://www.oracle.com/technology/documentation/1012_solaris/relnotes.1012/relnotes/toplink.htm#CEGEBDEG
    My Java object instance variable is defined as java.sql.Timestamp and the corresponding data type on the Oracle DB is defined as TIMESTAMP(6). Can I use the direct-to-field mapping from now on with new TopLink 10.1.3.1.0 without the serializable issue? If I still have to use the Type Conversion mapping, please help provide some detail about the mapping.
    Many thanks for any help.

    From what I can understand from your reply, I can use the direct-to-field mapping for Java class attribute of java.sql.Timestamp to the Oracle DB 10.2.x data type of TIMESTAMP(6) without any issue of not serializable. Please confirm. Many thanks!
    By the way, I am having the same issue (Java objects not serializable) with Oracle DB 10.1.x when I use the direct-to-field mapping. It seems to me that this is more than the Oracle 9i JDBC driver.
    If I have to do this with TopLink 10.1.3.1.0 + Oracle 10.2.x, I plan to use the Type Conversion with:
    Java class attribute: java.sql.Timestamp
    DB data type: oracle.sql.TIMESTAMP
    Is this the proper way to do it? Please confirm.

  • Saving object graph containing transient-new and attached objects

    Problem
    We have simple FK relationship A->B relationship and create inside the transaction (service façade method) a new instance of A:
    A a = new A().
    Later in the same transaction we read independent instance of B from DB and put it in the ralationship with A:
    a.setB(b);
    Afterthat (in the same transaction) we want to save the object graphstarting with instance ‘a’. We do it with
    pm.attachCopy(a);
    We get an Exception:
    <4|false|4.0.0EA5> kodo.util.UserException:
    The instance "mypackage.A-pypackage.A-14638" is already managed.
    FailedObject: mypackage.A - mypackage.A -14638 at kodo.jdo.PersistenceManagerImpl.processArgument(PersistenceManagerImpl.java:1259)
    Known solution
    Detach the instance ‘b’ before calling pm.attachCopy(a);
    We could achieve this for example using Autodetach=commit and puting read and save operations in separate transactional methods (façade calls).
    This solution is unsatifying, because we want to be able to manipulate object graph inside the transaction without caring explicitly about attach/detach semantic.
    Question
    We habe an heterogeneous object graph consisting of attached, detached and transient-new objects. How can we make the graph persistent with one API call on the roor object ?
    Which mapping settings have to be done ? How KODO decides which object is ‘new’ and shhould be inserted and which obejct has to be updated ?

    Denis,
    Even the makePersistent (...) call is redundant but not harmful as long
    as the instance is managed (and not detached).
    Denis Sukhoroslov wrote:
    Hi Andre,
    Not clear, why do you call pm.attachCopy(a) at all. I haven't worked with
    kodo 4.0 yet, but in 3.4.0 you just need to call pm.makePersistent(a). In
    the same way you can persist whole object graph, AFAIK.
    Denis.
    "Andre Teshler" <[email protected]> wrote in message
    news:[email protected]..
    Problem
    We have simple FK relationship A->B relationship and create inside the
    transaction (service fa??ade method) a new instance of A:
    A a = new A().
    Later in the same transaction we read independent instance of B from DB
    and put it in the ralationship with A:
    a.setB(b);
    Afterthat (in the same transaction) we want to save the object
    graphstarting with instance ???a???. We do it with
    pm.attachCopy(a);
    We get an Exception:
    <4|false|4.0.0EA5> kodo.util.UserException:
    The instance "mypackage.A-pypackage.A-14638" is already managed.
    FailedObject: mypackage.A - mypackage.A -14638 at
    kodo.jdo.PersistenceManagerImpl.processArgument(PersistenceManagerImpl.java:1259)
    Known solution
    Detach the instance ???b??? before calling pm.attachCopy(a);
    We could achieve this for example using Autodetach=commit and puting read
    and save operations in separate transactional methods (fa??ade calls).
    This solution is unsatifying, because we want to be able to manipulate
    object graph inside the transaction without caring explicitly about
    attach/detach semantic.
    Question
    We habe an heterogeneous object graph consisting of attached, detached and
    transient-new objects. How can we make the graph persistent with one API
    call on the roor object ?
    Which mapping settings have to be done ? How KODO decides which object is
    ???new??? and shhould be inserted and which obejct has to be updated ?

  • User Profile Services - need-full-object

    During a Delta import over the past 5-6 days there has been one discovery error with a "need-full-object" as the error code. Now when looking at the user profile in sharepoint I see the user and all custom fields. However it is flagging daily. 
    We do a one way synchronization (AD-> SharePoint)  Is the only way to resolve this to run a Full Synchronization? Or is there a process to "fix" the one error that is popping up?  We get flow errors with "exported-change-not-reimported"
    fairly frequently but they appear to clean up after the next import, this is the first time I have seen an error stick around for any amount of time
    Thank you for any responses!
    Jay

    See http://msdn.microsoft.com/en-us/library/windows/desktop/ms696564(v=vs.100).aspx, there should be some additional info about this object in miisclient.exe, but you're probably going to need to run a Full Sync.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Restrict printing a report on physical paper

    HI All I am generating online report from my Forms 10g application in the web browser in PDF format. Now I want to restrict the user to take print of that report on physical paper based some application restrictions. How do I achieve this? Thanking Y

  • How do I sync my iPod to my new PC?

    My old PC died before I had the chance to export my iTunes Library, I got a new PC which I have authorised on the Apple site. I downloaded iTunes on to the new PC but when I connect my iPod Classic nothing happens. How do I sync my iPod to my new PC

  • I lost my iPad mini how can I find it?

    I lost my iPad mini how can I find it?

  • VO OK in JClient but not in AM tester: Missing IN or OUT?

    Hi, JDEv 10.1.2. I have a ViewObject with bind variables that I set at the beginning of the ViewObjectImpl.executeQuery() method. In my jClient application I get no error but in AM tester it shows: oracle.jbo.SQLStmtException: JBO-27122: SQL error du

  • To solve the sound problem

    i have problem in my computer ,cause this get very slow after open 2 or 3 works