xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward McMasters <edward_mcmast...@yahoo.com>
Subject Re: generating data url external-graphic in PDF
Date Tue, 14 Feb 2006 14:44:35 GMT
Jeremias,

It only took several tries and one week to get your
advice through my thick skull!

This is how I finally got it to work:

I added my JAR with the new classes and batik.jar to
the global classpath via:

Servers -> myserver -> configuration tab -> Process
Definition -> Java Virtual Machine -> Classpath

In Classpath I just listed the two jars separated only
by newlines.

Maybe having this in the record will help the next WS
user with this issue.

Thanks again.  You may have saved my job!

Edward

--- Jeremias Maerki <dev@jeremias-maerki.ch> wrote:

> The protocol handler is a plug-in for a very
> low-level service in the
> Java class library. It plug directly into the
> java.net.URL subsystem.
> That's why these classes must be available on a very
> low level.
> 
> If you want to know more about protocol handlers,
> read:
>
http://java.sun.com/developer/onlineTraining/protocolhandlers/
> 
> Yes, I'm sure your modified classes get called, but
> they get called in
> the context of a special class loader that's set up
> specifially for your
> web application. The java.net.* stuff however, is a
> basic class library
> service so these classes won't see the protocol
> handler if it's not
> added to the system class loader.
> 
> Here are a couple of links that may help:
>
http://www.developer.com/java/other/article.php/10936_2248831_1
>
http://www.theserverside.com/articles/article.tss?l=ClassLoading
> 
> On 08.02.2006 23:16:05 Edward McMasters wrote:
> > I am still trying to figure out how to do what you
> > suggested, but meanwhile, sorry to belabor this
> point,
> > but, what is special about this protocol handler? 
> I
> > was able to replace other classes
> > (org.apache.fop.render.pdf.PDFRenderer,
> > org.apache.fop.fo.flow.ExternalGraphic) that are
> > called from inside the FOP JAR to my modified
> class in
> > WEB-INF/classes and my local versions get called
> by
> > FOP (as evidenced by System.out displays).
> > 
> > Thanks.
> > 
> > Edward (confused but slowly trying to learn!)
> > 
> > --- Jeremias Maerki <dev@jeremias-maerki.ch>
> wrote:
> > 
> > > In addition to what Chris already told you:
> Maybe I
> > > was not clear enough.
> > > You don't place that JAR file with the protocol
> > > handler with your other
> > > JARs (i.e. not in WEB-INF/lib), you need to
> place it
> > > in WebSphere so
> > > they end up in the top-level class loader. That
> > > directory could be a
> > > "lib" directory directly under the root where
> you
> > > installed WebSphere.
> > > As I said, you will need to consult the
> WebSphere
> > > documentation to find
> > > the right spot. What I forgot to mention is that
> in
> > > addition to the JAR
> > > file with the protocol handler you will need to
> > > place the batik.jar in
> > > the same place, too, because the protocol
> handler
> > > references classes
> > > from batik.jar.
> > > 
> > > On 08.02.2006 17:58:53 Edward McMasters wrote:
> > > > I generated a JAR with just those classes and
> put
> > > it
> > > > in the same place as my other JAR files,
> giving
> > > this
> > > > new one precedence and got the same result.  I
> am
> > > in
> > > > the middle of attempting to try rebuilding FOP
> > > 0.20.5
> > > > with these new classes embedded but I am
> currently
> > > > having a problem because it seems that I
> cannot
> > > get
> > > > one of the packages from the source download
> > > > (org.apache.fop.fo.properties).
> > > > 
> > > > Should I be concerned that the package
> > > > org.apache.fop.util.protocols.data does not
> appear
> > > in
> > > > the original FOP 0.20.5 JAR?  I am just
> wondering
> > > > where these classes will be called from,
> although
> > > the
> > > > program that I copied has the same libraries
> as my
> > > > program and it has no trouble referencing
> these
> > > > classes.
> > > <snip/>
> > > 
> > > 
> > > Jeremias Maerki
> > > 
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > fop-users-unsubscribe@xmlgraphics.apache.org
> > > For additional commands, e-mail:
> > > fop-users-help@xmlgraphics.apache.org
> > > 
> > > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 
> 
> Jeremias Maerki
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message