ValueHolder vs. Proxy Indirection

Hi all,
We have a new project and we must decide what kind of indirection we'll use. I analyzed both indirection types, and noticed that ValueHolder is simpler but kind of 'pollutes' the code, OTOH proxy indirection is transparent but it needs to have interfaces for each indirection class. I don't know if we choose the elegant and transparent proxy indirection, or the simplicity of ValueHolder indirection.
What do you use? Why not use Proxy? Why not use ValueHolder?
Should I mix ValueHolder and Proxy Indirection?
Thanks,
Henrique Viecili

Henrique,
Either option is functional and both illustrate the challenges of transparent 1:1 indirection in Java. In order to truly make these lazy load relationships transparent you must do one of the following:
1 - Introduce a proxy class (value holder)
2 - Use Java's dynamic proxy
3 - use byte-code weaving/enhancement (ASM, BCEL, CGLIB, ...)
Going forward, starting with TopLink JPA, we are offering dynamic byte code weaving. This involves the classes having the proxy introduced when the persistent class is loaded. This is the best way as it does not require any additional proxy class or interfaces in your model and does not add any additional compile/build steps to development.
In the current releases of Oracle TopLink I would recommend using the ValueHolder approach for 1:1 as a private field and then wrap it in get/set methods that provide access to only the real related object type. Using this pattern you can more easily move to our dynamic weaving solution without the ValueHolder with the least amount of change.
Proxy indirection does have some performance impact.
Doug

