You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Marshall Keith J NPRI <Ma...@Npt.NUWC.Navy.Mil> on 2008/07/10 20:38:34 UTC

desc and title element exceptions

Hi,

 I get an exception when title and desc elements are included in my svg file. Any ideas why?

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at java.util.ResourceBundle.getBundle(Unknown Source)
        at org.apache.batik.i18n.LocalizableSupport.lookupResourceBundle(LocalizableSupport.java:275)
        at org.apache.batik.i18n.LocalizableSupport.getResourceBundle(LocalizableSupport.java:287)
        at org.apache.batik.i18n.LocalizableSupport.getString(LocalizableSupport.java:312)
        at org.apache.batik.i18n.LocalizableSupport.formatMessage(LocalizableSupport.java:214)
        at org.apache.batik.swing.Messages.formatMessage(Messages.java:72)
        at org.apache.batik.swing.JSVGCanvas$CanvasUserAgent.handleElement(JSVGCanvas.java:950)
        at org.apache.batik.swing.svg.AbstractJSVGComponent$30.run(AbstractJSVGComponent.java:2849)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

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


Re: desc and title element exceptions

Posted by Helder Magalhães <he...@gmail.com>.
>  I get an exception when title and desc elements are included in my svg file. Any ideas why?
>
> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>        at java.util.ResourceBundle.getBundle(Unknown Source)

I'm not much familiar with Batik (nor with Java, to be honest) but,
from the stack trace, I'd say that Java is attempting to load one of
those famous "Message_XX.properties" file whose name depends on your
system's current localization. For example, for me (who am in
Portugal) I've found, in applet experiments, that the Web server
receives some "Message_pt_PT.properties" which I believe to be related
with loading Batik's resource strings.

Could you post a code snippet so that one could take a more informed
look at this?

Hope this helps,

 Helder Magalhães

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


Re: desc and title element exceptions

Posted by marsh <Ma...@Npt.NUWC.Navy.Mil>.
Sorry for the doubt but you were correct. We had a major conflict with my
java endorsed directory and  classpath setting. We run a stand alone corba
application that only had the endorsed directory set (no classpath). All jar
files where located in the endorsed dir. After figuring out what java files
needed to be endorsed and which ones should be on the classpath it worked. 
Our batik jars are on the classpath now and we got the mouse overs to work! 

Interesting issue to note is that the exception occured when the jars were
in the endorsed directory and the messages.properties file couldnt be found.
Putting batik jars directly on the classpath worked. 

Thank you.


thomas.deweese wrote:
> 
> Hi Marsh,
> 
> marsh <Ma...@Npt.NUWC.Navy.Mil> wrote on 07/14/2008 02:08:29 PM:
> 
>> I do have the jar file in my class path and I verified that the 
> properties
>> file existed. I think I found the problem though... I think its a 
> namespace
>> conflict with the html code thats in the properties file. Im not using 
> the
>> svg prefix or namespce.
> 
>      I doubt it.  That 'html code' is for the standard Java text element
> that we use in the tooltip.  I think for some reason it can't find/isn't
> allowed to load the properties file.  Are you running in an Applet or 
> something else that might make permissions a problem?
> 
> 

-- 
View this message in context: http://www.nabble.com/desc-and-title-element-exceptions-tp18390671p18533806.html
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Re: desc and title element exceptions

Posted by th...@kodak.com.
Hi Marsh,

marsh <Ma...@Npt.NUWC.Navy.Mil> wrote on 07/14/2008 02:08:29 PM:

> I do have the jar file in my class path and I verified that the 
properties
> file existed. I think I found the problem though... I think its a 
namespace
> conflict with the html code thats in the properties file. Im not using 
the
> svg prefix or namespce.

     I doubt it.  That 'html code' is for the standard Java text element
that we use in the tooltip.  I think for some reason it can't find/isn't
allowed to load the properties file.  Are you running in an Applet or 
something else that might make permissions a problem?

Re: desc and title element exceptions

Posted by marsh <Ma...@Npt.NUWC.Navy.Mil>.
I do have the jar file in my class path and I verified that the properties
file existed. I think I found the problem though... I think its a namespace
conflict with the html code thats in the properties file. Im not using the
svg prefix or namespce.


