Component.validate() leaves invalidated

Hello,
I have the following problem:
nodeComp.validate();
if (!nodeComp.isValid())
     System.err.println("Component is invalid!!!");It keeps printing that the component is invalid.
I am using a JComponent as a stamp (same as in JTable) so my component is not really added to any container.
PS: bsampieri are you there?

yeah...
Did you read the API docs on what validate() and isValid() means? I don't believe, from reading them just now, that they are that closely related.
validate() -- Ensures that this component has a valid layout. This method is primarily intended to operate on instances of Container.
isValid() -- Determines whether this component is valid. A component is valid when it is correctly sized and positioned within its parent container and all its children are also valid.
What's the real problem? That it says it's valid or not shouldn't matter. If you call setSize() and validate(), after that you should be able to call paint() on the component with another graphics object to draw that component on the graphics.

Similar Messages

  • Oracle DataBase server component is in INVALID in 10.2.0.4

    Hi
    I took full RMAN backup from production two node RAC system. Production system is in Oracle 10.2.0.3. I tried to restore the backup in another system which is single node system Oracle 10.2.0.4. I restored and recovered database successfully. When I try to do 'alter database open resetlogs' I received following error:
    RMAN-03002: failure of alter db command at 11/05/2009 08:39:10
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00704: bootstrap process failure
    ORA-39700: database must be opened with UPGRADE option
    Then I started database with upgrade option.
    SQL> STARTUP UPGRADE
    SQL> @?/rdbms/admin/catupgrd.sql
    Below shows the invalid objects.
    Oracle DataBase server component is in INVALID status
    COMP_TIMESTAMP UPGRD_END 2009-11-05 11:16:45
    Oracle Database 10.2 Upgrade Status Utility 11-05-2009 11:16:45
    Component           Status      Version HH:MM:SS
    Oracle Database Server                       INVALID           10.2.0.4.0  00:11:45
    JServer JAVA Virtual Machine      VALID      10.2.0.4.0 00:02:01
    Oracle XDK           VALID      10.2.0.4.0 00:00:20
    Oracle Database Java Packages VALID      10.2.0.4.0 00:00:20
    Oracle Text           VALID      10.2.0.4.0 00:00:14
    Oracle XML Database      VALID      10.2.0.4.0 00:03:05
    Oracle Real Application Clusters             INVALID           10.2.0.4.0  00:00:01
    Oracle Workspace Manager      VALID      10.2.0.4.3 00:00:55
    Oracle Data Mining      VALID      10.2.0.4.0 00:00:34
    OLAP Analytic Workspace      VALID      10.2.0.4.0 00:00:20
    OLAP Catalog      VALID      10.2.0.4.0 00:00:55
    Oracle OLAP API      VALID      10.2.0.4.0 00:00:41
    Oracle interMedia      VALID      10.2.0.4.0 00:06:49
    Spatial           VALID      10.2.0.4.0 00:01:45
    Oracle Expression Filter      VALID      10.2.0.4.0 00:00:14
    Oracle Enterprise Manager      VALID      10.2.0.4.0 00:01:19
    Oracle Rule Manager      VALID      10.2.0.4.0 00:00:09
    How do I resolve this issue ?

    Hi Srini
    I did the following steps and could resolve Databas server invalid to valid.
    SQL>sqlplus / as sysdba
    SQL>drop table plan_table;
    SQL>@?/rdbms/admin/utlxplan
    SQL>@?/rdbms/admin/prvtspao.plb
    SQL>@?/rdbms/admin/utlrp.sql
    Oracle Database 10.2 Upgrade Status Utility 11-05-2009 16:41:55
    Component Status Version HH:MM:SS
    Oracle Database Server                    VALID      10.2.0.4.0  00:12:05
    JServer JAVA Virtual Machine VALID 10.2.0.4.0 00:02:09
    Oracle XDK VALID 10.2.0.4.0 00:00:20
    Oracle Database Java Packages VALID 10.2.0.4.0 00:00:20
    Oracle Text VALID 10.2.0.4.0 00:00:14
    Oracle XML Database VALID 10.2.0.4.0 00:03:04
    Oracle Real Application Clusters        INVALID      10.2.0.4.0  00:00:01
    Oracle Workspace Manager VALID 10.2.0.4.3 00:00:59
    Oracle Data Mining VALID 10.2.0.4.0 00:00:33
    OLAP Analytic Workspace VALID 10.2.0.4.0 00:00:21
    OLAP Catalog VALID 10.2.0.4.0 00:00:56
    Oracle OLAP API VALID 10.2.0.4.0 00:00:41
    Oracle interMedia VALID 10.2.0.4.0 00:06:52
    Spatial VALID 10.2.0.4.0 00:01:59
    Oracle Expression Filter VALID 10.2.0.4.0 00:00:16
    Oracle Enterprise Manager VALID 10.2.0.4.0 00:01:29
    Oracle Rule Manager VALID 10.2.0.4.0 00:00:09
    Is there any way can resolve ORacle Real Application Cluster Invalid

  • Component - validate, invalidate

    What's the proper way to use the Component validate and invalidate methods?
    Quick background: I've extended JPanel to draw an image as it's background. The image can be scaled and what i want to do is set the preferred size of the panel to reflect that of the scaled image size.
    I've placed some zoom in/out buttons in a frame along with the panel but i can't get them to work as i would expect. The code below does what i want it to do but i don't understand why i need to set both the preferred size and the size, then why i need to call invalidate and then validate on the parent.
    Any ideas/guidance on the proper way of resizing components and getting the parents to re-layout with the new sizes?
    Thanks
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import javax.swing.JPanel;
    public class ImagePanel extends JPanel {
         /** Original image */
         private Image image;
         /** Scaled version */
         private Image zoomedImage;
         /** Scaled width */
         private int imageZoomWidth;
         /** Scaled height */
         private int imageZoomHeight;
         @Override
         protected void paintComponent(Graphics g) {
              g.clearRect(0, 0, getWidth(), getHeight());
              g.drawImage(zoomedImage, 0, 0, this);
         public void setImage(Image image) {
              this.image = image;
              imageZoomWidth = image.getWidth(this);
              zoom(0);
         public void zoom(int delta) {
              imageZoomWidth += delta;
              zoomedImage = image.getScaledInstance(imageZoomWidth, -1,
                        Image.SCALE_FAST);
              imageZoomHeight = zoomedImage.getHeight(this);
              // Both these are needed?
              setPreferredSize(new Dimension(imageZoomWidth, imageZoomHeight));
              setSize(getPreferredSize());
              // invalidate to force re-layout of parents
              invalidate();
              // Why is this is needed too ?
              if (getParent() != null) {
                   getParent().validate();
    import java.awt.Color;
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    public class ImagePanelTest {
         public static void main(String[] args) throws FileNotFoundException,
                   IOException {
              JFrame frame = new JFrame("Image Panel Test");
              JButton zoomInButton = new JButton("Larger");
              JButton zoomOutButton = new JButton("Smaller");
              final ImagePanel imgPanel = new ImagePanel();
              imgPanel.setImage(ImageIO.read(new FileInputStream(
                        "image09-07-14_12-34-57-99.jpg")));
              imgPanel.setBorder(BorderFactory.createLineBorder(Color.black));
              zoomInButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        imgPanel.zoom(50);
              zoomOutButton.addActionListener(new ActionListener() {
                   @Override
                   public void actionPerformed(ActionEvent e) {
                        imgPanel.zoom(-50);
              Container container = frame.getContentPane();
              JPanel panel = new JPanel();
              panel.setLayout(new FlowLayout());
              panel.add(zoomOutButton);
              panel.add(imgPanel);
              panel.add(zoomInButton);
              container.add(new JScrollPane(panel));
              frame.setSize(800, 600);
              frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent we) {
                        System.exit(0);
              frame.setVisible(true);
    }

    You're playing the role of the RepaintManager with that code. Just change your zoom method to this,
    public void zoom(int delta) {
        imageZoomWidth += delta;
        zoomedImage = image.getScaledInstance(imageZoomWidth, -1,
                Image.SCALE_FAST);
        imageZoomHeight = zoomedImage.getHeight(this);
        setPreferredSize(new Dimension(imageZoomWidth, imageZoomHeight));
        revalidate();
        repaint();
    }and all will be well.

  • Java.lang.IllegalStateException:Attempt to validate already invalid Region

    Hi,
    i am using jdev 11.1.1.2
    I am working in region, I drag drop the table and so on.Suddenly i start getting this error -”java.lang.IllegalStateException: Attempt to validate an already invalid RegionSite”.
    any idea how to solve it.

    check all these points..
    - Check all bindings of page. if you not able to find it then delete it and create again.
    - Add the “-Djbo.debugoutput=console” in JAVA options of the Run/Debug/Profile to see the error
    - Check if all the library references for the UI project are proper and that is also accessible.

  • Calendar component validate and valueChange events in creator 2_1

    Hi, I have a very simple test scenario for calendar component -
    two textfields + one calendar. When value changed (either via manually enter or select date from popup calendar), I want to see if validate and valueChange events get fired.
    ( similar to this post http://developers.sun.com/jscreator/reference/code/samplecomps/2004q2/calendar/calendar_component.pdf)
    So, in page1, I have:
    public void calendar1_validate(FacesContext context, UIComponent component, Object value) {
    // TODO: Replace with your code
    textField2.setValue("validate visit:"+calendar1.getValue());
    public void calendar1_processValueChange(ValueChangeEvent event) {
    // TODO: Replace with your code
    textField1.setValue("valuechange visit:"+calendar1.getValue());
    In the calendar property, I have:
    validate: lengthValidator1.validate()
    valueChange: calendar1_processValueChange
    valueChangeListener: #{Page1.calendar1_processValueChange}
    However, nothing happens when a date, valid or not, was entered or a new date was selected from popup.
    I have a message attached to calendar1 and it shows nothing.
    I set break points in functions above and there is not break.
    Question:
    1. Where can I look for clues of what events get fired?
    2. Any simple thing that I missed using calender? simple property setting...etc.
    System: vista + creator 2_1
    Thanks in advance for your suggestions

    There may be a couple of things going on here.
    First, is the page being submitted?
    Second, I think custom validators have to be registered. Have you registered the validator?

  • Shell script to validate all invalid objects?

    Hello DBA's.
    New to DBA ing and so seek your help.. I am using oracle Oracle9i Release on a Solaris box.
    I need a shell script that will check all invalid objects on a DB and would validate it by running utlrp.sql. I know i can do this manually but i am asked to automate the process..
    Kindly suggest where i can find a shell script or share this script with me.. it would be much appreciated.
    Regards!

    OK, this is possible, and here is one way entirely within SQL*Plus where it will try once more to recompile invalid objects, please note that this (top one) will work only on 11g or greater, and only getting around to testing this properly now:
    #!/bin/ksh
    . $HOME/.profile
    export ORACLE_SID=<your_SID>
    sqlplus '/ as sysdba' << EOF
    set serveroutput on
    set pagesize 1000
    @${ORACLE_HOME}/rdbms/admin/utlrp.sql
    begin
    for cur  in (select do.owner || '.' || do.object_name module, object_type from dba_objects do join obj$ o on (do.object_id = o.obj#) where o.status = 5)
    loop
    begin
    execute immediate 'alter ' || cur.object_type || ' ' || cur.module  || ' compile';
    exception when others then continue;
    end;
    end loop;
    end;
    spool <path_and_filename_of_your_Invalid_Objects_output_file>
    select do.owner || '.' || do.object_name from dba_objects do join obj$ o on (do.object_id = o.obj#) where o.status = 5;
    spool off
    quit
    EOF
    exit $?For < 11g:
    #!/bin/ksh
    . $HOME/.profile
    export ORACLE_SID=<your_SID>
    sqlplus '/ as sysdba' << EOF
    set serveroutput on
    set pagesize 0
    set heading off
    set termout off
    set feedback off
    @${ORACLE_HOME}/rdbms/admin/utlrp.sql
    spool /tmp/recompile.sql
    begin
    for cur  in (select do.owner || '.' || do.object_name module, object_type from dba_objects do join obj$ o on (do.object_id = o.obj#) where o.status = 5)
    loop
    dbms_output.put_line( 'alter ' || cur.object_type || ' ' || cur.module || ' compile;');
    end loop;
    end;
    spool off
    @/tmp/recompile.sql
    !rm /tmp/recompile.sql
    set heading on
    set termout on
    set pagesize 1000
    spool <path_and_filename_of_your_Invalid_Objects_output_file>
    select do.owner || '.' || do.object_name from dba_objects do join obj$ o on (do.object_id = o.obj#) where o.status = 5;
    spool off
    quit
    EOF
    exit $?Edited by: SeánMacGC on Apr 29, 2009 1:12 PM

  • 9.0.3 validates an invalid XML document as valid

    JDeveloper 9.0.3 validates the XML document below with no errors, although it contains several. It also insists on a namespare (even a blank one) before the validator will run, even though it has an internal DTD.
    Also, there is no DTD file type in JDeveloper. Why?
    -----------------------Clip here-----------
    <?xml version="1.0"?>
    <!DOCTYPE todo [
    <!ATTLIST description priority NMTOKEN "low">
    <!ELEMENT description (#PCDATA)>
    <!ELEMENT task (description)>
    <!ELEMENT todo (task)+>
    ]>
    <todo xmlns="">
    <task>
    <description priority="high">Backup sales data for last month</description>
    </task>
    <task>
    <description priority="l ow">Complete end of month report</description>
    </task>
    <task>xxx</task>
    </todo>

    Ed,
    JDev 9.0.3 supports validation based on XML Schema only, not DTD.
    DTD validation is being considered for a future release, but has not
    been scheduled yet so I cannot give you an idea of when it's coming.
    I'll try to encourage the team to write a little Extension we could
    put up on OTN to restore this validate against the DTD feature that
    JDeveloper 3.2 did support.

  • Polymorphic View commit does not validate & returns invalid status

    JClient 9.05.2, using the departments table i was able to reproduce the problem im having.
    I added a type field and created departments type a and b, included them as subtypes in the default departments view and tested the Appmodule departmentsA view, create and then save without any input -- the primary key validates as being required as it should.
    Now create a panel for DepartmentAView1 perform insert and then commit -- no validation and this ties to another posting I have isTransactionDirty() returns the wrong results. What to do, suggestions?

    Hello,
    It's just refresh problem. Your Commit button is not aware of checkbox checking so it isn't changing it's enability (initially disabled).
    What you could do is:
    a) set checkbox autoSubmit="true" and set Commit button partialTrigger to checkbox Id.
    This will inform Commit button to refresh.
    or (better)
    b) remove Commit button disabled property.
    This will keep Commit button always enabled.

  • Component XDB is invalid

    Hi,
    After applying the database patchset 9.2.0.8 XDB shows invalid.
    How i make to valid.
    17:37:02 SYS@prd > select comp_id,version,status,schema from dba_registry;
    COMP_ID , VERSION , STATUS , SCHEMA
    XDB   ,                             9.2.0.8.0    ,                  INVALID  ,   XDB
    Abk

    Check this link
    http://www.experts-exchange.com/Database/Oracle/Q_23240984.html
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com

  • Validating xml in pipeline - if not valid drop file in invalid folder

    My goal is to receive an xml file through a customized pipeline so I can validate it.  If it's valid I drop it in 'valid' folder.  Then my orchestration will pick it from that location and do whatever it will do with it.  This works fine.
     But if the xml file is NOT valid I want to drop it in a an 'INVALID' folder and have a different orchestration pick it up and send an email to me.  Is this possible?  In my pipeline I don't have a dissambler, just an XMLValidator with the appropriate
    schema in the document schemas collection.  When I do drop in an 'invalid' xml file according to the schema, the pipeline is suspended.  How can I drop that invalid xml file into a folder?
    I've been learning/working with BizTalk for about 3 months.  I'm trying to keep this simple and avoid doing any custom c# code until I'm more comfortable with BizTalk.
    thank you in advance for your expert advice.
    Jean Stiles

    Hi Jean,
    Your validation pipeline should promote the "MessageType" property of the message (if the orchestration doesn't have any other filters and if the orchestration's receive shape has a message type pointing to specific message). Its seems that when your validation
    component validate any incoming message, after its process it shall promote the message type property of the message. Other wise you would not have any subscriber for the message published. The error "The published message could not be routed because no subscribers
    were found" is due to this issue. i.e your orchestration subscription doesn't match to the message outputted by your custom vaidation component.
    Not sure what is the full functionality of your custom validation component. if its simply validating the message, you can still get this functionality by using XML-Receive pipeline and set the property "Validate Document" to "True" and by specifying the
    "DocumentSpecNames" to the schema which you want to validate the incoming message against.
    If you're using custom pipeline to do standard validation, then follow like this:
    Receive Port (with Enable routing for Failed Messages enabled)  Receive Location with XML-Receive pipeline  (Validate Document" to "True" and by specifying the "DocumentSpecNames" to the schema which you want to validate )
    Bind the Receive Port to Orchestration - Do your process as normal
    Create a send port with above filter for ErrorReport and configure this send port to send the invalid message to your invalid folder.
    If you're using custom pipeline to something more than standard validation of XML-Receive pipeline , then follow like this:
    Receive Port (with Enable routing for Failed Messages enabled)  Receive Location with Your custom validation pipeline component.
    Ensure your custom pipeline component promotes the message type property as
    string systemPropertyNS = @”http://schemas.microsoft.com/BizTalk/2003/system-properties”;
    outboundMsg.Context.Promote(“MessageType”, systemPropertyNS, “http://NameSpace#RootNode”);
    replace the outboundMsg to the outbound message you output in your custom validation component. And message type to relevant value as yours. Or by some means ensure your custom pipeline output the message with matces to subcription expected by your Orchestration.
    Bind the Receive Port to Orchestration - Do your process as normal
    Create a send port with above filter for ErrorReport and configure this send port to send the invalid message to your invalid folder.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Oracle Xml Database Invalid On Dba_registry in Oracle 9i

    Hi All,
    We are facing some issue with XML DB status of this component is showing INVALID in dba_registry
    and we try to validate it with below step
    connect / as sysdba
    execute dbms_regxdb.validatexdb;
    but it gives us below error
    SQL> execute dbms_regxdb.validatexdb;
    BEGIN dbms_regxdb.validatexdb; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'DBMS_REGXDB.VALIDATEXDB' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Thanks in advance
    Regards,
    Bhanu Chander

    Hello,
    If XMD DB is not currently used you can try to reinstall XML DB by executing the following scripts as sysdba:
    To deinstall:
    @OH/rdbms/admin/catnoqm.sql
    To reinstall:
    @?/rdbms/admin/catqm.sql
    @?/rdbms/admin/catxdbj.sql Before doing that you should set the following parameter as follows:
    shared_pool_size =150 MB
    java_pool_size =150 MB And, Turn on AUTO EXTEND on the XDB tablespace.
    For more details please look at the Notes *243554.1* of My Oracle Support.
    Hope it can help.
    Best regards,
    Jean-Valentin

  • Metadata of component ManageTicketWorkhourUIComp is not valid!

    Hi guys, i have a ui dc referencing a model dc. when i activate the ui dc, a problem  occurs"  Metadata of component ManageTicketWorkhourUIComp is not valid! com.neusoft.ase.tm.ticketworkhour.comp.ManageTicketWorkhourUIComp --> Component ManageTicketWorkhourUIComp: Has invalid component usage 'ManageTicketWorkhourModelCompInst'
         [wdgen] [Error]   .GetTicketWorkhourArr: The mapping definition is inconsistent, the mapped context element does not exist.
    How should i do?

    Hi,
    Could you pl check the activation status of the model Dc .
    Window->ShowView->Activation Requests.
    Could you pl update the CSN the build log.
    Regards
    Ayyapparaj

  • How to get Leave Request text in ABAP HR

    Dear Expert,
    I am using BADI PT_ABS_REQ to validate leaves applied on portal.
    Here I am getting ITEM_ID for the leave request, but I need leave request_id for leave text.
    Also I want to update the timing of leave manually, based on the Leave applied (Exp First Half/Second Half).
    Thanks.
    Regards,
    Hemendra

    The text i think you are referring to is in table PTREQ_NOTICE. The key is REQUEST_ID.
    Edit : Sorry misunderstood the question. You can get REQUEST_ID from PTREQ_HEADERS where ITEM_LIST_ID equals ITEM_ID.
    Edited by: Pedro Guarita on Apr 13, 2011 3:23 PM

  • Real Application Clusters [upgrade] INVALID

    Hi,
    I was upgrading an Oracle Apps 9i database to 10g (to upgrade the 11i to R12) and when I ran the upgrade info utility, in the section Components I have ---->Real Application Clusters [upgrade] INVALID.. It is the only one with invalid.
    I have no RAC, but I want to put this on RAC.
    What I have to do ?
    thanks,
    Dana

    What I have to do ?You have to do nothing :)
    Since you do not have RAC, then the status column of the "Real Application Clusters" component should show 'INVALID'
    but I want to put this on RACYou can do that later, once the upgrade is done.

  • Unable to validate Invoice Lines

    Hi,
    I have an invoice and it has 5 lines .This particular invoice has been accounted and later i have added 5 more lines to the same invoice
    by mistake i have cancelled the entire invoice with out validating the newly added 5 lines.
    My issue is every month end the invoice is showing up in "Unaccounted report"out put,exception as 'Needs Revalidation'
    How can i validate these lines
    Thanks

    Hi,
    Thanks for you reply.
    The invoice has no Holds on it. it has been cancelled with 5 accounted lines and 5 invalid lines.I jut want to validate those invalid 5 lines that's it.
    so that this invoice will not come in "unaccounted report"
    Thanks

Maybe you are looking for

  • Barcoding AR Invoices

    Can anyone tell me if Oracle AR has the ability to produce barcoding on invoices. Or if there is a product that interacts with Oracle to produce barcoding??

  • E1200 v1. IPTV (multicast) is not working

    sorry my english. I have e1200 v1 with last firmware 1.0.03. Device using as AP/switch (no WAN port installed). When I open the TV chanal (239.0.1.3) the pictures 1 sec good and then stoped, device not responding. When TV off, 3 sec later internet wo

  • Opening Canon 6D .CR2 raw files with CS5 Extended

    Can't open Canon EOS 6D raw files with CS5. What is the minimum I need to do to open Canon  EOS 6D .CR2 raw files in Photoshop CS5 Extended version 12.1 x64, and Brige CS5 version 4.1.0.54, and Camera Raw version 6.7.0.339? I would rather not have to

  • Character conversion depends on LC_CTYPE on a Solaris

    I wrote the following code: public class Main {      public static void main(String[] args) throws Exception {           byte[] buf = {-23};           InputStream is = new ByteArrayInputStream(buf);           BufferedReader r = new BufferedReader(new

  • Control bar problems

    My control bar seems to ignore the flashvars used. It autoplays and hides even though set to false. My code <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver