NullPointerException for Toplink mappings to inherited attributes

In the Toplink workbench (I´m using TP3) I need to map inherited attributes to the super class. Whenever I try this, my Toplink map goes corrupt with a NullPointer and is not usable any more.
This is how it goes:
- I have different common attributes (such as id, version, ...) stored in the super class
- Create a new Toplink map
- Choose "Add or Remove Descriptors"
- Add the child class to be mapped
- Choose "Map inherited attributes" -> "To Root Minus One"
- Nothing happens: the additional super attributes don´t show up (??)
- Restart JDev
- Choose again "Map inherited attributes" -> "To Root Minus One"
- Now the additional super attributes show up and you can do any mapping
- Yet, if you restart JDev again and try to open the Toplink mapping you get the stacktrace shown below
I checked this with Jdev 10.1.3 and the same classes and didn´t have any problems.
Can you reproduce this?
Thanx in advance
Jens
java.lang.NullPointerException
     at oracle.toplink.workbench.mappingsmodel.descriptor.MWDescriptor.packageName(MWDescriptor.java:214)
     at oracle.toplink.workbench.mappingsplugin.ui.project.ProjectNode.descriptorPackageNodeFor(ProjectNode.java:375)
     at oracle.toplink.workbench.mappingsplugin.ui.project.ProjectNode.addDescriptorNodeFor(ProjectNode.java:444)
     at oracle.toplink.workbench.mappingsplugin.ui.project.ProjectNode.addDescriptorNodesFor(ProjectNode.java:438)
     at oracle.toplink.workbench.mappingsplugin.ui.project.ProjectNode.engageValue(ProjectNode.java:268)
     at oracle.toplink.workbench.uitools.app.AbstractTreeNodeValueModel.addStateChangeListener(AbstractTreeNodeValueModel.java:70)
     at oracle.toplink.workbench.uitools.app.swing.TreeModelAdapter.engageNode(TreeModelAdapter.java:370)
     at oracle.toplink.workbench.uitools.app.swing.TreeModelAdapter.addChildren(TreeModelAdapter.java:354)
     at oracle.toplink.workbench.uitools.app.swing.TreeModelAdapter$ChangePolicy.addChildren(TreeModelAdapter.java:478)
     at oracle.toplink.workbench.uitools.app.swing.TreeModelAdapter$4.itemsAdded(TreeModelAdapter.java:177)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:76)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemsAdded(ChangeSupport.java:1140)
     at oracle.toplink.workbench.uitools.app.ValueModelChangeSupport.fireItemsAdded(ValueModelChangeSupport.java:242)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemsAdded(AbstractModel.java:373)
     at oracle.toplink.workbench.uitools.app.CollectionListValueModelAdapter.itemsAdded(CollectionListValueModelAdapter.java:305)
     at oracle.toplink.workbench.uitools.app.SortedListValueModelAdapter.itemsAdded(SortedListValueModelAdapter.java:99)
     at oracle.toplink.workbench.uitools.app.CollectionListValueModelAdapter$1.itemsAdded(CollectionListValueModelAdapter.java:97)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:55)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemsAdded(ChangeSupport.java:700)
     at oracle.toplink.workbench.uitools.app.ValueModelChangeSupport.fireItemsAdded(ValueModelChangeSupport.java:167)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemsAdded(AbstractModel.java:179)
     at oracle.toplink.workbench.uitools.app.ListCollectionValueModelAdapter.addInternalItems(ListCollectionValueModelAdapter.java:269)
     at oracle.toplink.workbench.uitools.app.ListCollectionValueModelAdapter.itemsAdded(ListCollectionValueModelAdapter.java:273)
     at oracle.toplink.workbench.uitools.app.ListCollectionValueModelAdapter$1.itemsAdded(ListCollectionValueModelAdapter.java:89)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:76)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemsAdded(ChangeSupport.java:1090)
     at oracle.toplink.workbench.uitools.app.ValueModelChangeSupport.fireItemsAdded(ValueModelChangeSupport.java:233)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemsAdded(AbstractModel.java:377)
     at oracle.toplink.workbench.uitools.app.ItemAspectListValueModelAdapter.itemsAdded(ItemAspectListValueModelAdapter.java:234)
     at oracle.toplink.workbench.uitools.app.ListValueModelWrapper$1.itemsAdded(ListValueModelWrapper.java:69)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:76)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemsAdded(ChangeSupport.java:1140)
     at oracle.toplink.workbench.uitools.app.ValueModelChangeSupport.fireItemsAdded(ValueModelChangeSupport.java:242)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemsAdded(AbstractModel.java:373)
     at oracle.toplink.workbench.uitools.app.CollectionListValueModelAdapter.itemsAdded(CollectionListValueModelAdapter.java:305)
     at oracle.toplink.workbench.uitools.app.CollectionListValueModelAdapter$1.itemsAdded(CollectionListValueModelAdapter.java:97)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:55)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemsAdded(ChangeSupport.java:650)
     at oracle.toplink.workbench.uitools.app.ValueModelChangeSupport.fireItemsAdded(ValueModelChangeSupport.java:158)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemsAdded(AbstractModel.java:183)
     at oracle.toplink.workbench.uitools.app.CollectionAspectAdapter.itemsAdded(CollectionAspectAdapter.java:264)
     at oracle.toplink.workbench.uitools.app.CollectionAspectAdapter$1.itemsAdded(CollectionAspectAdapter.java:117)
     at oracle.toplink.workbench.utility.events.DefaultChangeNotifier.itemsAdded(DefaultChangeNotifier.java:55)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemAdded(ChangeSupport.java:751)
     at oracle.toplink.workbench.utility.events.ChangeSupport.fireItemAdded(ChangeSupport.java:757)
     at oracle.toplink.workbench.utility.AbstractModel.fireItemAdded(AbstractModel.java:175)
     at oracle.toplink.workbench.utility.AbstractModel.addItemToCollection(AbstractModel.java:214)
     at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.addProjectNode(FrameworkNodeManager.java:121)
     at oracle.toplink.workbench.addin.ui.view.TopLinkViewContext.initializeApplicationNodes(TopLinkViewContext.java:413)
     at oracle.toplink.workbench.addin.ui.view.TopLinkViewContext.initialize(TopLinkViewContext.java:391)
     at oracle.toplink.workbench.addin.ui.view.TopLinkViewContext.<init>(TopLinkViewContext.java:98)
     at oracle.toplink.workbench.addin.ui.view.TopLinkContextTopLinkViewContext.<init>(TopLinkContextTopLinkViewContext.java:64)
     at oracle.toplink.workbench.addin.ui.view.TopLinkContextViewContextBuilder.buildViewContext(TopLinkContextViewContextBuilder.java:84)
     at oracle.toplink.workbench.addin.ui.view.ViewContextManager.buildViewContext(ViewContextManager.java:361)
     at oracle.toplink.workbench.addin.ui.view.ViewContextManager.buildViewContext(ViewContextManager.java:343)
     at oracle.toplink.workbench.addin.ui.view.ViewContextManager.getViewContext(ViewContextManager.java:849)
     at oracle.toplink.workbench.addin.ui.view.TopLinkEditor.updateViewContext(TopLinkEditor.java:497)
     at oracle.toplink.workbench.addin.ui.view.TopLinkEditor.setContext(TopLinkEditor.java:371)
     at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:147)
     at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:94)
     at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:231)
     at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:194)
     at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:103)
     at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:355)
     at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1399)
     at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1333)
     at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1259)
     at oracle.ideimpl.navigator.OpenEditorController.whenOpenEditor(OpenEditorController.java:41)
     at oracle.ideimpl.navigator.OpenEditorContextMenuListener.handleDefaultAction(OpenEditorContextMenuListener.java:51)
     at oracle.ide.controller.ContextMenuListenersHook$LazyContextMenuListener.handleDefaultAction(ContextMenuListenersHook.java:212)
     at oracle.ide.controller.ContextMenu.fireDefaultAction(ContextMenu.java:415)
     at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1770)
     at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:2105)
     at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:2126)
     at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:195)
     at java.awt.Component.processEvent(Component.java:5282)
     at java.awt.Container.processEvent(Container.java:1966)
     at java.awt.Component.dispatchEventImpl(Component.java:3984)
     at java.awt.Container.dispatchEventImpl(Container.java:2024)
     at java.awt.Component.dispatchEvent(Component.java:3819)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
     at java.awt.Container.dispatchEventImpl(Container.java:2010)
     at java.awt.Window.dispatchEventImpl(Window.java:1791)
     at java.awt.Component.dispatchEvent(Component.java:3819)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Hi John,
