Entity Dependants & writable entities

[att1.html]

In 7.0, CMR would be the most efficient route since it can read the bean
and its relation in one db round-trip.
If you want some more ideas, you'll have to answer my other questions in
the previous post.
-- Rob
"DAGHFAL Carole(LB Soft)" wrote:
I know that CMR works in this case but I'm searching for a solution
that minimize database round-trips and optimize performance!
For that I'm trying to avoid using CMRs by implementing the concept of
dependencies .
Rob Woollen wrote:
"DAGHFAL Carole(LB Soft)" wrote:
Hi all,
I have the Operation table in the database that has the operationId
as Primary Key ,this table is linked to another table called
OperationNormal by the operationId
For the Operation table I need to get the corresponding data from
the OperationNormal table.
In this case i had created the Operation as my Entity and the
OperationNormal as dependant class and get
the corresponding data using SQL statements in ejbLoad of
Operation.Is the Operation entity CMP or BMP? Do you want to load the
Operation and OperationNormal in one SQL Join?
But once I had to add a record in the operation table I should add
a corresponding one in the OperationNormal table.Yes, it sounds like you'll have to insert into the OperationNormal
table after you've done the operation insert.
Should I create two writable entities one OperationWrite and the
other OperationNormalWrite to be able to write into the two tables
?Are the Operation and OperationNormal beans read-only?
In this case I would use the dependant class only to read the data
from the OperationNormal table and the OperationNormalWrite to be
able to write to the OperationNormal table.
Or Should I implement the two tables as 2 entities with CMR
relation between them and forget about the dependant class????CMR would work fine in this case as well.
-- Rob
>
AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnWebLogic.com
[att1.html]

