Cannot find or invalidate its owning entity.

hi when i click my createinsert am geting this error cannot find or invalidate its owning entity. am in jdeveloper 11.1.1.6.0
my log error is
<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Detail entity UamOrganisationUser with row key oracle.jbo.Key[null 7601 ] cannot find or invalidate its owning entity.
oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamOrganisationUser with row key oracle.jbo.Key[null 7601 ] cannot find or invalidate its owning entity.
     at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
     at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
     at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
     at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
     at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
     at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
     at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
     at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
     at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
     at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
     at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2514)
     at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:11079)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1364)
     at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
     at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
     at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.el.parser.AstValue.invoke(Unknown Source)
     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
     at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
     at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
     at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
     at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
     at java.security.AccessController.doPrivileged(Native Method)
     at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
     at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
     at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
     at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
     at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
     at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
this is my association
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
<!---->
<Association
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="OrguserlinkOrganisationsFkAssoc"
  Version="11.1.1.61.92"
  InheritPersonalization="true">
  <DesignTime>
    <Attr Name="_isCodegen" Value="true"/>
  </DesignTime>
  <AssociationEnd
    Name="UamOrganisations"
    Cardinality="1"
    Source="true"
    Owner="model.UamOrganisations"
    LockLevel="NONE">
    <DesignTime>
      <Attr Name="_aggregation" Value="0"/>
      <Attr Name="_finderName" Value="UamOrganisations"/>
      <Attr Name="_isUpdateable" Value="true"/>
      <Attr Name="_minCardinality" Value="1"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.UamOrganisations.Organisationid"/>
    </AttrArray>
  </AssociationEnd>
  <AssociationEnd
    Name="UamOrganisationUser"
    Cardinality="-1"
    Owner="model.UamOrganisationUser">
    <DesignTime>
      <Attr Name="_aggregation" Value="0"/>
      <Attr Name="_finderName" Value="UamOrganisationUser"/>
      <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.UamOrganisationUser.Organisationid"/>
    </AttrArray>
  </AssociationEnd>
</Association>Edited by: adf009 on 2013/03/24 1:12 AM

this is my association between parent and child
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
<!---->
<Association
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="OrguserlinkOrganisationsFkAssoc"
  Version="11.1.1.61.92"
  InheritPersonalization="true">
  <DesignTime>
    <Attr Name="_isCodegen" Value="true"/>
  </DesignTime>
  <AssociationEnd
    Name="UamOrganisations"
    Cardinality="1"
    Source="true"
    Owner="model.UamOrganisations"
    LockLevel="NONE">
    <DesignTime>
      <Attr Name="_aggregation" Value="0"/>
      <Attr Name="_finderName" Value="UamOrganisations"/>
      <Attr Name="_isUpdateable" Value="true"/>
      <Attr Name="_minCardinality" Value="1"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.UamOrganisations.Organisationid"/>
    </AttrArray>
  </AssociationEnd>
  <AssociationEnd
    Name="UamOrganisationUser"
    Cardinality="-1"
    Owner="model.UamOrganisationUser">
    <DesignTime>
      <Attr Name="_aggregation" Value="0"/>
      <Attr Name="_finderName" Value="UamOrganisationUser"/>
      <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.UamOrganisationUser.Organisationid"/>
    </AttrArray>
  </AssociationEnd>
</Association>i try to folow this
http://tfathy.blogspot.com/2011/04/detail-entity-with-row-key-null-cannot.html
http://one-size-doesnt-fit-all.blogspot.com/2008/05/jbo-25030-failed-to-find-or-invalidate.html
Edited by: adf009 on 2013/03/24 1:22 AM

