Problem with undesired rounding of entity attributes of type Number

Hello,
We have an entity object based on an oracle database table. Some of the columns of the table are of type NUMBER ( without specified precision and scale) and are mapped to attributes of type oracle.jbo.domain.Number as is the oracle recommendation and default behaviour. We have a view object based on this entity. We are using JSF <af:table> component to show and edit the contents of the view object.
In the database table we have values in the NUMBER columns like:
-.0000000000000696421833421346
8029.19708029197
-364.9641231232332
The problems is that these values get rounded to the 3th digit after the decimal point, without to have specified any formatting. The numbers shown in the <af:table> look like:
-0
8029.197
-364.964
We tested the ViewObject with the Business Component Browsers and there the values looked fine. In the JSF page we tried to comment out the <af:converter> but the result is the same.
The problem is where these values are rounded to the 3th digit after the decimal point. Is that an ADF configuration?
Please reply ASAP, the case is urgent, we are waiting on that to move our system to production.

Hi
I have a similar problem.
I want to load xml data into a table using the OracleXmlSave class.
There are long numbers to import (7638286488771946140)
When the destination field is of type NUMBER(38), everything is alright. But when there is no precision specified (just NUMBER) the numbers are rounded to 14 digits
7638286488771946140 -> 7638286488771950000
When i insert numbers with TOAD, everything's alright, even with "just-NUMBERs".
Any ideas?
Daniel
Message was edited by:
user548995
Message was edited by:
user548995