Similar Messages

  • Entity with nested entities, create method generated incorrectly

    For the sake of this question, assume I have two entities: Header, and LineItem.  The Header has 0..n LineItems.  I've modeled this in the CAS by creating two entities, with a nested relationship between teh two.  Tables were created correctly, everything looks fine.  I then created an Application Service, which uses the Header an LineItem entities.  I created CRUD methods for the Header object; when selecting the types to be included as part of the create method, I selected Header details, as well as the list of LineItem's.
    The generated create method (the _R version), however, does not have the correct method signature.  It looks like this:
    public xxx..Header_R createHeader_R(java.lang.String[] lineItems) throws  ...
    Why is lineItems declared as String[] instead of LineItem[]?  All objects have been marked as remote enabled, so that's not the issue.  Is this a bug, or a feature?
    The other CRUD methods only expose the Header, so I could exclude the LineItem from the create, and just perform an update after the create, but I'd rather not have to create objects in two steps.
    Anyone else run into this situation?

    Hello Ken!
    CRUD operations usually belong to the Entity Services that are generated for the business objects you modelled.
    Based on these Entity Services you can implement custom Application Services which can be provided with any signature you want them to have.
    Any Application Service has to be implemented by you. Thereby, you can rely on the Entity Services generated for your business objects.
    If you want to deal with sets of objects like line items, you should model a set type LineItemList or so which wraps the set of items. Otherwise, you won't be able to expose your Application Service as a Web Service.
    You could now implement an Application Servcie operation which takes a Header object as well as a LineItemList object as input parameters. However, it is questionable if you should deal with multiple business object types in one Application Service operation. Implementing multiple operations which rely on keys might result in a better design.
    Best regards
    Alexander

  • Dynamic re-creation of Entity/View Objects

    Does anybody know if the following is possible with JDeveloper/ADF, and if so, any suggestions on where to start?
    My boss wants to be able to re-define a series of database views dynamically at any time, adding/removing columns. This will be handled by PL/SQL etc so it is not part of the JDeveloper question.
    But he then wants the J2EE Swing GUI application to be able to "see" the changes to the view immediately e.g. to display new fields on the client form, without having to re-compile any code.
    The Swing GUI appears to be a given, unfortunately as it would be easier to re-create at least the GUI dynamically using JSP etc.
    Right now, I'm trying to figure out how to pass the database changes through the J2EE tiers e.g. how do I dynamically re-define the Entity Object based on the modified view, without re-compiling it? How do I reflect these changes in the corresponding View Object(s)?
    Personally I think this requirement will be the death of the project, as it will absorb 95% of our limited intellectual/Java resources for 5% of the functionality: Welcome to Dilbertland!
    But given this requirement, does anybody out there have any ideas?
    Thanks,
    Chris

    Hi Chris ,
    well you can always create dynamic attribute in the view object using viewObject.addDynamicAttribute(DynamicAttributeName);
    and you can store any serialazable object in this attribute like any other attribute. It should be serializable coz BC4J needs to send it to Database in case you are using spillover feture
    to cache records.
    you can also create Dynamic view object based on an entity or a SQL query.
    AppModule.createViewObjectFromQueryStmt();
    But of course dynamic view based on SQl Query
    will not be updatable. I doubt , You can dynamically create attribute on Entity or dynamic Entities.
    I have already posted one question for this ..and waiting for reply ..:-(
    Updatable , Dynamic VIEW OBJECT ??
    hope it'll help
    Prasoon

  • How to make reference to ENTITY in tld file ?

    Hello,
    I have a tld file in which in put the definition of my own components.
    I'd like to create ENTITY in XML and make reference to those entities in this tld, in order to make the tld smaller.
    <!DOCTYPE taglib
      PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
      "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd" [
    <!ENTITY display_value_only_attributes  SYSTEM "entities/display_value_only_attributes.xml">
    ]>
    &display_value_only_attributes;But when I make this, I got the following exception:
    2007-02-05 11:46:57,881 ERROR [org.apache.catalina.startup.TldConfig] Exception processing TLD META-INF/cwsoft.tld in JAR at resource path C:\jboss-4.0.1sp1\server\default\tmp\deploy\tmp28432cwsoft-technicalframework-web-1.2.2-exp.war\WEB-INF\lib\cwsoft-cweb-1.2.2.jar in context /cwsoft/technicalframework
    java.io.FileNotFoundException: C:\jboss-4.0.1sp1\bin\entities\display_value_only_attributes.xml
         at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:80)
         at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:89)
         at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
         at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1647)
         at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:514)
         at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:472)
         at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:307)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4282)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.apache.catalina.core.StandardContext.init(StandardContext.java:5441)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
         at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:289)
         at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:92)
         at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:374)
         at org.jboss.web.WebModule.startModule(WebModule.java:62)
         at org.jboss.web.WebModule.startService(WebModule.java:40)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:418)
         at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy24.start(Unknown Source)
         at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:360)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy8.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:418)
         at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy4.start(Unknown Source)
         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy5.deploy(Unknown Source)
         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
         at org.jboss.Main.boot(Main.java:195)
         at org.jboss.Main$1.run(Main.java:463)
         at java.lang.Thread.run(Thread.java:534)Could someone indicates me how to make it work?
    Thanks in advance.
    bgOnline

    No, indeed !
    But I forgot to specify that this file is placed in my jar that is included is my war.
    So, I'd like to make reference to this file, and not to put it somewhere in my AS.
    Thanks for your reply...

  • How can we develop two hierarchies in single entity structure?-HFM

    Dear Professionals,
    In our project we follow legal consolidation hierarchy in entity dimension.
    But client required us Geographical consolidation too.
    How can we create both hierarchies in single entity dimension??
    please revert me,
    Sarath

    Hi Mr.Sarath
    I understood your question,
    means you want create 2 hierarchies in Entity dimension right,
    that means see i do give with example ok
    Nav: Open window client--> Manage metadata-->open the Metadata file that u have saved with open button--> go to Entity Dimension
    Now u have created one hierarchy,
    Entity Dimension
    Geographical Entities (First Hierarchy)
    India
    AP
    TN
    MP
    USA
    Newyork
    Texas
    Legal Entities (Second Hierarchy)
    AP
    MP
    Newyork
    Under Geographical Entities u created few entities and then u can create sibling to geographical entity member , as Legal entities, as another member.
    Then you select the Members list at right side pane of window and then it will show all the members of entity dimension (including Parent and children), then choose the what are the legal entities and then select the each member and drag each member with mouse cursor, to Legal entities member in entity dimension.
    If you do like for all the entities
    the system will not show that same name entity members message.

  • Using [ICP None], [ICP Top] and [ICP Entities]

    Dear Experts,
    I'm a newcomer in HFM application and I have a confusion on how to use ICP Dimension wrote in title above. As what I know, system will use [ICP Entities] or [ICP None] based on plug account settings. When Plug Account settings for IsICP = Y, then system will store elimination result based on each entity (data can be view in each children of [ICP Entities]. While when Plug Account settings for IsICP = N, then system will store elimination result in [ICP None].
    For data input, is there any suggestion or best practice to input/load data only in [ICP None] or should I put data in specific entity under [ICP Entities] ? What is the plus and minus of it ? Also, i tried to find about [ICP Top] but couldn't find an exact answer on how to use it.
    Appreciate any help for my questions.
    Thanks,
    - Anna

    Dear Jai,
    Thanks for your reply.
    I'm clear enough for data entry that should be loaded to [ICP None], while elimination can happen either in [ICP None] or [ICP Entities]. I am aware too that [ICP Top] can consist of both number from [ICP None] and [ICP Entities].
    In that case, when i load/input an intercompany transaction, can i load it into [ICP None] or [ICP Entities], regardless i set my PlugAccount to Y means elimination will be done in [ICP Entities] level ?
    Appreciate for your kind reply.
    --Anna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JPA compound keys in entities

    Hi, just a small question on how the compound keys work.
    I'm developing an app using EclipseLink2.0. If I try to build an entity with a compound key composed by primitive types (such as String, int, java.sql.Date...) all is fine, but when I put in it a user-made Entity i get this error:
    Exception [EclipseLink-7149] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: The composite primary key attribute [idnomeCategoria] of type [null] on entity class [class entities.Sottocategoria] should be of the same type as defined on its primary key class [entities.SottocategoriaPK]. That is, it should be of type [entities.Categoria].where the entities are the following:
    @Entity
    @IdClass(SottocategoriaPK.class)
    @Table(name = "sottocategoria")
    public class Sottocategoria implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        private Categoria idnomeCategoria;
        @Id
        private String nomeSottocategoria;
        public Sottocategoria() {
        public Sottocategoria(Categoria idnomeCategoria, String nomeSottocategoria) {
            this.idnomeCategoria = idnomeCategoria;
            this.nomeSottocategoria = nomeSottocategoria;
        public Categoria getIdnomeCategoria() {
            return idnomeCategoria;
        public void setIdnomeCategoria(Categoria idnomeCategoria) {
            this.idnomeCategoria = idnomeCategoria;
        public String getNomeSottocategoria() {
            return nomeSottocategoria;
        public void setNomeSottocategoria(String nomeSottocategoria) {
            this.nomeSottocategoria = nomeSottocategoria;
    public class SottocategoriaPK implements Serializable {
        private Categoria idnomeCategoria;
        private String nomeSottocategoria;
        public SottocategoriaPK() {
        public SottocategoriaPK(Categoria idnomeCategoria, String nomeSottocategoria) {
            this.idnomeCategoria = idnomeCategoria;
            this.nomeSottocategoria = nomeSottocategoria;
        public Categoria getIdnomeCategoria() {
            return idnomeCategoria;
        public void setIdnomeCategoria(Categoria idnomeCategoria) {
            this.idnomeCategoria = idnomeCategoria;
        public String getNomeSottocategoria() {
            return nomeSottocategoria;
        public void setNomeSottocategoria(String nomeSottocategoria) {
            this.nomeSottocategoria = nomeSottocategoria;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (idnomeCategoria != null ? idnomeCategoria.hashCode() : 0);
            hash += (nomeSottocategoria != null ? nomeSottocategoria.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            if (!(object instanceof SottocategoriaPK)) {
                return false;
            SottocategoriaPK other = (SottocategoriaPK) object;
            if ((this.idnomeCategoria == null && other.idnomeCategoria != null) || (this.idnomeCategoria != null && !this.idnomeCategoria.equals(other.idnomeCategoria))) {
                return false;
            if ((this.nomeSottocategoria == null && other.nomeSottocategoria != null) || (this.nomeSottocategoria != null && !this.nomeSottocategoria.equals(other.nomeSottocategoria))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "entities.SottocategoriaPK[idnomeCategoria=" + idnomeCategoria + ", nomeSottocategoria=" + nomeSottocategoria + "]";
    @Entity
    @Table(name = "categoria")
    public class Categoria implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @Column(name = "nomeCategoria", nullable = false, length = 70)
        private String nomeCategoria;
        public Categoria() {
        public Categoria(String nomeCategoria) {
            this.nomeCategoria = nomeCategoria;
        public String getNomeCategoria() {
            return nomeCategoria;
        public void setNomeCategoria(String nomeCategoria) {
            this.nomeCategoria = nomeCategoria;
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (nomeCategoria != null ? nomeCategoria.hashCode() : 0);
            return hash;
        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Categoria)) {
                return false;
            Categoria other = (Categoria) object;
            if ((this.nomeCategoria == null && other.nomeCategoria != null) || (this.nomeCategoria != null && !this.nomeCategoria.equals(other.nomeCategoria))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "entities.Categoria[nomeCategoria=" + nomeCategoria + "]";
    EntityManagerFactory emf=Persistence.createEntityManagerFactory("tryPU");
    EntityManager em = emf.createEntityManager();
    Categoria c = new Categoria("prova");
    Sottocategoria s = new Sottocategoria(c,"riprova");
    em.getTransaction().begin();
    em.persist(c);
    em.persist(s);
    em.getTransaction().commit();
    em.close();If, instead of Categoria entity as part of the compound class, I put
    String nomeCategoria;all is fine.
    I wasn't able to figure out why... or where's the error.
    Any suggestion on how to proceed?
    My provvisional solution then is to use simple keys by putting an extra field as key of the entity (Sottocategoria in this case). Is that fine?
    Thanks for the answers!
    Edited by: muganz on Feb 25, 2010 10:37 PM

    The JPA specification does not allow the use of Entities as PKs. In the specification the PKs must be primitive values or PK classes derived from related entites.
    --Gordon                                                                                                                                                                                                                                                                                                                                                           

  • What happens to cached entity beans when directly change record in database?

    hi:
    i am working on a project which weblogic as app server. there's many case
    in my application where we have to update large number of records(about
    fifty thousands) in
    a loop one at a time. we have tried with entity beans but it 's so slow.
    so in this case we have to update database directly. but i am worried about
    my code accessing record with entity beans. the entities caches state and i
    am
    afraid there will be trouble if the state in ejb caches and record in db
    mismatch . i change state in db directly and ejbs has no way to know about
    it.
    is there any solution?
    thanks in advance!
    daniel

    Depends on the way you have implemented your entity bean. Normally, a bean
    method invocation will trigger a transaction (based on the bean's method
    transaction attribute), which will in turn call the ejbLoad(). In CMP's the
    container will automatically load the data from the underlying datastore. In
    BMP's a transactional method call will invoke the ejbLoad(), and the
    ejbLoad() implementation would be responsible for loading the data.
    "daniel wang" <[email protected]> wrote in message
    news:3c5e01b9$[email protected]..
    hi:
    i am working on a project which weblogic as app server. there's manycase
    in my application where we have to update large number of records(about
    fifty thousands) in
    a loop one at a time. we have tried with entity beans but it 's so slow.
    so in this case we have to update database directly. but i am worriedabout
    my code accessing record with entity beans. the entities caches state andi
    am
    afraid there will be trouble if the state in ejb caches and record in db
    mismatch . i change state in db directly and ejbs has no way to know about
    it.
    is there any solution?
    thanks in advance!
    daniel

  • Weblogic XML Registry and Entity Resolution

    Hi,
    I have configure Weblogic XML Registry as described in
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/xml.html. I have a directory
    where my dtds reside (%WLDOMAIN%/xml/registries/MyRegistry/). I using JAXP
    (the BEA recommended API which should automatically make use of the registry
    for entity resolution). But somehow it seems that it is looking in the root
    of the weblogic domain for the entities and not in the registry entities
    directory.
    A sample doctype in one of my doc looks like <!DOCTYPE substance_id PUBLIC
    "-//CAS//DTD substance_id//EN" "substance_id.dtd">
    The registry is configured as follows
    Public ID System ID
    Entity URI When To Cache Cache Timeout Interval
    ============================================================================
    ===============
    -//CAS//ENTITY CMD Defined Entities//EN CMSents.dtd CMSents.dtd
    defer-to-registry-setting -1
    -//CAS//DTD control//EN control.dtd
    control.dtd defer-to-registry-setting -1
    -//CAS//DTD substance_id//EN substance_id.dtd
    substance_id.dtd defer-to-registry-setting -1
    Below is the exception from the server log. Any help would be greatly
    appreaciated.
    ####<Dec 12, 2003 11:09:32 AM EST> <Debug> <org.cas.felix.util.XML>
    <PC81227> <myserver> <ExecuteThread: '13' for queue:
    'weblogic.kernel.Default'> <<anonymous>> <BEA1-0009897C74118C32D0F4>
    <000000> <exception parsing document <?xml version="1.0"?>
    <!DOCTYPE substance_id PUBLIC "-//CAS//DTD substance_id//EN"
    "substance_id.dt ... (4869)
    java.io.FileNotFoundException: D:\wls_domains\felix\substance_id.dtd (The
    system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at
    sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:6
    9)
    at
    sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection
    .java:156)
    at java.net.URL.openStream(URL.java:960)
    at
    weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.ja
    va:836)
    at
    weblogic.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager
    .java:796)
    at
    weblogic.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerIm
    pl.java:275)
    at
    weblogic.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XM
    LDocumentScannerImpl.java:841)
    at
    weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD
    ocumentFragmentScannerImpl.java:329)
    at
    weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
    525)
    at
    weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
    581)
    at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at
    weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav
    a:1175)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
    at org.cas.felix.util.XML.validate(XML.java:88)
    at org.cas.felix.util.XML.validate(XML.java:69)
    at org.cas.felix.si.master.MasterDocument.<init>(MasterDocument.java:94)
    at org.cas.felix.si.master.MasterDocument.<init>(MasterDocument.java:139)
    at
    org.cas.felix.si.j2ee.processing.FelixSIProcessorBean.processRecord(Unknown
    Source)
    at org.cas.felix.si.j2ee.processing.FelixSIProcessorBean.onMessage(Unknown
    Source)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:374)
    at
    weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:30
    8)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:273)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2550)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2470)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

    Hi Brian,
    In your config.xml, in the <XMLRegistry> section, what does the
    EntityURI look like? I believe it should be a relative entry, something
    like %WLDOMAIN%/xml/registries/MyRegistry
    If this is not the issue, I would encourage you to provide this
    information with your config.xml to our outstanding support team to
    resolve this issue.
    Thanks,
    Bruce
    Brian Sam-Bodden wrote:
    >
    Hi,
    I have configure Weblogic XML Registry as described in
    http://e-docs.bea.com/wls/docs81/ConsoleHelp/xml.html. I have a directory
    where my dtds reside (%WLDOMAIN%/xml/registries/MyRegistry/). I using JAXP
    (the BEA recommended API which should automatically make use of the registry
    for entity resolution). But somehow it seems that it is looking in the root
    of the weblogic domain for the entities and not in the registry entities
    directory.
    A sample doctype in one of my doc looks like <!DOCTYPE substance_id PUBLIC
    "-//CAS//DTD substance_id//EN" "substance_id.dtd">
    The registry is configured as follows
    Public ID System ID
    Entity URI When To Cache Cache Timeout Interval
    ============================================================================
    ===============
    -//CAS//ENTITY CMD Defined Entities//EN CMSents.dtd CMSents.dtd
    defer-to-registry-setting -1
    -//CAS//DTD control//EN control.dtd
    control.dtd defer-to-registry-setting -1
    -//CAS//DTD substance_id//EN substance_id.dtd
    substance_id.dtd defer-to-registry-setting -1
    Below is the exception from the server log. Any help would be greatly
    appreaciated.
    ####<Dec 12, 2003 11:09:32 AM EST> <Debug> <org.cas.felix.util.XML>
    <PC81227> <myserver> <ExecuteThread: '13' for queue:
    'weblogic.kernel.Default'> <<anonymous>> <BEA1-0009897C74118C32D0F4>
    <000000> <exception parsing document <?xml version="1.0"?>
    <!DOCTYPE substance_id PUBLIC "-//CAS//DTD substance_id//EN"
    "substance_id.dt ... (4869)
    java.io.FileNotFoundException: D:\wls_domains\felix\substance_id.dtd (The
    system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:103)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at
    sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:6
    9)
    at
    sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection
    .java:156)
    at java.net.URL.openStream(URL.java:960)
    at
    weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.ja
    va:836)
    at
    weblogic.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager
    .java:796)
    at
    weblogic.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerIm
    pl.java:275)
    at
    weblogic.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XM
    LDocumentScannerImpl.java:841)
    at
    weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD
    ocumentFragmentScannerImpl.java:329)
    at
    weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
    525)
    at
    weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
    581)
    at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at
    weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav
    a:1175)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
    at org.cas.felix.util.XML.validate(XML.java:88)
    at org.cas.felix.util.XML.validate(XML.java:69)
    at org.cas.felix.si.master.MasterDocument.<init>(MasterDocument.java:94)
    at org.cas.felix.si.master.MasterDocument.<init>(MasterDocument.java:139)
    at
    org.cas.felix.si.j2ee.processing.FelixSIProcessorBean.processRecord(Unknown
    Source)
    at org.cas.felix.si.j2ee.processing.FelixSIProcessorBean.onMessage(Unknown
    Source)
    at weblogic.ejb20.internal.MDListener.execute(MDListener.java:374)
    at
    weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:30
    8)
    at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:273)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2550)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:2470)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:178)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)

  • OPA 10.4 - batch processor and Entity

    Hello all.
    I have a problem with the use of Entity with batch processor.
    The fact is we want to use OPA with csv input named like "TARIF_ONE.csv". One different csv for every way of tarification and each time a different project that will be call by a batch process (the client need)... without the use of a configuration file !
    So, if I well understood the OPA batching process, I need, for a "TARIF_ONE" project to be feed with a "TARIF_ONE.csv" file, to have a "TARIF_ONE" entity that will get all the data from the csv input file.
    I've done so.
    But my problem is that when I call the OPA zip by batch, the TARIF_ONE entity are well feed by the data from the csv file... but the calculation from the excel file are not made at all... and in a exporttsc file, the Entities (TARIF_ONE) are set as "unknown" for all the cases inputed...
    I've setted my project like this :
    my Properties file is setted like that :
    Global
    - TARIF_ONE (entity)
    --- INPUT_DATA_ONE (attribute) : Text = "Input data one"
    --- INPUT_DATA_TWO (attribute) : Text = "Input data two"
    --- OUTPUT_DATA_ONE (attribute) : Text = "Output data one"
    --- OUTPUT_DATA_TWO (attribute) : Text = "Output data two"
    And my excel rules file is setted like below
    - Declaration Sheet
    -- INPUT_DATA_ONE : Text = "Input data one from TARIF_ONE"
    -- INPUT_DATA_TWO : Text = "Input data two from TARIF_ONE"
    -- OUTPUT_DATA_ONE : Text = "Output data one from TARIF_ONE"
    -- OUTPUT_DATA_TWO : Text = "Output data two from TARIF_ONE"
    - Calculation Sheet
    -- OUTPUT_DATA_ONE = INPUT_DATA_ONE * INPUT_DATA_TWO
    As I said, when using the batch process, the inputs attribute for the TARIF_ONE entity are well feed, but the OUTPUT attribute are not (still unknown)... and the Entity itself is said as "Unknown"... any way of reflexion to soluce that ?
    Thank-you,
    Philippe,

    Philippe Carpentier wrote:
    Thank you Franck for your answer.
    I would have just one more question : is it possible to use different entity in the zero configuration mode ?
    I tried with one data file by entity, and the entities ares not created
    I tried with all the datas for entities in the global.csv file, and the same.
    It seams to me that when using differents entities in a projetc for batch, we have to use a configuration file... do you confirm my feeling ?
    Philippe,
    Edited by: Philippe Carpentier on 25 mai 2012 03:12You can definitely load entities other than global using zero configuratiuon. To do this create a csv file that has the same name as the public name of your entity. For example if you have an entity with the name "person" then create a person.csv file for each entity instance.
    You will need to have a reference to which global instance each entity instance relates to. The way to do this is to have a column named for the containment relationship for the entity to hold the foreign key to the entity instances parent.
    Example
    We have a global.csv with 3 globals (3 cases)
    #, (number_of_persons)
    1,
    2,
    3,And then a person.csv with 7 people which must all be link to their owning (parent) global. This is done through the containment relationship with the public name "all_persons"
    #,person_name,person_age,all_persons
    1,Fred,      ,27,       ,1
    2,Barney,    ,28,       ,1
    3,Homer,     ,40,       ,2
    4,Marge,     ,38,       ,2
    5,Bart,      ,10,       ,3
    6,Maggie,    ,1,        ,3
    7,Lisa,      ,8,        ,3Each value in the column "all_persons" is a foreign key to the global value which contains that person
    For more information on this, see "CSV input for the Batch Processor", and "Zero-configuration conventions for CSV input" in the "Oracle Policy Automation Developer's Guide". http://docs.oracle.com/html/E29403_01/toc.htm

  • What would be my JPA Entities ??

    Hello Everyone.
    I have a confusion.
    In my database i have 3 tables.
    1) University (id, Name)
    2) Specialization (id, Name)
    3) Degree (id, Name)
    and one relationship table.
    4) degree_prog_replationshiip (id, university_id, specialization_id, degree_id)
    i am not able to design my entity classes.
    Please tell me how would be my entity classes?
    Thanks.

    >
    >
    > In the degree entity for example it has a one to many relationship expressed as a List of degree_prog_replationship entities. Then in the degree_prog_replationship entity you have a many to one relationship to the degree entity. Then the same for each of the other 2 entity types.
    >
    Here entity classes.
    University.java package entities;
    import java.io.Serializable;
    import java.util.List;
    import javax.persistence.*;
    @Entity
    @Table(name="university")
    public class University implements Serializable {
    @Id
    @GeneratedValue(generator="university_id_seq",strategy=GenerationType.SEQUENCE)
    @Column(name="id")
    private int universityId = 0;
    @Column(name = "name")
    private String universityName = "";
    @OneToMany(mappedBy="university",cascade=CascadeType.PERSIST,CascadeType.REMOVE})
    private List<DegreeProgam> degreeProg;
    public void University(){ }
    public void setUniversityId(int universityId) { this.universityId = universityId; }
    public int getUniversityId() { return this.universityId; }
    public void setUniversityName(String universityName) {
    this.universityName = universityName;
    public String getUniversityName() { return this.universityName; }
    public List<DegreeProgram> getDegreeProg() { return degreeProg; }
    public void setDegreeProg(List degreeProg) {
    this.degreeProg = degreeProg;
    } }Specialization.java
    package entities;
    import java.io.Serializable;
    import java.util.List;
    import javax.persistence.*;
    @Entity
    @Table(name="specialization")
    public class Specialization implements Serializable {
    @Id
    @GeneratedValue(generator="specialization_id_seq",strategy=GenerationType.SEQUENCE)
    @Column(name="id")
    private int specializationId = 0;
    @Column(name="name")
    private String specializationName = "";
    public void Specialization() { }
    public void setSpecializationId(int specializationId) {
    this.specializationId = specializationId;
    public int getSpecializationId() { return this.specializationId;}
    public void setSpecializationName(String specializationName) {
    this.specializationName = specializationName;
    public String getSpecializationName() { return this.specializationName;}
    }Degree.java
    package entities;
    import java.io.Serializable;
    import java.util.List;
    import javax.persistence.*;
    @Entity
    @Table(name="degree")
    public class Degree implements Serializable {
    @Id
    @GeneratedValue(generator="degree_id_seq",strategy=GenerationType.SEQUENCE)
    @Column(name="id")
    private int degreeId = 0;
    @Column(name="name")
    private String degreeName = "";
    public void Degree() { }
    public void setDegreeId(int degreeId) {
    this.degreeId = degreeId;
    public int getDegreeId() { return this.degreeId; }
    public void setDegreeName(String degreeName) {
    this.degreeName = degreeName;
    public String getDegreeName() { return this.degreeName; }
    }and last one .DegreeProgram.java
    package entities;
    import java.io.Serializable;
    import javax.persistence.*;
    @Entity
    @Table(name="degree_program_relationship")
    public class DegreeProgram implements Serializable{
        @Id
        @GeneratedValue
        @Column(name="id")
        private int degreeProgramId = 0;
        @ManyToOne
        @JoinColumn(name="university_id")
        private University uni;
        @ManyToOne
        @JoinColumn(name="specialization_id")
        private Specialization spec;
        @ManyToOne
        @JoinColumn(name="degree_id")
        private Degree deg;
        public void DegreeProgram() { }
        public int getDegreeProgramId() { return degreeProgramId; }
        public void setDegreeProgramId(int degreeProgramId) {
            this.degreeProgramId = degreeProgramId;
        public Degree getDeg() { return deg; }
        public void setDeg(Degree deg) { this.deg = deg; }
        public Specialization getSpec() { return spec; }
        public void setSpec(Specialization spec) { this.spec = spec; }
        public University getUni() { return uni; }
        public void setUni(University uni) { this.uni = uni; }
    }after that when i tried to run my code i got the error
    oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: The attribute [degreeProg] in entity class [class entities.University] has a mappedBy value of [uniersity] which does not exist in its owning entity class [class entities.DegreeProgram]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.Please help me. Thanks.

  • FWDEngineering.execute() nullpointerException when engineering from logical to physical model

    Dear Community,
    During the "engineer to relational model" from the logical model I got a long time the correct behaviour.
    Now I get the following error in the log file: "ERROR FWDEngineering - FWDEngineering.execute()" NullpointerException
    The model is not that large but contains a number of entities with sub-entities for which I set the way of implementation to generate a single table.
    Test 1: Restart
    Removing the model has not solved the problem for this ... (delete entire relational model)
    Test 2: reset subtype implementation to default behaviour
    So on the level of the super entity the following settings are set on the subtype property page:
      - subtree do not preset
      - No Discriminator column
      - no 'use attribute' selected
      - no column name set,
    The model generates the foreign keys ... and gives no error.
    Test 3 : setting discriminator.
    Juglin' around with the properties I noticed that when after starting from test 2 and setting the property "generate discrimator" *and* selecting the name of the discriminator colomn the error can be reproduced. Currently I do not know fit the setting subtree together with discriminator column is logically correct ... but I get the stacktrace ;-)
    Test 4 : can the subtree generation mode solve it -> Seems I'm not able to set it to an other value than "do not preset" anymore.
    Version datamodeler is 4.0.0.833
    Test 5 : Created a smaller model ... and tested if the foreign key generation in itself caused the problem. Removing the relationship with a subentity does not cause the problem to not occur ...
    At this moment in time ... it seems to me I cannot set the mode to generate the master entity and its subs to one table anymore.
    What am I doing wrong?
    ... and anyway ... there is a stacktrace ;-)
    Has anyone some solution/experience with this?
    For the completeness ... the stacktrace, which shows a processDiscriminatorColumn ....
    Oh yes ... also for completeness: in the test with a subentity not having a relationship the method calling the processDescr... is a different one inheritancePostProcessingNew() ...
    Thanks you all.
    2014-01-30 18:35:39,795 [AWT-EventQueue-0] ERROR FWDEngineering - FWDEngineering.execute()
    java.lang.NullPointerException
      at oracle.dbtools.crest.model.design.engineering.FEEntityHierarchy.processDiscriminatorColumn(FEEntityHierarchy.java:592)
      at oracle.dbtools.crest.model.design.engineering.FEEntityHierarchy.createFKeysNew(FEEntityHierarchy.java:921)
      at oracle.dbtools.crest.model.design.engineering.FEEntityHierarchy.inheritancePostProcessingNew(FEEntityHierarchy.java:861)
      at oracle.dbtools.crest.model.design.engineering.FWDEngineering.processEntities(FWDEngineering.java:275)
      at oracle.dbtools.crest.model.design.engineering.FWDEngineering.execute(FWDEngineering.java:107)
      at oracle.dbtools.crest.model.design.Design.forwardEngineer(Design.java:895)
      at oracle.dbtools.crest.swingui.engineeringcompare.EngineeringCompareDialog.engineer(EngineeringCompareDialog.java:992)
      at oracle.dbtools.crest.swingui.engineeringcompare.EngineeringCompareDialog.access$3200(EngineeringCompareDialog.java:125)
      at oracle.dbtools.crest.swingui.engineeringcompare.EngineeringCompareDialog$22.actionPerformed(EngineeringCompareDialog.java:1777)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
      at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
      at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
      at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
      at java.awt.Dialog.show(Dialog.java:1082)
      at java.awt.Component.show(Component.java:1651)
      at java.awt.Component.setVisible(Component.java:1603)
      at java.awt.Window.setVisible(Window.java:1014)
      at java.awt.Dialog.setVisible(Dialog.java:1005)
      at oracle.dbtools.crest.swingui.engineeringcompare.EngineeringCompareDialog.show(EngineeringCompareDialog.java:1766)
      at oracle.dbtools.crest.swingui.browser.BrowserPanel$41.actionPerformed(BrowserPanel.java:1145)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      at com.apple.laf.AquaMenuItemUI.doClick(AquaMenuItemUI.java:157)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)
      at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    Hi ViForEver,
    thanks for detailed report. We also found the problem in engineering of entity hierarchy when existing attribute is used as discriminator column. No such problem when leave DM to create new discriminator column.
    Problem is fixed and fix is included in the forthcoming patch release.
    About your questions/observations:
    can the subtree generation mode solve it -> Seems I'm not able to set it to an other value than "do not preset" anymore
    Generation of table for given entity depends on "Engineer to" flag and it can have different value for each relational model. If the flag is checked then table will be generated for that entity
    otherwise attributes will be implemented by another entity down or up in the hierarchy. So two combo boxes in "Entity and sub-tree generation preset" help you to set that flag for entity
    and it's sub-tree. It's functionality behind them, not properties so they are always in initial state when you reopen dialog.
    Currently I do not know fit the setting subtree together with discriminator column is logically correct
    They are related - discriminator column won't be generated:
    1) if you go for sub-types implementation
    2)implement all entity but "References" is set to arc implementation.
    Philip

  • Configuring Cache Expiration in Toplink using Jdeveloper

    HI
    I am using Toplink10g, Jdeveloper10g.
    I have a batch job running over more than 25K records,
    It initially perform a findall query, then updates data and calls commit on Unit OF Work(which merges the entity and all entities in relation), Commit is called after every 100 entities are updated.
    After commit, new Unit of work is acquired from the Session.
    I am monitoring the memory consumption, I can see it is increasing till it reaches the max., and even after batch job ends, the memory consumption never lowers down.
    I assume, all those merged entities are now in cache.m
    I tried to check different type of IdentityMaps(i.e. different type of cache), but none helped.
    I also tried to set expiry at query level, but found no diff. in memory consumption.
    I assume, that If I set cache expiration at project level, then it can help.
    But, I couldn't find any way to set cache expiration at project level, in JDeveloper.
    I opened the map( configured in sessions.xml), i found what kind of cache to use, but couldn't find a way to set the expiry.
    Please suggest any otherw ay also, to reduce memory consumption by batch job, while using Toplink
    Thanks

    Cache expiration has nothing to do with your issue.
    Assuming you used a weak cache, then the cache is probably not what is holding these objects in memory. A weak cache will allow any object that is not reference by your application to garbage collect.
    Does your code or application hold onto these objects or the UnitOfWork, they will not be free to garbage collect until you remove any references to them.
    Are you holding onto the original findAll query results? If so, then this will keep all of these objects in memory. The UnitOfWork should still be free to garbage collect, so you will need to find out what is holding onto the UnitOfWork or the objects within it. You may wish to use a memory profiler such as JProfiler.
    What exact version of TopLink are you using? I believe there were some memory related issues in 10g, so make sure you have the latest patch release.
    Depending on your TopLink version you could also try an isolated cache.
    James : http://www.eclipselink.org

  • POJOs and createNativeQuery

    We are having lots of complex sql and tonnes of tables in our schema and intend to use JPA(present system is on JDBC). We intend to lower the development time by using the native query support in JPA(createNativeQuery) and reuse the existing SQLs ; so that it plays well with UI which is on ADF.
    So, I have a native query which selects some columns; and i also have a suitable entity(POJO) which maps to the columns that are fetched in the query. Note that the query fetches columns from multiple tables and hence the POJO resembles something like a value object (though in the present parlance its called as an Enitity). All is fine till here.
    Now i need to group by certain columns; how should the result list be now accessed - do i need to create another entity(POJO) which maps to this structure of groupby column name(s) and its respective counts? Is this a fine(and elegant) solution; or can you think of anything else?

    It depends,
    SqlResultSetMapping is cool. But, I think not in your case.
    If you map the values to an entity, the returned entities become managed by the persistence context.
    An entity is a bit more than a single pojo, it must be defined as an entity, and must have an id.
    So you must create entities for all results of your queries, so all result must have an id.
    This is quite limited in JPA.
    so maybe single transformator classes could be better choice.
    if you can use hibernate instead of "standard jpa", you can use resulttranformator, it would be more useful in your case :)

  • Manytoone lazy issue

    Hi all,
    I have problems with manytoone mappings with fetchtype set to lazy. When the mappings are set to eager, everything works great.
    My situation is: I want to improve the performance of entities load from server (Glassfish v2.1.1), so I' ve set some mappings to lazy (don't need them on client). When the entity is saved (from client), i wish to set the lazy relationships with correct entities on server side. But when I call entity.setAnotherEntity(anotherEntity) an NullPointerException is thrown. When I've debugged the server side (using Netbeans 6.7.1), I've found out, that the setter setAnotherEntity is not on the top of stack trace(it's on second place), on the top is something like toplinksetanotherentity. I my entity has been added fields with names toplinkfieldname_vh. On the net I've found, that there is something wrong with weaving. Can anybody help me? I'm new in Java EE.
    Thank you

    Thank you for answer.
    I'm trying to improve the response time from server. Some entities have "large" related entities in manytoone relationship, which are not needed on client side, so I don't want to load them to the client. But when I save the entities, I need to keep this relations or sometimes to change them - it depends on information on server side. Yes, it can be handled from client - load the whole entity with related entites, but there is sometimes unacceptable delay. Then I set the manytoone relation to lazy, merge fails with oracle.toplink.essentials.exceptions.DescriptorException.
    Caused by: Exception [TOPLINK-99] (Oracle TopLink Essentials - 2.1 (Build b31g-fcs (10/19/2009))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: The method [_toplink_getanotherentity_vh] on the object [entity] triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.essentials.mappings.OneToOneMapping[anotherentity]
    Can you advice me a solution for this situation?

Maybe you are looking for

  • So HDR photo mode only works with flash off?

    I noticed that when you turn the HDR photo mode on, the flash changes to off. If you try to put the flash back to on or auto, it turns HDR off.

  • Essbase admin server is not responding in 11.1.2.2 and related services ??

    Hi All, I've installed & configured Hyperion 11.1.2.2. When i entered admin & password in EAS console, the message is displaying as Essbase Administration server is not responding. Can you pls. let me know, what is the service for Essbase Admin servi

  • ORA-600 [17280]

    Hello, I have a problem on a 10.2.0.4 enterprise edition database. The database crashes several times a day with the error ORA-600 [17280]. Form the metalink I learned that this is due to a bug which is fixed in 11.1 version. Here is the error from t

  • How manuplate data on multiple tables in the oracle resource adapter

    Hi all, I have a requirement to write an resource adapter for oracle. But the key point is that, the user creation has to add entries in several tables and same goes with updation and getting the results. Please help me with the code snippet, if any

  • Can you rotate a video clip?

    I have shot some video holding my camcorder sideways and upside down. Is there a was to "turn" the video in iMovie so it is displayed the right side up? Thanks