Class with composite Key,  attribute and relation

Hello
I am implementing the jpa part of my project however I have a quite common relation to set up between 2 tables and I think I am in the wrong way
I have 3 entities : question - answer and project
The code below should allow you to understand easierly :
----- project
public class Project implements Serializable{
     private static final long serialVersionUID = 6478117913922953539L;
     @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
     private Long ProjId;
     @Column(nullable = false)
     private String Name;
     @OneToMany(mappedBy="project",targetEntity=AnswerPK.class)
     private List<Answer> Answers;
------- question
public class Question implements Serializable{
     private static final long serialVersionUID = -1231353969246302525L;
     @Id @GeneratedValue
     private Long QuestId;
     @Column(nullable = false)
     private String Label;
     @Column(nullable = false)
     private String Type;
-------- Answer
public class Answer implements Serializable{
     private static final long serialVersionUID = -690621748466361598L;
     @EmbeddedId
     private AnswerPK key;
     private String result;
----------- AnswerPK
public class AnswerPK implements Serializable { 
     private static final long serialVersionUID = 9172011321649468776L;
     @ManyToOne(optional=false)
     @JoinColumn(name = "ProjId",nullable = false)
     private Project project;
     @OneToOne(optional=false)
     @JoinColumn(name = "QuestId",nullable = false)
     private Question question;
however I got this error
Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.unmod.Domain.Project.Answers[com.unmod.Domain.AnswerPK]
so I start thinking that's not the way to do that

Numerous other things started going odd so I cleared out and re-installed jdev.
The entities are generated correctly now.
blew 4 hours on it though

Similar Messages

  • JSF- view with no key-attributes cannot be activated