thomas.deweese wrote:
> 
> Hi Marshall,
> 
> marsh <Ma...@Npt.NUWC.Navy.Mil> wrote on 07/11/2008 04:44:50 PM:
> 
>> What resources directory? Are you talking the resource directory that 
> comes
>> with batik? the only one I saw that in the distro was under 
> samples/tests/
> 
>    I think you are using Jar files from the binary distribution.
> If you were compiling from the source distribution you need
> to add the 'resources' directory (at the top level of the source
> dist) to your class path.
> 
>> Is that the one?
> 
>    If you are using Jar files then I'm a little unsure where the
> problem is coming from.  Are you running in an Applet environment?
> Can you check that 'org/apache/batik/swing/resources/Messages.properties'
> is present in lib/batik-swing.jar?
> 
>> thomas.deweese wrote:
>> > 
>> > Hi Keith,
>> > 
>> > Marshall Keith J NPRI <Ma...@Npt.NUWC.Navy.Mil> wrote on 
> 07/10/2008 
>> > 02:38:34 PM:
>> > 
>> >>  I get an exception when title and desc elements are included in my 
>> >> svg file. Any ideas why?
>> > 
>> >     You probably don't have the contents of the 'resources' directory
>> > on your class path (or they aren't compiled into jars).
>> > 
>> >> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>> >>         at java.util.ResourceBundle.getBundle(Unknown Source)
>> > 
>> > 
>> 
>> -- 
>> View this message in context: http://www.nabble.com/desc-and-title-
>> element-exceptions-tp18390671p18412207.html
>> Sent from the Batik - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/desc-and-title-element-exceptions-tp18390671p18449645.html
Sent from the Batik - Users mailing list archive at Nabble.com.


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


Re: desc and title element exceptions

Posted by th...@kodak.com.
Hi Marshall,

marsh <Ma...@Npt.NUWC.Navy.Mil> wrote on 07/11/2008 04:44:50 PM:

> What resources directory? Are you talking the resource directory that 
comes
> with batik? the only one I saw that in the distro was under 
samples/tests/

   I think you are using Jar files from the binary distribution.
If you were compiling from the source distribution you need
to add the 'resources' directory (at the top level of the source
dist) to your class path.

> Is that the one?

   If you are using Jar files then I'm a little unsure where the
problem is coming from.  Are you running in an Applet environment?
Can you check that 'org/apache/batik/swing/resources/Messages.properties'
is present in lib/batik-swing.jar?

> thomas.deweese wrote:
> > 
> > Hi Keith,
> > 
> > Marshall Keith J NPRI <Ma...@Npt.NUWC.Navy.Mil> wrote on 
07/10/2008 
> > 02:38:34 PM:
> > 
> >>  I get an exception when title and desc elements are included in my 
> >> svg file. Any ideas why?
> > 
> >     You probably don't have the contents of the 'resources' directory
> > on your class path (or they aren't compiled into jars).
> > 
> >> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
> >>         at java.util.ResourceBundle.getBundle(Unknown Source)
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/desc-and-title-
> element-exceptions-tp18390671p18412207.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 

Re: desc and title element exceptions

Posted by marsh <Ma...@Npt.NUWC.Navy.Mil>.
What resources directory? Are you talking the resource directory that comes
with batik? the only one I saw that in the distro was under samples/tests/

Is that the one?


thomas.deweese wrote:
> 
> Hi Keith,
> 
> Marshall Keith J NPRI <Ma...@Npt.NUWC.Navy.Mil> wrote on 07/10/2008 
> 02:38:34 PM:
> 
>>  I get an exception when title and desc elements are included in my 
>> svg file. Any ideas why?
> 
>     You probably don't have the contents of the 'resources' directory
> on your class path (or they aren't compiled into jars).
> 
>> Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
>>         at java.util.ResourceBundle.getBundle(Unknown Source)
> 
> 

-- 
View this message in context: http://www.nabble.com/desc-and-title-element-exceptions-tp18390671p18412207.html
Sent from the Batik - Users mailing list archive at Nabble.com.


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