Return-Path: X-Original-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Delivered-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC50511FD7 for ; Fri, 22 Aug 2014 11:01:12 +0000 (UTC) Received: (qmail 27846 invoked by uid 500); 22 Aug 2014 11:01:12 -0000 Delivered-To: apmail-xmlgraphics-batik-dev-archive@xmlgraphics.apache.org Received: (qmail 27816 invoked by uid 500); 22 Aug 2014 11:01:12 -0000 Mailing-List: contact batik-dev-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-dev@xmlgraphics.apache.org Delivered-To: mailing list batik-dev@xmlgraphics.apache.org Received: (qmail 27797 invoked by uid 99); 22 Aug 2014 11:01:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2014 11:01:12 +0000 Date: Fri, 22 Aug 2014 11:01:12 +0000 (UTC) From: "Surendra Babu Kunka (JIRA)" To: batik-dev@xmlgraphics.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (BATIK-1079) SecurityException while generating JPEG from SVG string using batik MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Surendra Babu Kunka created BATIK-1079: ------------------------------------------ Summary: SecurityException while generating JPEG from SVG string using batik Key: BATIK-1079 URL: https://issues.apache.org/jira/browse/BATIK-1079 Project: Batik Issue Type: Bug Components: SVG Rasterizer Affects Versions: 1.7 Environment: Windows/Linux Reporter: Surendra Babu Kunka We are getting exception while exporting chart SVG string to JPEG file. Batik Version : 1.7 Exception : java.lang.SecurityException: The application cannot install or remove a security manager when there is already one it place that it did not install. Root cause: In my webapplication, we already installed the security manager to perform some checks.Now when we try to export chart to JPEG we are invoking batik with arguments "-scriptSecurityOff".it is failed to pass the security checks due to my application is already installed security manager. We are invoking batik Main.execute() method by passing arguments. String[] inputArr = { "-scriptSecurityOff", "-m","JPEG", inputFileName }; (new org.apache.batik.apps.rasterizer.Main(inputArr)).execute(); After debugging the exception, we came to know there are security checks happening in ApplicationSecurityEnforcer.java. Class Name : ApplicationSecurityEnforcer.java Method Name : enforceSecurity(boolean enforce) { if (sm != null && sm != lastSecurityManagerInstalled) { // Throw a Security exception: we do not want to override // an 'alien' SecurityManager with either null or // a new SecurityManager. throw new SecurityException (Messages.getString(EXCEPTION_ALIEN_SECURITY_MANAGER)); } Please let us know , how to resolve the issue without commenting above code in ApplicationSecurityEnforcer.java, when security Manager is already installed. find the link somebody got the same kind of exception, but we don't have any solution in below link. https://community.oracle.com/thread/1546085?start=0&tstart=0 -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org