    Hi,
    i have a view Called Globals with 2 transient varibales , when i open many sessions at the same time and work with them , i got error
    JBO-30003: The application pool (model.PlacingModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-25052: ViewObject Globals with no key-attributes cannot be activated!
    each attribute of the view have
    Updateable = Always
    Queyable is Checked
    Passivative is checked
    in the view properties, tab Tuning => No Rows
    and "Fill Last Page " and "Passivate State " and "Including All Transient Variables"
    all the 3 are checked
    the view is NOT based on Entity Object
    i use this view for holding data from SelectOneListBox
    should i modify the view by any way ?
    By The Way this view is exactly the same in SRDemo
    Any Suggestions?
    thanks....

    hi,
    answer is here
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CCSMessageBundle~html/
    and it says
    JBO-25052: JboException
    Cause: A ViewObject with no key attributes has transient passivatable attributes. This type of ViewObject cannot participate in passivation/activation.
    Action: Set one or more attributes as key attributes for this ViewObject
    that means that SRDemo may have a little bug which is any attribute should be key attr in Globals view

  • No primary key attribute and does not support rowId -- URGENT : ADF Swing

    Hi , i have created a view and while create Entity Object through Business Components wizard for that view i am getting following error.
    ENTITY CREATION FAILED FOR THE FOLLOWING DATABASE OBJECT
    NO PRIMARY KEY ATTRIBUTES AND DOES NOT SUPPORT ROWID . USE ENTITY WIZARD TO CREATE THE ENTITY OBJECT.
    very urgent.
    Jdeveloper version :: 10.1.3.1.0
    oracle version :: 10g
    view script is :
    SELECT
    oh.order_number||'- ('||ol.line_number||'-'||ol.shipment_number||')' so_line,
    oh.cust_po_number customer_po,
    ol.flow_status_code status,
    ol.shipping_method_code carrier,
    ol.ordered_item item_no,
    nvl(xxapplication_express_pkg.getcustomerpart(ol.inventory_item_id, hca.cust_account_id), ' ') customer_item_number,
    nvl(mtl.description , 'na') description,
    nvl(org.organization_name , 'oak park') ship_from,
    hcsu.location||' ('||hl.city||' '||hl.state||' '||hl.postal_code||')' ship_to,
    nvl(ol.promise_date, sysdate) promised_date,
    nvl(ol.ordered_quantity, 0) order_quality ,
    xxapps.xx_eg_calculated_onhand(ol.line_id) available_qty,
    nvl(ol.shipped_quantity, 0) shipped_quality ,
    ol.order_quantity_uom uom,
    hp.party_name customer_name,
    jrs.name sales_person_name,
    0 refer
    FROM
    oe_order_headers_all oh,
    oe_order_lines_all ol,
    hz_cust_accounts hca,
    hz_parties hp ,
    hz_cust_site_uses_all hcsu,
    hz_cust_acct_sites_all hcas,
    hz_party_sites hps,
    hz_locations hl,
    org_organization_definitions org ,
    mtl_system_items_b mtl ,
    jtf_rs_salesreps jrs
    WHERE
    oh.header_id = ol.header_id and
    oh.org_id = ol.org_id and
    oh.sold_to_org_id = hca.cust_account_id and
    hca.party_id = hp.party_id and
    hcas.cust_account_id = hca.cust_account_id and
    hcsu.cust_acct_site_id = hcas.cust_acct_site_id and
    hcas.party_site_id = hps.party_site_id and
    hps.location_id = hl.location_id and
    hcsu.site_use_id = oh.ship_to_org_id and
    hcsu.site_use_code = 'SHIP_TO' and
    org.organization_id = ol.ship_from_org_id and
    org.organization_id = mtl.organization_id and
    ol.inventory_item_id = mtl.inventory_item_id and
    ol.ship_from_org_id = mtl.organization_id and
    ol.salesrep_id = jrs.salesrep_id and
    ol.org_id = jrs.org_id
    can i know will it check for any constraints while correlation multiple table or whether this type of exception can be sorted out .
    need help looking forward to reply...
    Regards
    bhanu prakash
    Message was edited by:
    user579125
    Message was edited by:
    user579125

    User,
    I assume that this is for read-only activity. If so, don't create an EO from the database view; create a read-only view object instead. The only reason you'd want to use an Entity Object is if you were going to insert/update through the EO; unless you have an instead-of trigger, this database view is non-insertable/non-updatable.
    Short answer: I think what you want to do is a read-only View Object (not EO) - put "select x, y, z (your columns) from view_name" as the SQL.
    John

  • [svn:osmf:] 13083: Updated MASTAdapter class with new trait names and events.

    Revision: 13083
    Revision: 13083
    Author:   [email protected]
    Date:     2009-12-17 16:10:05 -0800 (Thu, 17 Dec 2009)
    Log Message:
    Updated MASTAdapter class with new trait names and events.
    Modified Paths:
        osmf/trunk/plugins/MASTPlugin/org/osmf/mast/adapter/MASTAdapter.as
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/osmf/test/mast/TestMASTPluginInfo.as
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/osmf/test/mast/adapter/TestMASTAdapt er.as

    Silviu!
    I'm really sorry, but as all the office is trying to fix the problem, someone replaced the url content with the stuff that was pointing to the local machine.
    I've fix it, and the video player is available here again: http://pp.player.webtv.flumotion.com/params/apiKey/5PzLR2ULL3z2rumJ/videoId/60
    If there are other references to the localhost, please do not bother with them, as they do not affect player functionality.
    The stream that it uses is an RTMPE, so i'm afraid it will only works with this player. Anyway, the stream url is as follows: rtmpe://87.248.205.81/a4349/e2/veo7/ondemandrtmpe/mp4/med/first-person-mario-4d8741aa.mp4
    I really appreciate your help!
    Thank you!

  • CQL Join on Coherence Cache with Composite Key

    I have a Coherence Cache with a composite key and I want to join a channel to records in that cache with a CQL processor. When I deploy the package containing the processor, I get the following error:
    +italics14:32:35,938 | alter query SimpleQuery start                                                                        | [ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)' | CQLServer | FATAL+
    +14:32:35,938 | alter query >>SimpleQuery<< start+
    +specified predicate requires full scan of external source which is not supported. please modify the join predicate | [ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)' | CQLServer | FATAL+
    I think that I'm using the entire key. If I change the key to a single field, it deploys OK. I found a similar issue when I defined a Java class to represent the composite key. Is it possible to join in this way on a composite key cache?
    I could define another field which is a concatenation of the fields in the composite key but this is a little messy.
    My config is as below:
    <wlevs:caching-system id="MyCache" provider="coherence" />
    <wlevs:event-type-repository>
    <wlevs:event-type type-name="SimpleEvent">
              <wlevs:properties>
                   <wlevs:property name="field1" type="char" />
                   <wlevs:property name="field2" type="char" />
              </wlevs:properties>
    </wlevs:event-type>
    </wlevs:event-type-repository>
         <wlevs:channel id="InChannel" event-type="SimpleEvent" >
              <wlevs:listener ref="SimpleProcessor" />
         </wlevs:channel>
         <wlevs:processor id="SimpleProcessor">
              <wlevs:listener ref="OutChannel" />
              <wlevs:cache-source ref="SimpleCache" />
         </wlevs:processor>
         <wlevs:channel id="OutChannel" event-type="SimpleEvent" >
         </wlevs:channel>
         <wlevs:cache id="SimpleCache" value-type="SimpleEvent"
              key-properties="field1,field2"
              caching-system="MyCache" >
         </wlevs:cache>
    and the processor CQL is as follows:
    <processor>
    <name>SimpleProcessor</name>
    <rules>
    <query id="SimpleQuery">
    <![CDATA[ 
                select I.field1, I.field2 from InChannel [now] as I,
    SimpleCache as S where
    I.field1 = S.field1 and
    I.field2 = S.field2
    ]]> </query>
    </rules>
    </processor>
    Thanks
    Mike

    Unfortunately, joining on composite keys in Coherence is not supported in the released versions. This will be supported in 12g release.
    As you mention, defining another field as key, which is the concatenation of the original keys is the workaround.

  • Connect By with composite Key

    Hello
    I have a table more or less like this
    ID - CONTINENT- COUNTRY-CITY
    1 ASIA
    2 ASIA CHINA
    3 ASIA CHINA BEIJING
    4 ASIA CHINA XANGAI
    5 ASIA JAPAN
    6 ASIA JAPAN TOKIO
    7 EUROPE
    8 EUROPE GERMANY
    Altough I have a sequencial primary key, that key os not used to relate to the "master record". The only way I have to know which record depends on which is by using a composite key (in the real table those three columns are numbers, and their combination is unique).
    Is there a way to use an hierarquical query on this table?
    Thanks for any help

    Nuno wrote:
    example:
    CREATE TABLE PLACES
    (ID, CONTINENT,COUNTRY,CITY,NAME)Does that command work when you run it? I get 'ORA-02263: need to specifuy the datatype for this column".
    INSERT INTO PLACES (1,1,NULL,NULL,'ASIA')
    INSERT INTO PLACES (2,1,1,NULL,'CHINA')
    INSERT INTO PLACES (3,1,1,1,'BEIJING')
    INSERT INTO PLACES (4,1,1,2,'XANGAI)
    INSERT INTO PLACES (5,1,2,NULL,'JAPAN')
    INSERT INTO PLACES (6,1,2,1,'TOKIO')
    INSERT INTO PLACES (7,2,NULL,NULL,'EUROPE')
    INSERT INTO PLACES (8,2,1,NULL,'GERMANY')Do those statements work for you? I get "ORA-00928: missing SELECT keyword".
    Oracle 10g is the version used...
    what I want is a list like this:
    ASIA
    CHINA
    BEIJING
    XANGAI
    JAPAN
    TOKIO
    EUROPE
    GERMANY
    The way I used was to create a "dummy" ID and Mother ID using both case and concatenating CONTINENT,COUNTRY,CITY fields.
    Don't know if there is other cleaner way...
    CONTINENT || COUNTRY || CITYdummy_id,
              CASE
              WHEN COUNTRY IS NULL AND CITY IS NULL
              THEN NULL
              WHEN COUNTRY IS NOT NULL AND CITY IS NULL
              THEN CNUT1
              WHEN COUNTRY IS NOT NULL AND CITY IS NOT NULL
              THEN      CONTINENT || COUNTRY      
              END DUMMY_MOMUsing COALESCE, like Odie did, is a lot simpler.
    Instead of generating a "dummy" parent_id, you may want to add a real parent_id column to the table. Then it sould be easier to do CONNECT BY queries when you needed to.
    However, you can get the output you requested without anything hierarchical:
    {code}
    SELECT     name
    FROM places
    {code}
    If the output somehow had to reflect the hierarchical structure then you'd have to do somehting different.
    For example, to be sure children were displayed after their parents), add an ORDER BY clause:
    {code}
    SELECT     name
    FROM places
    ORDER BY continent
    ,      country     NULLS FIRST
    ,     city          NULLS FIRST
    {code}
    If your output need to be indented, post exactly what you want, with an explanation.
    When posting any fomatted text on this site, type these 6 characters:
    \{code}
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
    Perhaps you want something like this:
    {code}
    SELECT     NVL2 (country, ' ', NULL)     ||
         NVL2 (city,     ' ', NULL)     ||
         name                         AS indented_name
    FROM places
    ORDER BY continent
    ,      country     NULLS FIRST
    ,     city          NULLS FIRST
    {code}
    You can always do a CONNECT BY query, as Odie demonstrated.

  • Master-Detail query problem with composite key

    I have tested a MD form with EMP and DEPT tables and the MD query works okay.
    I have created two tables both with two fields EMP_ID and REPORT_DATE as a composite key. The problem I am having with the MD form is that it does not query back the results when I select the QUERY button. I have verified that the join is setup during the creation of the form.

    I have recreated the form and the MD query works fine.

  • Problem with setting custom attribute and it being searchable

    I'm having an issue with setting a custom attribute and having it be searchable using Portal 10.1.4. The situation that we have is that we initially added a bunch of files to Oracle Portal using webdrive. Later on, we decided that we needed another custom attribute called "Pinned Item" that will be used for searching (boolean value) and gave it a default value of false. The attribute was then added to the "File" item type in the "Shared Objects" group.
    It appears that since this attribute wasn't initially available on the file object, we couldn't search on it so we decided to set it programatically. First, I tried using wwsbr.set_attribute but it errored out seemingly because the value wasn't set in the first place. If I set a value first by using the web front end, I could then use the set_attribute procedure.
    So, I moved on to using wwsbr_api.modify_item and it appears to set it (although everything is being set to false until I changed it to "text" instead of "boolean" which is OK because that's what I wanted anyway... see metalink bug 390618.1). I'm using the method outlined in metalink doc 413079.1. When I do set it to a "1", and edit the item the check box is checked indicating that it is set correctly. And if I just click "OK" to save the attributes after I open it everything works like it should.
    However, the advanced search (and custom search portlet) and the search APIs are not picking it up. I'm not sure if I'm hitting Metalink bug ID 5592472 or not as that's using the "set_attribute" procedure instead of the modify_item procedure. And their "workaround" of setting the attribute in the UI isn't really feasible for a couple thousand files.
    So far I've tried the following things to get it working:
    1. I am calling wwpro_api_invalidation.execute_cache_invalidation
    2. I have executed wwv_context.sync
    3. I cleared the page group cache
    4. I invalidated all of the web cache
    Does anyone else have any other suggestions?

    I'm having an issue with setting a custom attribute and having it be searchable using Portal 10.1.4. The situation that we have is that we initially added a bunch of files to Oracle Portal using webdrive. Later on, we decided that we needed another custom attribute called "Pinned Item" that will be used for searching (boolean value) and gave it a default value of false. The attribute was then added to the "File" item type in the "Shared Objects" group.
    It appears that since this attribute wasn't initially available on the file object, we couldn't search on it so we decided to set it programatically. First, I tried using wwsbr.set_attribute but it errored out seemingly because the value wasn't set in the first place. If I set a value first by using the web front end, I could then use the set_attribute procedure.
    So, I moved on to using wwsbr_api.modify_item and it appears to set it (although everything is being set to false until I changed it to "text" instead of "boolean" which is OK because that's what I wanted anyway... see metalink bug 390618.1). I'm using the method outlined in metalink doc 413079.1. When I do set it to a "1", and edit the item the check box is checked indicating that it is set correctly. And if I just click "OK" to save the attributes after I open it everything works like it should.
    However, the advanced search (and custom search portlet) and the search APIs are not picking it up. I'm not sure if I'm hitting Metalink bug ID 5592472 or not as that's using the "set_attribute" procedure instead of the modify_item procedure. And their "workaround" of setting the attribute in the UI isn't really feasible for a couple thousand files.
    So far I've tried the following things to get it working:
    1. I am calling wwpro_api_invalidation.execute_cache_invalidation
    2. I have executed wwv_context.sync
    3. I cleared the page group cache
    4. I invalidated all of the web cache
    Does anyone else have any other suggestions?

  • How to create a PDF with substituted key-value and table-values using a template language

    I have about 50 key-values and 10 table-values that I want to substitute into a formatted report template (language can be anything standard, would create a small number of these templates) and then use an Adobe tool to substitute the values into the template and produce a PDF. Preferably the template language would permit some basic conditional logic (if <key #> has value <value> then <show key label here> and <key value here> in close spatial proximity on the form) and permit embedding of a static graphic logo, text with fonts/styles, etc. to produce a polished report but also handle pagination (e.g. enable page breaks or numbering) to be handled automatically.
    What is a recommended template language and product to accomplish this?

    Are you thinking of something like a blank form that you can enter information into, save, and send to another user? If so, what you want is possible. If you want more information, post again and include more details about how you want to use it and how the recipient will use it.

  • ClassNotFound Exception integrating Coherence and Eclipselink with composite key entity objects

    I am hooking up coherence as an L2 cache for eclipselink in weblogic 12c (using the latest released weblogic and eclipselink 2.4.2.v20130514-5956486).  I have my application war and coherence gar packaged in the same EAR file.  For Entity Objects with single primary keys (Longs) coherence integration works as expected.  However I have several multi-part key Entity Objects that use an IdClass to represent the key.  When these objects get serialized, coherence throws a class not found exception.  I'm assuming its because the cachekey used is an instance of my applications IdClass, and the weblogic classloader doesn't have access to this.  Since eclipselink hides the cache integration with coherence, I cannot pass my classloader off to coherence (as i do with other caches i'm using directly with coherence).
    How can I get around this problem? 
    I saw this option in ExternalizableHelper.xml, but modifying it directly had no effect:
      <!-- if deploying Coherence in CLASSPATH and deploying application
           classes within a hot-redeployable archive (e.g. ".ear"), set this to
           true -->
      <!-- *** WARNING *** all cluster nodes must use the same setting -->
      <force-classloader-resolving>false</force-classloader-resolving>
    Here is the stack trace:
    ClassLoader: null) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.Base.ensureRuntimeException(Base.java:286)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:50)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:61)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.run(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:20)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:1)
      at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:2)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
      at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:51)
      at java.lang.Thread.run(Thread.java:724)
    Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2270)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.deserializeProcessor(PartitionedCache.CDB:7)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:37)
      ... 10 more

