Errors with partitioning by callback or keys (JNI/Java), bug?

Hello,
Just upgraded to 4.8, to test new partitioning features. Seems to be not working for me, or maybe I'm doing something wrong?
Vista 64-bit, Java 1.6.0_16 32-bit, BDB 4.8.24 32-bit.
Callback-based partitioning:
public class InfoDataPartitionHandler implements PartitionHandler {
@Override
public int partition(Database db, DatabaseEntry key) {
     return 0; // just testing
DatabaseConfig cfg = new DatabaseConfig();
cfg.setAllowCreate(true);
cfg.setPartitionByCallback(4, new InfoDataPartitionHandler());
cfg.setType(DatabaseType.BTREE);
Database db = env.openDatabase(null,"test",null,cfg);
And this is what I get when running, looks like a bug actually:
Exception in thread "main" java.lang.IllegalArgumentException: DatabaseEntry must not be null
at com.sleepycat.db.internal.db_javaJNI.Db_set_partition(Native Method)
at com.sleepycat.db.internal.Db.set_partition(Db.java:497)
at com.sleepycat.db.DatabaseConfig.configureDatabase(DatabaseConfig.java:2206)
at com.sleepycat.db.DatabaseConfig.openDatabase(DatabaseConfig.java:2105)
at com.sleepycat.db.Environment.openDatabase(Environment.java:314)
Key-based partitioning
Things are even worse.
DatabaseEntry k1 = new DatabaseEntry();
StringBinding.stringToEntry("111111111111111111111111", k1);
int sz = k1.getSize();
MultipleDataEntry keys = new MultipleDataEntry(new byte[sz]);
keys.append(k1);
DatabaseConfig cfg = new DatabaseConfig();
cfg.setAllowCreate(true);
cfg.setPartitionByRange(2, keys);
cfg.setType(DatabaseType.BTREE);
Database db = new Database("/tmp/test.db", null, cfg);
db.close();
Exception in thread "main" com.sleepycat.db.DatabaseException: DB_NOTFOUND: No matching key/data pair found: DB_NOTFOUND: No matching key/data pair found
at com.sleepycat.db.internal.db_javaJNI.Db_open(Native Method)
at com.sleepycat.db.internal.Db.open(Db.java:449)
at com.sleepycat.db.DatabaseConfig.openDatabase(DatabaseConfig.java:2106)
at com.sleepycat.db.Database.<init>(Database.java:103)
at Temp.main(Temp.java:23)
Please help.

Hello. Thanks for this report, both situations you've reported are bugs in Berkeley DB. We are currently validating patches internally.
Please contact me directly at ben dot schmeckpeper at the obvious domain.
Thanks,
Ben

Similar Messages

  • Problem with JMenus that Persist - Is this a Java bug?

    I am having a problem with JMenus that persist. By this I mean
    that my drop down menus persist on the screen even after they have
    been selected.
    I've checked the Java bug database, and the following seems
    to come closest to my problem:
    Bug ID: 4235188
    JPopupMenus and JMenus persist when their JFrame becomes visible
    State: Closed, not a bug
    http://developer.java.sun.com/developer/bugParade/bugs/4235188.html
    This page says that the matter is closed and is not a bug. The
    resolution of this matter printed at the bottom of the page
    is completely abstruse to me and I would appreciate any
    comments to understand what they are talking about.
    The code at the end of my message illustrates my problem.
    1. Why should paintComponent() make any difference to
    Menu behavior?
    2. Is this a bug?
    3. What's the workaround if I have to paint() or repaint()?
    Thanks
    Tony Lin
    // Example of Menu Persistence Problem
    // Try running this with line 41, paintComponent(), and without line 41
    // Menus behave normally if line 41 is commented out
    // If line 41 exists, menus will persist after they have been selected
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class P2 extends JPanel {
    JMenuItem[] mi;
    public P2() {
    JFrame thisFrame = new JFrame();
    thisFrame.getContentPane().add(this);
    JMenu menu = new JMenu("My Menu");
    JMenuBar mb = new JMenuBar();
    mi = new JMenuItem[4];
    for (int i=0; i<mi.length; i++) {
    mi[i] = new JMenuItem("Menu Item " + String.valueOf(i));
    menu.add(mi);
    mb.add(menu);
    thisFrame.setJMenuBar(mb);
    thisFrame.setSize(400,200);
    thisFrame.setLocation(150,200);
    thisFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    System.exit(0);
    thisFrame.setVisible(true);
    public void paintComponent(Graphics g) {} //Affects menu behavior!
    public static void main(String[] args) {
    new P2();

    Well, my understanding of the way painting works is that a component doesn't UNPAINT itself. Instead a message is sent to the component under the coordinates of the menu to REPAINT itself.
    In your demo program the JFrame is the component under the JMenu. The paintComponent() method of JFrame is empty, so nothing gets repainted.
    I added super.paintComponent(g); to the method and everything works fine.

  • Error with specfile. 1.Bad Key: [Directories] NIDIR

    While running this code from a command line,(and test_spec.txt resides in the same root)
    setup.exe test_spec.txt /r:n
    I get this error during initialization,
    "The following sections are missing from the specfile:
    1. Bad Key: [Directories] NIDIR
    Please correct the specfile and try again"
    Hopefully this is just a syntax problem I am having. But I am using a specfile from the template that came with the media. Here is the section from my test_spec.txt file.
    [Directories]
    NIDIR=C:\Program Files\National Instruments
    I have tried enclosing in quotes, adding spaces around "=" sign, etc. and I get the same error.
    Anyone have a working example, or any ideas?
    Thanks in advance,
    DR

    I could not get it to work with quotes around the path, seperate folders or the entire string. NIDIR=C:\ did not work either.
    I finally got it to work by commenting out the NIDIR in the specfile.txt, which installs in the default directory.
    Something strange that I found however.
    There is different syntax available when calling setup.exe, depending on how you call it.
    From a cmd line type, setup.exe /? your get a message box with the available SETUP syntax options.
    Then run setup.exe /? from within a simple batch file and you get a message box with the avaiable USAGE syntax options.
    MY users will want specific components installed besides the defaults.
    Does anyone have working code for using the setup.ini or setup.inf silent install options?
    Thanks in advance,
    DR

  • Error with Partition Help please.

    Hello!
    So when I tried to install Windows on my Mac using Boot Camp Assistant, I set my partiton memory to 25 gigs (I have 150 gigs free) and clicked partition. However it said that it couldent be partitioned because some files couldent be moved. I read up on it and it said that you had to restore your computer and defrag it. I would like to avoid this and was wondering what is the matter. I had other partitions on my mac but I deleted them and it appears that my Mac HD is the only partition in disk utility. What is going wrong?

    EDIT:
    Some people say to boot with the Install CD and use the Disk utility on that to repair the Hard Drive. Does this delete files and apps?

  • Error with partitioning

    My friend has a macbook unibody (the silver one) and when ever he trys to run boot camp to partition his drive, the application comes up but when you hit continue, it tells you that the software needs to be updated. I have updated everything and it shows it all as being updated but it is still not working. I have tried to find the plist file but can't find any. What is going on?

    Fixed it! it turns out the drive has to be journaled. so I just went into disk utility and enabled it and it works fine. I dont know why it doesnt tell you that off the bat. or at least that you have to upgrade your hardware

  • Key Lenght too short error with dbms_crypto.encrypt

    Hi Friends,
    I am getting above mentioned error with dbms_crypto.encrypt.
    I had created a thread in technology --> security forum but i am not getting any help from there.
    ORA-28234 Key Length too short with dbms_crypto.encrypt
    Appreciate if anyone help me resolve this issue.
    Thanks
    AT

    Hi Warren,
    Yes function is compiled without any compilation error.
    Thanks
    AT

  • Sybase Error 2601 Attempt to insert duplicate key row in object with unique

    RE: Sybase Error 2601 Attempt to insert duplicate key row in object with unique index.
    Hi Folks,
    I'm getting the following error whilst executing a stored procedure in Sybase.
    ERROR: Sybase Error 2601 Attempt to insert duplicate key row in object with unique index.
    I understand that duplicate values have been inserted into a column that has a unique constraint.
    I just can't figure out how to rectify the problem.
    Your help will be greatly appreciated!
    Many thanks in advance.

    If the value I'm trying to insert (using update)
    already exists in the unique-value field then the DB
    refuses to update the field.
    If the value is different it will update.Are you trying to insert or update in SQL (identified by the keyword INSERT or UPDATE respectively)?
    Even in case of an UPDATE query, if you are going to update the values of some columns to violate the unique constraints, the update will not succeed and you will get the error message.
    or is it?
    it tries to create a new row, but can't because there
    is another row with the same unique-values.
    If this is the case, I am only trying to update and
    not create a new item.To put it in simpler words, if you have a set of values defining the uniqueness of a record, you cannot insert another record with the same set of unique values. Similarly, you cannot update an existing record by modifying the set to conflict with another set of unique values which already exist in the database.
    Suppose there are two columns A and B defining the uniqueness of the record and you have only two records at the moment like -
    A B
    ========
    1 1
    2 1
    If you try to insert a record with A = 1 and B = 1, it will fail because a record already exists. You cannot violate uniqueness because the database has already been told that there will be only one record for any given combination of A and B.
    Similarly, if you try to update the second record from A = 2 to A = 1, the end result would be A =1 and B = 1. There is already a record with that set of values and this will result in a violation of the uniqueness. So, this update will also be disallowed. On the other hand, if you try to update B to some value, say 3, there is no problem in doing so.
    For convenience, you can imagine an UPDATE operation to be equivalent to DELETE + INSERT operation, though it doesn't necessarily work the same way internally.
    I hope I was clear enough.

  • Error with forign key constraints

    hi
    I have a .sql file which contains about 180 tables scripts . TO disable the contraints i ran the below script first
    begin
    for v in (select constraint_name, table_name from user_constraints where constraint_type = 'R')
    loop
         execute immediate
         'alter table ' || v.table_name || ' disable constraint ' || v.constraint_name;
    end loop;
    end;
    and then the .sql file by giving @filename.sql .Some of the scripts are getting executed but the one's having forign key references it is showing containt error foreign key check. but when i ran the above script ie the one to disable the foreign key check again and then ran each of these table scripts which showed error before manually it gets executed .why is this so? can anyone help me in solving this problem
    Thanking you in advance
    Dinny

    I have a .sql file which contains table scripts and i some of these tables there is foreign key referencesing other tables so when i am ruuning the script it is showing such tables(ie the tables that i am refering to) is not existing for eg below is one of the script from the .sql file
    create table t_system_groups (
    group_id NUMBER(11) not null,
    group_name VARCHAR2(255) not null,
    group_desc VARCHAR2(255),
    parent_id NUMBER(11) default '0',
    full_path VARCHAR2(255) default NULL,
    CONSTRAINT pk_group_id_t_system_groups PRIMARY KEY (group_id),
    CONSTRAINT uk_group_name_t_system_groups UNIQUE (group_name),
    CONSTRAINT fk_t_system_groups FOREIGN KEY (parent_id) REFERENCES t_system_groups (group_id) ON DELETE CASCADE
    Since i have run the script for disabling the constraints before running the .sql file then why is it showing such as error. also showing errors with drop table having references
    for eg:
    SQL> begin
    2 for v in (select constraint_name, table_name from user_constraints where constraint_type = 'R'
    3 loop
    4 execute immediate
    5 'alter table ' || v.table_name || ' disable constraint ' || v.constraint_name;
    6 end loop;
    7
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> drop table t_system_groups;
    drop table t_system_groups
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys
    Regards
    dinny

  • SMD error: PPMS Modelling is inconsistent with SMSY. Check PPMS Keys

    Hi,
    In extractors configured - WORKLOAD ANALYSIS (Introscope DATE) - BI Java, i have an inconsistency for Enterprise Portal:
    ERROR: Consistency Check: PPMS Modelling is inconsistent with SMSY. Check PPMS Keys.
    I can not find the problem. Can you help me?
    Best regards,
    Diego.

    Hello Diego,
    In regards to the error you are getting:
    "PPMS Modelling is inconsistent with SMSY. Check PPMS Keys."
    There is a daily consistency check against SMSY.  In case that the PPMS information in SMSY changed, we flag the relevant
    extractor in order to prevent collecting of false data. Please delete the inconsistent extractors for system <select your managed SID> in the EFWK AdminUI (Managing System -> Inconsistent Extractors) and rerun the managed system setup for system <select your managed SID>.
    This will resolve your issue.
    Thanks,
    Mark

  • Error with data source and jndi

    Dave,
    I am using weblogic 6.1 now and I am still getting the same problem.
    Error:
    The DataSource name with the JNDI name: Organization can not be located. Please
    ensure that the DataSource has been deployed successfully and that the JNDI name
    in your EJB Deployment descriptor is correct.
    The Entity Bean files that I have used for JBoss are:
    * GangsterBean.java
    * Copyright (c) 2002 Sempire, Inc.
    * All rights reserved.
    * This software is the confidential and proprietary information
    * of Sempire, Inc
    * @ version 1.0
    package com.sempire.builder.business_component;
    import java.util.Collection;
    import java.util.Set;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.FinderException;
    public abstract class GangsterBean implements EntityBean
    private static int idgen = 1;
    private EntityContext context;
    public Integer ejbCreate( String Name, String Nickname, Integer Badness) throws
    CreateException
    setID(new Integer(idgen++));
    setName(Name);
    setNickname(Nickname);
    setBadness(Badness);
    return null;
    public void ejbPostCreate( String Name, String Nickname, Integer Badness)
    throws CreateException
    // CMP Field Accessors -----------------------------------------------------
    public abstract Integer getID();
    public abstract void setID(Integer ID);
    public abstract String getName();
    public abstract void setName(String Name);
    public abstract String getNickname();
    public abstract void setNickname(String Nickname);
    public abstract Integer getBadness();
    public abstract void setBadness(Integer Badness);
    // CMR Field Accessors -----------------------------------------------------
    public abstract Collection getJobs();
    public abstract void setJobs(Collection Jobs);
    public abstract Organization getOrganization();
    public abstract void setOrganization(Organization Organization);
    // EJB callbacks -----------------------------------------------------------
    public void setEntityContext(EntityContext ctx)
    context = ctx;
    public void unsetEntityContext()
    context = null;
    public void ejbRemove() {}
    public void ejbLoad() {}
    public void ejbStore() {}
    public void ejbPassivate() {}
    public void ejbActivate() {}
    What are the changes to be made in this file so that the files work in weblogic
    too?
    Also, my ejb-jar.xml file has been changed to:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <display-name>Business Component CMP 2.0</display-name>
    <enterprise-beans>
    <entity>
    <display-name>Gangster Entity Bean</display-name>
    <ejb-name>GangsterEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.GangsterHome</local-home>
    <local>com.sempire.builder.business_component.Gangster</local>
    <ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>GangsterEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>nickname</field-name></cmp-field>
    <cmp-field><field-name>badness</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/GangsterDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    <entity>
    <display-name>Organization Entity Bean</display-name>
    <ejb-name>OrganizationEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
    <local>com.sempire.builder.business_component.Organization</local>
    <ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>OrganizationEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>description</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    <entity>
    <display-name>Job Entity Bean</display-name>
    <ejb-name>JobEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.JobHome</local-home>
    <local>com.sempire.builder.business_component.Job</local>
    <ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>JobEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>score</field-name></cmp-field>
    <cmp-field><field-name>setupCost</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/JobDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>organization-memberGangsters</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>organization---memberGangsters</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>OrganizationEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>memberGangsters</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>memberGangsters---organization</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>organization</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    <ejb-relation>
    <ejb-relation-name>gangsters-jobs</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>gangsters---jobs</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>jobs</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>jobs---gangsters</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>JobEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>gangsters</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    <ejb-relation>
    <ejb-relation-name>organization-theBoss</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>organization---theBoss</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>OrganizationEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>theBoss</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>theBoss---organization</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>GangsterEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>OrganizationEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>JobEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    My weblogic-ejb-jar.xml file has been changed to:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>GangsterEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/GangsterDataSource</res-ref-name>
    <jndi-name>jdbc.GangsterDB</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Gangster</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OrganizationEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
    <jndi-name>jdbc.Organization</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Organization</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>JobEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/JobDataSource</res-ref-name>
    <jndi-name>jdbcJob</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Job</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Please do let me know all the changes I need to make so that my application can
    deploy in weblogic.
    Thank You
    Ronak

    Dave,
    I am using weblogic 6.1 now and I am still getting the same problem.
    Error:
    The DataSource name with the JNDI name: Organization can not be located. Please
    ensure that the DataSource has been deployed successfully and that the JNDI name
    in your EJB Deployment descriptor is correct.
    The Entity Bean files that I have used for JBoss are:
    * GangsterBean.java
    * Copyright (c) 2002 Sempire, Inc.
    * All rights reserved.
    * This software is the confidential and proprietary information
    * of Sempire, Inc
    * @ version 1.0
    package com.sempire.builder.business_component;
    import java.util.Collection;
    import java.util.Set;
    import javax.ejb.CreateException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.FinderException;
    public abstract class GangsterBean implements EntityBean
    private static int idgen = 1;
    private EntityContext context;
    public Integer ejbCreate( String Name, String Nickname, Integer Badness) throws
    CreateException
    setID(new Integer(idgen++));
    setName(Name);
    setNickname(Nickname);
    setBadness(Badness);
    return null;
    public void ejbPostCreate( String Name, String Nickname, Integer Badness)
    throws CreateException
    // CMP Field Accessors -----------------------------------------------------
    public abstract Integer getID();
    public abstract void setID(Integer ID);
    public abstract String getName();
    public abstract void setName(String Name);
    public abstract String getNickname();
    public abstract void setNickname(String Nickname);
    public abstract Integer getBadness();
    public abstract void setBadness(Integer Badness);
    // CMR Field Accessors -----------------------------------------------------
    public abstract Collection getJobs();
    public abstract void setJobs(Collection Jobs);
    public abstract Organization getOrganization();
    public abstract void setOrganization(Organization Organization);
    // EJB callbacks -----------------------------------------------------------
    public void setEntityContext(EntityContext ctx)
    context = ctx;
    public void unsetEntityContext()
    context = null;
    public void ejbRemove() {}
    public void ejbLoad() {}
    public void ejbStore() {}
    public void ejbPassivate() {}
    public void ejbActivate() {}
    What are the changes to be made in this file so that the files work in weblogic
    too?
    Also, my ejb-jar.xml file has been changed to:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <display-name>Business Component CMP 2.0</display-name>
    <enterprise-beans>
    <entity>
    <display-name>Gangster Entity Bean</display-name>
    <ejb-name>GangsterEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.GangsterHome</local-home>
    <local>com.sempire.builder.business_component.Gangster</local>
    <ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>GangsterEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>nickname</field-name></cmp-field>
    <cmp-field><field-name>badness</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/GangsterDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    <entity>
    <display-name>Organization Entity Bean</display-name>
    <ejb-name>OrganizationEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
    <local>com.sempire.builder.business_component.Organization</local>
    <ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>OrganizationEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>description</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    <entity>
    <display-name>Job Entity Bean</display-name>
    <ejb-name>JobEJB</ejb-name>
    <local-home>com.sempire.builder.business_component.JobHome</local-home>
    <local>com.sempire.builder.business_component.Job</local>
    <ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>JobEJB</abstract-schema-name>
    <cmp-field><field-name>iD</field-name></cmp-field>
    <cmp-field><field-name>name</field-name></cmp-field>
    <cmp-field><field-name>score</field-name></cmp-field>
    <cmp-field><field-name>setupCost</field-name></cmp-field>
    <primkey-field>iD</primkey-field>
    <resource-ref>
    <res-ref-name>jdbc/JobDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params></method-params>
    </query-method>
    <ejb-ql>
    <![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
    </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>organization-memberGangsters</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>organization---memberGangsters</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>OrganizationEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>memberGangsters</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>memberGangsters---organization</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>organization</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    <ejb-relation>
    <ejb-relation-name>gangsters-jobs</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>gangsters---jobs</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>jobs</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>jobs---gangsters</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>JobEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>gangsters</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    <ejb-relation>
    <ejb-relation-name>organization-theBoss</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>organization---theBoss</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>OrganizationEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>theBoss</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>theBoss---organization</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>GangsterEJB</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>GangsterEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>OrganizationEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>JobEJB</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    My weblogic-ejb-jar.xml file has been changed to:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>GangsterEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/GangsterDataSource</res-ref-name>
    <jndi-name>jdbc.GangsterDB</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Gangster</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>OrganizationEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/OrganizationDataSource</res-ref-name>
    <jndi-name>jdbc.Organization</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Organization</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>JobEJB</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/JobDataSource</res-ref-name>
    <jndi-name>jdbcJob</jndi-name>
    </resource-description>
    </reference-descriptor>
    <local-jndi-name>Job</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    Please do let me know all the changes I need to make so that my application can
    deploy in weblogic.
    Thank You
    Ronak

  • IDOC to MSsql,  error in mapping(Violation of PRIMARY KEY constraint)

    Hi All,
    I'm working with MATMAS IDOC  to MSSql. My SQL structure is of 8 tables(multiple statements) with primary key. In mapping i have used UPDATE_INSERT in action field for all the tables but still im getting "Violation of PRIMARY KEY constraint" for the last table structure. first 7 tables are single occurances but the 8th structure data is coming multple times from IDOC(E1MARMM).
    my 8th table structure is :
    STATEMENT8                                IDOC(MAPPED)
    TABLE8
    ACTION                                      UPDATE_INSERT
    TABLE                                           TABLENAME
    ACCESS     0 to Unbounded            MAPPED with E1MARMM
    Item_CD                                used oneasmany +splitbyvalue with MATNR
    Plant_ID                                  used oneasmany +splitbyvalue with WERKS  
    EAN_CAT                                 used oneasmany +splitbyvalue with NUMTP
    EAN                                             used oneasmany +splitbyvalue with EAN11
    Numerator_For_Conversion_To_BaseUOM
    Display_UOM
    Denominator_for_conversion_To_baseUOM
    KEY           0 to Unbounded                 MAPPED with E1MARMM
    Item_CD                                used oneasmany +splitbyvalue with MATNR
    Plant_ID                                  used oneasmany +splitbyvalue with WERKS  
    EAN_CAT                                 used oneasmany +splitbyvalue with NUMTP
    EAN                                             used oneasmany +splitbyvalue with EAN11
    Display_UOM
    in test tab its fine and fetching number of times according to MARMM segments  but in END to END testing its triggering an error stating that
    ""Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MM_EAN' (structure 'STATEMENT8'): com.microsoft.sqlserver.jdbc.SQLServerException: Violation of PRIMARY KEY constraint 'PK_MM_EAN'. Cannot insert duplicate key in object 'dbo.MM_EAN'.  ""
    Plz help me regarding this..

    Hi team,
    How resolve the below error 
    Violation of PRIMARY KEY constraint 'PK_test'. Cannot insert duplicate key in object 'dbo.test'. The duplicate key value is (12610). (Source: MSSQLServer, Error number: 2627) ?
    Thanks,
    Ram
    RAM
    There can be two reasons
    1. The insert script used is having multiple instances of the records with Key as 12610 returned from the source query. If this is the issue add a logic to include only the unique set of id values for records by avoiding duplicates. There are several approaches
    for this like using ROW_NUMBER with PARTITION BY, using a join with derived table etc
    2. The record with Key 12610 already exist in your destination table and your script is again trying to insert another instances of record with same key. This can be avoided by adding a NOT EXISTS condition with a subquery which will check and return only
    those records which doesnt already exist in the source
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Troubles editing tables with partitions

    I'm running SQL Developer 1.5.3 against Oracle 10/11 databases and SQL Developer has trouble with my partitioned tables. Both the schema owner and sys users experience the same problems.
    The first time I try to edit a table, I get an "Error Loading Objects" dialog with a NullPointException message. If I immediately turn around and try to edit the table again, I get the Edit Table dialog. That's annoying but there's at least a work-around.
    Next, if I select the Indexes pane, I can view the first index but selecting another one results in an "Index Error on <table>" error dialog. The message is "There are no table partitions on which to define local index partitions". At this point, selecting any of the other panes (Columns, Primary Key, etc.) results in the same dialog. While the main Partitions tab shows my partitions, I cannot see them in the Edit Table dialog. In fact, the Partition Definitions and Subpartition Templates panes are blank.
    Does anyone else see this behavior? Version 1.5.1 behaved the same way so it's not new.
    Of course I've figured out how to do everything I need through SQL but it would be handy if I could just use the tool.
    Thank you.

    Most of my tables are generated from a script so this morning I decided to just create a very basic partitioned table. It contained a NUMBER primary key and a TIMESTAMP(6) column to use with partitioning. That table worked just fine in SQL Developer.
    At that point I tried to figure out what is different about my tables and I finally found the difference... Oracle Spatial. If I add an MDSYS.SDO_GEOMETRY column to my partitioned table, SQL Developer starts having issues.
    I also have the GeoRaptor plugin installed so I had to wonder if it was interfering with SQL Developer. I couldn't find an option to uninstall an extension so I went into the sqldeveloper/extensions directory and removed GeoRaptorLibs and org.GeoRaptor.jar. GeoRaptor doesn't appear to be installed in SQL Developer anymore but I still see the same behavior.
    It appears that there is an issue in SQL Developer with Oracle Spatial and partitioning. Can someone confirm this?

  • Problems with partition tables

    Hi all,
    I've got some problems with partition tables. The script at the bottom run but when I wanna insert some values it returns me an error
    (ORA-06550: line 1, column 30: PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored)
    and I can't understand why!
    There's something incorrect in the script or not?
    Please help me
    Thanks in advance
    Steve
    CREATE TABLE TW_E_CUSTOMER_UNIFIED
    ID_CUSTOMER_UNIFIED VARCHAR2 (27) NOT NULL ,
    START_VALIDITY_DATE DATE NOT NULL ,
    END_VALIDITY_DATE DATE ,
    CUSTOMER_STATUS VARCHAR2 (255)
    PARTITION BY RANGE (START_VALIDITY_DATE)
    SUBPARTITION BY LIST (END_VALIDITY_DATE)
    PARTITION M200909 VALUES LESS THAN (TO_DATE('20091001','YYYYMMDD'))
    (SUBPARTITION M200909_N VALUES (NULL), SUBPARTITION M200909_NN VALUES (DEFAULT)),
    PARTITION M200910 VALUES LESS THAN (TO_DATE('20091101','YYYYMMDD'))
    (SUBPARTITION M200910_N VALUES (NULL), SUBPARTITION M200910_NN VALUES (DEFAULT)),
    PARTITION M200911 VALUES LESS THAN (TO_DATE('20091201','YYYYMMDD'))
    (SUBPARTITION M200911_N VALUES (NULL), SUBPARTITION M200911_NN VALUES (DEFAULT)),
    PARTITION M200912 VALUES LESS THAN (TO_DATE('20100101','YYYYMMDD'))
    (SUBPARTITION M200912_N VALUES (NULL), SUBPARTITION M200912_NN VALUES (DEFAULT)),
    PARTITION M201001 VALUES LESS THAN (TO_DATE('20100201','YYYYMMDD'))
    (SUBPARTITION M201001_N VALUES (NULL), SUBPARTITION M201001_NN VALUES (DEFAULT)),
    PARTITION M201002 VALUES LESS THAN (TO_DATE('20100301','YYYYMMDD'))
    (SUBPARTITION M201002_N VALUES (NULL), SUBPARTITION M201002_NN VALUES (DEFAULT)),
    PARTITION M210001 VALUES LESS THAN (MAXVALUE))
    (SUBPARTITION M210001_N VALUES (NULL), SUBPARTITION M210001_NN VALUES (DEFAULT))
    ;

    Hi Hoek,
    the DB version is 10.2 (italian version, then SET is correct).
    ...there's something strange: now I can INSERT rows but I can't update them!
    I'm using this command string:
    UPDATE TW_E_CUSTOMER_UNIFIED SET END_VALIDITY_DATE = TO_DATE('09-SET-09', 'DD-MON-RR') WHERE
    id_customer_unified = '123' and start_validity_date = TO_DATE('09-SET-09', 'DD-MON-RR');
    And this is the error:
    Error SQL: ORA-14402: updating partition key column would cause a partition change
    14402. 00000 - "updating partition key column would cause a partition change"
    *Cause:    An UPDATE statement attempted to change the value of a partition
    key column causing migration of the row to another partition
    *Action:   Do not attempt to update a partition key column or make sure that
    the new partition key is within the range containing the old
    partition key.
    I think that is impossible to use a PARTITION/SUBPARTITION like that: in fact the update of "END_VALIDITY_DATE" cause a partition change.
    Do u agree or it's possible an update on a field that implies a partition change?
    Regards Steve

  • Problems Faced with Partitions in Oracle 9i.

    I have a doubt regarding the partitions in Oracle 9i can you please help me regarding this?
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    alter table t2 exchange partition p1 with table t1;
    SQL> alter table t2 exchange partition p1 with table t1;
    alter table t2 exchange partition p1 with table t1
    ERROR at line 1:
    ORA-14099: all rows in table do not qualify for specified partition
    WHAT DOES THIS ERROR MESSAGE MEAN? I AM NOT ABLE TO UNDERSTAND THIS? WHAT NEED's TO BE DONE TO RESOLVE THIS?
    alter table t2 exchange partition p1 with table t1 WITHOUT VALIDATION;
    SQL> SELECT * FROM T2;
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P2);
    no rows selected
    SQL> SELECT * FROM T2 PARTITION(P3);
    no rows selected
    (i) Why i am facing this error ORA-14099: while partitioning? Can you please brief me about this ?
    (ii) why there is not data's in the PARTITIONS p2 &p3 after the partitions is exchanged WITHOUT VALIDATION options?
    what is going with this method?
    (iii) Also can you please explain me with an example how to partitions a table having milliion of records with EXCHANGE PARTITION Options with MULITPLE partition segment's (say partition based on status id column with 6 differnt values i am thinking to use list partitions using status_id as partition key) ?
    Also i have tried the below approch is this a right approch? please correct me if i am wrong.
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    commit;
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    SQL> insert into t2 select * from t1;
    3 rows created.
    SQL> commit;
    Commit complete.
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    SQL> SELECT * FROM T2 PARTITION(P2);
    X Y Z
    2 2 2
    SQL> SELECT * FROM T2 PARTITION(P3);
    X Y Z
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P4);
    no rows selected
    EXPLAIN PLAN
    FOR SELECT * FROM T2 WHERE X = 1
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 9 | 2 | | |
    | 1 | TABLE ACCESS FULL | T2 | 1 | 9 | 2 | 1 | 1 |
    Now my question is what is problem instead of using EXCHANGE PARTITION why caun't we follow this above approch?
    to partition a non-partitioned table?
    Thanks,
    Rajesh.

    The value of 3 should obviously should go into the partition P3.Then why are you putting it into p1?
    Your command,
    <tt>    alter table t2 exchange partition <b>p1</b> with table t1;</tt>
    will swap partition p1 with the contents of table t1, leaving you with partition p1 containing the three values that were in t1. At first it told you there were rows in t1 that did not belong in that partition, but you used FORCE so it put them in anyway.
    btw there are notes in the FAQ about how to use ** tags to format your posts.
    ~Edited by: William Robertson on Oct 15, 2008 6:49 AM~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Disk error before partition

    I'm on a MacBook Pro 17... I believe it's the late 2008 model - not the new unibody.
    Seems I'm having the same problem some others have had but I haven't seen much in the way of resolutions or answers to those posts beyond suggestions of changing the size of the partitions or just repeating the process multiple times.
    I've tried 4 times now to install Win XP Pro SP2 and every time I get a disk error and the ubiquitous "press any key to restart" (which doesn't work of course) after the computer restarts from copying files and before I'm given the option to format the Boot Camp partition.
    This has got to be a problem with Boot Camp. I'm very confident it's not a problem with my copy of Windows. It's not getting far enough in the installation to be a problem with Windows it seems to me.
    If anybody has any further advice besides changing the partition size or just trying again and again, I'm open to suggestions...
    Frustrated (but still happy with my MacBook purchase). I may give Fusion a try though I'd prefer to not go the virtual machine route... it might get me up and running though until a fix is found for this.
    Rob

    The hatter wrote:
    Do a long format to NTFS before installing and see if that helps.
    Not all XP CDs seem to work, no common thread as to why or which ones, so even if it worked on a PC doesn't help.
    Belonging to MSDN, I have a slew of XP and Vista DVDs and it's true that not all XPs CDs/DVDs worked when I first installed XP. My suspicion tends toward the drivers on the CD. If they do not support enough Mac hardware, the install hangs. Usually on an XP install, there is a point when you can press an F key to install additional drivers or other special software. Of course on a Mac, this is difficult, but on a PC, one can insert a special boot driver disk which the installer can read. It's rarely necessary on a PC but, again, I suspect that this is the problem. I know that some have reported that they could not use the Mac keyboard when the installer required a keypress, indicating that the keyboard driver set did not include the Mac keyboard.
    This may explain some of the issues with XP CDs and DVDs, but certainly not all.
    Windows 7 RC download should be out May 5th or later. Much better hardware support.
    I just DLd both Win7 x86 and x64 edition inages and patches. I may give one of them a shot this weekend.
    I have heard rumors about being able to install Win7 directly on an external HD. I will find out.

Maybe you are looking for

  • Sales order ATP Check

    As per our clientu2019s requirement during MRP run that stock as well as the receipts ( planned orders, Pos ) are not to be considered, we used the Storage Location MRP indicator (MRP 4 View, Storage Location MRP u2013 1), as a result Planned orders

  • Not allow to create delivery note if not enough stock

    Hi is it possilbe not allow to create delivery note if not enough stock? how can i do it thanks

  • Strange – Bottom Part of Windows are Unclickable?

    Hey guys, I signed up on this forum just to ask this question. I have been a Mac user since System 6, and have obviously had my fair share of problems, but 99% of the time I find a solution. Until this one... After updating to Leopard a few days afte

  • Batch Processing in Photoshop CS3

    With ImageReady abandoned and my CS2 Suite completely trashed by the installation and uninstallation of CS3 InDesign Beta I am stuck now with all my ImageReady droplets dead! I have tried my best to set up a comparable batch process in PS, but am una

  • HT4858 how do I see the photos on i cloud? how do others?

    Confused that there is not an option to view my photo stream on i cloud. What am I doing wrong. Have read and re-read the help options in i cloud but still cant see where I can see the thing online.