Similar Messages

  • Problem with non-container managed entity manager

    i am working on a project, in which i am using entity beans.i use netbeans, glassfish as application server and toplink as persistence provider .
    i created a java class that handles all the operations with the entitys, which means i using non-container managed entity manager.
    in the constructor
    try{
                EntityManagerFactory emf = Persistence.createEntityManagerFactory("voidPU");
                entityManager = emf.createEntityManager();
            catch(Exception ex){
                throw new EJBException(ex.getMessage());
            }then i call a function in this class from a servlet
    the code of the function
    List users = null;
            try {
                ProgLanguages progLanguage = entityManager.find(ProgLanguages.class, languageId);
                users = (List) progLanguage.getUserIdCollection();
            catch(IllegalStateException illegalStateException){
                throw new EJBException(illegalStateException.getMessage());
            catch(IllegalArgumentException illegalArgumentException) {
                throw new EJBException(illegalArgumentException.getMessage());
            }i got an IllegalArgumentException saying Unknown entity bean class: class vanguard.server.entity.ProgLanguages, please verify that this class has been marked with the @Entity annotation
    what confuses me is that sometimes it works and most of the time it does not work, have i made anything wrong?, or there is a problem with any of the tools netbeans, glassfish, or toplink?

    Is it always the same entity that is reported as 'unknown' ? You mention that it works sometimes but is it the same deployment and the same code that works? The first thing I would verify is that the ear is being created as expected by netbeans. Check the persistence.xml file and verify that all of the classes are listed that will be used as entities.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem with JavaScript code in Page Attributes, modal popup...

    Hello all!
    I'm encountering a problem with a modal popup I wrote in JavaScript.
    h3.
    The situation*
    A user sees an interactive report with rows that are clickable, so these rows are links. Upon clicking the name of something in a row, some items get a certain value and a modal popup shows on the screen. In this modal popup, there are details regarding that particular row the user has clicked, but the problem_ here is...
    The modal popup closes itself only seconds after it has been opened.
    This must be because I've probably made a mistake somewhere in my code, but I just can't figure out where... It also appears that when I click on a row link, the popup shows, but the progress bar of my toolbar seems to show a loading bar (as if I refreshed the page).
    h3.
    My code*
    This code is located in the _"Function and Global Variable Declaration"_ part, under the _"JavaScript"_ tab. Code is in the _"Page Attributes"_ of my page 24.
    function showhide(x){
    $x('REGION1').style.display = ( x == 'REGION1') ? 'block' : 'none';
    $x('REGION2').style.display = ( x == 'REGION2') ? 'block' : 'none';
    $x('REGION3').style.display = ( x == 'REGION3') ? 'block' : 'none';
    $( function(){
      $('#ModalForm').dialog(
         modal: true,
         autoOpen: false,
         width: 500,
         height: 350,
         buttons:{ Close: function(){closeForm();}        
    function openForm()
        $('#ModalForm').dialog('open');
    function closeForm()
        $('#ModalForm').dialog('close');
        $(document).ready(function() {
            $('a.temppop').click(function() {
                openForm();
        });This code is located in the _"Header Text"_ part, under the _"Header"_ tab. Code is in the _"Page Attributes"_ of my page 24.
    <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css" type="text/css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>This code is located in the _"Column Link"_ part, you get there by going to the _"Report Attributes"_ of the region called _"Template overview"_ on page 24. This region is an interactive report.
    Link Text: #FOODTEMPLATENAME#
    Link Attributes: class="temppop"
    Target: Page in this Application
    Page: 24
    Item 1, name: P24_MEALID; item 1, value: #MEALTYPEID#
    Item 2, name: P24_TEMPLATEID; item 2, value: #FOODTEMPLATEID#So basically I call the function to open the modal popup by the class name. When a link with that class name in it is clicked, it opens the popup.
    To remind you of the problem, the modal popup closes seconds after it has been opened. How do I fix this?
    Thanks in advance.
    (APEX version 4.1.1.00.23)

    Come on guys... I really need to know this. :(

  • Problem with Persistent Object as Reference Attribute of Persistent Object

    Hello All,
    I have a problem with a persistent class that contains a reference attribute to another persistent class.  I can write the reference object attribute to the DB but when I read the reference attribute back from the DB the object is null.  Allow me to explain...
    I have two tables; one is a data table with one key field of type OS_GUID, the second is a mapping table with several business key fields and two further fields; an instance GUID and a class identifier GUID.  The data table is used to contain all the data for an object.  The mapping table is used to hold a relationship between the GUID assigned in the data table and the business key.  The mapping table has been structured in this way by following the help here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/df/e785a9e87111d4b2eb0050dadfb92b/frameset.htm
    and the field mapping in persistent class for the mapping table has been mapped following the help here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/06/f23c33638d11d4966d00a0c94260a5/frameset.htm
    The code I use to create entries in the data and mapping table is:
    <-snip->
      DATA:
        gv_blank_data_guid TYPE REF TO zcl_ps_data,
        gv_data_guid       TYPE        os_guid,
        go_data_ps         TYPE REF TO zcl_ps_data,
        go_data_agent      TYPE REF TO zca_ps_data,
        go_data_map_ps     TYPE REF TO zcl_ps_data_map,
        go_data_map_agent  TYPE REF TO zca_ps_data_map,
        go_exc             TYPE REF TO cx_root.
      go_data_agent = zca_ps_data=>agent.
      go_data_map_agent = zca_ps_data_map=>agent.
      TRY.
    Check if there's already data with the business key on the DB
          go_data_map_ps = go_data_map_agent->get_persistent(
                             i_data_ref     = iv_data_ref
                             i_action       = iv_action ).
    ... if there is then exit.
          EXIT.
        CATCH cx_root INTO go_exc.
      ENDTRY.
      TRY.
    Create the data...
          go_data_ps = go_data_agent->create_persistent(
                           i_root_guid = gv_blank_data_guid
                           i_req_date  = iv_req_date ).
          TRY.
    ... finally, write the new data to the data business key map table
              go_data_map_ps = go_data_map_agent->create_persistent(
                                 i_data_ref     = iv_data_ref
                                 i_action       = iv_action
                                 i_data_guid    = go_data_ps ).    "note1
            CATCH cx_root INTO go_exc.
          ENDTRY.
        CATCH cx_os_object_not_found.
      ENDTRY.
      COMMIT WORK.
    <-snip->
    The fact that it is possible to pass the object GO_DATA_PS in the call to GO_DATA_MAP_AGENT (the line that I've put the comment "note1" on) indicates to me that the reference to the data persistent object can be written to the DB by the mapping persistent object.  After executing the above code the mapping table object and class identifier fields are populated.  Also, if multiple entries are written to the tables then the class identifier field in the mapping table is always the same and the object ID is different as expected.
    However, the problem I have is if I read an object from the DB using the business key with the following code:
    <-snip->
      DATA:
        gv_req_date        type        datum,
        gv_data_guid       TYPE        os_guid,
        go_data_ps         TYPE REF TO zcl_ps_data,
        go_data_agent      TYPE REF TO zca_ps_data,
        go_data_map_ps     TYPE REF TO zcl_ps_data_map,
        go_data_map_agent  TYPE REF TO zca_ps_data_map,
        go_exc             TYPE REF TO cx_root.
      go_data_agent = zca_ps_data=>agent.
      go_data_map_agent = zca_ps_data_map=>agent.
      TRY.
    Read data mapping with the business key
          go_data_map_ps = go_data_map_agent->get_persistent(
                             i_data_ref     = iv_data_ref
                             i_action       = iv_action ).
    ... then read the data.
          TRY.
              CALL METHOD go_data_map_ps->get_data_guid
                RECEIVING
                  result = go_data_ps.
            CATCH cx_os_object_not_found.
          ENDTRY.
        CATCH cx_root INTO go_exc.
      ENDTRY.
    <-snip->
    At no point during this code are the attributes of the object of the persistent class for the data table populated with the contents of the fields of the data table referenced as the attribute of the mapping table.  To clarify, when viewing the object in the debugger all the attributes of the mapping object that are simple table fields are populated with the values of the fields of in the mapping table, however, the attributes of the object that represents the persistent class for the data table are not populated with the fields of the data table.  I had hoped that by reading the mapping table object the data object would automatically be populated.  Is there another step I need to perform to populate the data object?
    I'm sorry if the above is hard to follow.  Without being able to provide screenshots it's difficult to explain.
    If someone has managed to store references to persistent objects in a table and then read the references back could you list the steps you went through to create the persistent classes and include the code that reads the objects please?  The code I have almost works, I must be just missing some subtle point...
    Thanks in advance,
    Steve.

    Hi Andrea,
    The iObject being replicated at item level for Service Complaints is the SAP standard behaviour.
    Generally we raise complaint refering to some sales or service issues. In your scenario you are trying to create a complaint based on an iObject, then you have to mention the corresponding product details. I dont see any business requirement not to copy the iObject product at the item level.
    If you want it then I think only you have to write a Z program for it.
    Hope this helps!
    Regards,
    Chethan

  • Problem with the round function using Date

    Hi,
    I have a problem with round function for Date. The input is the four digit year which was picked out from say SYSDATE.
    In these scenarios the original value should be rounded up and should get the output as shown under rounded column.
    Scenario1
    Original Rounded
    2020 ---> 2020
    2021 ---> 2020
    2022 ---> 2020
    2023 ---> 2020
    2024 ---> 2020
    2025 ---> 2025
    2026 ---> 2025
    Scenario2
    Original Rounded
    2020 ---> 2020
    2021 ---> 2025
    2022 ---> 2025
    2023 ---> 2025
    2024 ---> 2025
    2025 ---> 2030
    2026 ---> 2030
    Scenario3
    Original Rounded
    2020 ---> 2020
    2021 ---> 2020
    2022 ---> 2020
    2023 ---> 2025
    2024 ---> 2025
    2025 ---> 2025
    2026 ---> 2025
    Can anyone help with this....Urgent Please
    Thanx for your time

    1.
    SQL> select n,n-mod(n,5) rnd from test;
             N        RND
          2020       2020
          2021       2020
          2022       2020
          2023       2020
          2024       2020
          2025       2025
          2026       2025
    2.
    SQL> select n,n+(case when mod(n,10) = 0 then 0
      2                   when mod(n,10) < 5 then 5-mod(n,5)
      3                   else 10-mod(n,10)
      4              end) rnd
      5  from test;
             N        RND
          2020       2020
          2021       2025
          2022       2025
          2023       2025
          2024       2025
          2025       2030
          2026       2030
    7 rows selected.
    3.
    SQL> select n,n+(case when mod(n,10) < 3 then mod(n,10)*-1
      2                   when mod(n,10) < 8 then 5-mod(n,10)
      3                   else 10-mod(n,10)
      4              end) rnd
      5  from test;
             N        RND
          2020       2020
          2021       2020
          2022       2020
          2023       2025
          2024       2025
          2025       2025
          2026       2025
          2027       2025
          2028       2030
          2029       2030
          2030       2030
    11 rows selected.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Netbeans + MySQL + Tomcat (problem with: not a known entity type)

    I try to create WebApplication with Stripes in netbeans, but I have problem with connect to DB.
    I have this code:
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("jpaPU");
    EntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    Person p = new Person();
    p.setFirstName("name1");
    p.setLastName("name2");
    try
    em.persist(p);
    } catch(Exception e)
    System.out.println(e.toString());
    em.getTransaction().commit();
    em.close();
    emf.close();But in try{..} is em.persist(p); ant it prints into console this error: "java.lang.IllegalArgumentException: Object: db_entity.Person@13c7c35 is not a known entity type."
    I do not know where is problem. Could you help me, please?
    This is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" 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">
      <persistence-unit name="jpaPU" transaction-type="RESOURCE_LOCAL">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <properties>
          <property name="toplink.jdbc.user" value="root"/>
          <property name="toplink.jdbc.password" value="adminadmin"/>
          <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/test"/>
          <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
          <property name="toplink.ddl-generation" value="create-tables"/>
        </properties>
      </persistence-unit>
    </persistence>When I run my application I can see in console:
    [TopLink Info]: 2008.11.15 09:01:13.265--ServerSession(4794542)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    [TopLink Info]: 2008.11.15 09:01:13.578--ServerSession(4794542)--file:/D:/Workspace/NetBeansProjects/jpa/build/web/WEB-INF/classes/-jpaPU login successful..so, I hope persistence.xml is good
    This is my class Person.java:
    @Entity
    public class Person implements Serializable {
        @Id
        @GeneratedValue
        private Long id;
        private String firstName;
        private String lastName;
        public void setId(Long id) { this.id = id; }
        public Long getId() { return id; }
        public String getFirstName() {  return firstName; }
        public void setFirstName(String firstName) { this.firstName = firstName;  }
        public String getLastName() { return lastName; }
        public void setLastName(String lastName) { this.lastName = lastName;  }Please, help me.

    I had the same "is not a known entity type" error when running under a development environment Eclipse/Tomcat using Toplink. But the almost same code and configuration worked when running under Eclipse as a stand-alone Java app.
    Eventually I figured out (actually trial and error), that I had checked the toplink-essentials.jar libraries to be exported under: Eclipse Project/Java Build Path/Order and Export. I was messing around with libraries. Unchecking the export option there fixed the problem.
    While its unlikely that this could have been your exact problem, I would check the library order and export configurations. Looking at other message boards about this problem, many seemed to have been caused or fixed by playing with their libraries.

  • MVC Problem with getter method of table attribute in model class

    Hi,
    I am on 620 SP34. I am writing a bsp application with mvc. One of the model classes has an attribute of type table. I use this attribute in a htmlb-tableview and '//MODEL/ZMY_TAB' for data binding. If I try to activate a getter method for this attribute, the application dumps with exception <i>BSP exception: Structure component with name "ZMY_TAB" does not exist</i>. I find the SAP source, that raising this exception (see below). The source code looks like: <i>"I don't support getter methods for tables in attribute path"</i>! The setter method works fine, so I am at a loss. Has anyone of you wrote a getter method for an table attribute in bsp-mvc? Have I to consider anything special?
    Thanks,
    Carsten
    Main Program CL_BSP_MODEL==================CP
    Source code of CL_BSP_MODEL==================CM00Z
    METHOD IF_BSP_MODEL_BINDING~GET_ATTRIBUTE_DATA_REF
           * check if attribute exists for binding!                                   
             if exists_attribute( l_name ) is initial.                                
               return.                                                                
             endif.                                                                               
    * setter or getter defined? Not supported for DATA REF requests            
             if get_getter( attribute_name = l_name ) is not initial.                 
               raise exception type cx_bsp_inv_component                              
                 exporting name = l_name.                                             
             endif.                                                   

    You have two options:
    1. Make your attributes public. It should work fine.
    2. If you need to process the attribute values before it is used, you can make the attribute private but will need three methods
    GET_T_ZMY_TAB that returns the table
    SET_T_ZMY_TAB that sets the values
    GET_M_T_ZMY_TAB that returns DDIC information about the attribute. The same holds good for structures(Change to GET_S_ and GET_M_S_ ) and simple attributes(Change to GET_ and GET_M_).
    The set and get methods are kind of documented at http://help.sap.com/saphelp_nw04/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/content.htm but there is no mention of the GET_M_ methods. I could not find one single document on the Model part MVC.
    Once I added the GET_M_XYZ methods to my attributes, my BSPs started to work fine.
    Cheers
    Sreekanth

  • Problem with function, need to return a very large number

    I have a function that is used to derive a number by using a defined algorithm. We have tested it many times in our 'development' region and it works. We moved it to our 'UAT' region and now the function is giving an error. The data is the same in both oracle instances. So.... dba's are telling me it is the function. At this point, I don't know what to do.
    Can I declare "RESULT" in a function so that it can return a number this big: 2.00023880306E24?
    Oracle returns -6502 error in the deriveNewNum function.
    Here is the error:
    *** ERROR in deriveNewNum.fnc
    SQLCODE: -6502
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    BEGIN TF1ID; END;
    ERROR at line 1:
    ORA-06503: PL/SQL: Function returned without value
    ORA-06512: at DERIVENEWNUM", line 93
    ORA-06512: at line 1

    Hi,
    Did you look up that error in the error messages manual?
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28278/e4100.htm#sthref1889
    Is there something there that you didn't understand?
    <h3>ORA-06502: PL/SQL: numeric or value errorstring </h3>
    Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
    Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
    If you declare variables like this:
    x     NUMBER;
    y     NUMBER (20, 10);there woul be no problem assigning a value like 2E24 to x, but there would be if you tried it with y.
    How are your varaibles declared.
    Whenever you have a problem with your code, post your code.
    Always say what version of Oracle you're using.

  • Counter KF with 1 & 0 and difference between data type NUMBER (DEC) and INTEGER (INT4)

    Hi,
    I need to create a counter kf which should populate 1 and 0 to this counter field. Please let me know is there any difference between data type
    NUMBER (DEC) and INTEGER (INT4).
    Please suggest.
    Thanks & Regards,
    Pavan kumar

    Hi Pavan,
    The basic difference between Number(DEC) and INT4 is its internal storage in system.
    For Number (DEC) - Value internally stored as packed number with 3 decimal places whereas INT 4 as 4 byte integer without decimal places.
    For counter KF, you can go for INT 4.
    Hope this helps.
    Thanks

  • Noob Question: Problem with Persistence in First Entity Bean

    Hey folks,
    I have started with EJB3 just recently. After reading several books on the topic I finally started programming myself. I wanted to develop a little application for getting a feeling of the technology. So what I did is to create a AppClient, which calls a Stateless Session Bean. This Stateless Bean then adds an Entity to the Database. For doing this I use Netbeans 6.5 and the integrated glassfish. The problem I am facing is, that the mapping somehow doesnt work, but I have no clue why it doesn't work. I just get an EJBException.
    I would be very thankfull if you guys could help me out of this. And don't forget this is my first ejb project - i might need a very detailed answer ... I know - noobs can be a real ....
    So here is the code of the application. I have a few methods to do some extra work there, you can ignore them, there are of no use at the moment. All that is really implemented is testConnection() and testAddCompany(). The testconnection() Methode works pretty fine, but when it comes to the testAddCompany I get into problems.
    Edit:As I found out just now, there is the possibility of Netbeans to add a Facade pattern to an Entity bean. If I use this, everythings fine and it works out to be perfect, however I am still curious, why the approach without the given classes by netbeans it doesn't work.
    public class Main {
        private EntryRemote entryPoint = null;
        public static void main(String[] args) throws NamingException {
            Main main = new Main();
            main.runApplication();
        private void runApplication()throws NamingException{
            this.getContext();
            this.testConnection();
            this.testAddCompany();
            this.testAddShipmentAddress(1);
            this.testAddBillingAddress(1);
            this.testAddEmployee(1);
            this.addBankAccount(1);
        private void getContext() throws NamingException{
            InitialContext ctx = new InitialContext();
            this.entryPoint = (EntryRemote) ctx.lookup("Entry#ejb.EntryRemote");
        private void testConnection()
            System.err.println("Can Bean Entry be reached: " + entryPoint.isAlive());
        private void testAddCompany(){
            Company company = new Company();
            company.setName("JavaFreaks");
            entryPoint.addCompany(company);
            System.err.println("JavaFreaks has been placed in the db");
        }Here is the Stateless Session Bean. I added the PersistenceContext, and its also mapped in the persistence.xml file, however here the trouble starts.
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(mappedName="Entry")
    public class EntryBean implements EntryRemote {
        @PersistenceContext(unitName="PersistenceUnit") private EntityManager manager;
        public boolean isAlive() {
            return true;
        public boolean addCompany(Company company) {
            manager.persist(company);
            return true;
        public boolean addShipmentAddress(long companyId) {
            return false;
        public boolean addBillingAddress(long companyId) {
            return false;
        public boolean addEmployee(long companyId) {
            return false;
        public boolean addBankAccount(long companyId) {
            return false;
    }That you guys and gals will have a complete overview of whats really going on, here is the Entity as well.
    package ejb;
    import java.io.Serializable;
    import javax.persistence.*;
    @Entity
    @Table(name="COMPANY")
    public class Company implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
        @Column(name="COMPANY_NAME")
        private String name;
        public Long getId() {
            return id;
        public void setId(Long id) {
            this.id = id;
       public String getName() {
            return name;
        public void setName(String name) {
            this.name = name;
            System.err.println("SUCCESS:  CompanyName SET");
        @Override
        public int hashCode() {
            int hash = 0;
            hash += (id != null ? id.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 Company)) {
                return false;
            Company other = (Company) object;
            if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
                return false;
            return true;
        @Override
        public String toString() {
            return "ejb.Company[id=" + id + "]";
    }And the persistence.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" 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">
      <persistence-unit name="PersistenceUnit" transaction-type="JTA">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <jta-data-source>jdbc/sample</jta-data-source>
        <exclude-unlisted-classes>false</exclude-unlisted-classes>
        <properties>
          <property name="toplink.ddl-generation" value="create-tables"/>
        </properties>
      </persistence-unit>
    </persistence>And this is the error message
    08.06.2009 10:30:46 com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNUNG: ACC003: Ausnahmefehler bei Anwendung.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
            java.rmi.RemoteException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.; nested exception is:
            javax.transaction.RollbackException: Transaktion für Zurücksetzung markiert.
            at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
            at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
            at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
            at ejb.__EntryRemote_Remote_DynamicStub.addCompany(ejb/__EntryRemote_Remote_DynamicStub.java)I spend half the night figuring out whats wrong, however I couldnt find any solution.
    If you have any idea pls let me know
    Best regards and happy coding
    Taggert
    Edited by: Taggert_77 on Jun 8, 2009 2:27 PM

    Well I don't understand this. If Netbeans created a Stateless Session Bean as a facade then it works -and it is implemented as a CMP, not as a BMP as you suggested.
    I defenitely will try you suggestion, just for curiosity and to learn the technology, however I dont have see why BMP will work and CMP won't.
    I also don't see why a stateless bean can not be a CMP. As far as I read it should not matter. Also on the link you sent me, I can't see anything related to that.
    Maybe you can help me answering these questions.
    I hope the above lines don't sound harsh. I really appreciate your input.
    Best regards
    Taggert

  • Problem with ejb 3.0 entity beans with manyToMany relationship

    Hello everyone!
    I am using struts 1.2.9 and java ee 5 sdk update 2 for my enterprise application. Besides others i have these entity beans Targetgroup.java and City.java, (i would upload file but i do not know how:)
    with manytomany relationship with join table.
    when user updates Targetgroup, by clicking on web page with checkboxes and textfields, struts dispatch action calls following method stateless bean:
    public void update(String firmId, String targetgroupId, String newGender, String newMinYearsOld, String newMaxYearsOld, String[] newCities) {
    TargetgroupPK pkForUpdate = new TargetgroupPK(targetgroupId, firmId);
    Targetgroup targetgroupForUpdate = find(pkForUpdate);
    targetgroupForUpdate.setGender(newGender);
    targetgroupForUpdate.setMinyearold(Integer.parseIn t(newMinYearsOld));
    targetgroupForUpdate.setMaxyearold(Integer.parseIn t(newMaxYearsOld));
    //pronalazenje gradva za koje je vezana ciljna grupa
    Collection<City> newCitiesCollection = new ArrayList<City>();
    for(int i = 0; i < newCities.length; i++){
    String tmp_city_name = newCities;
    City city_obj = cityFacade.find(tmp_city_name);
    newCitiesCollection.add(city_obj);
    targetgroupForUpdate.setCityidCollection(newCities Collection);
    parameter newCities represents names of cities which user checked on his update page. When the page is showen to him some cities are allready check because they were connected with Targetgruoup when it was created (targetgroup).
    this code throws following exception:
    [#|2007-07-26T12:13:36.993+0200|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.container.web|_Threa dID=16;_ThreadName=httpWorkerThread-8080-0;_RequestID=f79d9c50-86b0-4b6c-96ab-97956dfb39c1;|StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
    javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
    javax.transaction.RollbackException: Transaction marked for rollback.
    at
    .com.sun.enterprise.web.connector.grizzly.WorkerTh read.run(WorkerThread.java:75)
    javax.ejb.EJBException: Transaction aborted; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback.
    at com.sun.ejb.containers.BaseContainer.completeNewTx (BaseContainer.java:3659)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx( BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(Ba seContainer.java:1247)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHan dler.invoke(EJBLocalObjectInvocationHandler.java:1 92)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHan dlerDelegate.invoke(EJBLocalObjectInvocationHandle rDelegate.java:71)
    at $Proxy149.update(Unknown Source)
    at audiotel.sms.actions.backoffice.TargetgroupDispatc hAction.updateOrDelete(TargetgroupDispatchAction.j ava:132)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:270)
    at org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:187)
    at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:431)
    at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:236)
    at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:727)
    com.sun.enterprise.web.connector.grizzly.WorkerThr ead.run(WorkerThread.java:75)
    |#]
    exceprion is throwen ONLY when in parameter newCities are city names allready connected to Targetgroup. when NewCities contains names of
    City objects which are not connected to Targetgroup it works fine, but it's of no use for me, because user must be able to add or remove certian cities from relaionship with Targetgroup. I think it's because there are rows in join table that contain primary keys of city and targetgroup which are connected so perisistence manager cann't write them again.
    i thought it was going to figure it out by itself, and only update those rows.
    Does anyone know what is the problem and solution?
    Thanks! (forgive my spelling errors :)

    solved the problem!
    I moved code from sesion bean to struts action as follows:
    CityFacadeLocal cityFacade = lookupCityFacade();
    //prikupljanje novih podataka o ciljnoj grupi
    String newGender = ctf.getGender();
    String newMaxYears = ctf.getMaxyears();
    String newMinYears = ctf.getMinyears();
    String[] newSelectedCities = ctf.getSelectedCities();
    //niz imena gradova se prevodi u kolekcju objekata City
    Collection<City> newCitiesObjCollection = new Vector<City>();
    for(int i = 0; i < newSelectedCities.length; i++){
    String tmpCityName = newSelectedCities;
    City tmpCityObj = cityFacade.find(tmpCityName);
    newCitiesObjCollection.add(tmpCityObj);
    //setovanje novih podataka
    targetgroupForUD.setGender(newGender);
    targetgroupForUD.setMinyearold(Integer.parseInt(newMinYears));
    targetgroupForUD.setMaxyearold(Integer.parseInt(newMaxYears));
    targetgroupForUD.setCityidCollection(newCitiesObjCollection);
    //pozivanje update metdoe u session beany
    targetgroupFacade.edit(targetgroupForUD);
    //korisnik se vraca na stranu sa svim postojecim ciljnim grupama
    forward = mapping.findForward("backend.targetgroups");
    and now it works fine. I guess probelm was same transaction scope for Targetgroup and City entities. Now when they are separated it works.
    Thanks!

  • Problem with ora:output and xmlns attribute

    Using lastest XDK.
    I am using the built in extension ora:output in a stylesheet running via XSQL called from a small java prg.
    I am using this to generate several html fragments that will get processed later on not by xsql or xml/xsl but by another java prg.
    I have specifed the output as html BUT when I look at the output some of the elements have an xmlns attribute added i.e. xmlns:ora="http://www.oracle.com/XSL/Transform/java"....
    Strange thing its not on all elements, "a", "tr", "td" tags are ok but "b", "br" and "table" have this attribute added.... HELP!!
    How do I stop this attribute getting added...
    Many thanks
    Rob
    PS I know if I use an "html" tag to wrap the output then only that element ends up with the xmlns attribute but I cant/dont want to do this as the prg running later will combine many of these fragments to create a single "real" html page.

    I'm not sure whether i understand your problem,
    It doesnot need using the binding attribute If you wanna updating the value of each rows in the datatable.
    below is a sample that updating each rows of a datatable
    jsp file
    <h:dataTable value="#[sampleBean.data}" var="row">
        <h:column><h:inputText value="#{row.col1}"/></h:column>
    </h:dataTable>
    <h:commandButton value="update" action="#{sampleBean.update}"/>BackingBean:
    SampleBean.java
    public class Samplebean{
      private SampleRow[] rows[];
      public SampleRow[] getData{
              return rows;
      public String update(){
          for(int i=0; i<rows.length; i++){
             rows.update();
    return "success";
    SampleRow.java
    public class SampleRow{
      private String col1;
      public String getCol1(){
        return col1;
      public void setCol1(String col1){
        this.col1 = col1;
      public void update(){
         //write your code to save one row data to db/file here

  • Problem with local class, static private attribute and public method

    Hello SDN,
    Consider the following situation:
    1) I have defined a LOCAL class airplane.
    2) This class has a private static attribute "type table of ref to" airplane (array of airplanes)
    3) A public method should return the private static table attribute
    Problems:
    a) The table cannot be given as an EXPORTING parameter in the method because TYPE TABLE OF... is not supported and I get syntax errors. I also cannot define a dictionary table type because it is a local class.
    b) The table cannot be given as a TABLES parameter in the method because TABLES is not supported in the OO context.
    c) The table cannot be given as an EXPORTING parameter in the method defined as LIKE myStaticAttribute because my method is PUBLIC and my attribute is PRIVATE. ABAP syntax requires that all PUBLIC statements are defined before PRIVATE ones, therefore it cannot find the attribute to reference to with LIKE.
    I see only 2 solutions:
    a) Never ever use local classes and always use global classes so that I might define a dictionary table type of my class which I can then use in my class.
    b) Make the attribute public, but this goes against OO principles, and isn't really an option.
    Am I missing anything here, or is this simply overlooked so far?

    Hello Niels
    Since your class is local and, thus, only know to the "surrounding" application is does not really make sense to make it public to any other application.
    However, if you require to store instances of your local classes in internal tables simply use the most generic reference type possible, i.e. <b>OBJECT</b>.
    The following sample report shows how to do that. Furthermore, I believe it also shows that there are <u><b>no </b></u>serious inconsistency in the ABAP language.
    *& Report  ZUS_SDN_LOCAL_CLASS
    REPORT  zus_sdn_local_class.
    " NOTE: SWF_UTL_OBJECT_TAB is a table type having reference type OBJECT
    *       CLASS lcl_airplane DEFINITION
    CLASS lcl_airplane DEFINITION.
      PUBLIC SECTION.
        DATA:    md_counter(3)             TYPE n.
        METHODS: constructor,
                 get_instances
                   RETURNING
                     value(rt_instances)   TYPE swf_utl_object_tab.
      PRIVATE SECTION.
        CLASS-DATA: mt_instances    TYPE swf_utl_object_tab.
    ENDCLASS.                    "lcl_airplane DEFINITION
    *       CLASS lcl_airplane IMPLEMENTATION
    CLASS lcl_airplane IMPLEMENTATION.
      METHOD constructor.
        APPEND me TO mt_instances.
        DESCRIBE TABLE mt_instances.
        md_counter = syst-tfill.
      ENDMETHOD.                    "constructor
      METHOD get_instances.
        rt_instances = mt_instances.
      ENDMETHOD.                    "get_instance
    ENDCLASS.                    "lcl_airplane IMPLEMENTATION
    DATA:
      gt_instances      TYPE swf_utl_object_tab,
      go_object         TYPE REF TO object,
      go_airplane       TYPE REF TO lcl_airplane.
    START-OF-SELECTION.
      " Create a few airplane instance
      DO 5 TIMES.
        CREATE OBJECT go_airplane.
      ENDDO.
      gt_instances = go_airplane->get_instances( ).
      CLEAR: go_airplane.
      LOOP AT gt_instances INTO go_object.
        go_airplane ?= go_object.
        WRITE: / 'Airplane =', go_airplane->md_counter.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe<u></u>

  • Problem with jax-ws and optional attributes

    Hello,
    I'm developing some web services, starting by defining the object model in schemas, then doing WSDL first to define the services.
    I've come across a problem that appears to be caused by jax-ws not properly handling optional attributes. I've tried this with both 2.0 and 2.1ea3 and both fail the same way.
    I created a simplified test case to repeatably demonstrate the problem.
    The type definition for the object looks like this :
    <xsd:complexType name="TestObject" >
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="subId" type="xsd:integer" use="optional" />
    </xsd:complexType>
    And in the wsdl:
    <wsdl:message name="testRequest">
    <wsdl:part name="testrequest" type="mf:TestObject"/>
    </wsdl:message>
    <wsdl:operation name="testAction">
    <wsdl:input name="testRequest" message="mf:testRequest"/>
    <wsdl:output name="successResponse" message="mf:successResponse"/>
    </wsdl:operation>
    and the test code:
    public void testOptionalAttrs()
    TestObject testObj = new TestObject();
    testObj.setName("testName");
    //testObj.setSubId(2);
    MDSProvisioningResourcePortType resourceManager = factory.getGatewayResourceManager();
    boolean success = resourceManager.testAction(testObj);
    Running the test code with the 'setSubId' uncommented works.
    With the 'setSubId' call commented out out results in this error:
    javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
         at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:301)
         at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:124)
         at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:91)
         at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:225)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:121)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:69)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:541)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:497)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:392)
         at com.sun.xml.ws.client.Stub.process(Stub.java:213)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:238)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:212)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
         at $Proxy58.testAction(Unknown Source)
         at com.qualcomm.mf.prov.ProvisioningGatewayClientFactoryTest.testOptionalAttrs(ProvisioningGatewayClientFactoryTest.java:118)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
         at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
         at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
         at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
         at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
         at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException]
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:255)
         at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:64)
         at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:105)
         at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:292)
         ... 35 more
    Caused by: com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:224)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:239)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:302)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:661)
         at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:111)
         at com.sun.xml.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(CompositeStructureBeanInfo.java:71)
         at com.sun.xml.bind.v2.runtime.CompositeStructureBeanInfo.serializeBody(CompositeStructureBeanInfo.java:19)
         at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:663)
         at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:250)
         ... 38 more
    Caused by: com.sun.xml.bind.api.AccessorException: java.lang.NullPointerException
         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.java:33)
         at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.print(TransducedAccessor.java:199)
         at com.sun.xml.bind.v2.runtime.property.AttributeProperty.serializeAttributes(AttributeProperty.java:61)
         at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeAttributes(ClassBeanInfoImpl.java:295)
         ... 44 more
    Caused by: java.lang.NullPointerException
         at org.w3._2001.xmlschema.Adapter3.marshal(Adapter3.java:23)
         at org.w3._2001.xmlschema.Adapter3.marshal(Adapter3.java:1)
         at com.sun.xml.bind.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.java:31)
         ... 47 more
    So am I missing something or is jax-ws not handling optional attributes correctly?
    Thanks,
    Hank

    Hi,
    This is not a direct answer to your question. But if you want to build restful web services with Weblogic 10.3, why not use Jersey . It is the implementation of the new JAX-RS spec. In my experience, although Jersey is part of the Java EE 6 spec, it appears to work ok with Java EE 5 container like Weblogic 10.3.1. The [JAX-RS section of Java EE tutorial|http://java.sun.com/javaee/6/docs/tutorial/doc/giepu.html] is another good source of example code.
    Edited by: vamsee2 on Sep 25, 2009 12:38 PM

  • Problem with demo : Round-Tripping XML with Oracle9i

    Hi,
    We have recently installed a 9.2.0.1.0 database with the intention of trying some of the new XMLTYPE samples.
    I downloaded the demo : Round-Tripping XML with Oracle9i.
    The first part, Mapping XML into Oracle9i, worked fine.
    The second part, Re-composing XML from Oracle9i, doesn't seem to run.
    Here is what I get i SQLPLUS :
    (Step 1 to 15 is OK)
    SQL> create or replace type PURCHASEORDER_TYPE as object
    2 (
    3 "Reference" VARCHAR2(64),
    4 "Actions" SYS.XMLTYPE,
    5 "Requester" VARCHAR2(48),
    6 "User" VARCHAR2(32),
    7 "Reject" PURCHASEORDERREJECTION_TYPE,
    8 "CostCenter" VARCHAR2(3),
    9 "Vendor" VARCHAR2(32),
    10 "PONumber" NUMBER(10),
    11 "ShippingInstructions" PURCHASEORDERSHIPINST_TYPE,
    12 "SpecialInstructions" VARCHAR2(2048),
    13 "LineItems" SYS.XMLTYPE
    14 );
    15 /
    Type created.
    SQL> --script 16
    SQL> create or replace view PURCHASEORDERDOCUMENTS as
    2 select P.REFERENCE,
    3 sys_xmlgen(
    4 PURCHASEORDER_TYPE(
    5 P.REFERENCE,
    6 (
    7 select
    8 sys_xmlagg(
    9 sys_xmlgen(
    10 PURCHASEORDERACTION_TYPE(
    11 A.ACTIONEDBY,
    12 A.DATEACTIONED
    13 ),
    14 sys.xmlgenformattype.createFormat('Action')
    15 )
    16 ).extract('//Action')
    17 from PURCHASEORDERACTIONS A
    18 where A.REFERENCE = P.REFERENCE
    19 ),
    20 P.REQUESTER,
    21 P.USERID,
    22 PURCHASEORDERREJECTION_TYPE(
    23 R.REJECTEDBY,
    24 R.DATEREJECTED,
    25 R.COMMENTS
    26 ),
    27 P.COSTCENTER,
    28 P.VENDOR,
    29 P.PONUMBER,
    30 PURCHASEORDERSHIPINST_TYPE(
    31 S.SHIPTONAME,
    32 S.ADDRESS,
    33 S.PHONE
    34 ),
    35 P.SPECIALINSTRUCTIONS,
    36 (
    37 select
    38 sys_xmlagg(
    39 sys_xmlgen(
    40 PURCHASEORDERLINEITEM_TYPE(
    41 L.LINENO,
    42 L.DESCRIPTION,
    43 PURCHASEORDERPART_TYPE(
    44 L.PARTNO,
    45 L.QUANTITY,
    46 L.UNITPRICE
    47 )
    48 ),
    49 sys.xmlgenformattype.createFormat('LineItem')
    50 ),
    51 sys.xmlgenformattype.createFormat('LineItems')
    52 )
    53 from PURCHASEORDERLINEITEMS L
    54 where P.REFERENCE = L.REFERENCE
    55 )
    56 ),
    57 sys.xmlgenformattype.createFormat('PurchaseOrder')
    58 ) "PODOCUMENT"
    59 from PURCHASEORDERSTORE P,
    60 PURCHASEORDERREJECTION R,
    61 PURCHASEORDERSHIPINSTRUCTIONS S
    62 where R.REFERENCE = P.REFERENCE
    63 and S.REFERENCE = P.REFERENCE;
    View created.
    SQL> --script 17
    SQL> set heading off;
    SQL> set wrap on
    SQL> set pagesize 10000;
    SQL> set long 10000;
    SQL> select P.PODOCUMENT.getClobVal() from PURCHASEORDERDOCUMENTS P;
    select P.PODOCUMENT.getClobVal() from PURCHASEORDERDOCUMENTS P
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 1
    Has anyone had the same problem ?? I would appreciate any suggestions.
    Thanks,
    Frank

    I found the solution :
    The database was running with a multibyte characterset (UTF8).
    After changing that to WE8ISO8859P1 everything worked fine.
    It is strange that Oracle suggest to use UTF8 when installing the new database (9i)
    and on the other hand doesn't support multibyte charactersets for several of the XML-products.
    Cheers,
    Frank

Maybe you are looking for

  • IPod Mini to Ford Expedition adapter

    I just bought a used 2003 Ford Expedition. Just my luck, it has the factory in-dash 6 CD changer / head unit which does not have the external CD changer jack. The unit does not have a cassette player. It seems that nobody makes an iPod adapter for th

  • .mod file to be used by iMovie

    Hi, I have a JVC camera that produces .mod video files! Does someone knows the best way to use them within iMovie? Is there a specific plugin existing for this kind of files? Thanks for help

  • I have reset my iphone 4 but have lost my itunes purchases, how can i redownload them?

    My iphone 4 went into recovery mode so i had to reset to factory settings, in doing this i lost music that i had not backed up to my pc, is there a way of redownloading them??

  • My iP 4S auto goes on DFU mode (I think so) ?

    Hi all, My 4S (brand new) do not "wake up" when I press Sleep/Home button twice a day. So I must press and hold Sleep and Home about 10s then release Sleep button to restart. I restored to the lastest iOS (5.1.1) but this happens again. Can anyone he

  • Kareoke Style Patch in Mainstage

    Hello all, Wondering if you brainy people could help me brainstorm. I'm wondering if there's a way to get lyrics to scroll along with the playback of an audio file when using mainstage. I'm trying to get a little kareoke game going and was hoping the