You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Luke-SuperDude <er...@erwinfok.com> on 2009/05/06 12:39:42 UTC
FOP Servlet in restricted environment
Hi,
I am trying to get a Fop Servlet working in a Godaddy Linux java hosting
account. I am running a servlet like the example wich a feed with an xml.
create a fo out of it and try to build a pdf. It works fine locally on my
own system, but not on this restricted hosting environment. I get the
following error and i can't figure out what to do. I know it is the fop in
its init doing stuff:
java.security.AccessControlException: access denied (java.io.FilePermission
/root read)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
java.security.AccessController.checkPermission(AccessController.java:427)
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
java.lang.SecurityManager.checkRead(SecurityManager.java:871)
java.io.File.exists(File.java:700)
org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
org.apache.fop.fonts.FontCache.load(FontCache.java:117)
org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
DocGen.init(DocGen.java:82)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:110)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:417)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:595)
Any ideas?
--
View this message in context: http://www.nabble.com/FOP-Servlet-in-restricted-environment-tp23404112p23404112.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP Servlet in restricted environment
Posted by Chris Bowditch <bo...@hotmail.com>.
Luke-SuperDude wrote:
> Hi,
Hi Luke,
>
> I am trying to get a Fop Servlet working in a Godaddy Linux java hosting
> account. I am running a servlet like the example wich a feed with an xml.
> create a fo out of it and try to build a pdf. It works fine locally on my
> own system, but not on this restricted hosting environment. I get the
> following error and i can't figure out what to do. I know it is the fop in
> its init doing stuff:
>
> java.security.AccessControlException: access denied (java.io.FilePermission
> /root read)
>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
> java.security.AccessController.checkPermission(AccessController.java:427)
> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
> java.io.File.exists(File.java:700)
> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
> org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
> DocGen.init(DocGen.java:82)
> javax.servlet.GenericServlet.init(GenericServlet.java:211)
> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
Looks like this error occurs when FOP is checking for its Font Cache.
You can disable the cacue with the use-cache option as documented here:
http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
Simply put the XML element <use-cache>false</use-cache> into the
fop.xconf file.
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP Servlet in restricted environment
Posted by megaapps <pr...@gmail.com>.
Drop godaddy their service is realy poor. I use javaprovider.net for
http://javaprovider.net java hosting
Luke-SuperDude wrote:
>
>
>
> Johannes Künsebeck-2 wrote:
>>
>> Am Mittwoch, den 06.05.2009, 18:41 +0200 schrieb Sergiu Dumitriu:
>>> Luke-SuperDude wrote:
>>> >
>>> >
>>> > cbowditch wrote:
>>> >> Luke-SuperDude wrote:
>>> >>
>>> >>> Hi,
>>> >> Hi Luke,
>>> >>
>>> >>> I am trying to get a Fop Servlet working in a Godaddy Linux java
>>> hosting
>>> >>> account. I am running a servlet like the example wich a feed with an
>>> xml.
>>> >>> create a fo out of it and try to build a pdf. It works fine locally
>>> on my
>>> >>> own system, but not on this restricted hosting environment. I get
>>> the
>>> >>> following error and i can't figure out what to do. I know it is the
>>> fop
>>> >>> in
>>> >>> its init doing stuff:
>>> >>>
>>> >>> java.security.AccessControlException: access denied
>>> >>> (java.io.FilePermission
>>> >>> /root read)
>>> >>>
>>> >>>
>>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>>> >>>
>>> >>>
>>> java.security.AccessController.checkPermission(AccessController.java:427)
>>> >>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>>> >>> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>>> >>> java.io.File.exists(File.java:700)
>>> >>> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
>>> >>>
>>> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
>>> >>> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
>>> >>> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
>>> >>> org.apache.fop.apps.FopFactory.(FopFactory.java:158)
>>> >>> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
>>> >>> DocGen.init(DocGen.java:82)
>>> >>> javax.servlet.GenericServlet.init(GenericServlet.java:211)
>>> >>> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>>> >> Looks like this error occurs when FOP is checking for its Font Cache.
>>> >> You can disable the cacue with the use-cache option as documented
>>> here:
>>> >>
>>> >>
>>> http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
>>> >>
>>> >> Simply put the XML element false into the
>>> >> fop.xconf file.
>>> >>
>>> >>
>>> >>
>>> >> Chris
>>> >
>>> >
>>> > Hi,
>>> >
>>> > i tried this with the option and it appears not to make any
>>> > difference. (Will try a bit more with it)
>>> > I am using the 0.95 version, and when i look at the
>>> fop-configuration.xsd
>>> > the option is not there. So i am still a bit confused.
>>>
>>> Try using a trunk build. You won't even have to disable the cache, since
>>> it will automatically try to use the system temporary directory instead
>>> of the root's home.
>>>
>>
>> Or create the directory /root/.fop with write access for the webserver
>> user. At least it helps with apache and "/var/www/.fop"
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>
> Hi,
>
> THX for all the help, but all of this still has no result. I have the
> trunk build. And i have created the directories, in the root of my shared
> hosting account.
>
--
View this message in context: http://www.nabble.com/FOP-Servlet-in-restricted-environment-tp23404112p23506702.html
Sent from the FOP - Users mailing list archive at Nabble.com.
Re: FOP Servlet in restricted environment
Posted by Luke-SuperDude <er...@erwinfok.com>.
Johannes Künsebeck-2 wrote:
>
> Am Mittwoch, den 06.05.2009, 18:41 +0200 schrieb Sergiu Dumitriu:
>> Luke-SuperDude wrote:
>> >
>> >
>> > cbowditch wrote:
>> >> Luke-SuperDude wrote:
>> >>
>> >>> Hi,
>> >> Hi Luke,
>> >>
>> >>> I am trying to get a Fop Servlet working in a Godaddy Linux java
>> hosting
>> >>> account. I am running a servlet like the example wich a feed with an
>> xml.
>> >>> create a fo out of it and try to build a pdf. It works fine locally
>> on my
>> >>> own system, but not on this restricted hosting environment. I get the
>> >>> following error and i can't figure out what to do. I know it is the
>> fop
>> >>> in
>> >>> its init doing stuff:
>> >>>
>> >>> java.security.AccessControlException: access denied
>> >>> (java.io.FilePermission
>> >>> /root read)
>> >>>
>> >>>
>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>> >>>
>> >>>
>> java.security.AccessController.checkPermission(AccessController.java:427)
>> >>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>> >>> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>> >>> java.io.File.exists(File.java:700)
>> >>> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
>> >>>
>> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
>> >>> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
>> >>> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
>> >>> org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
>> >>> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
>> >>> DocGen.init(DocGen.java:82)
>> >>> javax.servlet.GenericServlet.init(GenericServlet.java:211)
>> >>> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>> >> Looks like this error occurs when FOP is checking for its Font Cache.
>> >> You can disable the cacue with the use-cache option as documented
>> here:
>> >>
>> >>
>> http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
>> >>
>> >> Simply put the XML element <use-cache>false</use-cache> into the
>> >> fop.xconf file.
>> >>
>> >> <snip/>
>> >>
>> >> Chris
>> >
>> >
>> > Hi,
>> >
>> > i tried this with the <use-cache> option and it appears not to make any
>> > difference. (Will try a bit more with it)
>> > I am using the 0.95 version, and when i look at the
>> fop-configuration.xsd
>> > the <use-cache> option is not there. So i am still a bit confused.
>>
>> Try using a trunk build. You won't even have to disable the cache, since
>> it will automatically try to use the system temporary directory instead
>> of the root's home.
>>
>
> Or create the directory /root/.fop with write access for the webserver
> user. At least it helps with apache and "/var/www/.fop"
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
Hi,
THX for all the help, but all of this still has no result. I have the trunk
build. And i have created the directories, in the root of my shared hosting
account.
--
View this message in context: http://www.nabble.com/FOP-Servlet-in-restricted-environment-tp23404112p23473884.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP Servlet in restricted environment
Posted by Johannes Künsebeck <ku...@gmx.net>.
Am Mittwoch, den 06.05.2009, 18:41 +0200 schrieb Sergiu Dumitriu:
> Luke-SuperDude wrote:
> >
> >
> > cbowditch wrote:
> >> Luke-SuperDude wrote:
> >>
> >>> Hi,
> >> Hi Luke,
> >>
> >>> I am trying to get a Fop Servlet working in a Godaddy Linux java hosting
> >>> account. I am running a servlet like the example wich a feed with an xml.
> >>> create a fo out of it and try to build a pdf. It works fine locally on my
> >>> own system, but not on this restricted hosting environment. I get the
> >>> following error and i can't figure out what to do. I know it is the fop
> >>> in
> >>> its init doing stuff:
> >>>
> >>> java.security.AccessControlException: access denied
> >>> (java.io.FilePermission
> >>> /root read)
> >>>
> >>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
> >>>
> >>> java.security.AccessController.checkPermission(AccessController.java:427)
> >>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
> >>> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
> >>> java.io.File.exists(File.java:700)
> >>> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
> >>> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
> >>> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
> >>> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
> >>> org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
> >>> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
> >>> DocGen.init(DocGen.java:82)
> >>> javax.servlet.GenericServlet.init(GenericServlet.java:211)
> >>> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
> >> Looks like this error occurs when FOP is checking for its Font Cache.
> >> You can disable the cacue with the use-cache option as documented here:
> >>
> >> http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
> >>
> >> Simply put the XML element <use-cache>false</use-cache> into the
> >> fop.xconf file.
> >>
> >> <snip/>
> >>
> >> Chris
> >
> >
> > Hi,
> >
> > i tried this with the <use-cache> option and it appears not to make any
> > difference. (Will try a bit more with it)
> > I am using the 0.95 version, and when i look at the fop-configuration.xsd
> > the <use-cache> option is not there. So i am still a bit confused.
>
> Try using a trunk build. You won't even have to disable the cache, since
> it will automatically try to use the system temporary directory instead
> of the root's home.
>
Or create the directory /root/.fop with write access for the webserver
user. At least it helps with apache and "/var/www/.fop"
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP Servlet in restricted environment
Posted by Sergiu Dumitriu <se...@xwiki.com>.
Luke-SuperDude wrote:
>
>
> cbowditch wrote:
>> Luke-SuperDude wrote:
>>
>>> Hi,
>> Hi Luke,
>>
>>> I am trying to get a Fop Servlet working in a Godaddy Linux java hosting
>>> account. I am running a servlet like the example wich a feed with an xml.
>>> create a fo out of it and try to build a pdf. It works fine locally on my
>>> own system, but not on this restricted hosting environment. I get the
>>> following error and i can't figure out what to do. I know it is the fop
>>> in
>>> its init doing stuff:
>>>
>>> java.security.AccessControlException: access denied
>>> (java.io.FilePermission
>>> /root read)
>>>
>>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>>>
>>> java.security.AccessController.checkPermission(AccessController.java:427)
>>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>>> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>>> java.io.File.exists(File.java:700)
>>> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
>>> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
>>> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
>>> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
>>> org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
>>> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
>>> DocGen.init(DocGen.java:82)
>>> javax.servlet.GenericServlet.init(GenericServlet.java:211)
>>> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>> Looks like this error occurs when FOP is checking for its Font Cache.
>> You can disable the cacue with the use-cache option as documented here:
>>
>> http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
>>
>> Simply put the XML element <use-cache>false</use-cache> into the
>> fop.xconf file.
>>
>> <snip/>
>>
>> Chris
>
>
> Hi,
>
> i tried this with the <use-cache> option and it appears not to make any
> difference. (Will try a bit more with it)
> I am using the 0.95 version, and when i look at the fop-configuration.xsd
> the <use-cache> option is not there. So i am still a bit confused.
Try using a trunk build. You won't even have to disable the cache, since
it will automatically try to use the system temporary directory instead
of the root's home.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP Servlet in restricted environment
Posted by Luke-SuperDude <er...@erwinfok.com>.
cbowditch wrote:
>
> Luke-SuperDude wrote:
>
>> Hi,
>
> Hi Luke,
>
>>
>> I am trying to get a Fop Servlet working in a Godaddy Linux java hosting
>> account. I am running a servlet like the example wich a feed with an xml.
>> create a fo out of it and try to build a pdf. It works fine locally on my
>> own system, but not on this restricted hosting environment. I get the
>> following error and i can't figure out what to do. I know it is the fop
>> in
>> its init doing stuff:
>>
>> java.security.AccessControlException: access denied
>> (java.io.FilePermission
>> /root read)
>>
>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
>>
>> java.security.AccessController.checkPermission(AccessController.java:427)
>> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>> java.lang.SecurityManager.checkRead(SecurityManager.java:871)
>> java.io.File.exists(File.java:700)
>> org.apache.fop.fonts.FontCache.getUserHome(FontCache.java:87)
>> org.apache.fop.fonts.FontCache.getDefaultCacheFile(FontCache.java:100)
>> org.apache.fop.fonts.FontCache.load(FontCache.java:117)
>> org.apache.fop.apps.FopFactory.setUseCache(FopFactory.java:692)
>> org.apache.fop.apps.FopFactory.<init>(FopFactory.java:158)
>> org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166)
>> DocGen.init(DocGen.java:82)
>> javax.servlet.GenericServlet.init(GenericServlet.java:211)
>> sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
>
> Looks like this error occurs when FOP is checking for its Font Cache.
> You can disable the cacue with the use-cache option as documented here:
>
> http://xmlgraphics.apache.org/fop/trunk/configuration.html#general-elements
>
> Simply put the XML element <use-cache>false</use-cache> into the
> fop.xconf file.
>
> <snip/>
>
> Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
Hi,
i tried this with the <use-cache> option and it appears not to make any
difference. (Will try a bit more with it)
I am using the 0.95 version, and when i look at the fop-configuration.xsd
the <use-cache> option is not there. So i am still a bit confused.
--
View this message in context: http://www.nabble.com/FOP-Servlet-in-restricted-environment-tp23404112p23410135.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org