    I am hooking up coherence as an L2 cache for eclipselink in weblogic 12c (using the latest released weblogic and eclipselink 2.4.2.v20130514-5956486).  I have my application war and coherence gar packaged in the same EAR file.  For Entity Objects with single primary keys (Longs) coherence integration works as expected.  However I have several multi-part key Entity Objects that use an IdClass to represent the key.  When these objects get serialized, coherence throws a class not found exception.  I'm assuming its because the cachekey used is an instance of my applications IdClass, and the weblogic classloader doesn't have access to this.  Since eclipselink hides the cache integration with coherence, I cannot pass my classloader off to coherence (as i do with other caches i'm using directly with coherence).
    How can I get around this problem? 
    I saw this option in ExternalizableHelper.xml, but modifying it directly had no effect:
      <!-- if deploying Coherence in CLASSPATH and deploying application
           classes within a hot-redeployable archive (e.g. ".ear"), set this to
           true -->
      <!-- *** WARNING *** all cluster nodes must use the same setting -->
      <force-classloader-resolving>false</force-classloader-resolving>
    Here is the stack trace:
    ClassLoader: null) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.Base.ensureRuntimeException(Base.java:286)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:50)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:61)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.run(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:20)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:1)
      at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:2)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
      at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:51)
      at java.lang.Thread.run(Thread.java:724)
    Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2270)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.deserializeProcessor(PartitionedCache.CDB:7)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:37)
      ... 10 more

  • Getting Not inside a container with tree (key attributes defined)

    Hello,
    I'm building an ADF tree with a recursive entity based query:SELECT ProjectIndicators.ID_COMPONENT AS ID_COMPONENT_KEY,
           ProjectIndicators.ID_PROJECT AS ID_PROJECT_KEY,
           ProjectIndicators.THE_VALUE,
           , res.ID_COMPONENT
           , res.ID_PROJECT
           , res.ID_MAIN_COMPONENT
    from PROJECT_INDICATORS_BA ProjectIndicators
    SELECT Project.Id_Project
           , Component.Id_Component
           , Component.Id_MAIN_COMPONENT
    FROM ...
    WHERE ... and Project.Id_Project = :Bind_IdProject
    ) res
    WHERE ProjectIndicators.Id_Project (+) = res.ID_PROJECT
          AND ProjectIndicators.Id_Component (+) = res.ID_COMPONENTNote there's a *:Bind_IdProject* peremeter inside a subquery.
    Queried data is:ID_COMPONENT_KEY     ID_PROJECT_KEY     THE_VALUE     ID_COMPONENT     ID_PROJECT     ID_MAIN_COMPONENT
                                                   1064             1003     
                                                   1065             1003             1064
                                                   1353             1003             1066
    1646                     1003                             1646             1003             1065
                                                   1586             1003             1066
                                                   1587             1003             1066
    1605                       1003              11             1605              1003             1065
    1625                       1003                          1625             1003             1065
                                                   1845             1003             1065
                                                   1846             1003             1845 ID_COMPONENT_KEY and ID_PROJECT_KEY are primary keys of PROJECT_INDICATORS_BA. THE_VALUE is a filed I need to edit (in case a row is null, a new row would be created on runtime).
    ID_COMPONENT and ID_MAIN_COMPONENT is a recursive relationship. ID_PROJECT is a foreign key.
    The recursive view link is
    Source            Destination
    IdComponent   IdMainComponent
    IdProject         IdProject
    Query
    (:Bind_IdComponent = ID_MAIN_COMPONENT) AND (:Bind_IdProject = ID_PROJECT)So I build a treetable on my page and the first (root) level looks fine. I can disclose a row and see the second level.
    But when I try to disclose any second level row I get java.lang.IllegalStateException: ADFv: not inside a container.
    Funny is that I can do "right click - disclose all" on any row, and I will see an entire tree without any errors.
    Seems, this messae should signal that there is no PK defined in the View Object, but here is prmary key definition:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
      </AttrArray>Tricky is that the tree must show some records where primary keys are null. But still "disclose all" button works fine.
    I also tried a key like:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
        <Item Value="IdComponent"/>
        <Item Value="IdProject"/>
      </AttrArray>But that only shows me a root level, no child records.
    Any help wpuld be appreciated.
    Thanks.
    ADF 11.1.2.1
    Found kinda workaround adding NVL to keys:
    SELECT nvl(ProjectIndicators.ID_COMPONENT, 0) AS ID_COMPONENT_KEY,
           nvl(ProjectIndicators.ID_PROJECT, 0) AS ID_PROJECT_KEY, And yet it works... but that seem to deliver me some DML troubles.
    Edited by: ILya Cyclone on Apr 25, 2012 4:54 PM

    Hello,
    I'm building an ADF tree with a recursive entity based query:SELECT ProjectIndicators.ID_COMPONENT AS ID_COMPONENT_KEY,
           ProjectIndicators.ID_PROJECT AS ID_PROJECT_KEY,
           ProjectIndicators.THE_VALUE,
           , res.ID_COMPONENT
           , res.ID_PROJECT
           , res.ID_MAIN_COMPONENT
    from PROJECT_INDICATORS_BA ProjectIndicators
    SELECT Project.Id_Project
           , Component.Id_Component
           , Component.Id_MAIN_COMPONENT
    FROM ...
    WHERE ... and Project.Id_Project = :Bind_IdProject
    ) res
    WHERE ProjectIndicators.Id_Project (+) = res.ID_PROJECT
          AND ProjectIndicators.Id_Component (+) = res.ID_COMPONENTNote there's a *:Bind_IdProject* peremeter inside a subquery.
    Queried data is:ID_COMPONENT_KEY     ID_PROJECT_KEY     THE_VALUE     ID_COMPONENT     ID_PROJECT     ID_MAIN_COMPONENT
                                                   1064             1003     
                                                   1065             1003             1064
                                                   1353             1003             1066
    1646                     1003                             1646             1003             1065
                                                   1586             1003             1066
                                                   1587             1003             1066
    1605                       1003              11             1605              1003             1065
    1625                       1003                          1625             1003             1065
                                                   1845             1003             1065
                                                   1846             1003             1845 ID_COMPONENT_KEY and ID_PROJECT_KEY are primary keys of PROJECT_INDICATORS_BA. THE_VALUE is a filed I need to edit (in case a row is null, a new row would be created on runtime).
    ID_COMPONENT and ID_MAIN_COMPONENT is a recursive relationship. ID_PROJECT is a foreign key.
    The recursive view link is
    Source            Destination
    IdComponent   IdMainComponent
    IdProject         IdProject
    Query
    (:Bind_IdComponent = ID_MAIN_COMPONENT) AND (:Bind_IdProject = ID_PROJECT)So I build a treetable on my page and the first (root) level looks fine. I can disclose a row and see the second level.
    But when I try to disclose any second level row I get java.lang.IllegalStateException: ADFv: not inside a container.
    Funny is that I can do "right click - disclose all" on any row, and I will see an entire tree without any errors.
    Seems, this messae should signal that there is no PK defined in the View Object, but here is prmary key definition:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
      </AttrArray>Tricky is that the tree must show some records where primary keys are null. But still "disclose all" button works fine.
    I also tried a key like:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
        <Item Value="IdComponent"/>
        <Item Value="IdProject"/>
      </AttrArray>But that only shows me a root level, no child records.
    Any help wpuld be appreciated.
    Thanks.
    ADF 11.1.2.1
    Found kinda workaround adding NVL to keys:
    SELECT nvl(ProjectIndicators.ID_COMPONENT, 0) AS ID_COMPONENT_KEY,
           nvl(ProjectIndicators.ID_PROJECT, 0) AS ID_PROJECT_KEY, And yet it works... but that seem to deliver me some DML troubles.
    Edited by: ILya Cyclone on Apr 25, 2012 4:54 PM

  • MacBook stuck with shift key enabled and numbers not working - even the keyboard app in languages wont type lowercase nor numbers?!  Anyone know whats up?  no spillage...cant understand why the keyboard app wont do anything.

    Anyone have a clue?  I can understand the keyboard being broke / shift key being stuck but why in the world would I not be able to type the numbers on the language keyboard app on the operating system?  Numbers show up on the app but when I press them I still get the special characters like #^&#* and it wont type lower case. Nothing has ever been spilt, just stopped working one day.  Rebooted from Time Capsule restore dated a month ago and its still doing it. (problem started two weeks ago).  Only way to get lower case or numbers to actually show up is the copy and paste.
    Any help would be amazing!
    Details on computer:  13 inch MacBook6, 1  (Late 2009) / Intel Core 2 DUO /  2.26GHZ / 2GB /  Memory running Mac OS X Lion 10.7.5

    If you can afford it, I would recommend replacing the topcase and keyboard as Apple suggests. If like me, you can't afford it or are open to a hack fix, then read on.
    The problem
    Yesterday, a little water spilt on my 13" MBP keyboard. I turned it around immediately, drained out the water and used tissue to suck it all up but the keyboard was still acting funny. I turned it off and left it out in the sun for a couple of hours and turned it on again but problems remained. Like Rickdubya, my warranty had run out just a month ago and I knew Apple would not cover this under warranty. I tried to clean the shift keys and left it overnight with some rice on them with hopes that the moisture might get sucked out. Nothing worked. (The rice bit is an urban legend that seems to work with some electronics). Went to the Apple Store this morning and was told that they wouldn't even take out the key and clean it, and that the entire top case would have to be replaced. A total bill of 156 Euros which I cannot afford. I had a USB keyboard that would let me use the Mac for the moment so I decided to try to work out a fix.
    Symptoms
    - Boots in safe mode everytime (which I later found out was because the shift key is pressed)
    - Cannot login because password is in lower case or has numbers
    - Cannot boot in super user mode and try to disable keys or override password as some commands won't work in uppercase (I wouldn't recommend this anyway because its super user mode)
    - All text is in caps and numbers are symbols as though shift key is always pressed
    - Audio doesn't work
    - Keyboard viewer would not always show the shift key pressed. The key seemed to get pressed at random
    Fix
    1. Hold the Option button down on boot to bypass the Safe Mode ensure a normal boot
    2. At the login screen, plug in a USB keyboard and enter your password to login
    3. Change your password to one that uses all caps and no numbers
    4. Download and install KeyRemap4MacBook .
    5. Use a combination of the functionalities of the Keyboard Viewer and KeyRemap4MacBook to figure out which shift key is the problem. In my case, I found out that it was only my left shift key.
    6. Disable the left/right shift key on KeyRemap4MacBook and click on the 'Reload XML' button to make that take effect.
    If only one shift key was the problem, then you are done. If both shift keys were shorted, then its likely other keys are too. In which case you should probably just replace the entire thing. If you think other keys are not affected, then you can use KeyRemap4MacBook itself to remap the shift functionality to a lesser used key like the Left Option key.
    7. Under System Preferences > Users & Groups > Login Items , add KeyRemap4MacBook as an application that should start on login. This will ensure that your disable/remap of the shift key is active everytime you login.
    Usage change/Things to remember
    1. Remember to hold down the Option key everytime the computer boots or reboots to bypass safe mode. The fix above is at the software level. The key is physically still shorted at the hardware level and will affect boot.
    2. Remember that at the login screen, the disable/remap is not active. So your password now has to be all caps and only letters.
    As soon as I can save some money, I will get my topcase and keyboard replaced but until then this solution works great with minimal change. Hope this helps!

  • Help with  On key press and Frame

    Hi everybody,
    I have been trying to make this work but not able to. It would be of great help if u can tell where i am going wrong. Here is my code ( it is prety small) :
    I am trying to draw a random line when i do a keypress on the text field.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class KeyPress extends Frame{
    Label label;
    TextField txtField;
    public static void main(String[] args) {
    KeyPress k = new KeyPress();
    public KeyPress(){
    super("Key Press Event Frame");
    Panel panel = new Panel();
    label = new Label();
    txtField = new TextField(20);
    txtField.addKeyListener(new MyKeyListener());
    add(label, BorderLayout.NORTH);
    panel.add(txtField, BorderLayout.CENTER);
    add(panel, BorderLayout.CENTER);
    addWindowListener(new WindowAdapter(){
    public void windowClosing(WindowEvent we){
    System.exit(0);
    setSize(400,400);
    setVisible(true);
    public class MyKeyListener extends KeyAdapter{
    public void keyPressed(KeyEvent ke){
    char i = ke.getKeyChar();
    String str = Character.toString(i);
    label.setText(str);
    Line2D myLine = new Line2D.Double(5,5,100,100);
    }

    Here's what I come up when I played with your code.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.util.Random;
    public class KeyPress extends Frame {
        TextField txtField;
        Panel panel;
        public static void main(String[] args) {
            KeyPress k = new KeyPress();
        public KeyPress(){
            super("Key Press Event Frame");
            panel = new myCanvass();
            txtField = new TextField(20);
            txtField.addKeyListener(new MyKeyListener());
            panel.setBackground(Color.LIGHT_GRAY);
            add(txtField, BorderLayout.PAGE_END);
            add(panel, BorderLayout.CENTER);
            addWindowListener(new WindowAdapter(){
                public void windowClosing(WindowEvent we){
                    System.exit(0);
            setSize(400,400);
            setVisible(true);
        class myCanvass extends Panel {
            private Graphics2D g2;
            public void paint(Graphics g) {
                drawLine(g);
            private void drawLine(Graphics g) {
                g2 = (Graphics2D) g;
                g2.setColor(Color.RED);
                g2.draw(new Line2D.Double(Math.random() * 150, Math.random() * 150, Math.random() * 200, Math.random() * 200));
        class MyKeyListener extends KeyAdapter{
            public void keyPressed(KeyEvent ke){
                char i = ke.getKeyChar();
                String str = Character.toString(i);
                panel.repaint();
    }

  • Issues with reverse key indexes and range scan

    I have a question. Why is it that reverse key indexes do not work in a range scan?
    Thanks

    Chris, well said in simple terms.
    Extract from metalink:
    Oracle8 provides the ability to create reverse key indexes. Reverse key indexes
    reverse the bytes of each indexed column with the exception of ROWID and still
    maintains the column order. Reverse key indexes are useful for Oracle Parallel
    Server environments.
    In an OPS environment, modifications to indexes are focused on a small
    set of leaf blocks. Reversing the keys of the index allows insertions to be
    distributed across all the leaf keys in the index. Reverse key indexes prevent
    queries from performing an index range scan since lexically adjacent keys
    are not stored next to each other. Reverse key indexes can also be used in
    situations where users insert ascending values and delete lower values from the
    table, thus helping to prevent skewed indexes.
    ===
    Good discussion at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:627823669999
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6163160472530
    Jaffar
    Message was edited by:
    The Human Fly

  • Updating Primary Key Records and Related FK dependencies

    1) How can I found out the name of all the tables that are using my primary key as foreign keys? The primary key is a varchar & used in many other tables. Now the PK records must be changed per client request, so it will obviously affect all my dependent tables.
    2) What is the most efficient PL/SQL script to perform this procedure?
    Any suggestions will be helpful.
    For testing I think I'd like a list of all the tables followed by a list of all the records affected. This report should display the PK record & all dependency records requiring an update. Is this reasonable?

    user10998542 wrote:
    1) How can I found out the name of all the tables that are using my primary key as foreign keys? The primary key is a varchar & used in many other tables. Now the PK records must be changed per client request, so it will obviously affect all my dependent tables. Check out the USER_CONSTRAINTS view. You could do something like this:
    SELECT     UC.OWNER
    ,     UC.TABLE_NAME
    ,     UC.R_OWNER
    ,     RUC.TABLE_NAME
    ,     UC.R_CONSTRAINT_NAME
    ,     RUC.CONSTRAINT_TYPE
    FROM     USER_CONSTRAINTS UC
    ,     USER_CONSTRAINTS RUC
    WHERE     UC.R_OWNER          = RUC.OWNER
    AND     UC.R_CONSTRAINT_NAME     = RUC.CONSTRAINT_NAME
    AND     UC.CONSTRAINT_TYPE     = 'R'If you need column names you can use the USER_CONS_COLUMNS view as well.
    2) What is the most efficient PL/SQL script to perform this procedure?
    Any suggestions will be helpful.[Tom Kyte: Update Cascade Package|http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyteupdatecascade.html]

Maybe you are looking for

  • Safari history on iPad won't clear. Can you help me?

    I'm using iPad 2, 64GB running iOS 7.1.2.  I want to clear browsing history in Safari, and I cannot select this simple option, because: 1.  Within Safari on the iPad, the "Clear" tab at the bottom of the History folder is faded and not selectable. 2.

  • Error while loading velocity template using ear file (weblogic 8.1,SP5)

    Hi, In one of our j2ee applications we have a web application and an EJB application. Web application uses velocity(1.2). Application server is weblogic 8.1 with sp5. If web app and ejb app are deployed separately, web app is able to load templates p

  • Downloaded Video Too Big for Screen

    From YouTube I downloaded the Mozart opera "Cosi Fan Tutti" as an MPEG4. The resulting video image is nice and clear with good sound, but it is larger than my screen. The usual video controls such as play, pause, etc are below the bottom horizon and

  • System.ArgumentNullException: Value cannot be null.

    We have an application that utilizes the WCF-OracleDB adapter on a send port connecting to an Oracle database. The application sends insert statements to a stored procedure that inserts the data into one of the tables. The table has a column for City

  • Need to buy CS5 Design Standard, New Laptop-Help Please

    My wife is a student taking a graphics class a and she must buy CS5 Design Standard (Photoshop, InDesign, Illustrator and Acrobat).  Her computer just broke down and we need to replace it right away but we are on a tight budget.  Can we get by with a