You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2012/06/20 23:17:43 UTC

[jira] [Commented] (TOMEE-249) NPE on DatatypeConverter

    [ https://issues.apache.org/jira/browse/TOMEE-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397878#comment-13397878 ] 

Romain Manni-Bucau commented on TOMEE-249:
------------------------------------------

Hi,


can you try the snapshot please?

if it is still here can you provide a sample reproducing the error please?
                
> NPE on DatatypeConverter
> ------------------------
>
>                 Key: TOMEE-249
>                 URL: https://issues.apache.org/jira/browse/TOMEE-249
>             Project: TomEE
>          Issue Type: New Feature
>    Affects Versions: 1.0.0
>         Environment: MacOS JDK 1.7.0_05 & Windows JDK 1.7.0_04
>            Reporter: Harro Lissenberg
>
> When using the method DatatypeConverter.printBase64Binary a NullPointerException occurs.
> java.lang.NullPointerException
> 	javax.xml.bind.DatatypeConverter.printBase64Binary(DatatypeConverter.java:173)
> 	Servlet.doGet(Servlet.java:17)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> The following example servlet will throw the NPE:
> @WebServlet("/npe")
> public class Servlet extends HttpServlet {
>     @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
>         String s = DatatypeConverter.printBase64Binary("TomEE & JAXB!".getBytes(StandardCharsets.UTF_8));
>         resp.getWriter().write(s);
>     }
> }
> A workaround is to remove the JAXB jars from the lib & endorsed directories. My application seems to work fine but I have no idea what (hidden) problems this might cause.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira