Fixed object stats

Hallo,
is there a possibillity to view LAST DATE of fixed objects statistics gathering? For non-fixes objects, it's easy to get this information from ALL_OBJECTS view, but for X$ tables it's not possible. Any idea?
For gathering I use following commands:
begin
DBMS_STATS.GATHER_FIXED_OBJECTS_STATS();
end;
begin
DBMS_STATS.GATHER_DICTIONARY_STATS();
end;
--Database version: Oracle 10g 10.2.0.3
Thanks for response.
Filip

Hi,
you can use the following select to find the last_analyzed time of the fixed tables.
select t.name, s.analyzetime
FROM sys.TAB_STATS$ s,
v$fixed_table t
WHERE s.obj#(+) = t.OBJECT_ID;
Best regards,
PP

Similar Messages

  • Object States panel not working in CS6, please help!

    I have InDesign CS6 installed (same license) on my work computer and home computer. The Object States panel works just fine at home. But at work the panel shows up, but it is always blank even though I have an object selected that has a State applied to it.
    I am thinking I need to uninstall/reinstall and hopefully it will work again.
    On a side note, when I save the file down to CS5 from CS6 and open in CS5, the Object States is now visible. I attached a photo. Top two images are screen grabs from file opened in CS6. Bottom two photos are same file opened in CS5. See how the Object States are visible in CS5 and not in CS6.

    Thjnis sort of problem is usually fixed by trashing the prefs. See Replace Your Preferences

  • Testing Process for Gathering Single Object stats.

    Hello Oracle Experts,
    I work a critical system and due to some high stakes all and every change is very heavily scrutinized here whatever the level is. And one of such changes which is currently under scrutiny is gathering object stats for single objects. Just to give you a background its an Oracle eBusiness site so fnd_stats is used instead of usual dbms_stats and we've an inhouse job that depending on the staleness of the objects gather stats on them using FND_STATS. (RDBMS : 10.2.0.4 Apps Release 12i).
    Now, we've seen that occasionally it leaves some of the objects that should ideally be gathered so they need to be gathered individually and our senior technical management wants a process around it - for gathering this single object stats (I know!). I think I need to explicitly mention here that this need to gather stale object stats has emerged becs one of the plans has gone pretty poor (from 2 ms to 90 mins) and sql tuning task states that stats are stale and in our PROD copy env (where the issue exists) gathering stats reverts to original good plan! So we are not gathering just because they are stale but instead because that staleness is actually causing a realtime problem!
    Anyway, my point is that it has been gathered multiple times in the past on that object and also it might get gathered anytime by that automatic job (run nightly). There arguments are:
    i. There may be several hundred sql plans depending on that object and we never know how many, and to what, those plan change and it can change for worse causing unexpected issues in the service!
    ii. There may be related objects whose objects have gone stale as well (for example sales and inventory tables both see related amount of changes on column stock_level) and if we gather stats only on one of them and since those 2 cud be highly related (in queries etc.) that may mess up the join cardinality etc. messing up the plans etc.
    Now, you see they know Oracle as well !
    My Oracle (and optimizer knowledge) clearly suggests me that these arguments are baseless BUT want to keep an open mind. So my questions are :
    i. Do the risks highlighted above stand any ground or what probably do you think is there of happening any of the above?
    ii. Any other point that I can make to convince the management.
    iii. Or if those guys are right, Do you guys use or recommend any testing strategy/process that you can suggest to us pls?
    Another interesting point is that, they are not even very clear at this stage how they are gonna 'test' this whole thing as the 'cost' option like RAT (Real Application Testing) is out of question and developing an inhouse testing tool still need analyzing in terms of efforts, worth and reliability.
    In the end, Can I request top experts from the 'Oak Table' network to make a comment so that I can take their backings!? Well I am hoping here they'll back me up but that may not necessarily the case and I obviously want an honest expert assessment of the situation and not merely my backing.
    Thanks so much in advance!

    >
    I work a critical system and due to some high stakes all and every change is very heavily scrutinized here whatever the level is.
    Another interesting point is that, they are not even very clear at this stage how they are gonna 'test' this whole thing as the 'cost' option like RAT (Real Application Testing) is out of question and developing an inhouse testing tool still need analyzing in terms of efforts, worth and reliability.Unfortunately your management's opinion of their system as expressed in the first paragraph is not consistent with the opinion expressed in the second paragraph.
    Getting a stable strategy for statistics is not easy, requires careful analysis, and takes a lot of effort for complex systems.
    >
    In the end, Can I request top experts from the 'Oak Table' network to make a comment so that I can take their backings!? Well I am hoping here they'll back me up but that may not necessarily the case and I obviously want an honest expert assessment of the situation and not merely my backing.
    The ideal with stats collection is to do something simple to start with, and then build on the complex bits that are needed - something along the lines suggested by Dan Morgan works: a table driven approach to deal with the special cases which are usually: the extreme indexes, the flag columns, the time-based/sequential columns, the occasional histogram, and new partitions. Unfortunately you can't get from where you are to where you need to be without some risk (after all, you don't know which bits of your current strategy are causing problems).
    You may have to progress by letting mistakes happen - in other words, when some very bad plans show up, work out WHY they were bad (missing histogram, excess histogram, out of date high values) to work out the minimum necessary fix. Put a defensive measure in place (add it to the table of special cases) and run with it.
    As a direction to aim at - I avoid histograms unless really necessary, I like introducing function-based indexes where possible, and I'm perfectly happy to write small programs to fix columns stats (low/high/distinct) or index stats (clustering_factor/blevel/distinct_keys) and create static histograms.
    Remember that Oracle saves old statistics when you create new ones, so any new stats that cause problems can be reversed out very promptly.
    Regards
    Jonathan Lewis

  • Object state improper for request

    We have a serious problem with our directory servers lately. We have custom code that, on a nightly basis, collates corporate information from various sources (primarily DB2 data accessed via ODBC) into an iPlanet Directory Server 4.16 SP1 (NT4 based currently). Suddenly (over the past two weeks) we have been having replication and performance issues - some during the nightly loading but also during normal operations. At no time is the machine greatly stressed.
    A number of applications which use the directory servers to authenticate users are getting errors that the app cannot talk to the directory servers. Looking at the log files, we see a number of "Object state improper for request" errors... These programs have run fine for over 18 months � no code changes have been done in over a month (an occasional glitch of course). We are unable to figure out what the error codes really are pointing to. These errors were encountered back when we ran 4.13 � but during upgrades, the errors disappeared.
    Configuration:
    =========
    The servers are three (3) NT-based servers with 4 processors and 2 GB RAM - they never break a sweat performance-wise. Windows Load Balancing S/W (WLBS) is used to offer a virtual address for requests which are brokered by WLBS and returned. All connections to the directory servers are over a 128-bit SSL channel and authenticated via X.509 certificates (BindDN/password are often used in the authentication as well since few vendors use certificates for authentication at this point - not even the iPlanet Certificate Management System! � aarrrggggg!).
    As a lot of applications are now dependent upon the directory servers, this is critical to us to rectify. Does anyone have
    1) a good explanation for the -5931 error code and why does it happen? (I read Achim Krisinger's post
    titled "Error code list or description for -5931 -5990" and the responses were of no help.)
    2) Any ideas as to how to go about fixing this? Getting a handle on it???
    Any suggestions would be greatly appreciated
    Rich
    Below is a sample of an error encountered during the nightly loading:
    [28/Aug/2002:04:12:13 -0400] conn=739 op=32 RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:14 -0400] conn=739 op=33 SRCH base="ou=People,ou=org2,ou=orgl,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenu mber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    [28/Aug/2002:04:12:14 -0400] conn=739 op=33 RESULT err=O tag=lOl nentries=50 etime=O
    [28/Aug/2002:04:12:15 -0400] conn=739 op=34 MOD dn="cn=Common
    Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:15 -0400] conn=739 op=34 RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:15 -0400] conn=739 op=35 MOD dn="cn= Common
    Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:15 -0400] conn=739 op=35 RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:15 -0400] conn=739 op=36 SRCH
    base="ou=People,ou=org2,ou=orgl,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (e mployeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenu mber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    [28/Aug/2002:04:12:16 -0400] conn=739 op=36 RESULT err=O tag=lOl nentries=50 etime=l
    [28/Aug/2002:04:12:16 -0400] conn=739 op=37 MOD dn="cn=Common_Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:16 -0400] conn=739 op=37 RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:17 -0400] conn=739 op=38 SRCH base="ou=People,ou=org2,ou=org1,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employe enumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenu mber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    [28/Aug/2002:04:12:17 -0400] conn=739 op=38 RESULT err=O tag=101 nentries=47 etime=O
    [28/Aug/2002:04:12:18 -0400] conn=739 op=39 fd=1184 closed error -5931 (Object state improper for request.) -A1
    [28/Aug/2002:04:12:18 -0400] conn=740 fd=896 slot=896 SSL connection from 162.45.10.31 to 162.45.10.31
    [28/Aug/2002:04:12:18 -0400] conn=740 SSL 128-bit RC4
    [28/Aug/2002:04:12:18 -0400] conn=740 op=O BIND dn="cn=Directory_Manager_Account" method=128 version=2
    [28/Aug/2002:04:12:18 -0400] conn=740 op=O RESULT err=O tag=97 nentries=O etime=O
    [28/Aug/2002:04:12:18 -0400] conn=740 op=l MOD dn="cn= Common Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:18 -0400] conn=740 op=l RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:19 -0400] conn=740 op=2 SRCH base="ou=People,ou=org2,ou=org1,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    r28/Auq/2002:04:12:19 -0400] conn=740 op=2 RESULT err=O taq=101 nentries=49 etime=O
    [28/Aug/2002:04:12:20 -0400] conn=740 op=3 aRCH
    base="ou=People,ou=org2,ou=orgl,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenu mber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    [28/Aug/2002:04:12:20 -0400] conn=740 op=3 RESULT err=O tag=101 nentries=50 etime=O
    [28/Aug/2002:04:12:21 -0400] conn=740 op=4 MOD dn="cn= Common Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:21 -0400] conn=740 op=4 RESULT err=O tag=103 nentries=O etime=O
    [28/Aug/2002:04:12:22 -0400] conn=740 op=5 aRCH
    base="ou=People,ou=org2,ou=orgl,o=Organization,c=US" scope=2
    filter=" (| (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (empl oyeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employe enumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=####) (employeenumber=#### ) (employeenumber..."
    [28/Aug/2002:04:12:22 -0400] conn=740 op=5 RESULT err=O tag=101 nentries=49 etime=O
    [28/Aug/2002:04:12:23 -0400] conn=740 op=6 MODRDN dn="cn= Common
    Name,ou=People,ou=org2,ou=orgl,o=Organization,c=US"
    [28/Aug/2002:04:12:23 -0400] conn=740 op=6 RESULT err=O tag=109 nentries=O etime=O
    [28/Aug/2002:04:12:23 -0400] conn=740 op=7 fd=896 closed error -5931 (Object state improper for
    request.) -Al

    If memory serves - I think this was a bug on Windows with SSL enabled replication. It would show this error on the consumer and a SDK error ninety something (91 I think) on the supplier? Is that what you are seeing?
    -Chris Larivee

  • How to control Object States of different objects with single button?

    I have a set of Images, stacked one on the other. I have selected all of them & created Object States for them. I also have a set of Text Objects, each containing a description of the images. These text objects are also stacked on top of each other & I've created object states for them too. I have two buttons which go to previous state & next state. When I do a mouse release operation on these buttons, only my images are moving from state to state.
    My question is how do I control the states of these different types of objects (images & type) so that they change states in sync with each other - I want to have an image 1 with its description, then image 2 with its description & so on. Thanks in advance.

    You just group your description with images

  • Problem with object state...

    Hi guys
    So I have this grid with 25 pictures.
    And I would like to use each of these pictures as a button. This button will trigger a frame with text in the center of the grid, like so :
    The X close the text frame and the user go back to the grid.
    But, I have 2 problems. I can mak a object state of the text frame and the button triggers one state (open/close for exemple) and it work. But if I click on the second square without closing the first text frame, the text frame linked to the first square is still there, underneath...
    Is there a way to 1 : a click triggers the texte square link to it AND close all the other
    Or is there an easier way to do it without object state?
    Thanks

    You have the grid of pics as your background. Then buld a state for each photo/description.
    If you have have 16 pictures  you'd build 16 different states for them. Combine them all into one MSO.
    You'll need to put the buttons into each state to make it work and you'll need one state with only the buttons with no fill or stroke over the background grid.
    You'll need to experiment to decide if you want the buttons to be live for all of the images in each state. It's lots of buttons and there's no automated way to do it, but it works well and avoids the problem that you're having now.
    Bob

  • Can ObjectStates become buttons that link to another object state?

    Hi. I am working on Adobe CS5 and I am trying to create an Image gallery.  I know how to create the basic type which is stacking the images, making them as object states, and then linking the navigation buttons to "Next State".
    The type of image gallery i'm trying to make involves thumbnails. In the thumbnails menu, there are back and forward arrows that will move the thumbnails from left to right. The way i did it was grouping the thumbnail images, convert them as object states, and just do the Left/Right animation through the Object State menu. The problem is, I can't make those thumbnails link to the picture it is assigned to. The Object states that appear in the button menu is just the object state of the thumbnails and not the Image viewer it self.
    If it is needed that i post a SWF demonstration of this, can someone show me how to?

    Here is a sample image
    What I'm trying to do is have a scroll like action with the thumbnails and when the user clicks the specific picture/thumbnail, the enlarged image will appear on the top.
    the only way i can create the scrolling action is by making the thumbnails into MOS and just change their position in each state. the problem is I can't link the thumbnails specifically to the image it is supposed to display. I hope this explanation helps.

  • Links in object states don't work

    I have an object state with several text boxes, hyperlinks and buttons works fine, UNTIL i create buttons to control the object states appearance. Then the integrated links in the mso don't work.
    Have tried with new document, new folio etc. As soon as I delete buttons to control the mso, the links works perfect. HELP please

    Hi,
    You can solve this problem putting the buttom outside the MSO. And recreate the links inside the MSO.
    //Felipe

  • Object States not working on iPad

    Hello!
    Crossing my fingers someone on here can help.
    I am working on, and nearly finished a children's book I made for the iPad. Everything looks great on my desktop content viewer but when I preview the app using the content viewer on my iPad a lot of my object states are being ignored. I searched these forums on people running into this problem but nothing seemed to turn up that related directly to myself.
    A lot of my object states are triggered by a button click and all timed to start one after the other so the image sequences I made in after effects look as seamless as possible. After the button click however it seems as though only 1 object state runs and then the rest are ignored.
    Here is a link to a video I recorded using quicktime to show how the app will function. I was hoping to record sound this wknd and hope this problem can be resolved soon!
    http://vimeo.com/39034611

    bobmagan wrote:
    It fires on both onactivate and onfocus. I had to do that to work on the Mac clients. Look at the code:
    onactivate="get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');" onfocus="if((typeof this.onactivate)!='function'){get_select_list_xml1(this,$x('P507_FORMS'),$x('P0_LOGIN_SCHOOL_YEAR'),this,'REFRESH_REPORT_LAYOUT_LOV');}"What about just
    onfocus="get_select_list_xml1(this, $x('P507_FORMS'), $x'P0_LOGIN_SCHOOL_YEAR'), this, 'REFRESH_REPORT_LAYOUT_LOV');"If not, supply the following information:
    <li>Full APEX version
    <li>Full DB version and edition
    <li>Web server architecture (EPG, OHS or APEX listener)
    <li>Browser(s)/version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/Item type(s)
    and the <tt>get_select_list_xml1</tt> JS code.
    Post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.

  • Object state not working if exported in PDF

    I'm working with Digital Publishing Suite and I have deeply appreciated the function "Object state". When used in connection with buttons and, eventually, the "Overlay Creator" it enables superb effects.
    I wonder about the fact that this helpful function does'nt work if the document is exported in PDF.
    Just in fact, at the moment, this feature works only with DPS, but I know that it is present since CS4, in times when DPS did'nt exist.
    Can you explain this?
    And when will be available in PDF exported documents?
    Thanks
    Lorenzo

    Hi Rahul,
    I have created the hyperlinks in the interactive (html) mode.
    While creating the hyperlink you just need to check one option "Use Complete URL path". This option will enable the hyperlink
    in the pdf mode too.
    FYI.. I am on BO XI 3.1
    Regards,
    Rohit

  • Object states in interactive PDF?

    Is it possible or will it be a feature soon?  I know I can essentially accomplish the same thing hiding buttons, but I have some very complicated object states in my interactive swf files and would like to publish them to PDF so they can be viewed on an iPad.  Will this feature ever happen?

    Don't hold your breath. PDF is now an ISO standard which means that it won't change quickly. There is no concept in PDF to support object states.
    Also you should know that the PDF readers on the iPad don't support much if any interactivity.
    You best best is creating a publication with the Adobe Digital Publishing Suite.  That would be more difficult to learn than PDF and more expensive. To learn more about it, see this link:
    http://help.adobe.com/en_US/digitalpubsuite/using/WS67cb9e293e2f1f60174dc2eb12f2ca67c28-80 00.html
    This technology supports slides shows like you can create with the Object Styles panel.

  • Why is my text rasterized and blurry when it loads in an object state?

    My fonts are coming out blurry when I use them in an object state and the state is displayed, but nice and clear when placed on the main page outside of an object state. I'm using viewer 25 for my folio version  and viewing it in adobe content viewer on the ipad. It is not yet published. Thank you.

    You need to keep in mind that DPS is still very much a cobbled onto InDesign solution. MSOs were intended for SWF output and any changes beyond that happen in the folio overlays panel.
    BTW, your replies via email show up on the web. No need to reply more than once.
    Bob

  • BMP question : got javax.ejb.EJBException error Object state not saved

    Could anybody please help me? I could not figure out what i did wrong.
    I got the javax.ejb.EJBException error: Object state not saved
    when i test the getname() method for findByPrimaryKey() and findAll() methods.
    Here is my code:
    package org.school.idxc;
    import javax.sql.*;
    import javax.naming.*;
    import javax.ejb.*;
    import javax.sql.*;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Enumeration;
    import java.util.Vector;
    * Bean implementation class for Enterprise Bean: status
    public class statusBean implements javax.ejb.EntityBean {
         private javax.ejb.EntityContext myEntityCtx;
         private int id;
         private String name;
         private DataSource ds;
         private String dbname = "jdbc/idxc";
         private Connection con;
         * ejbActivate
    public void ejbActivate() {
         * ejbLoad
         public void ejbLoad() {
         System.out.println("Entering EJBLoad");
         try
         Integer primaryKey = (Integer) myEntityCtx.getPrimaryKey();
         String sqlstmt = "select id, name from from status where id =?";
         con = ds.getConnection();
         PreparedStatement stmt = con.prepareStatement(sqlstmt);
         stmt.setInt (1,primaryKey.intValue());
         ResultSet rs = stmt.executeQuery();
         if (rs.next())
              this.id = rs.getInt(1);
              this.name = rs.getString (2).trim();
              stmt.close();
         } // if
         else
              stmt.close();
              throw new NoSuchEntityException ("Invalid id " + id);
         }// else
              } // try
         catch (SQLException e)
         System.out.println("EJBLOad : " + e.getMessage());
              } // catch
         finally
         try
              if (con != null)
              con.close();
              }// try
         catch (SQLException e)
              System.out.println("EJBLOad finally" + e.getMessage());
              } // catch
              }// finally
         * ejbPassivate
         public void ejbPassivate() {
         * ejbRemove
         public void ejbRemove() throws javax.ejb.RemoveException {
         System.out.println ("Entering ejb Removed");
         try
         String sqlstmt = "delete from status where id=" + id;
         con = ds.getConnection();
         Statement stmt = con.createStatement();
         stmt.executeUpdate(sqlstmt);
         stmt.close();
         }// try
         catch (SQLException e)
         System.out.println("Ejb Remove" + e.getMessage());     
         } // catch
         finally
         try
              if (con!=null)
                   con.close();
         }// try
         catch (SQLException e)
              System.out.println ("EJBRemoved " + e.getMessage());
         } // catch
         } // finally
         * ejbStore
         public void ejbStore() {
         System.out.println("Entering the ejbStore");
         try
    String sqlstmt = "update status set id=" + id + ",name='" + name + "' where id=" + id;
         con = ds.getConnection();
         Statement stmt = con.createStatement();
         if (stmt.executeUpdate(sqlstmt) != 1)
              throw new EJBException ("Object state not saved");
    stmt.close();     
         } // try
         catch (SQLException e)
              System.out.println ("EJBStore : " + e.getMessage());
         }// catch
         finally
         try
              if (con != null)
              con.close();
         } // try
         catch(SQLException e)
              System.out.println ("EJBStore finally " + e.getMessage());
         } // catch
         } // finally
         * getEntityContext
         public javax.ejb.EntityContext getEntityContext() {
              return myEntityCtx;
         * setEntityContext
         public void setEntityContext(javax.ejb.EntityContext ctx) {
              myEntityCtx = ctx;
              try
              InitialContext initial = new InitialContext();
              ds = (DataSource)initial.lookup(dbname);
    } // try
              catch (NamingException e)
              throw new EJBException ("set Entity context : Invalid database");     
              }// catch
         * unsetEntityContext
         public void unsetEntityContext() {
              myEntityCtx = null;
         * ejbCreate
         public Integer ejbCreate(Integer key, String name) throws javax.ejb.CreateException {
    this.id = key.intValue();
    this.name = name;
              System.out.println ("Entering ejbCreated!!!");
              try
              String sqlstmt = "insert into status(id,name) values (" + id + ",'" + (name == null ? "" : name) + "')";
              con = ds.getConnection();
              Statement stmt = con.createStatement();
              stmt.executeUpdate(sqlstmt);
              stmt.close();
              }// try
              catch (SQLException e)
              System.out.println("EJBCreate : SQLEXception ");     
              }// catch
              finally
              try
              if (con!=null)
                   con.close();
              }// try
              catch (SQLException e)
              System.out.println ("EJB Created Finally : SQLException");
              e.getMessage();
              } // catch
              }// finally
              this.id = key.intValue();
              this.name = name;
              return key ;
         * ejbPostCreate
         public void ejbPostCreate(Integer id, String name) throws javax.ejb.CreateException {
         * ejbFindByPrimaryKey
         public Integer ejbFindByPrimaryKey(
              Integer key) throws javax.ejb.FinderException {
              try
              String sqlstmt = "select id from status where id=" + key.intValue();
              con = ds.getConnection();
              Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(sqlstmt);
              if (!rs.next())
              throw new ObjectNotFoundException();     
              } // if
              rs.close();
              stmt.close();
              } // try
              catch (SQLException e)
              System.out.println ("EJBFindBYPrimaryKey " + e.getMessage());     
              } // catch
              finally
              try
              if (con!=null)
                   con.close();
              }// try
              catch (SQLException e)
              System.out.println ("EJB Find by primary key" + e.getMessage());
              }// catch
              }// finally
              return key;
         * @return Returns the name.
         public String getName() {
              return this.name;
         * @return Returns id
         public int getId() {
              return this.id;
         * @param name The name to set.
         public void setName(String xname) {
              this.name = xname;
         * ejbFindByLastnameContaining
         public Enumeration ejbFindAllNamne () throws javax.ejb.FinderException
         try
         String sqlstmt = "select id from status order by id";
         con = ds.getConnection();
         Statement s = con.createStatement();
         ResultSet rs = s.executeQuery(sqlstmt);
         Vector keys = new Vector();
         while (rs.next())
              keys.add(new Integer(rs.getInt(1)));
         }// while
         rs.close();
         s.close();
         con.close();
         return keys.elements();
         } // try
         catch (SQLException e)
              throw new FinderException (e.toString());
         } // catch
    }

    Hi,
    if you look at your error message you will see the problem. In your code you've missed to implement
    public void ejbPassivate {}
    so your code looks like this
    import java.lang.Object;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.rmi.RemoteException;
    import java.lang.Math;
    import java.util.Random;
    import java.io.*;
    /** * Title: * Description: * Copyright: Copyright (c) 2001 * Company: * @author * @version 1.0 */
    public class DiceEJB implements SessionBean, Serializable
         public int[] Roll()
              Random rng = new Random();
              int[] diceArray = new int[5];
              for(int i =0; i < diceArray.length;i++)
                   diceArray[i] = (Math.abs (rng.nextInt()) % 6) +1;
              return diceArray;
         public DiceEJB(){}
         public void ejbCreate() {}
         public void ejbRemove() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void setSessionContext (SessionContext sc)
         private void writeObject(ObjectOutputStream oos) throws IOException
              oos.defaultWriteObject();
         private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
              ois.defaultReadObject();
    bye

  • How we can intiallize the object  state

    how we can intialize the object state without using constructor or getter setter method?
    is their is any way to intialize the state of object using encapsulation??

    GouravBansal wrote:
    how we can intialize the object stateUsing the constructor.
    without using constructor You could also use an instance initializer. That's probably what the interviewer was getting at.
    or getter setter method?Once you call a getter/setter method, you're past initialization and are actively modifying the state post-initialization.
    is their is any way to intialize the state of object using encapsulation??As noted, this makes no sense. Encapsulation is the practice of maintaining the state purely through methods, constructors, and initializers of a class, in as limited and traceable a way as possible.

  • Objects states in an object state

    I am finding it impossible to insert an object state into a state of another object state...
    So that in object state 1 there is another series of object states (B) that would disappear once object state 1 goes to the next state...
    the end result I am trying to achieve is to have a question in an object state that the user can touch to show the answer...
    example: state 1 appears a question...when you touch it the answer appears, in state 2 a different question/answer etc...

    @hooplife – there are two solutions:
    1. InDesign CS5: copy or cut the MSO to the clipboard, paste after selecting the one and only insertion point in the empty text frame with your text tool (= double click the text frame with the selection tool). You can change position of the inserted MSO by using the anchored object options.
    2. InDesign CS5.5 and above:
    if you select an object you may have noticed that there is a new control on every object: the small blue square. Hover your mouse pointer over the square and just follow the instructions of the tool tip.
    In case you have disabled the tool tips function:
    Simply drag the little blue square to the one and only insertion point in the empty text frame.
    Use shift + drag to get the same result like pasting the MSO to the insertion point or:
    use alt + drag to immediately getting the options for anchored objects.
    Uwe

