From dev-return-18624-archive-asf-public=cust-asf.ponee.io@cxf.apache.org Fri Jan 12 05:37:03 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D9D2F180656 for ; Fri, 12 Jan 2018 05:37:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA0AF160C41; Fri, 12 Jan 2018 04:37:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 42B30160C13 for ; Fri, 12 Jan 2018 05:37:03 +0100 (CET) Received: (qmail 29401 invoked by uid 500); 12 Jan 2018 04:37:02 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 29384 invoked by uid 99); 12 Jan 2018 04:37:02 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2018 04:37:02 +0000 From: GitBox To: dev@cxf.apache.org Subject: [GitHub] ffang commented on issue #365: [CXF-7520]:Ensure CXF can build with JDK9 GA(build 9+181) Message-ID: <151573182163.597.13568902128638566708.gitbox@gitbox.apache.org> ffang commented on issue #365: [CXF-7520]:Ensure CXF can build with JDK9 GA(build 9+181) URL: https://github.com/apache/cxf/pull/365#issuecomment-357141231 Hi @jimma As Dan pointed out, the big issue is that your code impose compulsory restrictions that the CXF runtime must have jaxb-impl jar dependency. Otherwise you run into ClassNotFoundException, as the class name is com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler in JDK version but not com.sun.xml.bind.marshaller.CharacterEscapeHandler, the package name is different. In this case the DataWriter can't be created at all. I don't think we should introduce this compulsory dependency. So I suggest you have some static code to detect it first, something like ` static { try { DataWriterImpl.class.getClassLoader(). loadClass("com.sun.xml.bind.marshaller.CharacterEscapeHandler"); //if no CNFE means we have saaj-impl dependeceny so in this case //register the customized handler } catch (ClassNotFoundException cnfe) { LOG.debug("can't load class com.sun.xml.bind.marshaller.CharacterEscapeHandler", cnfe); } } } ` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services