Similar Messages

  • Detail entity Location with row key null cannot find or invalidate its owni

    I have a simple parent child relationship generated in ADF BC. It's 1 to many...a Work Request can have one or more Locations. If I turn on Composition Association in my assoc definition, I get "oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity Location with row key null cannot find or invalidate its owning entity." The error occurs on the CreateInsert for the Location entity. I've spent hours looking at other solutions and posts about this issue to no avail, including attempting both methods at the below post.
    http://radio.weblogs.com/0118231/stories/2003/01/17/whyDoIGetTheInvalidownerexception.html
    When I turn off Composition Association and I only add one Location to the Work Request, both the CreateInsert and the Commit work properly. However, if I add a second Location, I get a database constraint violation because ADF BC tries to commit the Location before the Work Request. I have verified that the Work Request Id is populated properly on the Location object, so I'm at a loss at this point. I'm on 11.1.1.3.

    Here's the answer in case someone else burns a day on this like I did. Turns out it's a bug (SR submitted), and one that's easy to recreate. The problem is that the parent object isn't "initialized" until after one of it's setters are called. So, what was happening was that I was invoking CreateInsert on the parent, then CreateInsert on the child, then setting properties on the child. So, since I invoked setters on the child first, the child is initialized first, and is thus ADF BC atttempts to insert it first upon commit. The strange thing is that the child had the correct ID for it's associated parent in the logs. Anyways, here are the steps to easily recreate:
    1. Model a simple parent child relationship (1 to many, not sure if that matters).
    2. Generate the ADF BC components (entity, assoc, vo's, and view links).
    3. Ensure that Composition Association is checked in the Assoc object.
    4. Add the parent to the app module, then add the child nested below it.
    5. Create a new task flow and drop CreateInsert for the parent object onto the flow. Make this the default activity
    6. Drop the CreateInsert from the child object onto the task flow, and link it as the outcome of the parent's CreateInsert
    7. Drop a page fragment onto the task flow that is bound to the parent object, and make it the third step in the task flow.
    8. Drop a commit onto the task flow as the forth step, and place the button on the page that invokes the action corresponding to the commit.
    Run it. As soon as the CreateInsert is hit for the child, the error is thrown.
    Another associated bug is that (appears to have the same culprit) the child will not be inserted unless one of it's attributes is set (note that you have to turn off Composition Association to get the above error to disappear). However, the child will not be inserted into the database unless one of its setters are invoked.
    **The workaround is to use CreateWithParams instead of CreateInsert in order to create the parent object, and pass in at least one parameter to set an attribute on the parent (even to blank). The same must be done on the child unless one of it's setters are invoked.
    Note that we're using SQL Server 2008 R2. This appears to be a problem with ADF BC and not with the target DB platform, but I have not tested with Oracle.

  • Detail entity with row key null cannot find or invalidate it

    hi am trying to insert parent table values and child table values same time in same view,am in jdeveloper 11.1.1.6.0 am geting this error
    the error happen when i click createinsert ,am doing this in testmodel
    93] executeQueryForCollection ViewObject:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1, RowSet:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [94] _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1>#q computed SQLStmtBufLen: 137, actual=110, storing=140
    [95] SELECT LutProfcategory.PROFCATCODE,         LutProfcategory.PROFCATEGORY FROM LUT_PROFCATEGORY LutProfcategory
    [96] ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1 Created new QUERY statement
    [97] Bind params for ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1
    [98] For RowSet : _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [99] Passing to detail entity.create: CadaccUserFkAssoc.UamCadastreaccounts = oracle.jbo.Key[11309 ]
    [100] OracleSQLBuilder Executing doEntitySelect on: LUT_COUNTRY (false)
    [101] Built select: 'SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry'
    [102] Executing FAULT-IN...SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry WHERE COUNTRYCODE=:1
    Exception in thread "AWT-EventQueue-0" oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamUserdetails with row key null cannot find or invalidate its owning entity.
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at model.Entity.UamUserdetailsImpl.create(UamUserdetailsImpl.java:913)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2498)
         at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11042)
         at oracle.jbo.jbotester.NavigationBar.doInsertAction(NavigationBar.java:136)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:109)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Edited by: adf009 on 2013/04/19 1:23 PM
    Edited by: adf009 on 2013/04/19 1:24 PM

    Hi,
    I assume this is a child entity in a composition association. So when you create the rows for the child entity do you populate the parent's reference key ?
    You can use NameValuePairs
    NameValuePairs nvps=new NameValuePairs();
    nvps.setAttribute("ForeignKeyReference", value);
    createAndInitRow(nvps);
    Regards,
    Ramandeep

  • Help with Detail entity Insert with row key null cannot find or invalidate

    Hi,
    My Problem:
    I have created a form in JDeveloper ADF. This form is based on the Table Name IT_HARDWARE. The IT_HARDWARE keep track of all the hardware and it is in the relationship with the IT_SYSTEM table, IT_LOCATION, EMPOYEES. So the IT_HARDWARE has a FOREIGN KEY from IT_SYSTEM (SYS_ID), IT_LOCATION (LOC#), EMPLOYEE (EIP#).
    When I create a form to insert data into this form, I receive message "Detail entity ItHardwareInsert with row key null cannot find or invalidate its owning entity."
    I tried all possible to understand what is causing this and I can't find it. Can someone help me?

    Than you for the link, I appreciate it. I kind understand the root of the problem, but since I am new to JDeveloper, I am getting trouble to solve the problem. I am going to read and understand what is going on. Thank you for the link.

  • Just downloaded lion in says its installed but cannot find it but its paid for by wizz

    just downloaded lion in says its installed but cannot find it but its paid for by wizz

    Look in the Dock or the Applications folder for an installer for Lion.  Then run it.

  • Thumbnails appear in iPhoto, but photos cannot be opened on its own

    Hello-
    I had an older camera that I have since replaced. When I uploaded the photos to iPhoto initially, they were uploaded fine. However, now when I go to open them in iPhoto, I can see them only as a small thumbnail. When I double click on the image, the photo does not appear- rather a circle with an exclamation point in it. Is there any way to save these photos? Thank you!

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 08* library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Regards
    TD

  • Cannot find class but its there... Please...

    Hi there, I'm trying to compile my small program that will become a java text editor, it calls in another class file "SyntaxDocument" but at compile time it cannot understand what it is.. The SyntaxDocument file is fine and in the correct directory but I still can't work this one out.. any ideas please////
    public exchange() {
    //Set up GUI
    final int DEFAULT_FRAME_WIDTH = 1280;
    final int DEFAULT_FRAME_HEIGHT = 1000;
    setSize(DEFAULT_FRAME_WIDTH, DEFAULT_FRAME_HEIGHT);
         addWindowListener(new WindowCloser());
    //----Constuct Components----//
    //Construct TopMenu
    JMenuBar menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    JMenu fileMenu = new JMenu("File");
         menuBar.add(fileMenu);
    JMenu help = new JMenu("Help");
         menuBar.add(help);
    //Add Listener to Menu
         MenuListener listener = new MenuListener();
    //Opens File from Menu
         openMenuItem = new JMenuItem("Import");
         fileMenu.add(openMenuItem);
              openMenuItem.addActionListener(listener);
    //Opens Help Menu for IP details
         helpMenuItem = new JMenuItem("IP Details");
         help.add(helpMenuItem);
              helpMenuItem.addActionListener(listener);
    //Construct text editing area          
         text_chat = new JEditorPane();
         text_chat.setEditorKit(new StyledEditorKit());
         text_chat.setDocument(new SyntaxDocument());
         JScrollPane scroll = new JScrollPane(text_chat);// PROBLEM IS HERE
         scroll.setVerticalScrollBarPolicy(
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

    1.The classpath is set already (i've been able to compile all programs..)
    2.All the java and class files are in same directory
    3. There are no packages
    4. Standard javac exchange.java (compiles main app)
    I did take this SyntaxDocument java file and stripped it down a little, maybe if you look at it what i stripped you can see a problem with it...?
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.text.*;
    class SyntaxDocument extends DefaultStyledDocument
         private DefaultStyledDocument doc;
         private Element rootElement;
         private boolean multiLineComment;
         private MutableAttributeSet normal;
         private MutableAttributeSet keyword;
         private MutableAttributeSet comment;
         private MutableAttributeSet quote;
         private Hashtable keywords;
         public SyntaxDocument()
              doc = this;
              rootElement = doc.getDefaultRootElement();
              putProperty( DefaultEditorKit.EndOfLineStringProperty, "\n" );
              normal = new SimpleAttributeSet();
              StyleConstants.setForeground(normal, Color.black);
              comment = new SimpleAttributeSet();
              StyleConstants.setForeground(comment, Color.gray);
              StyleConstants.setItalic(comment, true);
              keyword = new SimpleAttributeSet();
              StyleConstants.setForeground(keyword, Color.blue);
              quote = new SimpleAttributeSet();
              StyleConstants.setForeground(quote, Color.red);
              Object dummyObject = new Object();
              keywords = new Hashtable();
              keywords.put( "abstract", dummyObject );
              keywords.put( "boolean", dummyObject );
              keywords.put( "break", dummyObject );
              keywords.put( "byte", dummyObject );
              keywords.put( "byvalue", dummyObject );
              keywords.put( "case", dummyObject );
              keywords.put( "cast", dummyObject );
              keywords.put( "catch", dummyObject );
              keywords.put( "char", dummyObject );
              keywords.put( "class", dummyObject );
              keywords.put( "const", dummyObject );
              keywords.put( "continue", dummyObject );
              keywords.put( "default", dummyObject );
              keywords.put( "do", dummyObject );
              keywords.put( "double", dummyObject );
              keywords.put( "else", dummyObject );
              keywords.put( "extends", dummyObject );
              keywords.put( "false", dummyObject );
              keywords.put( "final", dummyObject );
              keywords.put( "finally", dummyObject );
              keywords.put( "float", dummyObject );
              keywords.put( "for", dummyObject );
              keywords.put( "future", dummyObject );
              keywords.put( "generic", dummyObject );
              keywords.put( "goto", dummyObject );
              keywords.put( "if", dummyObject );
              keywords.put( "implements", dummyObject );
              keywords.put( "import", dummyObject );
              keywords.put( "inner", dummyObject );
              keywords.put( "instanceof", dummyObject );
              keywords.put( "int", dummyObject );
              keywords.put( "interface", dummyObject );
              keywords.put( "long", dummyObject );
              keywords.put( "native", dummyObject );
              keywords.put( "new", dummyObject );
              keywords.put( "null", dummyObject );
              keywords.put( "operator", dummyObject );
              keywords.put( "outer", dummyObject );
              keywords.put( "package", dummyObject );
              keywords.put( "private", dummyObject );
              keywords.put( "protected", dummyObject );
              keywords.put( "public", dummyObject );
              keywords.put( "rest", dummyObject );
              keywords.put( "return", dummyObject );
              keywords.put( "short", dummyObject );
              keywords.put( "static", dummyObject );
              keywords.put( "super", dummyObject );
              keywords.put( "switch", dummyObject );
              keywords.put( "synchronized", dummyObject );
              keywords.put( "this", dummyObject );
              keywords.put( "throw", dummyObject );
              keywords.put( "throws", dummyObject );
              keywords.put( "transient", dummyObject );
              keywords.put( "true", dummyObject );
              keywords.put( "try", dummyObject );
              keywords.put( "var", dummyObject );
              keywords.put( "void", dummyObject );
              keywords.put( "volatile", dummyObject );
              keywords.put( "while", dummyObject );
         * Override to apply syntax highlighting after the document has been updated
         public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
              if (str.equals("{"))
                   str = addMatchingBrace(offset);
              super.insertString(offset, str, a);
              processChangedLines(offset, str.length());
         * Override to apply syntax highlighting after the document has been updated
         public void remove(int offset, int length) throws BadLocationException
              super.remove(offset, length);
              processChangedLines(offset, 0);
         * Determine how many lines have been changed,
         * then apply highlighting to each line
         private void processChangedLines(int offset, int length)
              throws BadLocationException
              String content = doc.getText(0, doc.getLength());
              // The lines affected by the latest document update
              int startLine = rootElement.getElementIndex( offset );
              int endLine = rootElement.getElementIndex( offset + length );
              // Make sure all comment lines prior to the start line are commented
              // and determine if the start line is still in a multi line comment
              setMultiLineComment( commentLinesBefore( content, startLine ) );
              // Do the actual highlighting
              for (int i = startLine; i <= endLine; i++)
                   applyHighlighting(content, i);
              // Resolve highlighting to the next end multi line delimiter
              if (isMultiLineComment())
                   commentLinesAfter(content, endLine);
              else
                   highlightLinesAfter(content, endLine);
         * Highlight lines when a multi line comment is still 'open'
         * (ie. matching end delimiter has not yet been encountered)
         private boolean commentLinesBefore(String content, int line)
              int offset = rootElement.getElement( line ).getStartOffset();
              // Start of comment not found, nothing to do
              int startDelimiter = lastIndexOf( content, getStartDelimiter(), offset - 2 );
              if (startDelimiter < 0)
                   return false;
              // Matching start/end of comment found, nothing to do
              int endDelimiter = indexOf( content, getEndDelimiter(), startDelimiter );
              if (endDelimiter < offset & endDelimiter != -1)
                   return false;
              // End of comment not found, highlight the lines
              doc.setCharacterAttributes(startDelimiter, offset - startDelimiter + 1, comment, false);
              return true;
         * Highlight comment lines to matching end delimiter
         private void commentLinesAfter(String content, int line)
              int offset = rootElement.getElement( line ).getEndOffset();
              // End of comment not found, nothing to do
              int endDelimiter = indexOf( content, getEndDelimiter(), offset );
              if (endDelimiter < 0)
                   return;
              // Matching start/end of comment found, comment the lines
              int startDelimiter = lastIndexOf( content, getStartDelimiter(), endDelimiter );
              if (startDelimiter < 0 || startDelimiter <= offset)
                   doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
         * Highlight lines to start or end delimiter
         private void highlightLinesAfter(String content, int line)
              throws BadLocationException
              int offset = rootElement.getElement( line ).getEndOffset();
              // Start/End delimiter not found, nothing to do
              int startDelimiter = indexOf( content, getStartDelimiter(), offset );
              int endDelimiter = indexOf( content, getEndDelimiter(), offset );
              if (startDelimiter < 0)
                   startDelimiter = content.length();
              if (endDelimiter < 0)
                   endDelimiter = content.length();
              int delimiter = Math.min(startDelimiter, endDelimiter);
              if (delimiter < offset)
                   return;
              //     Start/End delimiter found, reapply highlighting
              int endLine = rootElement.getElementIndex( delimiter );
              for (int i = line + 1; i < endLine; i++)
                   Element branch = rootElement.getElement( i );
                   Element leaf = doc.getCharacterElement( branch.getStartOffset() );
                   AttributeSet as = leaf.getAttributes();
                   if ( as.isEqual(comment) )
                        applyHighlighting(content, i);
         * Parse the line to determine the appropriate highlighting
         private void applyHighlighting(String content, int line)
              throws BadLocationException
              int startOffset = rootElement.getElement( line ).getStartOffset();
              int endOffset = rootElement.getElement( line ).getEndOffset() - 1;
              int lineLength = endOffset - startOffset;
              int contentLength = content.length();
              if (endOffset >= contentLength)
                   endOffset = contentLength - 1;
              // check for multi line comments
              // (always set the comment attribute for the entire line)
              if (endingMultiLineComment(content, startOffset, endOffset)
              || isMultiLineComment()
              || startingMultiLineComment(content, startOffset, endOffset) )
                   doc.setCharacterAttributes(startOffset, endOffset - startOffset + 1, comment, false);
                   return;
              // set normal attributes for the line
              doc.setCharacterAttributes(startOffset, lineLength, normal, true);
              // check for single line comment
              int index = content.indexOf(getSingleLineDelimiter(), startOffset);
              if ( (index > -1) && (index < endOffset) )
                   doc.setCharacterAttributes(index, endOffset - index + 1, comment, false);
                   endOffset = index - 1;
              // check for tokens
              checkForTokens(content, startOffset, endOffset);
         * Does this line contain the start delimiter
         private boolean startingMultiLineComment(String content, int startOffset, int endOffset)
              throws BadLocationException
              int index = indexOf( content, getStartDelimiter(), startOffset );
              if ( (index < 0) || (index > endOffset) )
                   return false;
              else
                   setMultiLineComment( true );
                   return true;
         * Does this line contain the end delimiter
         private boolean endingMultiLineComment(String content, int startOffset, int endOffset)
              throws BadLocationException
              int index = indexOf( content, getEndDelimiter(), startOffset );
              if ( (index < 0) || (index > endOffset) )
                   return false;
              else
                   setMultiLineComment( false );
                   return true;
         * We have found a start delimiter
         * and are still searching for the end delimiter
         private boolean isMultiLineComment()
              return multiLineComment;
         private void setMultiLineComment(boolean value)
              multiLineComment = value;
         *     Parse the line for tokens to highlight
         private void checkForTokens(String content, int startOffset, int endOffset)
              while (startOffset <= endOffset)
                   // skip the delimiters to find the start of a new token
                   while ( isDelimiter( content.substring(startOffset, startOffset + 1) ) )
                        if (startOffset < endOffset)
                             startOffset++;
                        else
                             return;
                   // Extract and process the entire token
                   if ( isQuoteDelimiter( content.substring(startOffset, startOffset + 1) ) )
                        startOffset = getQuoteToken(content, startOffset, endOffset);
                   else
                        startOffset = getOtherToken(content, startOffset, endOffset);
         private int getQuoteToken(String content, int startOffset, int endOffset)
              String quoteDelimiter = content.substring(startOffset, startOffset + 1);
              String escapeString = getEscapeString(quoteDelimiter);
              int index;
              int endOfQuote = startOffset;
              // skip over the escape quotes in this quote
              index = content.indexOf(escapeString, endOfQuote + 1);
              while ( (index > -1) && (index < endOffset) )
                   endOfQuote = index + 1;
                   index = content.indexOf(escapeString, endOfQuote);
              // now find the matching delimiter
              index = content.indexOf(quoteDelimiter, endOfQuote + 1);
              if ( (index < 0) || (index > endOffset) )
                   endOfQuote = endOffset;
              else
                   endOfQuote = index;
              doc.setCharacterAttributes(startOffset, endOfQuote - startOffset + 1, quote, false);
              return endOfQuote + 1;
         private int getOtherToken(String content, int startOffset, int endOffset)
              int endOfToken = startOffset + 1;
              while ( endOfToken <= endOffset )
                   if ( isDelimiter( content.substring(endOfToken, endOfToken + 1) ) )
                        break;
                   endOfToken++;
              String token = content.substring(startOffset, endOfToken);
              if ( isKeyword( token ) )
                   doc.setCharacterAttributes(startOffset, endOfToken - startOffset, keyword, false);
              return endOfToken + 1;
         * Assume the needle will the found at the start/end of the line
         private int indexOf(String content, String needle, int offset)
              int index;
              while ( (index = content.indexOf(needle, offset)) != -1 )
                   String text = getLine( content, index ).trim();
                   if (text.startsWith(needle) || text.endsWith(needle))
                        break;
                   else
                        offset = index + 1;
              return index;
         * Assume the needle will the found at the start/end of the line
         private int lastIndexOf(String content, String needle, int offset)
              int index;
              while ( (index = content.lastIndexOf(needle, offset)) != -1 )
                   String text = getLine( content, index ).trim();
                   if (text.startsWith(needle) || text.endsWith(needle))
                        break;
                   else
                        offset = index - 1;
              return index;
         private String getLine(String content, int offset)
              int line = rootElement.getElementIndex( offset );
              Element lineElement = rootElement.getElement( line );
              int start = lineElement.getStartOffset();
              int end = lineElement.getEndOffset();
              return content.substring(start, end - 1);
         * Override for other languages
         protected boolean isDelimiter(String character)
              String operands = ";:{}()[]+-/%<=>!&|^~*";
              if (Character.isWhitespace( character.charAt(0) ) ||
                   operands.indexOf(character) != -1 )
                   return true;
              else
                   return false;
         * Override for other languages
         protected boolean isQuoteDelimiter(String character)
              String quoteDelimiters = "\"'";
              if (quoteDelimiters.indexOf(character) < 0)
                   return false;
              else
                   return true;
         * Override for other languages
         protected boolean isKeyword(String token)
              Object o = keywords.get( token );
              return o == null ? false : true;
         * Override for other languages
         protected String getStartDelimiter()
              return "/*";
         * Override for other languages
         protected String getEndDelimiter()
              return "*/";
         * Override for other languages
         protected String getSingleLineDelimiter()
              return "//";
         * Override for other languages
         protected String getEscapeString(String quoteDelimiter)
              return "\\" + quoteDelimiter;
         protected String addMatchingBrace(int offset) throws BadLocationException
              StringBuffer whiteSpace = new StringBuffer();
              int line = rootElement.getElementIndex( offset );
              int i = rootElement.getElement(line).getStartOffset();
              while (true)
                   String temp = doc.getText(i, 1);
                   if (temp.equals(" ") || temp.equals("\t"))
                        whiteSpace.append(temp);
                        i++;
                   else
                        break;
              return "{\n" + whiteSpace.toString() + "\t\n" + whiteSpace.toString() + "}";

  • Once you create an alias it cannot be made into its own account.

    I did not read about this restriction.
    Now I need to convert my sons alias into independent account (with their credit).
    Could anybody in Apple help me? Also with a paid support ticket. Regards.

    I do not understand the reasons. This should have been one of the meaning an alias was for.
    Now i have my sons' iCloud aliases useless and tied to my account... That's unbelievable nobody from Apple can't help me to get out from this!

  • Can't Find Owning Entity From Detail Table With 2 Masters

    Hi,
    I've got a master detail table relationship working with association and view link but when I try to do it again with the same detail table but a new master table I am getting the error, JBO-25030: Detail entity RulBAAG with row key oracle.jbo.Key[null 6A ] cannot find or invalidate its owning entity.
    I really don't want to have to create a seperate set of EOs and VOs for this second relationship. Is there something I can do programaticaly to identify which master / detail relationship the CRUD operation is for? Thanks-
    Master1 table: PK and FK, BId
    Master2 table: PK and FK, AgId
    Detail table: PK, BId & AgId

    Gabz,
    I believe you need to create the database foreign key relationship with "cascade on delete" set. Then ensure that your association in BC4J that models this relationship also has the "cascade on delete" property set (it should by default).
    With this set, deleting the master should automatically delete the children.
    Hope this helps,
    -brian
    UIX Team

  • Just installed 10g: Main form cannot find subforms or menus

    I just added 10g FOrms Builder to my PC. I was running 9i and it still exists on the machine.
    Problem: My main form, when run locally from Forms Builder cannot find any of its menus or subforms unless the FULL PATHs are defined in the properties or CALL_FORMs.
    This was not a problem when running from 9i FOrms Builder.
    I am assuming its a parameter somewhere in the FORMSWEB.CFG file which sets the default path to whatever path the main form uses.
    Can anyone steer me in the right direction?
    THANKS!

    Hi,
    Well, I assume that if 9i was installed, you also had FORMS90_PATH set in the registry.
    Perhaps what is happening is Forms is running your main form, and then when you are calling other forms, it is using the 9i versions, and then failing because they are not 10g versions.
    For example:
    d:\app\9i\form1.fmx
    d:\app\10g\form1.fmx
    When trying to call form1.fmx, Forms follows the FORMS90_PATH first and uses the form in d:\app\9i\. Change your FORMS90_PATH and see what happens.
    This is just a theory, I am new to 9i and 10g myself.
    Cheers

  • Windows cannot find any networks

    hi all
    my dsl network connection is not being discovered by vista all of a sudden i tried all possible means but in vain any help would be greatly appreciated!
    the error message says "windows cannot find any networks" 
    its an adsl connection connected through a local area network
    Message Edited by samavedam_vijay on 11-23-2008 09:54 PM
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo
    Solved!
    Go to Solution.

    Hi,
    I think you already have done a Vista system restore?
    Which program do you use for connecting? AC or Vista.
    What have you done before and did this happen all of a sudden?
    Follow @LenovoForums on Twitter! Try the forum search, before first posting: Forum Search Option
    Please insert your type, model (not S/N) number and used OS in your posts.
    I´m a volunteer here using New X1 Carbon, ThinkPad Yoga, Yoga 11s, Yoga 13, T430s,T510, X220t, IdeaCentre B540.
    TIP: If your computer runs satisfactorily now, it may not be necessary to update the system.
     English Community       Deutsche Community       Comunidad en Español

  • IMac phantom please help search and mouse on its own

    Hi,
    my iMac has gone crazy. Opening spotlight search. Characters. And search in finder all on its own. When on a web browser its scrolls to the bottom of the page on its own. The right mouse button Magic Mouse function has become the left click and right click.
    i Know iMac shouldnt get virus or malware but it sure feels like it has ?
    any help greatly appreciated

    Had logitech wireless adaptor in usb think this may have been the culprit. Have unplugged and will try again if this helps anyone reading this is the future.

  • I forgot my icloud id and password. i want to delete the id. i forgot the password. if i try to delete the account its asking for password. i cannot find how to delete the account. Please anyone can help me out???

    I forgot my icloud id and password. i want to delete the id. i forgot the password. if i try to delete the account its asking for password. i cannot find how to delete the account. Please anyone can help me out???

    You aren't going to be able to delete it without the correct password.  If it's your ID, you can reset the password as explained here: http://support.apple.com/kb/HT5625.  If it isn't your ID, you will have to get the password for the person who owns the ID.  There's no way around this and no one else can help.

  • Create MasterDetail together - JBO-25030: Failed to find ...owning entity

    Hi All,
    (ADF Faces + BC, jdev 10.1.3 su 5)
    I have a master-detail data entry in one page. The requirement is when I press Create button, I want to create both Master & Detail (composition) rows together.
    Master-Detail has association. Master PK is sequence, detail FK is Number.
    So I code my backing beans :
    public String createMaster_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Create");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    else
    createDetail();
    return null;
    I get this error :
    1. JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25030: Failed to find or invalidate owning entity: detail entity SalesorderD, row key oracle.jbo.Key[-5 ].
    2. JBO-25030: Failed to find or invalidate owning entity: detail entity SalesorderD, row key oracle.jbo.Key[-5 ].
    How to solve this problem ?
    Thank you for your help,
    xtanto

    Hi xtanto,
    Perhaps you need to use "CreateInsert" instead of "Create" to create the master record. You can change this simply by editing the pagedef, double-click the "create" binding, and change it to "CreateInsert"
    Hope this helps,
    John

  • Could not load file or assembly 'mscorlib.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

    Hi,
    I am facing an issue when I deploy the application to Azure. Not sure what's causing the issue, It runs fine when debugged locally.
    XmlSerializer s = new XmlSerializer(typeof(List<SomeClass>));
    Below exception is thrown :
    Could not load file or assembly 'mscorlib.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
    System.IO.FileNotFoundException
    I have set to "CopyToLocal = True" for System.Xml dll in the references, this does not fix the issue. The application and all its required projects are running under .NET 4.5.
    Anybody faced this issue earlier ? Appreciate any help.
    Thanks.

    I'm guessing now. but:
    The system might be generating a serializer for the whole of mscorlib, which could be very slow.
    You could probably avoid this by wrapping the system type in your own type and serialising that instead - then you'd get a serializer for your own assembly.
    You might be able to build the serializer for mscorlib with sgen.exe, which was the old way of building serializer dlls before it got integrated into VS.
    Davide 'n3wt0n' Benvegnù
    If you found my answer helpful, please vote it.
    If you think that my answer resolve your issue, plase "Mark it as answer".

Maybe you are looking for

  • How to generate a single report  using multiple Databases

    Hi All Is it possible to create a single report using multiple databases I am working on Database A to generate reports usually,, but now i have a second database for which the data is coming from flat files now i have to use few tables from Database

  • Header in ALV

    i want to have layout described below using ALV,,is it feasible,        Management Joininees     Separations         2                 3         4                 1 i.e. i want to have Management as fixed header. and joinees & separations are the fie

  • Quicktime pro crashes with some mp4 in Lion Os X 7.2

    Hallo! I have upgraded to Lion OS X 7.2 and my Quicktime pro crashes when I try to open files mp4 with MPEG-4 HE AAC V2 audio codec. It used to work fine in Snow Leopard. I removed and installed again, tried to remove Mpeg 2 codec, installed 3ivx, bu

  • Preparing to send file to costco

    I am confused about a few things. 1. When do I use the export to jpg option and when do I use the print to jpg option?  In the print module I have added the correct icc profile for the printer at costco at the location I will go to.  If I export to j

  • Get a little USB in my life - classic BB USB failures?

    Being the owner of a second hand PB that arrived without a working micro usb port, I am constantly curious how it feels to have use of it. We get by just great otherwise. The hdmi port has also tested broke, dysfunctional.  Several lead tests, and co