Is it necessary to initialize all ValueHolderInterface properties?
Hello,
I'm new to Toplink and there are a few point that are still a mistery to me, even though i've read so many articles and forum posts, etc. ValueHolderInterface and Method Accessing are the top examples...
Even though i don't really understand what they are and how they work, i read that usage of both are recommended, so'i'm using.
Now i find myself in front of the challenge of actually making use of them.
First thing is that this one-to-one mapping i have, i'm initializing this property like this:
myObj.setProperty(new ValueHolder(anotherObj));
Ok, this one seems to be alright, although i'm not quite sure it'll work for the application is generating an Exception when i commit();
First the Exception was saying that:
"The mapping for the attribute [someAttr] uses transparent indirection so the attribute...". this is all e.getMessage() is giving me...
Somewhere i read that this because some ValueHolderInterface property is not being initialized. So, once this property is supposed to be null, for now, i'm trying to initialize it with a null object:
myObj.setsomeCollection(new ArrayList());
And i repeated that to all my collections that are supposed to be null by now.
But my question is, do i really need to initialize all these properties like that? Isn't there a way to just ignoring them, like any other regular property i want null?
Thanks you all
Chris,
You said you were not sure what the exception was. Well... me neither.
But i think i found a way to find it:
Mapping: oracle.toplink.mappings.ManyToManyMapping[posCollection]
Descriptor: Descriptor(ferramentaria.Usuarios --> [DatabaseTable(mypackage.USUARIOS)])
at oracle.toplink.exceptions.DescriptorException.<init>(DescriptorException.java:196)
at oracle.toplink.exceptions.DescriptorException.indirectContainerInstantiationMismatch(DescriptorException.java:562)
at oracle.toplink.internal.indirection.TransparentIndirectionPolicy.validateAttributeOfInstantiatedObject(TransparentIndirectionPolicy.java:357)
at oracle.toplink.mappings.ForeignReferenceMapping.getAttributeValueFromObject(ForeignReferenceMapping.java:303)
at oracle.toplink.mappings.ForeignReferenceMapping.isAttributeValueInstantiated(ForeignReferenceMapping.java:479)
at oracle.toplink.mappings.CollectionMapping.mergeChangesIntoObject(CollectionMapping.java:625)
at oracle.toplink.internal.descriptors.ObjectBuilder.mergeChangesIntoObject(ObjectBuilder.java:1453)
at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfWorkingCopyIntoOriginal(MergeManager.java:517)
at oracle.toplink.internal.sessions.MergeManager.mergeChanges(MergeManager.java:174)
at oracle.toplink.publicinterface.UnitOfWork.mergeChangesIntoParent(UnitOfWork.java:2555)
at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOfWork.java:960)
at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:771)
at ferramentaria.view.Usuarios_insereAction.execute(Usuarios_insereAction.java:73)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:239)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:645)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
I think this is it...
Thanks again
Similar Messages
-
I am having problems saving documents back to SharePoint when any of the document properties (metadata columns) are set to be "managed metadata". The check-in/save fails with error:
The document could not be saved. The server said:
“The operation failed because an unexpected error occurred. (Result code 0×80020005)”
Please ensure you have completed all required properties with the correct information and try again.
I have seen similar threads that suggest this is a known issue with this version of Acrobat but I would like conformation from Adobe that this is a known issue and whether it is fixed in a newer version?
Adobe Acrobat version 10.1.13
SharePoint 2010Hi quodd,,
We are sorry for the issue being faced by you. I need some information from you so that I take further steps:
1. Which Adobe product are you using Acrobat or Adobe reader- what is the complete version?
2. How are you opening and saving the PDF, the exact workflow?
Are you doing it from within Adobe Reader/Acrobat application or opening it from browser, doing changes and saving it using browser itself.
3. Can you try to save a PDF to library with Custom template and managed metadata columns using browser directly.
4. Please verify that columns name do not contain spaces or some other special characters.
Can you try to save PDF to library with Custom template and just a single managed metadata column with a simple name
Thanks,
Nikhil Gupta -
Lazy initialization of ValueHolderInterface
We are initializing the value holders lazily, for example we are initializing them checking them if they are null in the getter methods, from
the code patterns it is always seem that value holders are initialized in the constructors of the POJO. what are the problems associated
with lazy initialization of valueholderinterface? thanksShould be ok, and more optimal. When TopLink generates/weaves code it initializes them lazily (since 10.1.3).
James : http://www.eclipselink.org -
After transition on Windows 7 there was a problem with Firefox. At work with the text at allocation by the cursor of the big fragment of page it is necessary to shift all time it downwards, "against the stop", but the page automatically does not start to rise upwards as it was earlier and as occurs in other browsers. It is necessary to press other hand a key "downwards" that is the extremely inconvenient. Reinstallation on earlier version (8.0) earlier irreproachably working, has given nothing. I ask the help
You need to enable the Add-ons bar (Firefox > Options or View > Toolbars; Ctrl+/) or the Find bar (Ctrl+F) to make Firefox scroll the page while selecting text.
-
I've been searching online, and haven't been able to find a definitive answer to this. Does anyone know what the following SharePoint 2013 Search Service Application, Crawled property category option does?
"Map all string properties in this category to the Content managed property"
It appears when editing a crawled property category.Hi Vishal,
There is no Official documentation explaining the setting "Map all string properties in this category to the Content managed property". In my opinion, this setting will map all crawled properties which are in current category and
whose value is string type to the Content managed property.
Thanks,
Eric
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Is there a method or function to list all the properties
I'm looking for a method that's similar to Python's dir(x) which lists all the properties of an object. I'm looking to use this on After Effects Objects.
You can use a for...in loop: for (var key in myObj) if (myObj.hasOwnProperty(key)){ ...}
But in ExtendScript there are also Reflection and ReflectionInfo objects. Those are not documented in the After Effects Scripting Guide but in the JavaScript Tools Guide (common to all Adobe scriptable apps).
For any ExtendScript object o you can query its reflection object. o.reflect is an object with properties and methods:
"properties" : an array listing all properties in o. Each entry is a ReflectionInfo object.
"methods" : an array listing all methods in o. Each entry is a ReflectionInfo object.
"name" : the class name of the object
"help" and "description" : some strings supposed to give some hint about the objects but those fields are invariably empty...
"find" : a method to find a specific property or method by its name
For what a ReflectionInfo looks like, see the JavaScript Tools Guide. (The main properties are "name", "dataType", "type")
For instance, if o is a layer position property:
o.reflect.methods = array of ReflectionInfo corresponding to all "ADBE Position" methods
o.reflect.find("setValue") => ReflectionInfo corresponding to the method "setValue"
o.reflect.find("setValue").name : "setValue"
o.reflect.find("setValue").arguments.length : 0 // SHOULD BE 1 ... arguments are not filled in :-(
Xavier. -
All the properties are not displying for the View Object
i my one of the view Object it is only showing the properties
Values
Lable
Render values
I want to use text box (Input box )...but it is not showing in the property window
why it is not showing the all the properties for the that view Object.
Is it a read only view object ? if so then how to change itThis question is confusing.
You talk about properties, suggesting attribute properties are not showing up in the view object editor. Then you talk about a read-only view object, which suggests you talk about a running application?
Normally a view object is updatable when it is based on an entity object and when on the entity object tab of the view object editor (the page in which you select the entity object) the updatable checkbox has been checked.
But being updatable as such is not why attributes would not show up in a screen.
Can you be more specific, and also tell us what JDeveloper version you are working with?
Jan Kettenis -
when backing up photo is it necessary to include all edited files or is th original dng sufficient?
I don't keep a lot of edited copies of images. They aren't really necessary. I keep my master images (all raw files) and use them for browsing in Lightroom and for printing. Sometimes there are TIF files when I have gone to Photoshop to make further corrections. But other than that, I don't keep copies. I make copies for e-mail or to send to a lab, etc., but once they've been used I delete them. So backing up the master files and the catalog is really the most critical, in my opinion.
-
Error:Make sure user mapping is correct & all connection properties r right
Hi,
I am using SRM 5.0 and EP 7.0 I had imported the verify.der certificate of portal on SRM and changed the profile parameters of SRM to accept tickets.
And now after creating a system object for Srm on Portal I tried to test the connectivity and it shows the following error.
"Connection failed. Make sure user mapping is set correctly and all connection properties are correct."
ANy ideas? Please advice.
SwethaMy simple rule is to ignore the message as the test tends to give false negatives. Instead try to access the system with an iView, such as SAP transaction, or use System admin -> support -> SAP application -> scroll down to SAP transaction.
Cheers -
How to download all the properties of specification?
I have request from one of our customers that they have 2000 materials and they want to download all the properties for each of the specification attached to these materials. There are around 1700 specification and they want to download all the properties for all of these specifications.
Christoph mentioned some links Displaying Properties - Basic Data and Tools (EHS-BD) - SAP Library. I tried to follow the steps mentioned there and I saw
If you have already selected a value assignment type on the initial screen using the Substance with property search function, this is selected automatically and the property tree does not appear.
If you use Microsoft Excel, you can select a maximum of 50 value assignment types
So because of 50 VAT limitation we are only able to select 2 nodes out 16 nodes of the property whereas user needs to download all of them.
Dear Experts,
Any ideas about this, Please guide.
DevdattDear Devdatt
the "tipps" I provided does have some "cons" as mentioned in the thread. One con is limitation to 50 properties (hint of Edward will not help; sorry Edward).
SAP is delivering some output variants in the standard. E.g. EXCEL. Here the delivered solution is limited to:
a.) you can not download more than 50 properties
b.) some properties are out of scope (e.g. DG ones)
There is a additional other output variant in place which is more "flexible"; but I don't love the result showing up in EXCEL. In any case here is the link:
Displaying Specification Data - Basic Data and Tools (EHS-BD) - SAP Library
BUT: you can try to check customizing and then by "copy" the SAP solution to customer specific one and adapt and by creating the corresponding customizing you might get a solution. This option is used quite often
Further there is one "general limitation"; I believe we have now something more than 250 properties as part of STANDARD tree. If you are using the outvariant option the additional limitation is the performance. So if you have more than may be 10 specs and you would like to do the "full" export (based on STANDARD tree) it is probable that you will get an ABAP dump (time limit exceed for SAP session).
There is no limitation in regards to that if you use the standard EXPORT functionality. BUt here you will not get an EXCEL file.
C.B. -
Initialize all context values at one shot
Hi,
Is there a way i can initialize all the context values of a view. I mean when i click "Reset" all the values should be cleared at one shot instead of setting each value attribute to space.Hi Aditya,
Whether you use wdContext.invalidate() or wdContext.reset(), all the elements of the entire context will be deleted and hence the table will be disbaled since it's datasource node has no elements. Each row of a table corresponds to an element in it's datasource node. If you create n elements for the node, those many rows will be enabled. So when you remove all the elements of the node, all the rows of the table will also be disbaled. So you have two options here:
1) After removing the elements, create as many of them as required with the default values.
2) Instead of removing the elments, explicitly access each attribute and set it's value to null or space. It will involve just a for loop:
IPrivate<View_name>.I<node_name>Element elmt;
for(int i=0;i<wdContext.node<node_name>().size();i++)
elmt = wdContext. node<node_name>().get<node_name>ElementAt(i);
elmt.set<parameter1>("");
elmt.set<parameter2>("");
Hope this helps,
Best Regards,
Nibu.
(Please take care to close your solved problem's threads by awarding appropriate points . If you haven't got a solution for your problems, please update the forum on their status. Kindly consider awarding points for helpful answers on SDN !) -
Does web service support all the properties in the standalone BI console?
Hi,
Currently I am using BI web service API to get the report and its parameters and so on. But I find that the object definition in the web service can't be full defined to match the properties in the console UI. For exaple, ReportDefinition object there is no description property, so I can't get the desc by the ReportDefinition object (By now I don't know how to get it). Another sample is, there is no Parameter object defined in the web service, only ParamNameValue object, so I can't get the default value for the parameter defined in the console UI.
Is there any solution for me?
HELP!!!It is just not working for me. I am using static stub.
After tracking the HTTP traffic, I found that the WL70 server is not issuing any
cookie. I have configured all the parameters for tracking session in the web application,
but I still don't see any cookie in the HTTP headers from the server. I also tried
to invoke the service using a browser, still no cookie seen. Is this a bug or
there is some other configuration for the server?
- Hao
"manoj cheenath" <[email protected]> wrote:
By default client will maintain the session. You dont have to set this
property.
Are you using static or dyn client?
Also, you should use the same instance of the stub for all your invokes
(all invokes to be in the same session).
regards,
-manoj
"Hao Chen" <[email protected]> wrote in message
news:[email protected]..
It is not working for me.
When I set the "javax.xml.rpc.session.maintain" property, weblogicthrows
"UnsupportedOperation"
exception and be default I don't see any session information beingpassed.
How do I configure the client side or even the server?
Thanks.
- Hao
"manoj cheenath" <[email protected]> wrote:
WL70 client does support http session. Is this not
working for you?
regards,
-manoj
"Hao Chen" <[email protected]> wrote in message
news:3d6402ac$[email protected]..
Does anybody know how to make WL70 Web Service support sessions?
The "javax.xml.rpc.session.maintain" property on Stub does not seemto
work.
Without session support, it is almost no use for us because we haveto
authenticate
the user each time.
Thanks in advance.
- Hao -
Have been lost, all the properties files in the CM repository (FSDB mode)
Hi,
I encountered the following problem: lost all descriptions to folders and files in the CM repository, which is connected to the FSDB mode. This happened as follows. At desired time connection to the server where the repository was broken, after some time the link was restored, but the repository was not available. After this portal has been restarted, and the repository to work, but lost all completed file properties, including the description.
How do I return all the description files?Hi Stanislav,
Has this issue been resolved?
If not then the only way to restore this lost metadata would be a be restore, see sap notes 900571 and 737877 for more details.
Regards,
Lorcan. -
Hello
I am learning how to create management packs with VSAE and have a question please.
When defining a Class based on LocalApplication (which I believe already has a hosting relationship with Windows Computer and therefore no need to create a hosting relationship?)
let say I define two properties one called Version and the other Vendor both based on registry values, so I include the discovery of these regsitry values in my discovery (along with the regsitry key exists to check the actual app is installed).
Now if I have a Server with only two of the above three registry items created e.g. the actual Key and Version string value but not vendor string value. Will an instance of the Class be discovered and thereby viewable in the 'discovered inventory' view?
Or do ALL properties have to be present (as defined on the class definition) for an instance of said class to be created?
Thank you
AAnotherUser__
AAnotherUser__Hello Vladimir thanks for taking the time to reply
So if I have three properties definded on my custom class, none of which are key properties and I only discover two of them (as the registry key or what ever is missing for the last property) the class should still be discovered as there are no key properties
for the custom class and therefore no key properties missing from the discovery, is that correct please?
Also I understand I have to Discover any key properties of the classes parent/s
for example
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
<Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
<Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</Value>
</Setting>
</Settings>
I have done this, but my Class is not being discovered.
Then I saw a post which had the following, under the Class Discovery Section (along with the other properties of the class)
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
Therefore perhaps I need to add this as a property as well as an InstanceSetting?
I am using SCOM 2007 R2 at the moment
Thanks very much
AAnotherUser__
AAnotherUser__ -
How can a script access all link properties?
I'm really glad to find this pool of expertise out in the cloud. TIA for all replies.
I'm looking for proper syntax to access the more detailed properties of graphic file links, such as the page# on which they appear and effective PPI. These are visible in the link window, but I cannot find them in the ESTK for CS4 Object Model Viewer. There is are name, filePath, and linkType, which are all very useful and also visible in the link window. But as for the other info I see only a suggestive attribute called "properties" which is itself an object, and I cannot seem to query its contents.
As I'm very, very new to scripting the cause could be little more than my own ignorance.
Is there a way to convert and object to strings so I can see how it is built?
In case anyone is interested, I'm trying to amplify a very helpful little script written three years ago by Steve Wareham:
// ====== ListLinks ====== \\
/* This is a JavaScript for InDesign. It will create a new text box on the first page of your document, and list all the links used in your document.
A dialog box provides options to list the links names, files paths, and file types. Created by Steve Wareham 5/08/2007
attempts to amplify with addition of Page and Effective PPP by Marc Shargel May 2010 */
// ----- Dialog Box ------\\
var myDialog = app.dialogs.add({name:"Link Lister", canCancel:true});
with(myDialog){
with(dialogColumns.add()){
with(borderPanels.add()){
with(borderPanels.add()){
staticTexts.add({staticLabel:"What link information do you want? "});
with(dialogColumns.add()){
with(borderPanels.add()){
var my1RadioButton = checkboxControls.add({staticLabel:"Names", checkedState:true});
var my2RadioButton = checkboxControls.add({staticLabel:"Paths"});
var my3RadioButton = checkboxControls.add({staticLabel:"File type"});
var my4RadioButton = checkboxControls.add({staticLabel:"Page"});
var my5RadioButton = checkboxControls.add({staticLabel:"Effective PPI"});
// extending the dialogue box was easy...
// ----- End of Dialog Box ----- \\
//----- Begin ----- \\
if(myDialog.show() == true){
var myDocument = app.activeDocument;
var totalLinks = myDocument.links.length;
var myNewTextFrame = myDocument.textFrames.add() // Add a text frame to display the list of links
myNewTextFrame.geometricBounds = [ "0p0", "0p0", "50p5", "50p5"];
for ( i = 0; i < totalLinks; i++ )
if (my1RadioButton.checkedState == true) {
myNewTextFrame.contents = ( myNewTextFrame.contents + "File: " + myDocument.links.item(i).name );
if (my1RadioButton.checkedState == true) {
myNewTextFrame.contents = ( myNewTextFrame.contents + " Path: " + myDocument.links.item(i).filePath );
if (my3RadioButton.checkedState == true) {
myNewTextFrame.contents = ( myNewTextFrame.contents + " Type: " + myDocument.links.item(i).linkType );
//... but the following lines do not work. I can refer to "myDocument.links.item(i).properties" but it is reported as an object.
//if (my4RadioButton.checkedState == true) {
//myNewTextFrame.contents = ( myNewTextFrame.contents + " Page#: " + myDocument.links.item(i).page );
//if (my5RadioButton.checkedState == true) {
// myNewTextFrame.contents = ( myNewTextFrame.contents + " PPI: " + myDocument.links.item(i).effectivePPI );
myNewTextFrame.contents = ( myNewTextFrame.contents + '\r' );
myDialog.destroy();Is there a way to convert and object to strings so I can see how it is built?
Whoops, I'd meant to answer this. Sure, you can just loop over the object. For instance, since you were curious about the "properties" member, suppose we wanted to look at the individual members of the properties object of a link.
Just type in the JavaScript console:
{ var p = app.activeDocument.links[0].properties; for (var i in p) $.writeln(i + "\t"+p[i]); }
which produces:
versionState 1986221653
editingState 1986217301
linkXmp [object LinkMetadata]
index 0
parent [object Image]
assetURL
assetEtag
assetID
edited false
name yeti.png
needed true
status 1852797549
linkType Portable Network Graphics (PNG)
date Mon May 24 2010 15:36:52 GMT-0400
size 113083
filePath Hermann Zapf:Users:writer:Desktop:yeti.png
id 209
label
You'll note that these are all the same members that the links[0] object itself has. Again, "properties" is just a convenience for setting more than one at once. So compare the output to:
{ var p = app.activeDocument.links[0]; for (var i in p) $.writeln(i + "\t"+p[i]); }
How does that work? Well, the syntax "for (i in p)" calls the for loop once for every member of the Object p, and then we print out the name of each member along with its value.
(I guess the good JavaScript programmers would encourage you to put {}'s around the $.writeln, and the really anal people would remind you that JavaScript does not have block scope* and therefore you should wrap the whole thing in:
"function(){ ... }()".
(*:reference is to Javascript: The Good Parts; Awful Parts, a book (well, chapter thereof) well worth reading.))
Maybe you are looking for
-
Sender JDBC with Stored Procedure or Function
Hi. I have a problem to update a row that I obtain from sender JDBC (using SELECT or calling to a FUNCTION). As the consultation is so complex and the table has fed up transactions, often it takes the registry A and updates register B. Try to use
-
Since today, when I transferred some photos to iPhoto via photo stream, it doesn't open and keep crashing after 2 second, here is the result: Thanks rocess: iPhoto [831] Path: /Applications/iPhoto.app/Contents/MacOS/iPhoto Identifi
-
My iphone 3gs is really messed up
soooo My iphone 3gs is really messed up. i havnt been able to use it because it was reset and says "insert a valid sim card with no pin lock to activate iphone" i also dont have a sim card tray, and im getting the sim card tray sometime this week. th
-
I cannot show my video files on microsoft office program with macair book 11 inc notebook while using projector
-
With the new updates, my Fuji S2 pro is finally supported. Everything works fine when I import DNGs to the library, but when I import them as referenced files, I get an unsupported image format error. Same files, only difference is whether they're re