ADF: any good examples on inserting a new record

Hi, I'm currently developing a
web based application (using jsp + struts on top of ADF)
and I've seen many many demos and viewlets on
how to create a page that reads a list of employees
or master-detail relationship of records.
However, when I try to make a page which can insert
a new record (ex. new employee, new department, etc),
I am baffled, because I couldn't find a good example
that showed me how to do it.
Has anyone have a good example?
thank you.

Did you check the tutorials page?
For example:
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html

Similar Messages

  • Any good example of IMAQ Correlation vi.

    Hello,
    I am trying to understand the use of IMAQ Correlation VI for the purpose of feature tracking among the series of images for my experiment using Normalized Cross-Correlation technique. Kindly see the attached VI, it just not making any sense to me. Kindly suggest and any good example will be very helpful. Thanks in advance.
    Attachments:
    Correlation-1.vi ‏61 KB

    It is a little hard to tell what you are trying to do from your explanation. You would have a much higher success rate if you posted on the Machine Vision board in the Most Active Hardware Boards. Also, if you post an example it is good practice to state the version of software used. It is also helpful to save it to a previous version to allow a broader audience to see the example.
    You stated that you have a "purpose of feature tracking among the series of images for my experiment using Normalized Cross-Correlation technique." Could you post this with a more detailed explanation on the Machine Vision board? Also to explain what type of suggestions or advice you are looking for from the example that you posted would allow myself and others on the forums to understand what you are looking for here.
    Vince M
    Applications Engineer

  • Any BAPI/Function Module for adding new record with dates in PA0027

    Hi all,
    I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
    In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
    thanks for ur time.
    Murali

    Hi Raj/Suresh thanks for ur answers.
    but i am having a problem,i gave this values.
    INFTY               -
                0027
    NUMBER              -
                00000010
    SUBTYPE             -
                010
    OBJECTID
    LOCKINDICATOR
    VALIDITYEND         -
                03/12/2006
    VALIDITYBEGIN       -
                03/01/2006
    RECORDNUMBER        -
                000
    RECORD              -
                P0027
    OPERATION           -
                CHK
    TCLAS               -
                A
    DIALOG_MODE         -
                0
    NOCOMMIT            -
                Y
    VIEW_IDENTIFIER
    SECONDARY_RECORD
    i am getting short dump saying that
    The source field is too short.
    The current program, "SAPLHRMM", tried to assign a field to a field symbo
    However, the field is shorter than the type of the field symbol, which
    is not allowed.
    The statement in question is in the form ASSIGN f TO <fs> CASTING or
    ASSIGN f TO <fs> with a field symbol that was created using the
    STRUCTURE addition.
    I tried  operation - Chage,Create (same thing for all inputs)
    is this correct funtion moduel for my requirment?
    what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
    Thanks for ur time.
    Murali.

  • Insert a new record in the database table in between the records.

    i va a database table which ve 100 records. but i want to insert my new record  as 50th record. how i want to  proceed?
    thanks ,
    velu.

    V,
    This is an odd request.  Why?
    Ignoring that, you can ATTEMPT to insert into the 50th position IF:
    1) The DB table has just had the primary key index re-built/re-shuffled to GUARANTEE that it IS in primary key order
    2) And the primary key of the new record is built so that it follows the 49th record
    Regardless, once this table has activity against it, its sort order can/will get out of promary key order (with adds/changes/deletes). 
    But when you select data from it, you can use ORDER BY or an ABAP SORT to organzie the date as needed.
    Again... not sure WHY you need a record in a particular physical position... who cares... it is a relational DB.

  • Oracle.adfinternal.controller.savepoint.SavePointException: ADFC-08008: The ADF Controller is unable to insert a savepoint record for ID

    I implemented a save point in a task flow by creating a save point in a method action The following is the code from managed bean for creating the save point:
                 ControllerContext cc = ControllerContext.getInstance();
    if (cc != null) {
    SavePointManager mgr = cc.getSavePointManager();
    if (mgr != null) {
    String id = mgr.createSavePoint();
    savePointId = id;
    It worked fine in local (Integrated Weblogic server). It also worked fine initially when I deployed the changes to the DEV weblogic server. But after a couple of days, in DEV server I get the following error everytime when trying to create a save point:
    Caused By: oracle.adfinternal.controller.savepoint.SavePointException: ADFC-08008: The ADF Controller is unable to insert a savepoint record for ID '4d233555-ea0c-4bae-9f17-cc6c
    7124870f'. oracle.adfinternal.controller.savepoint.SavePointUtil.createAndLogSavePointException(SavePointUtil.java:56)
            at oracle.adfinternal.controller.savepoint.SavePointDBPersistManager.insertSavePoint(SavePointDBPersistManager.java:245)
            at oracle.adfinternal.controller.savepoint.DBSavePointManagerImpl.storeSavePoint(DBSavePointManagerImpl.java:127)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.storeSavePoint(SavePointManagerImpl.java:301)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createAndStoreSavePoint(SavePointManagerImpl.java:257)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createSavePoint(SavePointManagerImpl.java:187)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createSavePoint(SavePointManagerImpl.java:116)
            at view.security.errormanagement.ManageErrorsMB.saveTaskFlow(ManageErrorsMB.java:213)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
            at com.sun.el.parser.AstValue.invoke(Unknown Source)
            at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
            at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173)
            at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:163)
            at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
            at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:926)
            at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:824)
            at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:554)
            at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:158)
            at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:115)
            at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:84)
            at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
            at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
            at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:157)
            at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
            at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
            at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:479)
            at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
            at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
            at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
            at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
            at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
            at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
            at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
            at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
            at java.security.AccessController.doPrivileged(AccessController.java:284)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
            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:136)
            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)
    Caused By: java.sql.SQLException: Connection has already been closed.
            at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:58)
            at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:94)
            at weblogic.jdbc.wrapper.Connection.prepareCall(Connection.java:543)
            at oracle.adfinternal.controller.savepoint.SavePointDBPersistManager.insertSavePoint(SavePointDBPersistManager.java:221)
            at oracle.adfinternal.controller.savepoint.DBSavePointManagerImpl.storeSavePoint(DBSavePointManagerImpl.java:127)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.storeSavePoint(SavePointManagerImpl.java:301)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createAndStoreSavePoint(SavePointManagerImpl.java:257)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createSavePoint(SavePointManagerImpl.java:187)
            at oracle.adfinternal.controller.savepoint.SavePointManagerImpl.createSavePoint(SavePointManagerImpl.java:116)
            at view.security.errormanagement.ManageErrorsMB.saveTaskFlow(ManageErrorsMB.java:213)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke(Method.java:611)
    At the bottom of the stack, this statement "Caused By: java.sql.SQLException: Connection has already been closed." intrigues me, but why this error occurs after a couple of days or after particular number of connections or access to the application.
    This same issue is also happening in all environments including PROD. Please help. JDeveloper version used is 11.1.2.1.0.

    We got the solution from Oracle support. 
    Passivation Fails With Error "Connection has already been closed" in PoolConnection.checkConnection() (Doc ID 1330271.1). Problem is caused by the WebLogic Server Connection Pool feature "Inactive Connection Timeout". When this parameter is set up, WLS will forcibly release reserved connections back into the pool. This is a problem for ADF BC that relies on keeping the JDBC connection associated to its
    Application Module instance.
    Set the "Inactive Timeout Session" to 0 (default), so that the JDBC connection stays active while
    the corresponding Application Module instance is active:
    Thanks....

  • Any good examples of using hashCode?

    I am creating a simple test class of a date object using getYear, getMonth, GetDay, compareTo, equals and hashCode. Ive got everything else working fine, but im wondering if I am getting the correct output from the hashCode method. What exactly does the hashCode method do? anyone got a good example of using it and what it outputs?

    the name of my date class - here's the rest of my code if you want to verify it:
    package Final;
    import java.util.GregorianCalendar;
    import java.util.Calendar;
    public class SimpleDate
    /** Creates a new instance of SimpleDate
    public SimpleDate()
         GregorianCalendar greg = new GregorianCalendar();
              year = greg.get(Calendar.YEAR);
              month = 1 + greg.get(Calendar.MONTH);
              day = greg.get(Calendar.DATE);
    /** Creates the setDate method which allows the day, month, and year of the
    * date to be specified
    public SimpleDate( int year, int month, int day )
    setDate( year, month, day );
    /** Sets the day, month, and year variables for the date
    public void setDate( int year, int month, int day )
    GregorianCalendar greg = new GregorianCalendar();
    greg.set(Calendar.YEAR, year);
    greg.set(Calendar.MONTH, month-1);
    greg.set(Calendar.DATE, day);
    this.year = greg.get(Calendar.YEAR);
    this.month = 1 + greg.get(Calendar.MONTH);
    this.day = greg.get(Calendar.DATE);
    /** Defines the method getYear which gets the integer value which represents
    * the year in the date
    * @returns int year
    public int getYear()
    return year;
    /** Defines the method getMonth which gets the integer value which represents
    * the month in the date
    * @returns int month
    public int getMonth()
    return month;
    /** Defines the method getDay which gets the integer value which represents
    * the day in the date
    * @returns int day
    public int getDay()
    return day;
    /** Defines the boolean method equals which compares two dates to see if they
    * are equal
    * @returns boolean equals
    public boolean equals()
    return equals;
    public int compareTo()
    return comparable;
    public int hashCode()
    return hashcode;
    public String toString()
    String string1 = new String();
    return string1;
    /*************Built-in Self Test************/
    public static void main(String[] args)
    SimpleDate date = new SimpleDate();
    SimpleDate date2 = new SimpleDate();
    date.setDate(2005, 11, 4);
    System.out.println("Day, Month and Year: " + day + " " + month + " " + year);
    date.getYear();
    System.out.println("The year selected is: " + year);
    date.getMonth();
    System.out.println("The month selected is: " + month);
    date.getDay();
    System.out.println("The day selected is: " + day);
    date2.setDate(2004, 11, 4);
    System.out.println("The first date selected equals the second date selected: " + date.equals(date2));
    //System.out.println("The first date selected is comparable to the second date selected: " + date.compareTo(date2));
    //How do I implement compareTo?
    System.out.println("The hashcode for the first date selected is: " + date.hashCode());
    System.out.println("The hashcode for the second date selected is: " + date2.hashCode());
    // ***** Instance Variables *****
    static int year;
    static int month;
    static int day;
    boolean equals;
    int comparable;
    int hashcode;
    }

  • Any good faq sites for ppl new to solaris?

    Hi, just want to know if there are any good sites that teach
    the basics on solaris and samba

    Hi,
    You try this URL:
    http://docs.sun.com
    Thanks.
    revert back.
    regards,
    Senthilkumar
    SUN - DTS

  • EPUB with video and other functionalities - any good examples?

    Dear fellows,
    I'm in search of good examples of Epubs (electronic books or publications) with embedded video and eventually other advances functionalities. Can you mail me or refer me to good examples?
    Many thanks
    Knud Lindholm Lau
    Copenhagen

    Thanks Steve.
    Still as an ignorant: What does this mean for the possibility to read EPUBs sith embedded video and audio? Is Ibook the format of Ipads and and are these the only devices capable of running embedded video right now?
    Yours Knud

  • How to insert a new record to table with foreign key

    I have 3 tables like this :
    CREATE TABLE PERSON (
    PK INTEGER NOT NULL,
    NAME VARCHAR(10),
    SSNUM INTEGER,
    MGR INTEGER);
    ALTER TABLE PERSON ADD CONSTRAINT PK_PERSON PRIMARY KEY (PK);
    ALTER TABLE PERSON ADD CONSTRAINT FK_PERSON FOREIGN KEY (MGR) REFERENCES
    PERSON (PK);
    /* Tables
    CREATE TABLE PROJECT (
    PK INTEGER NOT NULL,
    CODE_NAME INTEGER);
    ALTER TABLE PROJECT ADD CONSTRAINT PK_PROJECT PRIMARY KEY (PK);
    /* Tables
    CREATE TABLE XREF (
    PERSON INTEGER NOT NULL,
    PROJECT INTEGER NOT NULL);
    ALTER TABLE XREF ADD CONSTRAINT PK_XREF PRIMARY KEY (PERSON, PROJECT);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF1 FOREIGN KEY (PERSON) REFERENCES
    PERSON (PK);
    ALTER TABLE XREF ADD CONSTRAINT FK_XREF2 FOREIGN KEY (PROJECT) REFERENCES
    PROJECT (PK);
    I do like the way of "ReverseTutoral" and the file .jdo here :
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="reversetutorial">
    <class name="Person" objectid-class="PersonId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PERSON"/>
    <field name="name">
    <extension vendor-name="kodo" key="data-column"
    value="NAME"/>
    </field>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="MGR"/>
    </field>
    <field name="persons">
    <collection element-type="Person"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="ssnum">
    <extension vendor-name="kodo" key="data-column"
    value="SSNUM"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="person"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="person"/>
    </field>
    </class>
    <class name="Project" objectid-class="ProjectId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="PROJECT"/>
    <field name="codeName">
    <extension vendor-name="kodo" key="data-column"
    value="CODE_NAME"/>
    </field>
    <field name="pk" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PK"/>
    </field>
    <field name="xrefs">
    <collection element-type="Xref"/>
    <extension vendor-name="kodo" key="inverse"
    value="project"/>
    <extension vendor-name="kodo" key="inverse-owner"
    value="project"/>
    </field>
    </class>
    <class name="Xref" objectid-class="XrefId">
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="table" value="XREF"/>
    <field name="person">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PERSON"/>
    </field>
    <field name="person2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PERSON"/>
    </field>
    <field name="project">
    <extension vendor-name="kodo" key="pk-data-column"
    value="PROJECT"/>
    </field>
    <field name="project2" primary-key="true">
    <extension vendor-name="kodo" key="data-column"
    value="PROJECT"/>
    </field>
    </class>
    </package>
    </jdo>
    Data of those tables are :
    PERSON :
    | PK | NAME | SSNUM | MGR |
    | 1 | ABC | 1 | 1 |
    | 2 | DEF | 5 | 1 |
    PROJECT
    | PK | CODE_NAME |
    | 1 | 12 |
    | 2 | 13 |
    And now I want to add a new record into table XREF : insert into XREF
    values (1,1);
    public void createData() {
    Xref xref = new Xref();
    Person person = new Person(1);
    Project project = new Project(1);
    xref.setPerson(person);
    xref.setProject(project);
    person.getXrefs().add(xref);
    person.getXrefs().add(xref);
    pm.currentTransaction().begin();
    pm.makePersistent(xref);
    pm.currentTransaction().commit();
    I don't know why Kodo automatically insert new record to table PERSON ->
    confilct Primary Key. The errors are :
    0 [main] INFO kodo.Runtime - Starting Kodo JDO version 2.4.1
    (kodojdo-2.4.1-20030126-1556) with capabilities: [Enterprise Edition
    Features, Standard Edition Features, Lite Edition Features, Evaluation
    License, Query Extensions, Datacache Plug-in, Statement Batching, Global
    Transactions, Developer Tools, Custom Database Dictionaries, Enterprise
    Databases, Custom ClassMappings, Custom ResultObjectProviders]
    41 [main] WARN kodo.Runtime - WARNING: Kodo JDO Evaluation expires in 29
    days. Please contact [email protected] for information on extending
    your evaluation period or purchasing a license.
    1627 [main] INFO kodo.MetaData -
    com.solarmetric.kodo.meta.JDOMetaDataParser@e28b9: parsing source:
    file:/D:/AN/Test/classes/reversetutorial/reversetutorial.jdo
    3092 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    3325 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@164dbd5[[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leaked=0;unavailable=0]]
    3335 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] close
    connection
    3648 [main] INFO jdbc.JDBC - Using dictionary class
    "com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary" to
    connect to "Firebird" (version "__WI-V6.2.972 Firebird 1.0.3)WI-V6.2.972
    Firebird 1.0.3/tcp (annm)/P10") with JDBC driver "firebirdsql jca/jdbc
    resource adapter" (version "0.1")
    4032 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] open:
    jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
    4143 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <3098834>: INSERT INTO XREF(PERSON, PROJECT) VALUES
    4224 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <3098834>: [reused=1;params={(int)1,(int)1}]
    4244 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    preparing statement <9090824>: INSERT INTO PERSON(MGR, NAME, PK, SSNUM)
    VALUES (?, ?, ?, ?)
    4315 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
    executing statement <9090824>: [reused=1;params={null,null,(int)1,(int)0}]
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
    resultSetType or resultSetConcurrency changed
    4598 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] begin
    rollback
    4608 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] end
    rollback 10ms
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ]
    close:
    com.solarmetric.datasource.PoolConnection@1878144[[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leaked=0;unavailable=0]]
    4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] close
    connection
    javax.jdo.JDOFatalDataStoreException:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON" [code=335544665;state=null]
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
    [SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
    [PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
    GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
    on table "PERSON"
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLExceptions.java:17)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:416)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    NestedThrowablesStackTrace:
    org.firebirdsql.jdbc.FBSQLException: GDS Exception. violation of PRIMARY
    or UNIQUE KEY constraint "PK_PERSON" on table "PERSON"
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:425)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    at org.firebirdsql.gds.GDSException: violation of PRIMARY or UNIQUE KEY
    constraint "PK_PERSON" on table "PERSON
    at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1683)
    at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1636)
    at org.firebirdsql.jgds.GDS_Impl.isc_dsql_execute2(GDS_Impl.java:865)
    at
    org.firebirdsql.jca.FBManagedConnection.executeStatement(FBManagedConnection.java:782)
    at
    org.firebirdsql.jdbc.FBConnection.executeStatement(FBConnection.java:1072)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:420)
    at
    org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
    at
    com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
    at
    com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
    at reversetutorial.Finder.createData(Finder.java:74)
    at reversetutorial.Finder.main(Finder.java:141)
    Exception in thread "main"

    First off, use the '-primaryKeyOnJoin true' flag when running the reverse
    mapping tool so that you can get rid of that useless Xref class and have
    a direct relation between Person and Project. See the documentation on
    reverse mapping tool options here:
    http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_pc_reverse.html
    But your real problem is that you are creating new objects, assigning
    primary key values, and expecting them to represent existing objects.
    That's not the way JDO works. If you want to set relations to existing
    objects in JDO, you use the PM to look up those objects. If you try to
    create new objects, JDO will assume you want to insert new records into
    the DB, and you'll get PK conflicts like you see here.
    There are several good books out on JDO; if you're just starting out with
    it, they might save you a lot of time and help you master JDO quickly.

  • Insert a new record in the middle of a tabular form

    Hi,
    I have a tabular form.
    Pressing "Add Row" button opens a new, empty row at the bottom of the page or - if I use pagination - jumps to the page with the last record and creates a new record there.
    Is it possible to open a new line in the middle of the page ?
    I mean: if I have 25 records, I am on the first page (records 1-10) and the cursor is in a field of the second record and I press the "Add Row" button there should be a new, empty second line with old second record in the third line,... the old ninth record now in line 10 and disappeared record ten ?
    Any idea ?
    Thanks,
    Heinz

    Heinz,
    You may investigate logic using UNIONs and a manual tabular form.
    Something like:
    --get all records above new row
    select apex_item... column1
    ,apex_item... column2
    from yourtable
    where <logic to limit rows above new record>
    union
    --get the new row
    select apex_item... column1
    ,apex_item... column2
    from dual
    where :REQUEST = 'ADDROW'
    union
    --get every row not in the top query
    select apex_item... column1
    ,apex_item... column2
    from yourtable
    where <logic to pull all records not pulled above new record>
    For this to work you'll need to add your own "Add Row" button and associate it with a branch. Notice the select between the two unions in the above query is a select against dual. This will be your new record when pressing your "Add Row" button (:REQUEST = 'ADDROW').
    The following how-to link is a reference for some of the logic you'll need when creating a manual tabular form.
    http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html#MANUAL
    Good Luck,
    Todd

  • Automatic insertion of new record.....help......

    i have done insertion of 6 field in the database..which is working good(code is below)...Now i want to do stuff that when i insert 6 field in database, then a new record also has to be insert into the database, in that new record the following changes should be done.
    1)if i insert field code no ex.. 20 is inserted into the database then the a new code no 120 should be generated and inserted into database (the new code no should be started with 1, then the orginal code no will come) ex.. 10=101, 11=111, 256=1256,257=1257. The bold part is orginal record entered by the user, and the new record isnot bold.
    2)Percentage field is there,ex 12%, 13% etc values will come , it calculates the percentage of credit amount field values and insert that values into the debit amount field of new record.
    In my following code the code no is displayed as code, debit amount is shown as DrAmount, credit amount is shown as CrAmount, percentage field is shown as pct.
    conn.setAutoCommit(false);
    PreparedStatement pstmt = conn.prepareStatement("INSERT INTO gl_mast VALUES (?, ?, ?, ?, ?, ?)");
    for (int i=1; request.getParameter((i==1)?"code":("code_" +i)) != null; i++){
    String Code1=request.getParameter((i==1)?"code":("code_" +i));
    int Code=Integer.parseInt(request.getParameter((i==1)?"code":("code_" +i)));
    pstmt.setInt(1,Code);
    String Description=request.getParameter((i==1)?"Description":("Description_" +i));
    pstmt.setString(2,Description);
    float Dr_Amt =Float.parseFloat(request.getParameter((i==1)?"DrAmount":("DrAmount_" +i)));
    pstmt.setFloat(3,Dr_Amt );
    float Cr_Amt =Float.parseFloat(request.getParameter((i==1)?"CrAmount":("CrAmount_" +i)));
    pstmt.setFloat(4,Cr_Amt);
    String Type =request.getParameter((i==1)?"type":("type_" +i));
    pstmt.setString(5,Type );
    float Pct =Float.parseFloat(request.getParameter((i==1)?"pct":("pct_" +i)));
    pstmt.setFloat(6,Pct);
    pstmt.addBatch();
    conn.commit();
    conn.setAutoCommit(true);
    pstmt.executeBatch();plz...look at my code and solved my prob....
    thanx

    Whats Happening ..are u getting errors when u run thispage..what is the error..If I remember correctly...there was a similar post a couple of days ago from you....
    for (int i=1; request.getParameter((i==1)?"code":("code_" +i)) != null; i++){what is the above line of code doing..U cannot access the value of i as u have done above...why dont u use two ifs..to check the values..within the for...

  • Error when inserting a new record (Ctrl+Down)

    Hello,
    [http://img402.imageshack.us/my.php?image=12846351.jpg]
    Here the problem is : when i press Ctrl+Down (Insert new record), i enter data into all those fields, but i got an error
    Cannot Insert Record ("ROGER"."NUME") cannot be null (roger is my username which i logged on). And i completed all fields
    Also, when inserting data into fields, when i click on another field, it points me back automatically to the last completed field, then when i click again on the next field, i can enter data in that field. why the cursor cannot be on the next field when i first click there?
    i changed the property of the items Required = No (but however, in the database cannot be null).
    Please help if you can.
    Thanks

    For your other issue, with null fields on your forms.
    have you ever tried to log those fields value into a log table?
    A better and simple idea is:
    Create a temp table, with four columns: seq, section, message, type
    Where section is the column to condition any search you want to make
    message is the column to write anything you want
    type is the column which holds the tpe of the record, like info, debug, warn, etc.
    then create a database procedure
    this procedure must recieve the section, message, type and insert them into the log table and do commit.
    in yiour pre-insert trigger [forms level] or in your when-button-pressed or even better on your on-commit trigger [forms level]
    write the following code:
    begin
    database_procdure('MY_FORM_NAME', 'THE VALUES ARE: 1='||:1||' 2='||:2||' 3='||:3, 'INFO');
    end;
    After that you can do a select in your sql*plus with the following statement:
    select *
    from temp_table
    where selction like 'MY_FORM_NAME';
    then you can track if any of the values you think is null or has a value, in fact, has a value.
    best regards,
    Abdel Miranda
    AEMS Global Group
    Panama

  • Inserting a new record in  a database

    Hi,
    In my program I have to add a new record in a database. The problem is that one of the column of the database is a MEDIUMBLOB, and I have to put into that column an array of byte ( that I can convert into an InputStream ).
    How can I do?

    To insert Blob data (an array of byte called "data") I tryed the following code; the blob colomn is called "column2" and the table(called "myTable") has only another column ("column1"), a column of String:
    InputStream inp = new ByteArrayInputStream(data);
    stmt.executeUpdate("insert into myTable (column1)
    values( ' value1' ); " );
    ResultSet res = stmt.executeQuery("select column2 from myTable");
    res.updateBlob("data", inp);The problem is that I have the following error:
    Exception in thread "AWT-EventQueue-0" java.lang.AbstractMethodError: >com.mysql.jdbc.ResultSet.updateBlob(Ljava/lang/String;Ljava/io/InputStream;)V

  • Any good example using JSF to perform search?

    is there a good design pattern I can find somewhere
    that uses jsf to search a list of words in a database
    and returns the definiation on the same page
    for example
    mywords.jsp
    submit jsf action
    bean searches mysql
    back to the same page mywords.jsp with the results listed
    thanks

    It is a little hard to tell what you are trying to do from your explanation. You would have a much higher success rate if you posted on the Machine Vision board in the Most Active Hardware Boards. Also, if you post an example it is good practice to state the version of software used. It is also helpful to save it to a previous version to allow a broader audience to see the example.
    You stated that you have a "purpose of feature tracking among the series of images for my experiment using Normalized Cross-Correlation technique." Could you post this with a more detailed explanation on the Machine Vision board? Also to explain what type of suggestions or advice you are looking for from the example that you posted would allow myself and others on the forums to understand what you are looking for here.
    Vince M
    Applications Engineer

  • Any good examples of content built for the iphone?

    Hi Guys
    Just testing and re-designing our content for the iPad on the iPhone. Colin fleming has advised designing a consistent area in your layout for page swipe and navigation and designing interactivity only in the upper area of the page. Just wanted to see some examples of this?
    Cheers
    Gemma

    A quick search in the app store found this: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=285180322&mt=8

Maybe you are looking for

  • How to automatically open csv files in Excel on imac

    I am migrating back from Google Chrome to firefox and would like to have the browser automatically open csv files to Excel on my mac desktop. The step to have them saved in the download folder and then go in an open it in Excel adds an unnecessary ac

  • How do I make a music playlist in adobe edge

    im trying to make a music playlist in adobe edge. The playlist must have multiple buttons that when you press the different buttons they play different songs. Could some one tell me how to make this or place a music playlist created in adobe edge for

  • External display not working with i-mac.

    Using a newer i-mac 2013. My acer monitor stopped working entirely when i installed the newest OS 10.9. Already tried the ram resets and display resets. Any help?

  • Insertion a record in a table having columns of different charsets using OLEDB

    My development environment - Database -> Microsoft SQL Server 2008 R2 OS -> Windows Server 2008 R2 Database Charset -> Chinese_PRC_CI_AS (Windows 936) Operating System Charset -> Chinese Below table is having varchar fields with different charsets. c

  • How to suppress cancel email notification

    Hello All, We have a time out in place for AP invoice approval for every 2 days. After every time out the Canceled remainder email comes. Is there a way to suppress the email notification of cancellation? Regards, Aniruddha