Maybe you are looking for

  • Print total in last page,

    Hello Everyone In PLD i have a requirement whereby if the layout goes into more than a page says 2 pages,then the total should display "Continued in next page" in the 1st page and in the last page(in our case 2nd page) total should print the document

  • Can we open Solidworks 2009 files with Acrobat 9 pro extended

    Hello, I'm testing Acrobat 9.0.0 Pro extended and I can not open Solidworks 2009 files. But I can open Solidworks 2007 files. I'm on Windows XP 64 bits. Can you tell me if this feature is corrected in newer version as 9.1 and later? Or any other solu

  • Where can I get a demo audiobook?

    Hi All, Looking to try out audiobooks, particularly the "chapter marker" feature with the intention of turning some ofthe DJ mixes I own into audiobooks, so I can listen to them without gaps but with the ability to skip to points in the mix. ANyone k

  • I have a problem with my phone n73

    i have a problem with my phone n73 my memory work good and i can see it from gallery but when i want to save some thing it save directelly in memory dont give me choise and when i want to sign ring tone for alert or ringtone or massege i dont see any

  • Idoc Failing With IDOC_INPUT_ALEAUD

    hi Trying to post an idoc from XI to R/3 system. The message has succesfully come into XI, but in R/3 system it is showing with error "Function module not allowed: IDOC_INPUT_ALEAUD" Could someone help. thx, Pradip