xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <David.Sm...@aeroint.com>
Subject RE: Batik over JNLP
Date Mon, 17 Dec 2001 16:41:48 GMT
Hi Vincent,

I thought it was probably a classpath problem too so I checked through all
my jar files.
Of all the jars downloaded with batik, I set all but crimson-parser.jar and
js.jar to my
classpath.  I am 100% sure my application cannot see the omitted jars from
the ide.  Im not even sure I use xerces, whatever that is.
The same jars are set in the xml part of my jnlp app.

If it was a classpath problem, wouldn't I be getting NoClassDefFound errors?
The DOMUtilities line it refers to contains the following:
            if (n.hasAttributes()) {	// line 57
                NamedNodeMap attr = n.getAttributes();

n is a Node object.  Looking at Node, both methods are interface
definitions, meaning concrete classes would not compile if the methods were
missing.

I have checked this with both batik 1.0 and 1.1.  Both classes appear to be
the same in both versions.

JNLP is unfortunately not niggle-free at the moment.  I already have to do a
workaround with bufferedreader objects, as they always return true from
ready() over jnlp.  Im reckoning this may be a similar problem as both are
to do with io.  The problems seem to start when trying to choose a file,
rather than doing the actual transcode.

dave

> -----Original Message-----
> From: Vincent Hardy [mailto:vincent.hardy@sun.com]
> Sent: 17 December 2001 08:01
> To: batik-users@xml.apache.org
> Subject: Re: Batik over JNLP
> 
> 
> David,
> 
> I think this is a classpath problem. Is there any chance you 
> would have
> an older version of crimson or xerces in the classpath on the machine 
> where you are starting with Java Web Start? 
> 
> Vincent.
> 
> Hi all.
> 
> My application writes constructed SVG documents to file.  
> When run from
> my
> ide, the app creates and displays the SVG without problem and 
> stores the
> data correctly in the specified file.  The code for outputting to file
> is
> below:
> 
>       PrintWriter writer = new PrintWriter(new
> java.io.FileOutputStream(file));
>       SVGTranscoder transcoder = new SVGTranscoder();
>       transcoder.transcode(new TranscoderInput(document),new
> TranscoderOutput(writer));
> 
> I use a JFileChooser to choose the file.  When the app is downloaded
> using
> Java Web Start, the graph is still drawn without problems but 
> whenever I
> try
> to save to file (it is a fully signed app) it tries to access the A
> drive
> for some reason (instead of the users' profiles directory), and then
> when
> the file is chosen, I get the following error:
> 
> Exception occurred during event dispatching: 
> java.lang.NoSuchMethodError     
> at
> org.apache.batik.dom.util.DOMUtilities.writeNode(DOMUtilities.java:57)
> 
> at
> org.apache.batik.dom.util.DOMUtilities.writeDocument(DOMUtilit
> ies.java:44)
> 
> at
> org.apache.batik.transcoder.svg2svg.SVGTranscoder.transcode(SV
> GTranscoder.ja
> va:169)         
> at
> javaAMAC.gui.chart.MaintenanceChartBuilder2.exportToFile(Maint
> enanceChartBui
> lder2.java:540)         
> at
> javaAMAC.gui.Editors.Panels.MaintanenceChartPanel.exportToFile
> (MaintanenceCh
> artPanel.java:347)      
> at
> javaAMAC.gui.Editors.Panels.MaintanenceChartPanel.actionPerfor
> med(Maintanenc
> eChartPanel.java:384)   
> at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.
> java:1450)
> 
> at
> javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
> (AbstractButto
> n.java:1504)    
> at
> javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButt
> onModel.java:3
> 78)     
> at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
> 
> at javax.swing.AbstractButton.doClick(AbstractButton.java:279)  
> at
> javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouse
> Released(Basic
> MenuItemUI.java:886)    
> at java.awt.Component.processMouseEvent(Component.java:3715)    
> at java.awt.Component.processEvent(Component.java:3544)         
> at java.awt.Container.processEvent(Container.java:1164)         
> at java.awt.Component.dispatchEventImpl(Component.java:2593)    
> at java.awt.Container.dispatchEventImpl(Container.java:1213)    
> at java.awt.Component.dispatchEvent(Component.java:2497)        
> at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
> 
> at 
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
> 
> at 
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)    
> at java.awt.Container.dispatchEventImpl(Container.java:1200)    
> at java.awt.Window.dispatchEventImpl(Window.java:914)   
> at java.awt.Component.dispatchEvent(Component.java:2497)        
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)       
> at
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDis
> patchThread.ja
> va:131)         
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispa
> tchThread.java
> :98)    
> at 
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
> 
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:85) 
> 
> No such method?!  I am using exactly the same files! (Yes I have
> checked)
> Has anyone else had any such problem?
> If so is there a solution?
> 
> Thanks,
> Dave Smith
> 
> **************************************************************
> **********
> This Internet E-mail is intended solely for the person to whom it is
> addressed. It may contain confidential or privileged 
> information. If you
> have received it in error please notify us immediately by 
> telephone and
> destroy the transmission. You must not copy, distribute or take any
> action in reliance on it.
> 
> Aerosystems International               Phone: +44 (0)1935 443000
>                                         Fax  : +44 (0)1935 443111
>                                         Web  : www.aeroint.com
> **************************************************************
> **********
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 

************************************************************************
This Internet E-mail is intended solely for the person to whom it is addressed. It may contain
confidential or privileged information. If you have received it in error please notify us
immediately by telephone and destroy the transmission. You must not copy, distribute or take
any action in reliance on it.

Aerosystems International               Phone: +44 (0)1935 443000
                                        Fax  : +44 (0)1935 443111
                                        Web  : www.aeroint.com
************************************************************************

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


Mime
View raw message