You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by ja...@ws.apache.org on 2004/08/12 06:21:20 UTC

[jira] Commented: (JAXME-21) NullPointerException when using in global bindings

The following comment has been added to this issue:

     Author: Matt Magoffin
    Created: Wed, 11 Aug 2004 9:20 PM
       Body:
I got the idea to do this from the Sun JAXB documentation, and doing this exact <xs:javaType> conversion with the Sun RI does as expected, that is, it creates JAXB classes with Integer objects in place of 'int' primitives that marshall as expected. 

The JAXB spec seems refers to these "default Java datatype or its wrapper class" like the primitives, I got the impression that int/Integer, long/Long are interchangable in the JAXB spec... i.e. in section "6.9.3 Built-in Conversions":
-----
If the parse method is omitted, then a JAXB implementation must perform the following steps:

a. if javaType is not one of the primitive types or its corresponding
 wrapper class as shown in Table 6-2, "Built-In Conversions," on
 page 159, then it must result in an invalid customization as specified
 in Section 6.1.5, "Invalid Customizations." Skip steps b through d.

b. bind xmlType to its default Java datatype using the parse method for
 the xmlType defined in DatatypeConverter. If javaType is
 the same as the default Java datatype or its wrapper class, then skip
 steps b and c.
...
-----

Do you still think this xs:javaType is invalid?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JAXME-21?page=comments#action_37202

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JAXME-21

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JAXME-21
    Summary: NullPointerException when using <jaxb:javaType> in global bindings
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: JaxMe

   Assignee: 
   Reporter: Matt Magoffin

    Created: Fri, 6 Aug 2004 8:51 AM
    Updated: Wed, 11 Aug 2004 9:20 PM

Description:
When I add the following to a shema, XJC generates a NullPointerException:

<annotation>
  <appinfo>
    <jaxb:globalBindings>
      <jaxb:javaType name="java.lang.Integer" xmlType="xs:int"/>
    </jaxb:globalBindings>
  </appinfo>
</annotation>

(This is using the 0.3 release).



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org