Empty object in cache? All attributes are null...
This happens rarely, but after adding an object to the database, it is stored in the identity map, but all that's stored is the primary key, the rest of it is NULL. Subsequent queries on that object retrieve objects with all atributes set to null, even those initialized to new Vector()..
Anyone noticed anything similar?
Thanks!
- Rustam -
This sounds like the UnitOfWork post commit phase that merges the transaction's change-set into the shared cache has failed. Is there any code in your set methods that could lead to an exception being thrown during the merge?
It is typically safer to use direct access. If you use method access the logic within the set methods must support the cache merge.
As far as the previous issue goes I have not seen a TAR filed with support for this issue. Typically support will work with the customer to construct a reproducible test case which engineering can use to validate and fix the issue.
Doug
Similar Messages
-
Overwrite Object Instance or all Attributes of it
Hello,
i have an question regarding ABAP OO,
i like to do following:
1) i like to give the reference me into a attribute of an local object.
2) edit attributes of this object
3) overwrite attributes of me with changed on of the atrribute of the local attribute
Step 1 and 2 is no problem,
but when i tried it like this.
me = lo_test->test.
i get the message that "me" is not overwriteable,
sure i can make it by every attribute of my class:
me->test1 = lo_test->test->test1.
me->test2 = lo_test->test->test2.
but i want a dynamic why to overwrite all attributes.
Thank you for any idea!
Regards
MarcusHi Marcus!
'me' (or 'lo_test') are pointer to an object. In case of attributes handling looks similar to a structure with their fields, but you discover the main difference: the structure name is just the head for all components - but 'me' is not a pointer to a (structured) field string.
You have to handle the attribute level (or make your assignments in a method). Maybe you can get a more dynamic access by using one structure with all values as single attribute.
Regards,
Christian -
Manually deleted cache, all sessions are gone
Every time I try to clear the cache (cmd-shift-backspace), Firefox hangs and I have to force quit. This is a known bug (https://support.mozilla.org/en-US/questions/938139). So I tried manually deleting the cache but when I started FF again, all windows were gone, and session manager could not restore the previous session. It shows up but nothing happens when I click on it. I tried restoring everything from trash, replacing current items, but this didn't work. I had months worth of open tabs and windows that would take days to restore from history. How can I recover the lost session?
Hello,
Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
Note: ''This will temporarily log you out of all sites you're logged in to.''
To clear cache and cookies do the following:
#Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
#Under "Time range to clear", select "Everything".
#Now, click the arrow next to Details to toggle the Details list active.
#From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
#Now click the ''Clear now'' button.
Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
Did this fix your problems? Please report back to us!
Thank you. -
Best Practice question - null or empty object?
Given a collection of objects where each object in the collection is an aggregation, is it better to leave references in the object as null or to instantiate an empty object? Now I'll clarify this a bit more.....
I have an object, MyCollection, that extends Collection and implements Serializable(work requirement). MyCollection is sent as a return from an EJB search method. The search method looks up data in a database and creates MyItem objects for each row in the database. If there are 10 rows, MyCollection would contain 10 MyItem objects (references, of course).
MyItem has three attributes:
public class MyItem implements Serializable {
String name;
String description;
MyItemDetail detail;
}When creating MyItem, let's say that this item didn't have any details so there is no reason to create MyitemDetail. Is it better to leave detail as a null reference or should a MyItemdetail object be created? I know this sounds like a specific app requirement, but I'm looking for a best practice - what most people do in this case. There are reasons for both approaches. Obviously, a bunch of empty objects going over RMI is a strain on resources whereas a bunch of null references is not. But on the receiving end, you have to account for the MyItemDetail reference to be null or not - is this a hassle or not?
I looked for this at [url http://www.javapractices.com]Java Practices but found nothing.I know this sounds like a specific apprequirement,
, but I'm looking for a best practice - what most
people do in this case. It depends but in general I use null.Stupid.Thanks for that insightful comment.
>
I do a lot of database work though. And for that
null means something specific.Sure, return null if you have a context where null
means something. Like for example that you got no
result at all. But as I said before its's best to
keep the nulls at the perimeter of your design. Don't
let nulls slip through.As I said, I do a lot of database work. And it does mean something specific. Thus (in conclusion) that means that, in "general", I use null most of the time.
Exactly what part of that didn't you follow?
And exactly what sort of value do you use for a Date when it is undefined? What non-null value do you use such that your users do not have to write exactly the same code that they would to check for null anyways? -
XML into table: Why do all my insert values are NULL?
Hello,
I'm pretty new in XML ... then I still learn a lot by myself !!!
I surfed to a lot of forums and examples ....
I have a XML file. I built a XSL file in order to insert a part of my XML file into a table.
The 2 files are loaded as CLOB into a DB table.
I wrote a PLSQL procedure for this job.
We are on a DB 10gR2.
As a result, all the inserted columns are loaded with NULL !!!! ....
I must have done something wrong ... for sure !!! but I cannot figure out.
Here are the files and procedures:
*<?xml version="1.0" ?>*
*<purchaseOrder orderDate="1999-10-20">*
*<shipTo country="US">*
*<name>Alice Smith</name>*
*<street>123 Maple Street</street>*
*<city>Mill Valley</city>*
*<state>CA</state>*
*<zip>90952</zip>*
*</shipTo>*
*<billTo country="US">*
*<name>Robert Smith</name>*
*<street>8 Oak Avenue</street>*
*<city>Old Town</city>*
*<state>PA</state>*
*<zip>95819</zip>*
*</billTo>*
*<comment>Hurry, my lawn is going wild!</comment>*
*<items>*
*<item partNum="872-AA">*
*<productName>Lawnmower</productName>*
*<quantity>1</quantity>*
*<USPrice>148.95</USPrice>*
*<comment>Confirm this is electric</comment>*
*</item>*
*<item partNum="926-AA">*
*<productName>Baby Monitor</productName>*
*<quantity>1</quantity>*
*<USPrice>39.98</USPrice>*
*<shipDate>1999-05-21</shipDate>*
*</item>*
*</items>*
*</purchaseOrder>*
The XLS file is :
*<?xml version="1.0"?>*
*<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">*
*<xsl:output method="xml" media-type="text/xml" />*
*<xsl:template match="/">*
*<insert>*
*<Table>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_club'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<Columns>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_code'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_name'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_price'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*</Column>*
*</Columns>*
*<xsl:for-each select="purchaseOrder/items">*
*<Rowset>*
*<xsl:for-each select="item">*
*<Row>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_code'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="@partNum" />*
*<!--layer=Default-->*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_name'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="productName" />*
*<!--layer=Default-->*
*</Column>*
*<Column>*
*<xsl:attribute name="source">*
*<xsl:value-of select="'item_price'" />*
*<!--layer=Default-->*
*</xsl:attribute>*
*<xsl:value-of select="USPrice" />*
*<!--layer=Default-->*
*</Column>*
*</Row>*
*</xsl:for-each>*
*<!--layer=Default-->*
*</Rowset>*
*</xsl:for-each>*
*<!--layer=Default-->*
*</Table>*
*</insert>*
*</xsl:template>*
*</xsl:stylesheet>*
*<!--xsl-easyControl - (C) 2003-2007 SoftProject GmbH-->*
*<!--Source: "purchaseOrder_clubDev.xml"|Type:"xml"-->*
*<!--Destination: "Connexion_XSL_SCFOX.xac"|Type:"Connexion_XSL_SCFOX"-->*
*<!--Document type: Input Driven-->*
The XML files are successfully inserted into a CLOB colum :
ID FILENAME XML
24 item_club.xsl <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.or
25 purchaseOrder.xml <?xml version="1.0" ?> <purchaseOrder orderDate="1999-10-20">
And the procedure is :
CREATE OR REPLACE PROCEDURE load_xml( p_dir IN VARCHAR2
, p_filename IN VARCHAR2) AS
insCtx DBMS_XMLSave.ctxType;
rows NUMBER;
l_bfile BFILE := BFILENAME(p_dir, p_filename);
l_clob CLOB;
l_bfile_xsl BFILE;
l_clob_xsl CLOB;
begin
dbms_output.put_line('p_filename='||p_filename);
insCtx := DBMS_XMLSave.newContext('sipmo.item_club'); -- get the save context..!
dbms_output.put_line('item_club.xsl context='||insCtx);
--IMPORTANT... ignore la casse
DBMS_XMLSave.setIgnoreCase(insCtx, 1);
--select XSL file item_club.xsl
l_bfile_xsl := BFILENAME(p_dir, 'item_club.xsl');
DBMS_LOB.createtemporary (l_clob_xsl, TRUE);
DBMS_LOB.fileopen( l_bfile_xsl, DBMS_LOB.file_readonly);
DBMS_LOB.loadfromfile( l_clob_xsl, l_bfile_xsl, DBMS_LOB.getlength(l_bfile_xsl));
dbms_output.put_line('item_club.xsl length='||DBMS_LOB.getlength(l_bfile_xsl));
DBMS_LOB.fileclose(l_bfile_xsl);
DBMS_XMLSave.SETXSLT(insCtx, l_clob_xsl);
dbms_output.put_line('step 10');
DBMS_XMLSave.clearUpdateColumnList(insCtx); -- clear the update settings
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_CODE');
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_NAME');
DBMS_XMLSave.setUpdateColumn(insCtx,'ITEM_PRICE');
-- Now insert into the table
dbms_output.put_line('step 90');
rows := DBMS_XMLSave.insertXML(insCtx, l_clob);
dbms_output.put_line('step 100 rows='||rows);
DBMS_XMLSave.closeContext(insCtx);
DBMS_LOB.freetemporary (l_clob_xsl);
DBMS_LOB.freetemporary (l_clob);
END;
The result table is like this :
scfx>select * from item_club;
ITEM_CODE ITEM_NAME ITEM_PRICE
All the columns of each row are NULL !!!
Why?
Do you have any advice ?
Thanks if advance,
OlivierSo, if I understand what you mean ... I should write something like this :
insert into item_club
select t2.partnum, t2.productname, to_number(replace(t2.usprice, '.', ','))
from odab_xml_tab t
, xmltable('*' passing t.xml.extract('purchaseOrder/items/*')
columns partNum varchar2(35) path '@partNum'
, productName varchar2(35) path 'productName'
, USPrice varchar2(35) path 'USPrice'
) t2
Its a change in our code.. but that looks nice !!!
Thanks,
Olivier -
Size limitation for all attributes in user objects in Active Directory????
hi geeks , i wanna know maximum size limit of an user objects attribute in active directory ... like max amount of character first name attribute can hold ... Thank in advance..
You can use ADSI Edit to view the properties of the attributes in the Schema container of your AD. In the Schema container you can select an attribute, like Company, right click, select properties, and find the rangeUpper property of the attribute. This
is the maximum length in characters (or bytes). You can also use dsquery to retrieve rangeUpper for an attribute. For example:
dsquery * "cn=Schema,cn=Configuration,dc=MyDomain,dc=com" -filter "(LDAPDisplayName=streetAddress)" -attr rangeUpper
where your domain is MyDomain.com. This finds the maximum length for the "street address" attribute. A few values in my test domain (the values can be modified, so these are the defaults):
company 64
streetAddress 1024
physicalDeliveryOfficeName 128
initials 6
st 128
postOfficeBox 40
name 255
cn 64
You can use the first two spreadsheets on this page to help identify attributes in AD (with no Exchange):
http://www.rlmueller.net/UserAttributes.htm
The first spreadsheet documents the attributes corresponding to the fields on most of the tabs of ADUC. For example, "st" is the attribute for state, "physicalDeliveryOfficeName" for the field labeled "office". You need the
LDAPDisplayName's of the attributes, like I used in the dsquery command above. The second spreadsheet documents all attributes in AD with more information, like the syntax and which class each applies to.
Richard Mueller - MVP Directory Services -
Can't read all attribute of my serialized object
Hello everybody,
I've got a problem with my program. I try to serialized a MutableTreeNode root in order to save and then open my JTree.
I serialize it and i have no problem but when i open it the parent hierarchy is saved (x is son of y...) but their name are null. I loose nodes' name... :/
try {
//Je cr�e un fichier temporaire dans le r�p�rtoire courant
//Ce fichier est l'arbre (selection de l'utilisateur) serializ�
//Flux cr�ant un fichier
FileOutputStream fos = new FileOutputStream(this.path);
//Flux dans lequel je stocke un objet
ObjectOutputStream oos = new ObjectOutputStream(fos);
//J'�cris dans mon flux mon objet
System.out.println("root before drag = "+this.root);
oos.writeObject(this.root);
//On ferme le flux
oos.flush();
fos.close();
} catch (FileNotFoundException e1) {
System.err.println("FileNotFoundException");
e1.printStackTrace();
return null;
} catch (IOException e1) {
System.err.println("IOException");
return null;
} catch (ClassCastException e1) {
System.err.println("ClassCastException");
return null;
try {
FileInputStream fos = new FileInputStream(this.path);
ObjectInputStream oos = new ObjectInputStream(fos);
//J'�cris dans mon flux mon objet
MutableTreeNode sousArbre = (MutableTreeNode) oos.readObject();
//On ferme le flux
fos.close();
//On r�cup�re l'arbre
System.out.println("root after drag = " + sousArbre);
this.root = sousArbre;
modele = new DefaultTreeModel(root);
Arbre.setModel(modele);
Aide a = new Aide(Arbre);
} catch (FileNotFoundException e1) {
System.err.println("FileNotFoundException");
e1.printStackTrace();
} catch (IOException e1) {
System.err.println("IOException");
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
System.err.println("ClassNotFoundException");
e1.printStackTrace();
} catch (ClassCastException e1) {
System.err.println("ClassCastException");
e1.printStackTrace();
}so:
System.out.println("root before drag = "+this.root);
return node name
Mais :
System.out.println("root after drag = " + sousArbre);
return null
Have you an idea ?
Thx :)Please check your Node Object, I mean all Objects that you are going to save is serialized or not.
-
Creating an array of objects sets them all to null?
I am using the following code:
public class PlayerTest {
public static void main(String[] args) {
Player[] p = new Player[1];
System.out.println(p[0].getId());
}and for the 'Player' object:
public class Player {
int id;
String name;
int prediction;
int score;
public Player() {
this.name = "a";
this.score = -1;
this.id = genRanId();
this.prediction = -1;
...and, when i try to execute the "PlayerTest" class, i get the error:
Exception in thread "main" java.lang.NullPointerException
at PlayerTest.main(PlayerTest.java:5)I think this is because when the array of player objects is created, they are all set to null, and the fields are not created. How do i get the program to initialise the fields in each player object of the array?
Creating the array of Player objects doesnt seem to use the constructor for the player class like creating an indivdual one does for some reason, as if i create a single element, instead of an array of them, it works fine....
Please help!Yes you are quite right they are null by default (that is nothing is assigned to the array of pointers you have created) you will have t initialise the array the array
Player[] p = new Player[1];
for(int i=0;i<p.length;i++)p[i] = new Player();
//or you can do
Player[] p = {new Player(),new Player()};(IMHO) Its pointless having an array like this with identical objects you are betteroff instantiating the Person class using a constructor that takes some initial parameters however it is up to you.
Good luck
Wiraj -
Include all xmlattributes even if they are null values
Hello,
Is there a way to include all null xmlattributes even if they are null? I found one way by doing the following pasted code. But as you can see if you ahve a lot of attributes to do this fix in the code will get pretty ugly.
insertchildxml(
decode(nvl(activity_record.destination_id, 0), 0,
xmlelement("Destination",
xmlattributes(activity_record.dest_state as "state",
'' as "country",
activity_record.dest_splc as "SPLC",
activity_record.dest_city as "city")
xmlelement("Destination",
xmlattributes(activity_record.shipto_state as "state",
'' as "country",
null as "SPLC",
activity_record.shipto_city as "city")
'Destination[not(@SPLC)]',
'@SPLC',
NULL)i do not fully understand that you want
but you may use cursor like follow
create table txmlgen as
select 1 id, 2 col from dual union all
select 2 id, null col from dual union all
select null id, 2 col from dual
DECLARE
ctx NUMBER;
xmldoc CLOB;
refcur SYS_REFCURSOR;
BEGIN
DBMS_LOB.createtemporary(xmldoc, TRUE);
for rec in (select dummy d from dual)
loop
OPEN refcur FOR 'SELECT id, col, :1 as d FROM txmlgen' USING rec.d;
ctx := DBMS_XMLGEN.newContext(refcur);
dbms_xmlgen.setRowSetTag(ctx, 'DummySet');
DBMS_XMLGEN.setRowTag(ctx, 'Dummy');
DBMS_XMLGEN.setNullHandling(ctx, dbms_xmlgen.EMPTY_TAG);
DBMS_XMLGEN.getXML(ctx, xmldoc);
DBMS_OUTPUT.put_line(xmldoc);
end loop;
DBMS_LOB.freetemporary(xmldoc);
CLOSE refcur;
DBMS_XMLGEN.closeContext(ctx);
END;
<?xml version="1.0"?>
<DummySet>
<Dummy>
<ID>1</ID>
<COL>2</COL>
<D>X</D>
</Dummy>
<Dummy>
<ID>2</ID>
<COL/>
<D>X</D>
</Dummy>
<Dummy>
<ID/>
<COL>2</COL>
<D>X</D>
</Dummy>
</DummySet> -
In flash you can have a shell that has the navigation and some button in the shell are not activated until all clickable objects are clicked. I am not a flash programmer but it was related to using the path of shell and the sub-project.
Can anybody help me on that.
I would like to create Captivate interaction that you can just embedded in a Shell captivate project.
Do I need to set variables at both levels (Global variable.Hello Lieve, That is the screen shot of my custom interactivity, when all labels are clicked the Continue button will be shown because there is a conditional validating if all Labels have now a value of 1. What I am trying to achieve is to create an interaction where where the continue button (an the back button would reside in another Captivate project. This way there is no reprograming required or use of share-actions. Everytime we use a similar advanced action or a shared action we have to make sure the object name in the advanced actions or conditional actions are not the same. I trying to make it a bit dump proof for somebody that does not know any thing about advanced action and just reuse the label interaction in may projects. (The only thing they would change would be the image and the content of the label.
Do you thing I going in the right direction. (As I said before I have custom javacript in Captivate 5.5) to unlock un button that was part of the LCMS ForceTen). I belive the word .this was part of the object path in the JavaScript. Can we hide and show a Captivate button.
I have embedded other Captivate animation in a Master Captivate but the objets were not talking to each other. (You can see a sample http://www.youtube.com/watch?v=Erm4_qdybiA&feature=youtube_gdata). In that sample the continue is always there and can be click anytime. The 3 steps animation has been done as another project and embedded in my main captivate. I would like to implement a solution where a my 7 labels have to be clicked in the subproject before showing and enabling the Continue button.
I hope my explanation is clear enough. -
Resetting a variable deletes cache in all subject areas.
I have a static variable as maxdatadate which I use in only one BM LTS to filter data. (There are about 30 BMs in the repository) When I reset this variable to a new date, I lose cache related to all the BMs. Has anyone experienced the same? Version is 7.8.4. Is this corrected in newer versions?
Thank YouNo need to available it , you just need to use it using expression where ever it is possible.
Check this http://docs.oracle.com/cd/E23549_01/bi.1111/e10540/variables.htm
To keep it Physically as you need you may need to create a new logical column Time Logical table in BMM and then use expression as repository variable and put that column in all subject areas
~ http://cool-bi.com -
I was moving bookmarks in safari and 2 complete folders have emptied their contents. The folders are still there. I don't have a working time machine and icloud has caused the relevant folders to disappear from all my machines, iPhone, iPad and iMac as well as thge MacBook Air I was working on. HELP!!!
Hi,
There is NO need to put your whole questing in the "Questing Heather" therefore you can TYPE here. In the Text window as I did to.
Now to your questing:
So, you moved some Bookmarks and now 2 folders are completely empty.
I think that they dropped in a other folder during dragging the Bookmarks.
Did you check ALL of you Bookmark folder if they are there?
If you didn't delete the they have to be still there.
Dimaxum -
Which all schemas are accessing my objects?
Hi All,
I have a schema XXX in my database. This database has a total of 20 schemas. I would like to know which all schemas are accessing the objects under XXX schema.
Could someone please help me to figure out a way to find this?
My database version is 92060 and is running on HP Unix environment.
Thanks!user9104898 wrote:
Hi All,
I have a schema XXX in my database. This database has a total of 20 schemas. I would like to know which all schemas are accessing the objects under XXX schema.
Could someone please help me to figure out a way to find this?
My database version is 92060 and is running on HP Unix environment.
Thanks!Implement Oracle Audit -
I am getting entries which are 'all day' entries duplicated 8 to 9 times. I have updated my software on the phone to the latest version. Entries in iCal are only once. I have completely emptied my iPhone of all data. Has Apple resolved the issue yet?
Simple solution. Get a real internet service and not a cell phone internet connection service it was never meant to be used as the primary internet service
And how do you lose a home and job and be sued as you claim. What over 10 Gb of data? Give me a break
In my city small claims is $5000.00
And over that amount you can go to a superior court to have your issue settled.
http://www.bbb.org
Good Luck, Elector -
DBCP - how are null connection objects handled?
We are using DBCP in a refactored web application that, in the past, used a locally written connection pool. This original pool always checked a connection object to see if it was NULL before handing it out. I was told that this was because the DB was unstable at one point and the pool was handing out connections that were null after a db restart.
I would like to know if this is an issue with DBCP. I can't image that it would be, this seems like a common enough situation. However, the higher ups are concerned that we have subtracted functionality by using DBCP.
Thanks,
-=billsnorky,
Suck it and see. Suggest you tell the higher ups to go worry about "higher up" stuff, and leave the details to you... but I'd also cover my ass with a proven reversion strategy.
Maybe you are looking for
-
Set variable in main mxml based on check box selection in another mxml
I have a two mxml, In one of my mxml I have a checkbox, on checkbox_click event I want to pass some value to my main.mxml. Using this value I want to toggle the visibility of map layer in main.mxml. So far I have declared a bindable boolean variable
-
Dear Members, I've made some out going payments in banking module and in payment means i entered the check number also and taken a print out of the outgoing payment. Now after two days if I see this entry again, the check number got disappeared. Only
-
Make network to connect wireless and ethernet macs
i have a macbook that connects via Airport, and a Mac Pro that connects via ethernet. In the past - I've had no problems connecting/sharing between 2 macs, but both were sharing one airport. Since plugging in the MacPro, I'm no longer able to share b
-
i don't want to compromise the integrity of my current OS,(Lion) so please, no work arounds. I tried purchasing Mountain Lion but get the error message listed above, i've waited for 2 weeks hoping the bug would get fixed but it hasn't. Reaching out t
-
Failed to Run Task Sequence on unknown computers
Hey everyone i need some major help here. I am 99.9% sure that we dont have something configured properly but here goes. I have a the following: A task sequence that is enabled to deploy a image to all platforms (Console, Boot media, PXE) I have Bo