thanks for the reply.
Thing is, we need to use JSF 1.2. So I guess, either we use 10g mappings in JDev/OC4J 11g or we try an alternative mapping with the 11g JDev/Workbench (e.g. using interfaces instead).
For the first case I´ve found no suitable way: I´ve tried to remove the toplink.jars by using the "remove-inherited" tag in the application´s "orion-application.xml" file. This did not have the proper effect.
For the second case, I´m wondering if the 11g TP3 mapping files are compatible to the next releases and to any EclipseLink releases.
It would be very helpful if you could clarify these issues.
Jens

Similar Messages

  • Sql for  inheritance mapping looks for inherited attributes in base table

    i don't know if it is my mistake but....
    with inherited attributes (that worked OK in 10.1.3DP3) we are experiencing strange behavoir in that: the sql generated to retrieve implementors of a base class from a base table with additional attributes for subclasses read from joined tables is not valid.
    in 10.1.3DP3, the sql is correctly generated such that the attributes for subclasses are selected from the appropriate joined tables
    in 10.1.3DP4, the sql is generated such that all fields are selected from the base table, regardless whether these fields are mapped to the base class (base table) or subclasses (joined tables).
    what i expect to see is that the base table (usually aliased as t0) AND the joined table for reading subclasses (usually aliased as t1) are used in the sql statement.
    instead, all fields are selected from t0.
    i have included the generated descriptor code
    thank you very much in advance of any help here
    regards
    paul
    base class descriptor: 10.1.3DP3
    public ClassDescriptor buildAbstractEnrichmentRuleDescriptor() {
         RelationalDescriptor descriptor = new RelationalDescriptor();
         descriptor.setJavaClass(com.aon.amp.beans.enrichment.AbstractEnrichmentRule.class);
         descriptor.addTableName("ENRICHMENT_RULE");
         descriptor.addPrimaryKeyFieldName("ENRICHMENT_RULE.ENRICHMENT_RULE_ID");
         // Inheritance Properties.
         descriptor.getInheritancePolicy().setClassIndicatorFieldName("ENRICHMENT_RULE.DROP_DOWN_IND");
         descriptor.getInheritancePolicy().addClassIndicator(com.aon.amp.beans.enrichment.TextEnrichmentRule.class, "N");
         descriptor.getInheritancePolicy().addClassIndicator(com.aon.amp.beans.enrichment.DropDownEnrichmentRule.class, "Y");
         descriptor.getInheritancePolicy().dontReadSubclassesOnQueries();
    base class descriptor: 10.1.3DP4
    public ClassDescriptor buildAbstractEnrichmentRuleDescriptor() {
         RelationalDescriptor descriptor = new RelationalDescriptor();
         descriptor.setJavaClass(com.aon.amp.beans.enrichment.AbstractEnrichmentRule.class);
         descriptor.addTableName("ENRICHMENT_RULE");
         descriptor.addPrimaryKeyFieldName("ENRICHMENT_RULE.ENRICHMENT_RULE_ID");
         // Inheritance Properties.
         descriptor.getInheritancePolicy().setClassIndicatorFieldName("ENRICHMENT_RULE.DROP_DOWN_IND");
         descriptor.getInheritancePolicy().setReadAllSubclassesViewName("ENRICHMENT_RULE");
         descriptor.getInheritancePolicy().addClassIndicator(com.aon.amp.beans.enrichment.TextEnrichmentRule.class, "N");
         descriptor.getInheritancePolicy().addClassIndicator(com.aon.amp.beans.enrichment.DropDownEnrichmentRule.class, "Y");
         // Descriptor Properties.
         descriptor.useNoIdentityMap();
         descriptor.setIdentityMapSize(100);
         descriptor.useRemoteNoIdentityMap();
         descriptor.setRemoteIdentityMapSize(100);
         descriptor.setIsIsolated(true);
         descriptor.setAlias("AbstractEnrichmentRule");
    sub class descriptor:
    public ClassDescriptor buildDropDownEnrichmentRuleDescriptor() {
         RelationalDescriptor descriptor = new RelationalDescriptor();
         descriptor.setJavaClass(com.aon.amp.beans.enrichment.DropDownEnrichmentRule.class);
         descriptor.addTableName("DROP_DOWN_ENRICHMENT_RULE");
         // Inheritance Properties.
         descriptor.getInheritancePolicy().setParentClass(com.aon.amp.beans.enrichment.AbstractEnrichmentRule.class);
         descriptor.getInheritancePolicy().dontReadSubclassesOnQueries();
         // Descriptor Properties.
         descriptor.setIsIsolated(true);
         descriptor.setAlias("DropDownEnrichmentRule");
         descriptor.setCacheSynchronizationType(ClassDescriptor.DO_NOT_SEND_CHANGES);
    ...and the exception/ SQL
    Problem details
    Internal Exception: java.sql.SQLException: ORA-00904: "T0"."DROP_DOWN_SQL": invalid identifier Error Code: 904 Call:SELECT t0.ENRICHMENT_RULE_ID, t0.DROP_DOWN_IND, t0.LABEL_EXPRESSION, t0.COLUMN_NUM, t0.ORDER_PRIORITY, t0.LABEL_NAME, t0.VALUE_EXPRESSION, t0.ENRICHMENT_RULE_TYPE_ID, t0.ENRICHMENT_RULE_ID, t0.DROP_DOWN_SQL FROM ENRICHMENT_RULE t0 WHERE (t0.ENRICHMENT_BASE_ID = ?) bind => [1] Query:ReadAllQuery(com.aon.amp.beans.enrichment.AbstractEnrichmentRule)

    Hello Paul,
    There is a difference in your descriptors that is causing the problem. In the DP3 descriptor, you have selected dontReadSubclassesOnQueries() option, meaning that queries to the base class will only return base class implementations.
    The DP4 descriptor instead has setReadAllSubclassesViewName("ENRICHMENT_RULE"), which is telling it that when a query is performed on the base class that TopLink should also return subclasses. It is also telling TopLink to do this in 1 query using the ENRICHMENT_RULE view table - this allows you to specify a view that joins all the inheritance tables. This option is good when you are using cursors and the like but still need to query on the base class to get the subclasses.
    Best Regards,
    Chris Delahunt

  • Toplink XML: polymorphism/inheritance

    Hi all,
    I have an XML like this (I have replaced the real business names by A, B, C, X ,etc etc)
    [root]
    [collectionOfX]
    [A/]
    [A/]
    [B/]
    [C/]
    [C/]
    [C/]
    [collectionOfX]
    [root]
    On the Java side, A, B and C are concrete classes extending an abstract class X. I have one root class with a collection of Xs.
    I am not able to map this stuff. Toplink requires to have concrete X elements with an attribute telling that it is in fact a A [X xsi:type="A"] and not [A]
    I have seen that substitution groups were a possible way for doing this, how does it work?
    If you have any indication about how to do this stuff, it is very welcome. I have not found any example of this.

    Ok Blaise, the example you provided me is working and I was able to apply the same principle to my project which is now working also.
    I want to share the "tricks" that will make it work for anyone after me who could face the same problem again.
    1. A, B and C must be defined as elements and these elements must be used as both schema context and default root element in the descriptor info pane of the corresponding A, B and C classes. In my case, A, B and C were complexTypes in the schema and it was not working.
    2. The abstract X class was added to the project but its descriptor was de-activated (maybe not really necessary)
    3. I have Mapped the Inherited Attributes for A, B, C concrete classes. It means the X attributes are now appearing in the A, B and C list of attributes in the workbench.
    4. The mapping of all inherited attributes is repeated in the workbench for all concrete classes (a pain if there are many attributes).
    Blaise, if possible I would like to find a better support for this case in future versions of the product. Ideally, the mapping of inherited attributes should be defined only once.
    Thx.
    Robin

  • Re-generate toplink mappings used by db adapter

    When changes are performed in the underlying relationel model, and these need to be reflected in the xsd-mapping file and toplink-mappings used in my bpel process. How can i propagate, reverse-engineer the changes from my database into the toplink mapping files?
    For example new releases are being scheduled for our project and in these new release, changes are made to the db-model, which are non-intrusive because only attributes are added, existing attributes aren't deleted/removed.
    How can I propagate the relational db changes inside my bpel process using db adapters?
    Kind regards,
    Nathalie

    You're able to update the defined toplink mapping files by re-importing the tables in your database adapter, used in the bpel process.
    But this will only update the associated mapping file, but won't update the xsd which was created the first time you've defined the database adapter.
    Has anyone found a solution for this?
    Kind regards,
    Nathalie

  • NullPointerException with Toplink version 9.0.4.4

    Dear All,
    We are using Toplink version 9.0.4.4 jar for one of our live application.
    Ours is a Java application connected to Oracle DB with the above mentioned toplink jar in the application server.
    Currently we are facing the following issue.
    java.lang.NullPointerException
    at oracle.toplink.mappings.DirectToFieldMapping.compareObjects(DirectToFieldMapping.java:154)
    at oracle.toplink.mappings.DirectToFieldMapping.compareForChange(DirectToFieldMapping.java:136)
    We are not facing this issue on all scenarios. But unable to figure our when this issue is triggered.
    From one of the forum we saw that version 9.0.4.5 might solve this issue.
    We tried replacing the jar but the result is not fruitful. We still have the issue.
    On higher end this is how our Objects are mapped.
    Database Side
    ==============
    Employee - Primary Table
    Employee Details - Secondary table with relation to Employee table.
              One to many relation with Employee
    Java Side
    ===========
    Employee.java
    EmployeeDetails.java
    Employee.java contains list of Employee Details.
    Process Flow
    ==============
    1. Read the Employee details from the Database. Employee Object is populated and the same is used to Display the details
    in the application screen
    2. User modified the Emplohyee details in the Screen
    3. Build EmployeeAmendDTO from Employee Object along with the modified data from Screen using HTTPRequest object
    4. Read the Employee Object again from the DB and register it for Update.
    5. Logic has been written in Java to check EmployeeAmendDTO against Employee Object and populate Employee Object with
    additional information from the EmployeeAmendDTO.
    6. In this process the EmployeeDetails List within the Employee Object is also set.
         Code snippet from Employee Object
         EmployeeDetailsList.add(EmployeeDetails);
         EmployeeDetails.setEmployee(this);
    7. Employee Object which is registed for update should update the records.
    The code works very fine while we comment the EmployeeDetailsList.add(EmployeeDetails); code in java.
    But this is very much required as we need to save the Employee Details as well.
    Below is the relationship maintained for Employee and EmployeeDetails in Toplink.
    In Employee the EmployeeDetails are set in one-to-many relations where Bidirectional Relationship is enabled. In the EmployeeDetails bidirectional relationship is not enabled for EmployeeHolder which is holder for the Employeeobject.
    Note:- The application is in use since 2005 and we have just modified few code here and there to include new parametes to
    the Employee and EmployeeDetails.

    Hello,
    9.0.4.x is rather old and I'd recommend trying a later version such as 10 or 11 if possible. I'd also recommend filing a support case as they will probably need to go through the old and new mappings and the details of how you are building Employee and EmployeeDetails objects from EmployeeAmendDTO, which would be difficult to look at through a forum post.
    What will be needed is the full stack, the portion of the log that shows the app first reading in Employee and then trying to commit the changes with logging on finest (if possible). The error hopefully shows the mapings involved in the problem that may issolate which objects will need to be looked at.
    Best Regards,
    Chris

  • Deleting inherited attribute using FM 'BBP_UPDATE_ATTRIBUTES'

    Hi Forum,
    I am trying to delete one value for attribute CAT using FM BBP_UPDATE_ATTRIBUTE , this attribute value is Inherited but I am unable to delete it.
    I tried this:
    1. Set the inherited flag to space using the same FM (in PPOSA_BBP I can see that inherited checkbox is not checked now)
    2. Try deleting the attribute using same FM (now the inherited flag is SET in PPOSA_BBP instead of deleting the attribute value)
    Is it not possible to delete inherited attribute or set inherited to space in PPOSA_BBP using BBP_UPDATE_ATTRIBUTES FM ?
    Another query is in this FM only USER_ID_P and ORGUNIT_ID_P are import parameters, how can we update attributes of a POSITION using the FM?
    Thanks,
    Anubhav

    Hello Anubhav,
    Inheritance between objects cannot be managed by any function module.
    Even if it can be done with a function module i don't know, it will be overwritten by your current customizing ( OOATTRCUST transaction) for attribute CAT.
    Regarding attributes update for positions, did you try with import parameter IS_OBJECT (OTYPE = 'S' and OBJID = position ID) ?
    Regards.
    Laurent.

  • CreateEntityManagerFactory throws NullPointerException for ejb3 jse client

    This question has been posted to the Toplink/jpa forum without any reply.
    Dear experts!
    I am trying to create a java standard edition client, to test outside the weblogic server, my ejb 3 entities, declared as shown in the following persistence.xml.
    The java code follows also. I have read about some relevant bugs in eclipselink back in 2006, or 7 or 8 and mostly unanswered threads :
    CreateEntityManagerFactory null pointer exception and
    Returned null to createEntityManagerFactory about tomcat and oc4j.
    Persistence.createEntityManagerFactory() throw NullPointerException in oc4j
    I am using JDeveloper 11g Studio Edition Version 11.1.1.3.0, Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660.
    Any helping hand available?
    Thank you very much in advance!
    NA
    package chapter12javaseclient;
    import actionbazaar.buslogic.BidException;
    import actionbazaar.persistence.Bid;
    import actionbazaar.persistence.Bidder;
    import actionbazaar.persistence.Item;
    import java.util.HashMap;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import org.eclipse.persistence.config.EntityManagerProperties;
    public class PlaceBidBeanJavaSE {
    private static EntityManagerFactory emf;
    private static EntityManager em;
    public static void main(String[] args) {
    String userId= "idiot";
    Long itemId = new Long (1);
    Double bidPrice = 2001.50;
    try {
    if (emf == null){
    emf = Persistence.createEntityManagerFactory("actionBazaar");
    System.out.println("EntityManagerFactory created!");
    getEntityManager();
    System.out.println("EntityManager created!");
    addBid(userId,itemId,bidPrice);
    commitTransaction();
    } finally {
    // close the EntityManager when done
    em.close();
    emf.close();
    private static void getEntityManager() {
    HashMap emProps = new HashMap();
    emProps.put(EntityManagerProperties.JDBC_USER, "ab");
    emProps.put(EntityManagerProperties.JDBC_PASSWORD, "ab");
    System.out.println("Creating entity manager");
    em = emf.createEntityManager(emProps);
    em.getTransaction().begin();
    private static void commitTransaction() {
    em.getTransaction().commit();
    private static Long addBid(String userId, Long itemId, Double bidPrice) throws BidException {
    Item item = em.find(Item.class,itemId);
    if (item == null)
    throw new BidException("Invalid Item Id");
    Bidder bidder = em.find(Bidder.class,userId);
    if (bidder == null)
    throw new BidException("Invalid Bidder Id");
    Bid bid = new Bid();
    bid.setItem(item);
    bid.setBidBidder(bidder);
    bid.setBidPrice(bidPrice);
    em.persist(bid);
    return bid.getBidId();
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="actionBazaar" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>actionbazaar.persistence.Bid</class>
    <class>actionbazaar.persistence.Item</class>
    <class>actionbazaar.persistence.User</class>
    <class>actionbazaar.persistence.Bidder</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.target-database" value="Oracle11"/>
    <property name="javax.persistence.jdbc.driver"
    value="oracle.jdbc.OracleDriver"/>
    <property name="javax.persistence.jdbc.password"
    value="ab"/>
    <property name="javax.persistence.jdbc.url"
    value="jdbc:oracle:thin:@hera:1521:orcl"/>
    <property name="javax.persistence.jdbc.user" value="ab"/>
    <property name="eclipselink.logging.level" value="ALL"/>
    </properties>
    </persistence-unit>
    </persistence>

    A solution might be found here:
    Re: createEntityManagerFactory() throws NullPointerException for ejb jse client
    Re: createEntityManagerFactory() throws NullPointerException for ejb jse client
    NA
    [http://nickaiva.blogspot.com/]

  • [svn] 4143: Fixed problem with metadata in SelectionFormatTextStyles. as so that named colors work for selectionColor, unfocusedSelectionColor, and inactiveSelectionColor attributes on Gumbo components.

    Revision: 4143
    Author: [email protected]
    Date: 2008-11-19 14:53:40 -0800 (Wed, 19 Nov 2008)
    Log Message:
    Fixed problem with metadata in SelectionFormatTextStyles.as so that named colors work for selectionColor, unfocusedSelectionColor, and inactiveSelectionColor attributes on Gumbo components.
    Thanks, Glenn!
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-18070
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18070
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SelectionFormatTextStyles .as
    flex/sdk/trunk/frameworks/projects/wireframe/bundles.properties

    Revision: 4143
    Author: [email protected]
    Date: 2008-11-19 14:53:40 -0800 (Wed, 19 Nov 2008)
    Log Message:
    Fixed problem with metadata in SelectionFormatTextStyles.as so that named colors work for selectionColor, unfocusedSelectionColor, and inactiveSelectionColor attributes on Gumbo components.
    Thanks, Glenn!
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-18070
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18070
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SelectionFormatTextStyles .as
    flex/sdk/trunk/frameworks/projects/wireframe/bundles.properties

  • Seeburger problem for Custom Mappings..!!!

    Hi All,
    File to Idoc using seeburger adapters(BIc & split)
    When I use standard mapping (Which starts with See_.. )in seeburger splitter configuration, ,the scenario is working perfectly.The idoc is posting in R/3 and Funcack is sending to Partner.
    But When I do for customised mappings (Like the ones which we will develop in BIC and deploy into XI and we will use the mapping name like E2X_DT_INVOICE).. then its not working.
    I tried by keeping custom mappings (E2X_DT_ORDERS) in splitter configuration. But it didn’t work.. !!
    Can anyone please tell the changes what I need to do in the modules or in splitter configuration..??
    Here is the Module parameters which i mentioned in sender File adapter.
    localejbs/SeeClassifier            C
    localejbs/CallBicXIRaBean   BIC
    localejbs/Seeburger/MessageSplitter   S
    C         attID                classifierAtt
    C         destSourceMsg        MainDocument
    C         showInAuditLog       true
    BIC       classifierAttID          classifierAtt
    BIC       destSourceMsg       MainDocument
    BIC       destTargetMsg         MainDocument
    BIC       mappingName           AUTO
    BIC       split                          true 
    1. mappingName I kept as “AUTO” for standard mappings..
    I need to change anything here for Custom Mappings???
    2. I didn’t mention anything here in split adapter in modules.
    Did I need to mention anything here when we do for custom mappings??
    Kindly let me know anyone has idea on this.
    Thanks&Regards
    Seema.

    You will also have to create this mapping on the BIC site.
    check the documentation on the classifier and functional acknowledgements
    Seeburger Classifier with customer mappings.
    In the manual Functional Acknowledgement For SAP XI3.0, Configuration Guide this is described. I add a description of how I have configured it at another customer
    In the Sender Communication Channel the classifier modules are configured (localejbs/SeeClassifier). This module expects some parameters:
    Parameter               Value
    attID                    ClassifierAtt
    classifierMappingID          XXXX (Choose something for XXXX)
    destSourcMsg               MainDocument
    showInAuditLog          true
    The parameter “mappingName” of module localejbs/Seeburger/CallBicXIRaBean should be set to AUTO otherwise the classifier functionality won’t work.
    In the BIC Mapping Designer now you have to create a program called Edifact_XXXX (have a look at page 40 of the manual)
    I generated a mapping called Edifact_XXXX from the message Edifact_service with the programs “CreateXMLMessage”, “CreateMappingXMLToEdi”, “CreateMappingEdiToXML”.
    After this I adjusted the generated program in the UNH segment I added the following rules:
    if name$ = "See_E2X_ORDERS_UN_D96B"
       copy "E2X_ORDERS_UN_D96B" to name$;
    endif
    With this code you change the mapping name that is called in the BIC to convert the EDIFACT message to XML. Or other functionalities.
    The mapping that you use here should be the same as configured in the Splitter of the Seeburger FrontEnd
    Screen prints:
    Configuration of Sender Communication Channel
    BIC MD: Generation programs
    BIC MD: New generated mapping Edifact_xxxx from message Edifact_Service
    BIC MD:Adjustment in mapping program Edifact_XXXX
    Seeburger FrontEnd Splitter configuration

  • APD query key date with variable for time dependent MD display attributes

    Hello,
    In a APD I use a query as a source with a query key date that is filled with a customer exit variable.
    When I run the query as a user, the time dependent MD display attributes look fine. However, when I use the query in an APD, I get no values for the time dependent display attributes.
    Any suggestions?
    Thanks

    Hi,
    Try to run query using RSCRM_BAPI Tcode, this you can also schedule in background
    Thanks
    Reddy

  • [svn:fx-trunk] 12912: With TLF 571 checked in we can now revert the MXML 2009 changes for how the id language attribute is processed .

    Revision: 12912
    Revision: 12912
    Author:   [email protected]
    Date:     2009-12-14 12:08:35 -0800 (Mon, 14 Dec 2009)
    Log Message:
    With TLF 571 checked in we can now revert the MXML 2009 changes for how the id language attribute is processed.
    An unqualified id property will no longer be seen as a setter for a normal public, writable, non-static "id" property - which matches Flex 3 behavior.
    As in earlier versions of Flex, the mechanism to retain MXML id attribute information at runtime is to implement mx.core.IMXMLObject. The compiler will generate a call to the intialized() method and pass in the id information.
    Note: One exception to this rule seems to be UIComponent which instead get id attribute information via mx.core.IDeferredInstantiationUIComponent (although there seems to be a TODO in the codebase to remove this mechanism and thus should not be relied on by third parties).
    QE notes: Please add tests for the TLF id property on flow elements (div, span, p, etc).
    Doc notes: Please check that we have not documented
    Bugs: N/A
    Reviewer: Paul
    Tests run: Checkintests, local test cases.
    Is noteworthy for integration: Yes
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicEleme nt.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.jav a
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/Type.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/reflect/TypeTable.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/init/ValueInitializer.ja va
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IID.as

    This is a duplicate post.  This should be locked to avoid further confusion.
    My CSS wont change
    Nancy O.

  • JAXB as standard API for Java Mappings in XI?

    Hi there,
    Has anyone on this forum implemented Java mappings in XI using JAXB (reference implementation for XML/JAVA data bindings of SUN)?
    If Yes, can you please share any experiences?
    We're considering to use this API for Java Mappings in XI but first would like to get more background info.
    Cheers,
    Rob.

    Hi Roberto,
    Have tried implementing Java mapping using JAXB technique couple of years ago. However I was not able to test the mapping in XI/PI environment.
    <ul>
    <li>There is no in built support for JAXB from SAP XI.</li>
    <li>There is no documentation available from SAP on JAXB hence it is difficult to implement the mapping.</li>
    <li>We have to import JAXB specific jars along with the mapping code. my attempt to execute the mapping test in IR tool was unsuccessful It was running fine in standalone mode in local PC </li>
    </ul>
    [My question on SDN on same topic..|Java Mapping Using JAXB [Java Arch for XML Binding];
    Thanks and regards,
    Ananth

  • Report for initial fill of marketing attributes for contact persons

    Hello,
    i have an excel document with contact persons and marketing attributes.
    What way do you recommend to bring this attributes into SAP CRM?
    The contact persons are already in SAP CRM.
    Thank you
    Best regards
    Manfred

    Hi Manfred - ELM, is what we use to update contacts for all information, including marketing attributes.
    If you don't have the contact in CRM...Step 1 - From the file that you have, just map the contact details and ELM the file to create contacts. Step 2 - You have to add the contact IDs to the file now and this time create a mapping format to update the contact and marketing attributes.
    In the mapping format that you would create, marketing attributes can be assigned from the file to be ELM'ed.
    Thanks
    Nikhil

  • Scripts for SAP mappings

    To generate the scripts for SAP mappings:
    - From the Warehouse Module Editor menu, choose Module then Generate.
    - The Generation Mode dialog
    hi i don't find the "generation mode dialog". where i find it?
    robson
    thanks.

    hi,
         the reboot of a system can be of broadly two types.
    1) done by the user
    2) abrupt shutdown say due to power failure.
       if you closely look at the file inittab under /etc/ you will find different files are executed for different run levels. For powerfailure also there is a script called powerfail under /etc/init.d/. with different options.
    under init.d directory you can find all the scripts for different run levlels starting from rc0-rc6, halt named script  , and reboot named script.
    . So to solve your problem you can write a script and execute it under this files. Changing all these files are not at all recommended as any mistake can lead to a system halt state. But still we can make the changes if we know what are we doing and definitely you can try if are having a test system with you.
    the logic will go something like this:-->
    1) for shutdown
        respawn a new shell
        login as <sid>adm
        execute the command i.e stopsap
        exit from that user
    same goes for startup also.
    now only you have to run this script in the appropriate files at appropriate places(most important).
    but the main problem comes when system goes down as sap system takes time to stop so you have to make your OS wait uptill that which may be a tedious task.
    . the above discussion was keeping SUSE linux enterprise server in mind.
    Please do not make any changes in the above mentioned file if you  are running a crucial 
    system on that OS. try only on  a test system.
    revert back in case of any query..
    cheers,
    yatindra
    null

  • "ADF Databinding for TopLink" - only one record?

    I went through this tutorial <http://otn.oracle.com/products/jdev/collateral/tutorials/9050/toplinkdatabinding_tut.html> and have successfully run it in the IDE, however, it only ever displays one record -- the paging buttuns don't seem to do anything.
    The only step where I think I might have introduced some error was in the renaming of the 'untitled.uix' file -- so for a while I would up with two uix files, and perhaps my struts flow page is not right.
    Should the 'browseDepartmentsDataAction' be pointing at itself?

    Ben,
    We are now successfully deploying from JDev 10g preview to OC4J 9.0.4. We /don't/ do the 'install runtimes' from JDev, and our WEB-INF\lib looks like this:
    03/17/2004  06:30p             235,178 bc4j_jclient_common.jar
    03/17/2004  06:30p             780,340 bc4jct.jar
    03/17/2004  06:30p             300,697 bc4jhtml.jar
    03/17/2004  06:30p           1,556,232 bc4jmt.jar
    03/17/2004  06:30p              40,883 bc4juixtags.jar
    03/17/2004  06:30p             259,265 collections.jar
    03/17/2004  06:30p             118,726 commons-beanutils.jar
    03/17/2004  06:30p             165,119 commons-collections.jar
    03/17/2004  06:30p             109,096 commons-digester.jar
    03/17/2004  06:30p             112,307 commons-el.jar
    03/17/2004  06:30p              22,379 commons-fileupload.jar
    03/17/2004  06:30p              63,980 commons-lang.jar
    03/17/2004  06:30p              31,605 commons-logging.jar
    03/17/2004  06:30p              46,865 commons-validator.jar
    03/17/2004  06:30p             133,694 datatags.jar
    03/17/2004  06:30p              16,982 graphtags.jar
    03/17/2004  06:30p              65,368 jakarta-oro.jar
    03/17/2004  06:30p               3,086 jsp-el-api.jar
    03/17/2004  06:30p           5,676,773 oc4j.jar
    03/17/2004  06:30p             815,637 ojc.jar
    03/17/2004  06:30p               3,503 oracle-el.jar
    03/17/2004  06:30p              29,871 regexp.jar
    03/17/2004  06:30p              53,389 servlet.jar
    03/17/2004  06:30p              55,994 share.jar
    03/17/2004  06:30p             498,051 struts.jar
    03/17/2004  06:30p           3,539,611 toplink.jar
    03/17/2004  06:30p           2,752,707 uix2.jar
    03/17/2004  06:30p               2,147 uixadfrt.jar
    03/17/2004  06:30p             974,690 xercesImpl.jar
    03/17/2004  06:30p             186,926 xmlcomp.jar
    03/17/2004  06:30p             687,065 xmlparserv2.jarIt sounds to me like something in your workspace is not in synch for the taglibs you're using. Note that JDeveloper automatically ads tld files to your project when you select taglibs, but if you're keeping your project in CVS and didn't add those files, then they may not be present if you check out your project on another machine.
    Also, we still have to copy the sessions.xml from classes/META-INF to classes/ in order for TopLink to find it.
    The sealing violation is probably from either a duplication of jars on your path, or JDeveloper opened up a jar into your WEB-INF/classes directory and the class is complaining that it's not in its original jar (or something like that.)
    Hope that helps...

Maybe you are looking for