Similar Messages

  • ValueHolder/Proxy indirection regarding UPDATE set null and DELETE

    In our first implementation we were using ValueHolder indirection for 1-1 indirect relationships. For our entities to be portable, we changed our 1-1 relationships to use proxy indirection. Lazy loading works fine, but now when we delete an entity targeted by a NON NULLABE FK we get this error:
    javax.faces.el.EvaluationException: java.lang.RuntimeException: com.taleo.akira.transaction.RollBackException: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.1) (Build 040128)): oracle.toplink.exceptions.DatabaseException
    Exception Description: java.sql.SQLException: ORA-01407: cannot update ("GISD_TSG100"."POLICYSTATEMENT"."POLICYCONTEXTNO") to NULL
    I tried to always create the ProxyIndirectionHandler when we set a new value, to update the inner value of the ProxyIndirectionHandler created by TopLink, to just set the value as is without proxying, to call hashCode() on the old value to ensure that it is loaded, but nothing works. Do I miss something? Is it fixed in a later release? (Unfortunately we can't update TopLink for now) Thanks for your help, Yannick

    Sorry, I made a mistake in my explanation. In our framework, we manage bidirectionnality. To be able to delete an entity, we must remove all references to it. The problem occurs when the entity to delete has a bidirectionnal relation. With ValueHolder indirection, TopLink detects that the entity will be deleted and doesn't update the to NULL. It just executes the DELETE statement. Using proxy indirection, it executes the UPDATE statement to update the FK to NULL and then DELETE the entity. When FK are not nullable, an exception is thrown. Even if we change our FK to be all nullables, it will execute the UPDATE statement which is not good performance wise. Do you think of a solution? Thanks, Yannick

  • TopLink Proxy Indirection problem when comitting uow

    We are trying to introduce the use of TopLink proxy indirection into our object model.
    We have run into situations where the uow cannot be committed because proxy indirection is being encountered.
    (See the stack trace provided below).
    What do we need to be aware of and what actions should we take to make it over this hurdle?
    Would ValueHolder cause the same problem, or would TopLink be better able to handle ValueHolder indirection than Proxy Indirection?
    Thanks for any help/hints guidance you can provide.
    2004.09.21 06:09:51.406--UnitOfWork(2820596)--Thread[ExecuteThread: '12' for queue: 'default',5,Thread Group for Queue: 'default']--Before JTS Completion
    2004.09.21 06:09:51.437--UnitOfWork(2820596)--Thread[ExecuteThread: '12' for queue: 'default',5,Thread Group for Queue: 'default']--Exception [TOPLINK-7009] (OracleAS TopLink - 10g (9.0.4.1) (Build 040128)): oracle.toplink.exceptions.ValidationException
    Exception Description: Missing descriptor for [$Proxy98]. Verify that the descriptor has been properly registered with the Session.Local Exception Stack:
    Exception [TOPLINK-7009] (OracleAS TopLink - 10g (9.0.4.1) (Build 040128)): oracle.toplink.exceptions.ValidationException
    Exception Description: Missing descriptor for [$Proxy98]. Verify that the descriptor has been properly registered with the Session.
         at oracle.toplink.exceptions.ValidationException.missingDescriptor(ValidationException.java:599)
         at oracle.toplink.internal.descriptors.DescriptorIterator.getDescriptorFor(DescriptorIterator.java:86)
         at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferenceObjectForMapping(DescriptorIterator.java:242)
         at oracle.toplink.mappings.ObjectReferenceMapping.iterateOnRealAttributeValue(ObjectReferenceMapping.java:267)
         at oracle.toplink.internal.indirection.IndirectionPolicy.iterateOnAttributeValue(IndirectionPolicy.java:186)
         at oracle.toplink.mappings.ForeignReferenceMapping.iterate(ForeignReferenceMapping.java:503)
         at oracle.toplink.internal.descriptors.ObjectBuilder.iterate(ObjectBuilder.java:1436)
         at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferenceObjects(DescriptorIterator.java:258)
         at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferenceObjectForMapping(DescriptorIterator.java:250)
         at oracle.toplink.mappings.ObjectReferenceMapping.iterateOnRealAttributeValue(ObjectReferenceMapping.java:267)
         at oracle.toplink.internal.indirection.IndirectionPolicy.iterateOnAttributeValue(IndirectionPolicy.java:186)
         at oracle.toplink.mappings.ForeignReferenceMapping.iterate(ForeignReferenceMapping.java:503)
         at oracle.toplink.internal.descriptors.ObjectBuilder.iterate(ObjectBuilder.java:1436)
         at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferenceObjects(DescriptorIterator.java:258)
         at oracle.toplink.internal.descriptors.DescriptorIterator.startIterationOn(DescriptorIterator.java:407)
         at oracle.toplink.publicinterface.UnitOfWork.discoverUnregisteredNewObjects(UnitOfWork.java:1361)
         at oracle.toplink.publicinterface.UnitOfWork.discoverAllUnregisteredNewObjects(UnitOfWork.java:1283)
         at oracle.toplink.publicinterface.UnitOfWork.assignSequenceNumbers(UnitOfWork.java:325)
         at oracle.toplink.publicinterface.UnitOfWork.collectAndPrepareObjectsForCommit(UnitOfWork.java:659)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1123)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2465)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:151)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:540)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:92)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1044)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1581)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:237)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:208)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:282)

    Hello,
    Could you tell me a little more about what you are trying to do? From the stacktrace it appears that TopLink is searching for all new objects and finding a proxy, and doesn't know that it is uninstantiated.
    Could you show me the piece of code where your unit of work registers and commits this object?

  • Specific changes are left undetected when using proxy indirection

    Hello!
    Recently, the following issue have been identified:
    ObjectReferenceMapping together with ProxyIndirectionPolicy and *UnitOfWorkValueHolder fails to identify specific changes - setting a reference to 'null' when the attribute's value was not instantiated previously.
    Detailed description:
    Consider we have 2 objects: A and B, and A has OneToOneMapping to B and uses ProxyIndirection.
    In initial moment we have A1 that references B1 in DB.
    Then we register A1 for modification. What we have in memory in UnitOfWork? Something like the following:
    A1(Clone) with attribute for B reference uninstantiated;
    A1(Backup) with <null> reference for B, as the attribute is expected to be retrieved when we access B from A1(Clone).
    Then we set reference in A1(Clone) for B to <null>.
    This change then will not be identified during commit phase, because of the result of getAttributeValueFromObject both for B reference in A1(Clone) and A1(Backup) is <null>. This part is clearly visible from the ObjectReferenceMapping.compareForChange method code:
    if ( !owner.isNew() ) {
    backUpAttribute = getAttributeValueFromObject(backUp);
    if ( (backUpAttribute == null) && (cloneAttribute == null) ) {
    return null;
    Accessing the B field in A1(Clone) fixes the problem, because in this case backUpAttribute value is initialized through *UnitOfWorkValueHolder.
    So it seems the part should be reworked to handle such cases, it seems reasonable that fields in backup clones that are using proxy indirection should be initialized even if not accessed to contain all required information to allow correct comparision in such cases.
    Can somebody from TopLink team comment this?
    Thanks,
    Sergey

    This does appear to be an issue. I will log this problem internally, you may want to follow it up with support.
    A work around is to instantiate the proxy in your set methods.
    i.e.
    public void setAddress(Address newAddress) {
    if (this.address != null) {
    this.address.hashCode();
    this.address = newAddress;
    }

  • Understanding proxy indirection for one-to-one mappings

    The developer's guide states the following for proxy indirection:
    To use proxy indirection, your domain model must satisfy all of the following criteria:
    ** The target class of the one-to-one relationship must implement a public interface.
    ** The one-to-one attribute on the source class must be of the interface type.
    ** If you employ method accessing ("Configuring Method Accessing"), then the getter and setter methods must use the interface.
    My current descriptors all have get/set methods for their attributes. So does this mean that I need to create an interface for each descriptor that has corresponding get/set methods?
    If so, this seems to add a little overhead to maintaining the descriptors. Anytime an attribute is added, removed or modified in a way that would change the method signature; the interface must also be updated to reflect the change. Is there any way to avoid this overhead?

    The recommended approach for lazy loading one to ones is generally to use ValueHolders.
    Proxy indirection is a solution for lazy loading one to ones, not requiring TopLink classes (i.e. ValueHolders) to be imported and referenced in the Domain model. It also doesn't require code generation, or static byte code enhancement.
    In both solutions (regular ValueHolders or Proxy Indirection), TopLink needs to build the Domain objects with empty Place Holders. When the place holder is accessed, addition SQL and Object Building occurs. Coding to an interface in Proxy Indirection allows for the 'place holders' to be used under the interface without the user directly referencing ValueHolders. Without this interface TopLink couldn't do this. Proxy Indirection is not a perfect solution however.
    Using TopLink's JPA support (10.1.3 in preview mode, or 10.1.3.1) ValueHolders are dynamically put into the byte codes of the classes at runtime, allowing the user to have lazy loading without proxy indirection or putting ValueHolders in the Object model.
    Peter

  • Best practices for Indirection implementation?

    Hi, I'm about to start trying out several aspects of indirection in Toplink. My question is; what are best practices to implement this feature?
    To me, it looks like proxy indirection is the cleanest way to do this, I'm not sure however whether there are any restrictions to it - besides the necessity for an interface for each domain class. My goal is to keep the amount of Toplink code 'clutter' in my domain model as low as possible.
    Thanks.

    Although proxy indirection is nice for 1:1 as it reduces the 'clutter' there may be a performance hit. It really depends upon your JDK.
    Personally I prefer to use ValueHolder for 1:1 and transparent collection indirection for my collection mappings. The attribute that you make a ValueHolder is private and the API of your class does not need to expose its existence in any way. I find this best as I do not need to manage an additional interface and keep its API in sync.
    In the very near future you will be able to use our EJB 3.0 implementation that leverage AOP style weaving to dynamically enhance your mapped classes during loading. This will allow you to have 1:1 indirection without the interface or ValueHolder. Since changing the type of the attribute and the implementation of the get/set method is probably less intrusive then factoring our an unecessary interface to your future migration I would stick with the ValueHolder for now.
    Doug

  • Transparent Persistence with TopLink?

    I had the impression that TopLink allowed for 'transparent' persistence. I would expect, therefore, that I would be able to make persistent objects that have no reference to any TopLink classes/interfaces. The only reference to 'transparent' that I see in the documentation so far is for 'transparent indirection', which is not what I'm looking for.
    Does TopLink support fully transparent persistence in this manner, and if so, where could I find documentation about this?
    Thanks!

    John,
    Unfortunately this information is not concisely spelled out in our current documentation. The upcoming 9.0.4 documentation should address this deficiency by describing the modeling and requirements of your object model.
    TopLink has always strived to be non-intrusive into the application's persistent model and it is completely possible to build a functional model that does not have ANY TopLink code in it.
    The only commonly used performance optimization that may result in TopLink being intrusive into the object model is indirection on 1:1 relationships. For the collection relationships TopLink offers the transparent indirection that you found described in the documentation.
    Unfortunately for 1:1 relationships it is not possible to be completely transparent without some sort of enhancements to your class (at present). TopLink's solutions to this are to provide proxy indirection, where you use an interface between the source and the target class (but still require no TopLink knowledge in the model) or you can use TopLink's ValueHolder interface to implement a simple proxy pattern.
    So the short story is yes, TopLink can be completely transparent and non-intrusive ... but for the performance benefits of lazy loading on 1:1 relationships you must use proxy of value-holder indirection internally within your persistent model.
    I hope this clarifies things for you,
    Doug

  • UseProxyIndirection() and Breaking Relationships

    I am encountering a problem when using proxy indirection on a one to one mapping. I set up proxy indirection by calling useProxyIndirection() on the mapping at run time. I am not using the ValueHolderInterface.
    I have two objects related by a one to one mapping, object A and object B. Object A contains a reference to object B. I wish to break the relationship between the two objects. I do this by setting object A's reference to null.
    If proxy indirection is not used the database field is set to null and the relationship is broken. However if I call useProxyIndirection() on the mapping the database field is not updated and the relationship remains.
    Is there a certain method or technique that must be used to break a relationship when using proxy indirection?
    Any suggestions are appreciated.

    Setting the relationship to null should work for proxy indirection. Check that you are using the latest TopLink version, or contact support to report this problem. You might also want to try first accessing the relationship before setting the value to null.
    In general I would suggest usage of value-holders over proxy indirection.

  • Understanding ValueHolder Indirection

    Hello Everyone:
    I have a question regarding ValueHolder Indirection. I have encountered a situation for which I cannot adequately explain the outcome.
    Consider that I have an object named A for which the optimistic locking policy is set to version locking. A has attributes B, C, and D that are declared as type ValueHolderInterface. All objects map to different database tables. In Toplink, the descriptor for object A has one-to-one mappings for each of the attributes B, C, and D and each object is set to use indirection.
    In my code, I register object A and set new instances of B, C, and D in object A. Entries in the database are being properly created for these three objects, but the version is not being updated for object A. How does utilizing ValueHolder Indirection affect the setting of the version number? When I set an attribute that is a direct-to-field mapping, the version is updated. Am I missing something? I would think that the parent object A would be updated when B, C, and D are set.
    Any insight would be appreciated.
    Thanks.

    Hello,
    This happens regardless of Indirection being involved. The way versioning works is that it only gets updated if a field in A's table requires an update. This is a performance enhancement so that if something in A changes, the version is not automatically incremented to avoid forcing an unneccessary update to the A table. This has the bigest impact in 1:M and M:M mappings, where say adding a new object to a collection really does not require a change to the parent object. In these cases, you can force the version field update using the uow.forceUpdateToVersionField(object,true) api.
    It can also happen in bi-directional 1:1s, on the side of the relationship that is set as the target foreign key. For example, if A has a 1:1 to B, but the foreign key is in the B table, changing the A->B relationship does not result in an update (as A does not own the foreign key). The foreign key is only affected from the B side, and needs to be mapped as either a 1:1 or a DirectToFieldMapping.
    Hope this helps,
    Chris

  • ValueHolder Indirection and TopLink Cache

    We have a parent object A (main table) and child object B (a lookup table), mapped thought ValueHolder Indirection.
    We use ReadAllQuery to build SQL and retrieve object A(s), and associated B(s).
    The query result is used to populate a web page table.
    The problem is that when the table is populated, the exact same lookup query against object B is repeated without checking cache. That data field is populated by object_A.object_b.description. For example, below same query would be repeated many times when loading up the web page table:
    Select description_id, description from Table_B where description_id = 1
    Why the query generated by this Indirection not checking cache? Anyway to force it to check TopLink cache first before querying against database?
    Thanks for any help!
    Jeffrey

    Thanks for the reply.
    We use JDeveloper 10.1.3.2. TopLink map in JDev is used to map all table objects and their relationships. So In TopLink map, object(table) A has a ValueHolder object(table) B through indirection. The primary key of B is: description_id, which is used in the table reference mapping.
    We use the default TopLink settings in JDev, so object B has below settings in TopLink map:
    Identity Map: FullIdentityMap
    Size: 50 (there are only about 20 records in this lookup table)
    Existence Checking: Check Cache
    We don't have any other caching mechanism other than TopLink's. EJB 3.0 is used as service bean, and External Transaction Controller (OC4J) is used.
    How to check if B is already in the TopLink cache? I heard ReadAllQuery always goes to database w/o checking TopLink cache, but in the case, the query generated by lazy loading indirection is after the ReadAllQuery execution (when the web page table is loading up).
    Jeffrey

  • Using ValueHolder Indirection With Method Accessing

    I am trying to use method getters/setters with value indirection member as described in the documentation
    (http://download-east.oracle.com/docs/cd/B31017_01/web.1013/b28218/mapcfg.htm#CEGFHCJF).
    My code modifies the mapping with the following lines:
    SessionFactory sf= LocatorLocator.getPersistence().getSessionFactory();
    Session s= sf.acquireUnitOfWork();
    ClassDescriptor d= (ClassDescriptor)s.getDescriptors().get(CharterBusTripLeg.class);
    DatabaseMapping m= d.getMappingForAttributeName("scheduledStartingLocation");
    m.setGetMethodName("getScheduledStartingLocationHolder");
    m.setSetMethodName("setScheduledStartingLocationHolder(oracle.toplink.indirection.ValueHolderInterface)");
    The CharterBusTripLeg class has the following members:
    private ValueHolderInterface scheduledStartingLocation;
    public Location getScheduledStartingLocation();
    public void setScheduledStartingLocation(Location scheduledStartingLocation);
    public ValueHolderInterface getScheduledStartingLocationHolder();
    public void getScheduledStartingLocationHolder(ValueHolderInterface scheduledStartingLocationHolder);
    When I try to restore an instance of CharterBusTripLeg, I get the following Exception:
    java.lang.NullPointerException
         at oracle.toplink.internal.security.PrivilegedAccessController.getMethodParameterTypes(PrivilegedAccessController.java:394)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getSetMethodParameterType(MethodAttributeAccessor.java:86)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(MethodAttributeAccessor.java:152)
         at oracle.toplink.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1119)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1022)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:244)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:525)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:381)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:677)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(DatabaseQueryMechanism.java:142)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:483)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:811)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2073)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:988)
         at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:62)
         at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:55)
         at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:148)
         at oracle.toplink.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:217)
         at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:61)
         at oracle.toplink.indirection.IndirectList.buildDelegate(IndirectList.java:202)
         at oracle.toplink.indirection.IndirectList.getDelegate(IndirectList.java:359)
         at oracle.toplink.indirection.IndirectList.size(IndirectList.java:703)
         at test.com.laidlaw.les.charter.charter.DeleteBusTest.checkLegs(DeleteBusTest.java:55)
         at test.com.laidlaw.les.charter.charter.DeleteBusTest.testAddBus(DeleteBusTest.java:79)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    Any suggestions as to what I am doing wrong?
    thanks,
    chas

    Chas,
    You only need to set the method name without parameters.
    m.setSetMethodName("setScheduledStartingLocationHolder");Since these methods will typically only be used by TopLink you can make them protected or private.
    Doug

  • Error creating a web service standalone proxy

    Hi all,
    I'm new with Sap Netweaver Developer Studio (SNDS), so sorry if the question is too easy.
    I wuold create a stand alone proxy for a web service created by a function module in R3.
    I follow the help of SNDS but the project doesn't compile. The error is
    This compilation unit indirectly references the missing type com.sap.engine.lib.xml.parser.tokenizer.XMLTokenReader (typically some required class file is referencing a type outside the classpath)     ZhrWsStrAnagInd2.java     AnagIndStandAloneProxy/src/com/capitalia/webservice/anagind/types/p1     line 0
    Where I can find this package? or the problem is another?
    thanks for any help,
    enzo

    Hi Enzo,
    Add <Install folder of Netweaver developer Studio>\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\xml\_comp\gen\default\public\def\lib\java\sapxmltoolkit.jar to classpath of your project (hope you know how to do it).
    Best regards, Maksim Rashchynski.

  • Cannot generate proxy

    Does anyone have an idea if the WSDL is wrong or if it's an XI problem?
    thanks
    Johann Marty
    TeamWork Management SA
    Geneva
    Cannot generate proxy (object  missing in WSDL, see long text)
    Message no. SPRX084
    Background
    During proxy generation, an interface description in WSDL format is fetched from the Integration Builder or another source and interpreted. This WSDL document must describe the whole interface correctly.
    ==> Display WSDL Document
    Diagnosis
    In the WSDL document, the object
       "<message name="existDocument"> <part name="invo..."
    from the namespace
      "http://tempuri.org/"
    links to the object
    from the namespace
    However, this last object does not exist in the WSDL document.
    System response
    ABAP proxy generation expects that all directly and indirectly referenced objects are in the WSDL document. Therefore, no proxy can be generated for this WSDL and the system displays an error message.
    Procedure
    This situation can have different causes:
    Object "" not been defined
    Object "" saved in the wrong namespace
    In the reference to object "", the wrong name was specified
    In the reference to object "", the wrong namespace "" was specified
    Internal error in the service that constructs the WSDL document
    Internal error in ABAP proxy generation

    Hi,
    Just cross check with your configuration details.
    Also try to recreate the proxy and activate it.-
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Regards,
    Moorthy

  • 1 to 1 Mapping using Indirection is causing a StackOverflowError exception

    I am trying to map a database column that contains a BLOB (i.e. PDF) to a persistent object's attribute that will contain the BLOB as a "1 to 1 mapping" utilizing "Indirection".
    The type of the persistent object's attribute is ValueHolderInterface and it is initialized as ValueHolder in the object's constructor.
    The column that contains the BLOB is not a primary key therefore in the "Table Reference" tab of the TopLink Workbench I use the database table's primary key for the "Source Field" and "Target Field".
    The mapping seems find until I test the code. When the code is executed a java.lang.StackOverflowError exception is thrown in the following method ServerSession(DatabaseSession).initializeDescriptors(Hashtable).
    In this scenario I am using "indirection" for obvious reasons. I want to have the ability to retrieve all the data in the row(s) except the PDF(s) so I can build a list for the user to choose from. If the user makes a selection I want to then go and retrieve the PDF via the persistent object's get/set methods that utilize the ValueHolder's interface methods getValue/setValue.
    Does anyone have any idea why this exception is being thrown and anyway to fix it? ANY help would be greatly appreciated. I included the stack trace below.
    The IDE our company is using at the moment is IBM's VisualAge for Java 4.0....don't ask.
    Debugger Stack Trace Report:
    Thread[P=359251:O=0:CT,5,main] (Alive)
    Uncaught exception (java.lang.StackOverflowError)
         ServerSession(DatabaseSession).initializeDescriptors(Hashtable)
              this=(oracle.toplink.threetier.ServerSession) ServerSession(
         DatabaseAccessor(connected)
         OraclePlatform)
              arg_1=(java.util.Hashtable) {class com.nwprov.provconnect.qss.domain.QssStatementTypes=Descriptor(com.nwprov.provconnect.qss.domain.QssStatementTypes --&gt; [DatabaseTable(QSS_STATEMENT_TYPES)]), class com.nwprov.provconnect.qss.domain.QssTransactionTypes=Descriptor(com.nwprov.provconnect.qss.domain.QssTransactionTypes --&gt; [DatabaseTable(QSS_TRANSACTION_TYPES)]), class com.nwprov.provconnect.qss.domain.QssTransactions=Descriptor(com.nwprov.provconnect.qss.domain.QssTransactions --&gt; [DatabaseTable(QSS_TRANSACTIONS)]), class com.nwprov.provconnect.qss.domain.QssPolicyStatements=Descriptor(com.nwprov.provconnect.qss.domain.QssPolicyStatements --&gt; [DatabaseTable(QSS_POLICY_STATEMENTS)]), class com.nwprov.provconnect.qss.domain.QssSubaccountPerformance=Descriptor(com.nwprov.provconnect.qss.domain.QssSubaccountPerformance --&gt; [DatabaseTable(QSS_SUBACCOUNT_PERFORMANCE)])}
         ServerSession(DatabaseSession).initializeDescriptors()
              this=(oracle.toplink.threetier.ServerSession) ServerSession(
         DatabaseAccessor(connected)
         OraclePlatform)
         ServerSession(DatabaseSession).login()
              this=(oracle.toplink.threetier.ServerSession) ServerSession(
         DatabaseAccessor(connected)
         OraclePlatform)
         SessionManager.getSession(XMLLoader, String, ClassLoader, boolean, boolean)
              this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
              arg_1=(oracle.toplink.tools.sessionconfiguration.XMLLoader) oracle.toplink.tools.sessionconfiguration.XMLLoader@146c
              arg_2=(java.lang.String) qss
              arg_3=(java.lang.ClassLoader) sun.misc.Launcher$AppClassLoader@51e4
              arg_4=(boolean) true
              arg_5=(boolean) false
         SessionManager.getSession(XMLLoader, String, ClassLoader)
              this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
              arg_1=(oracle.toplink.tools.sessionconfiguration.XMLLoader) oracle.toplink.tools.sessionconfiguration.XMLLoader@146c
              arg_2=(java.lang.String) qss
              arg_3=(java.lang.ClassLoader) sun.misc.Launcher$AppClassLoader@51e4
         SessionManager.getSession(String)
              this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
              arg_1=(java.lang.String) qss
         SessionSingleton.initializeSession(String)
              this=(com.nwprov.toplink.SessionSingleton) com.nwprov.toplink.SessionSingleton@4e0
              projectName=(java.lang.String) qss
         SessionSingleton.getSession(String)
              this=(com.nwprov.toplink.SessionSingleton) com.nwprov.toplink.SessionSingleton@4e0
              projectName=(java.lang.String) qss
              serverSession=(oracle.toplink.threetier.ServerSession) null
         PerformancePdfRetriever(TopLinkPdfAccessor).queryForPdf(Expression)
              this=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
              topLinkExpression=(oracle.toplink.expressions.Expression)
    Logical operator AND
    Logical operator AND
    Relation operator =
    Query Key legacyProductCode
    Base QUERY OBJECT
    Constant 00001
    Relation operator =
    Query Key statementPerformanceDate
    Base QUERY OBJECT
    Constant 2003-07-01
    Relation operator =
    Query Key legacyCoCode
    Base QUERY OBJECT
    Constant 01
         PerformancePdfRetriever.getPdf(String, Date, String)
              this=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
              legacyProdCode=(java.lang.String) 00001
              stmntPrfmncDate=(java.sql.Date) 2003-07-01
              legacyCoCode=(java.lang.String) 01
              pdfTopLinkObject=(com.nwprov.provconnect.qss.domain.IPdf) com.nwprov.provconnect.qss.domain.QssSubaccountPerformance@28ea
              expression=(oracle.toplink.expressions.Expression)
    Logical operator AND
    Logical operator AND
    Relation operator =
    Query Key legacyProductCode
    Base QUERY OBJECT
    Constant 00001
    Relation operator =
    Query Key statementPerformanceDate
    Base QUERY OBJECT
    Constant 2003-07-01
    Relation operator =
    Query Key legacyCoCode
    Base QUERY OBJECT
    Constant 01
         Object.Doit()
              retrievePerformancePdfHelper=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
              legacyProdCode=(java.lang.String) 00001
              statementPerfDate=(java.sql.Date) 2003-07-01
              legacyCoCode=(java.lang.String) 01

    Hello Don,
    Let me preface by saying thanks for being a brave soul to assist with this.
    Is there anything in the output leading up to the exception? No. There isn't any other output because the part of the code that I am unit testing just performs the function of retrieving the BLOB (i.e. PDF) from the database. I used hard coded values for the multi-value primary key in the driver.
    Is there some sort of obvious recursive query going on? No, not from what I can tell.
    Stack overflows usually result from bi-directional relationships where caching is turned off. If this is the case, use a Weak cache.This is not a bi-directinal relationship so let me provide you with details that lead up to the stack overflow.
    Details:
    - An expression is built using the hard coded values for the primary key:
         Expression exp1 = builder.get(LEGACY_PRODUCT_CODE).equal(legacyProdCode);
         Expression exp2 = builder.get(STATEMENT_PERFORMANCE_DATE).equal(stmntPrfmncDate);
         Expression exp3 = builder.get(LEGACY_CO_CODE).equal(legacyCoCode);
         Expression finalExp = exp1.and(exp2);
         finalExpression = finalExpression.and(exp3);
    - Expression is being executed:
    Session session = SessionSingleton.getInstance().getSession(SESSION_NAME);
    Collection pdfTopLinkObjects = new Vector();
              pdfTopLinkObjects = session.readAllObjects(queryObject.getClass(), topLinkExpression);
    - Returned Collection is investigated & utilized for values using Iterator
    BTW, in my first post there was an error. Here is the correction:
    The column that contains the BLOB is not a primary key therefore in the "Table Reference" tab of the TopLink Workbench I tried both os these situations:
    1. Used the database table's primary key for the "Source Field" and "Target Field".
    2. Used the database table's column that stores the BLOB (i.e. PDF) for the "Source Field" and "Target Field".
    Am I using the write type of mapping for this? As stated before I am currently using "one to one with Indirection" or should I be using something else.
    Dan, is this enough info to help diagnose the problem? I hope so :-(

  • Cannot generate proxy (object missing in WSDL)

    Hi folks,
    Once again, my apology for this thread isn’t 100% XI forum related. But, continuing with this issue…
    As you can see on my earlier post
    Consuming an external web service with WAS 6.40
    I’m trying to consume an external web service. Following Michal’s suggestion I have checked the WSDL in debug mode and I found some irregularities on it. It seams this WSDL doesn’t describe the whole interface correctly. Looking to Diagnosis, I see an object <b>"<message name="listaCodSig0Request"> <part name..."</b> that is linked to an empty object, or either, doesn’t exist in the WSDL document!!!
    <i>“ABAP proxy generation expects that all directly and indirectly referenced objects are in the WSDL document. Therefore, no proxy can be generated for this WSDL and the system displays an error message.”</i>
    It seams that this web service was developed through messages with several parts. Searching in http://service.sap.com I found a document <u>XSDandWSDL_XI30SP11.xls</u> with supported XML schema and WSDL. In this doc I can see that messages with several parts are not supported!!!
    I would like to know how can I workaround this issue. Is it possible replace these elements<b> “part name= “</b> with other supported elements in the WSDL document and without changes on the web service? I’m asking this because this external web service are working well with other third party client applications and is not supposed perform any changes on that.
    I tried to replace <b>“part name= “</b> to <b>“part element= “</b>, but it doesn’t work! “Proxy generation terminated: WSDL error (object part without name)…
    Anyone knows which elements I should use in replace of these unsupported elements and which procedures I need to taking into account?
    Thanks in advance,
    Ricardo.

    Hey Ricardo,
    First of all, when I tried to save your wsdl in XMLSpy, it complained about the empty soapaction declaration in the <operation> tag. I had to remove the line
    <soap:operation soapAction="" style="rpc" />
    in order to make it work in XMLSpy. It would be a good idea to check that out with the developers of the wsdl.
    Anyway, after I removed that tag, I start comparing your wsdl to a common Message Interface wsdl generated by XI. By doing that, I have found out that the <part> element in XI has a name and also refers to an existing element, which was previously defined in the <schema> group.
    I've made some modifications, you could try it, but I have found an issue about this approach. With your wsdl, the soap request message has a <listaCodSig> tag with namespace "http://db_cml_alcor_mgb/Moradas_Edificios.xsd", and inside it, you have a <pDesignLocal> tag with no namespace defined.
    If you use the modificated wsdl below, both <listaCodSig> and <pDesignLocal> tags have namespace as "http://db_cml_alcor_mgb/Moradas_Edificios.xsd", and I think that'll cause issues in your server application. But you can try it out, playing with the wsdls, if you can remove the definition there.
    The modificated wsdl is below (changed parts in bold).
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Generated by the Oracle JDeveloper 10g Web Services WSDL Generator -->
    <!-- Date Created: Wed Nov 08 12:01:03 GMT 2006 -->
    <definitions
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://alcor.cm-lisboa.net:7777/CML-SRUs-context-root/Moradas_Edificios.wsdl"
    xmlns:ns1="http://db_cml_alcor_mgb/Moradas_Edificios.xsd"
    name="Moradas_Edificios"
    targetNamespace="http://alcor.cm-lisboa.net:7777/CML-SRUs-context-root/Moradas_Edificios.wsdl">
    <types>
    <schema
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    targetNamespace="http://db_cml_alcor_mgb/Moradas_Edificios.xsd">
    <b><element name="pDesignLocal" type="xsd:string"/>
    <element name="return" type="ns1:db_cml_alcor_mgb_TabMoradaEdif"/></b>
    <complexType name="db_cml_alcor_mgb_TabMoradaEdif"
    jdev:packageName="db_cml_alcor_mgb"
    xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="array"
    type="ns1:ArrayOfdb_cml_alcor_mgb_MoradaEdifUser"/>
    </all>
    </complexType>
    <complexType name="db_cml_alcor_mgb_MoradaEdifUser"
    jdev:packageName="db_cml_alcor_mgb"
    xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
    <all>
    <element name="codSig" type="string"/>
    <element name="desigLocal" type="string"/>
    <element name="codLocal" type="string"/>
    <element name="nrPol" type="string"/>
    <element name="nome" type="string"/>
    <element name="nrObraConstrucao" type="string"/>
    <element name="freguesia" type="string"/>
    <element name="areaGestao" type="string"/>
    </all>
    </complexType>
    <complexType name="ArrayOfdb_cml_alcor_mgb_MoradaEdifUser"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <complexContent>
    <restriction base="SOAP-ENC:Array">
    <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="ns1:db_cml_alcor_mgb_MoradaEdifUser[]"/>
    </restriction>
    </complexContent>
    </complexType>
    </schema>
    </types>
    <message name="listaCodSig0Request">
    <b><part name="pDesigLocal" element="ns1:pDesignLocal"/></b>
    </message>
    <message name="listaCodSig0Response">
    <b><part name="return" element="ns1:return"/></b>
    </message>
    <portType name="Moradas_EdificiosPortType">
    <operation name="listaCodSig">
    <input name="listaCodSig0Request" message="tns:listaCodSig0Request"/>
    <output name="listaCodSig0Response" message="tns:listaCodSig0Response"/>
    </operation>
    </portType>
    <binding name="Moradas_EdificiosBinding" type="tns:Moradas_EdificiosPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="listaCodSig">
    <input name="listaCodSig0Request">
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Moradas_Edificios"/>
    </input>
    <output name="listaCodSig0Response">
    <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="Moradas_Edificios"/>
    </output>
    </operation>
    </binding>
    <service name="Moradas_Edificios">
    <port name="Moradas_EdificiosPort" binding="tns:Moradas_EdificiosBinding">
    <soap:address location="http://alcor.cm-lisboa.net:7777/CML-SRUs-context-root/Moradas_Edificios"/>
    </port>
    </service>
    </definitions>
    Regards,
    Henrique.

Maybe you are looking for

  • Flash play

    Does Creative have any other flash mp3 players besides the one that is GB? I've had bad luck with players with hard dri'ves in them, because I always end up dropping them and thus killing the hard dri've. Or, is there another product I could use that

  • Ability to connect Audio Cable for Apple TV to Apple Speaker

    Can I connect my Apple TV XtremeMac XtremeHD Toslink Audio Cable for Apple TV to my external Apple Iphone speaker? There is only a single audio cable connection behind the speaker that normally goes from the Iphone. Is there some sort of adapter I ca

  • REG : HTTP Receiver Channel

    Hi All,           I have a scenario where my sender is a SAP system and receiver is a HTTP url. I need to post IDOC from SAP system to the URL .No mapping is required, but i need to send a mail with the status of HTTP POST (e.g. 200 for success, 401

  • OWB 11gR2 - ORA-01017/ RPE-01008

    OWB 11gR2 - ORA-01017/ RPE-01008 ======================================= I am using OWB 11gR2 (11.2.0.1) on Win XP 32 bit. We applied the suggested patches for our earlier issues. We changed our database passwords. We tested our locations via locatio

  • IC Remove views "Note History" and "Last Interactions"

    Hello Everyone, I've got a problem within the IC(Business Role IC_AGENT). On the Account Identification view there are two screens, the first screen shows the Note History and the second shows Last Interactions. I really would like to remove them fro