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() + "}";

Similar Messages

  • 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.

  • HT1657 Hi All. I am new to this forum but hoping I can find some answers from some of you apple guru's out there. I have downloaded a mvie onto my iphone (which took forevere but I cannot find it to view it.Please help

    Hi All. I am new to this forum but hoping I can find some answers from some of you apple guru's out there. I have downloaded a mvie onto my iphone (which took forevere but I cannot find it to view it.Please help

    It should be in the Videos App - if it's not in there then have you got a film age rating set in Settings > General > Resttrictions that is hiding it ?

  • I transferred excell spreadsheet from my old pc to my new mac. I used it last fortnight but now cannot find it. Any Help please.

    I transferred excell spreadsheet from my old pc to my new mac. I used it last fortnight but now cannot find it. Any Help please.
    I have tried Spotlight but to no avail I have an Imac.
    gp140

    The file should still be listed by name under, "Open Recent."

  • My MBP has Mountain Lion installed. The iPhoto version is 8.1.2. Cannot install iPhoto 9.4 without installing 9.0, but cannot find 9.0. Solution, please.

    My MBP has Mountain Lion installed. The iPhoto version is 8.1.2. Cannot install iPhoto 9.4 without installing 9.0, but cannot find 9.0. Solution, please.

    If you're running Mac OS X 10.8.x ou can purchase iPhoto version 9.x from the App Store. If you purchase iPhoto at the App Store you will automatically get the most up-to-date version and you won't need to install the 9.4 update.
    -Doug

  • Cannot find class: Exception??

    Hi
    The compiler claims it cannot find class FileNotFoundException or any other exception in my Main. Any packages I import has no problem. My structure:
    java \ myMain \ Main.java
    java \ com \ myName \ packages //no, the space is just there as visual help:)
    Use javac -classpath java\ @compile.file
    ...where compile.file is a txt file giving the paths and filenames to all files I include.
    This is first time I use the -classpath parameter, but I believed java.lang always was included. What Am I doing wrong.
    regards
    JT

    You should review the tool documentation for the javac command and its use of classpath.
    Your problem appears to be due to the way you defined classpath, "-classpath java\". While you don't provide enough information to conclusively say what it should be, I'm guessing it should also include java\myMain\ - assuming that you're issuing the javac command from the parent of the \java\ directory, as your command example indicates.
    Here is a clip about its use of the classpath.
    "When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.
    For example, when you subclass java.applet.Applet, you are also using Applet's ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.
    When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path).
    If you set the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files."

  • Error:Cannot find class

    Hi
    I compile my application correctly, but when I copy this application in my PDA, and run this application (Hello.class) with Personal Java I saw a this message: Cannot find class Hello.class.
    I don't compile javacheck before copy in my PDA the application.
    Please help me

    Hi,
    are you sure that your classpath is set correct?
    For checking this you'll need a registry editor and check the command that is entered for the .class file extensions.
    Have a nice day,
    FReAK

  • Java teststand - Error 1500 Cannot find class

    Hi everyone,
    I am using TestStand 2010 and Java 1.7.
    I try to add a java class in the Computer example folder, and call the method.
    The java class is simply like below, because I just want to try calling my own java class.
    I have set the Class Path in Start JVM to the directory where the Computer example (which is also the directory where I put my java class) are located.
    TestStand can call the Computer's methods, but not mine (got error Error 1500 Cannot find class). I put my my java method calling among the defaults Computer example calls.
    Furthermore I have read similiar threads but still I cannot solve the error.
    Where is the part I miss, actually? Please share some insights.
    Note: I even try to leave the Class Path empty, but TestStand still can call the Computer's methods. Why?
    public class TestJava {
    public static void main(String[] args) {
    public String returnString(boolean a){
    return "success";
    Solved!
    Go to Solution.

    In order to load a class that is inside a package you have to use the package notation (or modify the example in order to use it). The path to the class is passed directly to the JVM in order to load the class, but really what is needed is the package from the class path including the full path to the class. 
    That means you have to do the following:
    1. Set the class path to the base directory where you built all your classes, if you have the following structure:
    MyFile.java
    builds
    MyPackage
    MyFile.class
    You have to set the classpath to the builds directory
    2. When you configure your steps, you have to set the path to the class in your Java steps to MyPackage/MyFile.class (note separator is a slash, not the usual Windows backslash, so the browse button doesn't quite help with that). 
     Another important thing is that when you set the classpath you are deleting the normal class path in Java, if you are using Java classes from the default libraries you might have to add <jre directory>\lib\rt.jar

  • I have installed Adobe packages and cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?

    I have installed Adobe Creative Cloud for teams CC Packages which says that Acrobat XI Pro is installed. Your support page says it does not install Acrobat and I have to look in the Extensions folder for an MSI file.  I have run a number of searches and  cannot find the Acrobat extension folder please advise how can I get these applications to load onto my computer?
    Also I now administer the teams and have accepted the invitation to I received to be a team member and download the apps.  The admin page shows that I have been sent an invitation but does not show my account as "ACtive" unlike my other team members.  I tried to use the link in the invite to accept it become active but the link displayed an error saying I had already accepted the invite... why is no account not active?
    Finally what other product downloads in Creative Cloud do not actually download as part of the Creative cloud Packager for downloading the apps? e.g. acrobat and what else?

    My apologies Eadeszoo I believe our support agents are unavailable on January 1.
    Are you able to copy the contents of the DVD to your computer?  Are you receiving any particular error messages when you are trying to install?  Finally which operating system are you using?

  • Preverification error: Cannot find class com/sun/perseus/model/Viewport

    Hi all,
    I have a (previously) working Midlet to which I have added one line as follows:
    SVGImage image = (SVGImage)SVGImage.createEmptyImage(null);
    - and imported the necessary from javax.microedition.m2g. (I am using the library that comes with the WTK, jsr226.jar).
    This builds, jars, obfuscates fine. But when I try to preverify (using Antenna's wtkpreverify) on the jar, it gives up in disgust very swiftly as follows:
    [wtkpreverify] Error preverifying class javax.microedition.m2g.ScalableGraphics
    [wtkpreverify] VERIFIER ERROR javax/microedition/m2g/ScalableGraphics.render(IILjavax/microedition/m2g/ScalableImage;)V:
    [wtkpreverify] Cannot find class com/sun/perseus/model/Viewport
    I'm using the WTK2.5.1ea and antenna 0.9.14, CLDC1.1, MIDP2.0...
    Many thanks for any ideas.

    Problem resolved simply by replacing jsr226.jar (as distributed with WTK2.5.1ea) with m2g.jar (as distributed with J2MEPolish).

  • Cannot find class java/lang/Thread

    I'm getting this error trying to compile a program that I'm writing in java. Its a very simple program just to get me back to basics. Any ideas as to how I can fix this problem??

    Extracted from Sun's website,
    * Error Message: "Exception in thread NULL" or
    "Unable to initialize threads: cannot find class java/lang/Thread"
    If you are getting one of these fatal error messages when running java,
    javac, or appetviewer, you should check your CLASSPATH environment variable.
    It may list "c:\java" or the "classes" directory from an older release. You can either unset the CLASSPATH variable, or set it to
    include only the latest version of the Java platform class library. For example:
    C:\> set CLASSPATH=.;C:\jdk1.1.8\lib\classes.zip
    This will make sure that you are using the correct classes for this release.
    -- Sudha

  • Warning - Cannot find class de.ewe.ikdb.action.ActionForward

    Hi,
    I'm using external classes e.g. struts as a MVC framework. Using JavaDoc to create the API documentation causes lots of the following warnings:
    warning - Cannot find class de.ewe.ikdb.action.ActionForward
    Actually the class in question is form struts, in the package org.apache.struts.action. As I'm using ant to compile the classes and to generate the documentation so the class path should be ok.
    First I tried the -link option to access the package-list file of struts. This didn't work (but maybe this is a problem due to our firewall).
    So I downloaded the documentation and put it in a local directory and used the -linkoffline option instead. Now the javadoc command works again but I still get these warning messages.
    Does anyone know how to avoid this?
    Regards,
    hedtfeld.

    Hi guys,
    as far as I understand I have to import the classes excplicitly and not with wildcards as my lazy self prefers to do it. It would be nice though to be able to use the wildcard as this is allowed by the java spec ...
    Hope this will help anyone facing the same problem.
    - hedtfeld.

  • 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.

  • Cannot find class JPanel

    Hi,
    Im trying to use swing for almost the first time.
    I changed my system to Linux and installed J2sdk 1.4.
    When I write a class
    e.g.
    import javax.swing.*;
    import java.awt.*;
    etc...
    class Test extends JPanel {
    I receive an error message "Cannot find class "JPanel""
    Can anyone help ? Maybe I didnt install the right thing ?
    Thanks
    Ulrike

    you sure reinstall and overwrite your current sdk. Do you have the runtime environment installed too -- should come with the sdk

  • 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

Maybe you are looking for

  • Change IndexColorModel to create palette effect?

    Here's one for you... Is there an easy way to change the palette in the IndexColorModel of a BufferedImage? Here's what I'm doing: I've got an 8-bit IndexColorModel with some palette values set. I use that to create the BufferedImage, and then get a

  • Ipod update does not finish, itunes wont recognise ipod!

    i recently installed the latest itunes. BIG MISTAKE!! when i connect my ipod and open itunes, it says "determining gapless playback information" and starts going through all the songs on my ipod (a very long process). so i sit this out, and it wants

  • Disable ocssd for oracle 10g

    Hi, I just installed oracle 10g on a linux box. I do not use any RAC or database grid feature. However, the ocssd is still started up by the init script(/etc/inittab). Unfortunately, it gave a core dump under $ORACLE_HOME/css/init in every trial. Qui

  • Is it possible to install oracle 11g client 32 bit and oracle 11g client 64

    Hi, I have Windows 2008 R2 64 Bit Operating Server Installed. Other software that are Installed : 1) Visual Studio 2010 Ultimate 32 Bit. 2) Microsoft SharePoint server 2010 64 Bit. For my development purpose I want to install both oracle 11g client 3

  • Securing contacts with password

    Is there any way to secure my contacts, notes, tasks etc with a password.  Obviously I know I can password the phone, but if I lost my phone and someone rang it, whoever had my phone would find it unlocked (because someone has rung). Thanks. p.s vers