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 Une Bévue <yt...@free.fr> on 2006/11/20 09:38:27 UTC
[Batik from source] ttf2svg Can't find bundle
Hey all,
that's the first time i'm using Batik from source. Testerday i've
installed it using ant with no prob, tested squiggle and rasterizer
both using the shell script "$BATIK_HOME/build.sh".(*)
then after that i wanted to give a try to "svggen.font" using again
the build.sh script but get a "NullPointerException" )))
java.lang.NullPointerException
at
org.apache.batik.svggen.font.SVGFont.writeFontAsSVGFragment(Unknown
Source)
at org.apache.batik.svggen.font.SVGFont.main(Unknown Source)
at org.apache.batik.apps.ttf2svg.Main.main(Unknown Source)
null
usage: java org.apache.batik.svggen.font.SVGFont <ttf-path> [-l
<range-begin>] [-h <range-end>] [-autorange] [-ascii] [-id <id>] [-o
i think my command line was valid syntactically speaking.
then, i've try to bypass this script using :
~/bin/xml-batik> java -cp classes org.apache.batik.apps.ttf2svg.Main /
Library/Fonts/ArialHBBold.ttf -ascii -id ArialHBBold -o
ArialHBBold.svg -testcard
and get this error :
java.util.MissingResourceException: Can't find bundle for base name
org.apache.batik.svggen.font.resources.Messages, locale fr_FR
even if i need french accentuated character, because i was only
testing, i've adde to the above command line another locale by adding :
java -Duser.language=en -Duser.region=US <same as before>
java.util.MissingResourceException: Can't find bundle for base name
org.apache.batik.svggen.font.resources.Messages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException
(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl
(ResourceBundle.java:805)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
at org.apache.batik.i18n.LocalizableSupport.getResourceBundle
(Unknown Source)
at org.apache.batik.i18n.LocalizableSupport.formatMessage
(Unknown Source)
at org.apache.batik.svggen.font.Messages.formatMessage
(Unknown Source)
at org.apache.batik.svggen.font.SVGFont.writeSvgBegin
(Unknown Source)
at org.apache.batik.svggen.font.SVGFont.main(Unknown Source)
at org.apache.batik.apps.ttf2svg.Main.main(Unknown Source)
Can't find bundle for base name
org.apache.batik.svggen.font.resources.Messages, locale en_US
Exception in thread "main" java.util.MissingResourceException: Can't
find bundle for base name
org.apache.batik.svggen.font.resources.Messages, locale en_US
at java.util.ResourceBundle.throwMissingResourceException
(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl
(ResourceBundle.java:726)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
at org.apache.batik.i18n.LocalizableSupport.getResourceBundle
(Unknown Source)
at org.apache.batik.i18n.LocalizableSupport.formatMessage
(Unknown Source)
at org.apache.batik.svggen.font.Messages.formatMessage
(Unknown Source)
at org.apache.batik.svggen.font.SVGFont.usage(Unknown Source)
at org.apache.batik.svggen.font.SVGFont.main(Unknown Source)
at org.apache.batik.apps.ttf2svg.Main.main(Unknown Source)
then i thought something is missing in the class path, i've added **
ALL ** the jars below JAVA_HOME into the class path with the same
result.
i'm running over MacOS X the latest with java version :
~/bin/xml-batik%> java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)
what i'm missing here ?
best,
Yvon
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: [Batik from source] ttf2svg Can't find bundle
Posted by Une Bévue <yt...@free.fr>.
Le 20 nov. 06 à 13:07, thomas.deweese@kodak.com a écrit :
>> then after that i wanted to give a try to "svggen.font" using again
>> the build.sh script but get a "NullPointerException" )))
>
> This is odd. Since you are building from source you might
> try turning on line numbers by creating a file 'build.properties'
> with the line 'debug=on' in it, in top directory of Batik
> (same directory that has 'build.xml').
OK, fine then i did :
ant clean
ant compiletest
debug on is OK :
compile-prepare:
[mkdir] Created dir: /Users/yvon/bin/xml-batik/classes
[echo] debug on, optimize on, deprecation on
BUT i got a "funny" result :
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space
[javac] at com.sun.tools.javac.code.Scope
$ImportScope.makeEntry(Scope.java:343)
[javac] at com.sun.tools.javac.code.Scope.enter(Scope.java:194)
[javac] at com.sun.tools.javac.code.Scope.enter(Scope.java:182)
[javac] at com.sun.tools.javac.comp.MemberEnter.importAll
(MemberEnter.java:132)
[javac] at com.sun.tools.javac.comp.MemberEnter.visitTopLevel
(MemberEnter.java:509)
[javac] at com.sun.tools.javac.tree.JCTree
$JCCompilationUnit.accept(JCTree.java:445)
[javac] at com.sun.tools.javac.comp.MemberEnter.memberEnter
(MemberEnter.java:387)
[javac] at com.sun.tools.javac.comp.MemberEnter.complete
(MemberEnter.java:797)
[javac] at com.sun.tools.javac.code.Symbol.complete
(Symbol.java:383)
[javac] at com.sun.tools.javac.code.Symbol
$ClassSymbol.complete(Symbol.java:756)
[javac] at com.sun.tools.javac.code.Symbol$ClassSymbol.flags
(Symbol.java:688)
[javac] at com.sun.tools.javac.comp.Resolve.isAccessible
(Resolve.java:124)
[javac] at com.sun.tools.javac.comp.Resolve.loadClass
(Resolve.java:843)
[javac] at com.sun.tools.javac.comp.Resolve.findGlobalType
(Resolve.java:901)
[javac] at com.sun.tools.javac.comp.Resolve.findType
(Resolve.java:957)
[javac] at com.sun.tools.javac.comp.Resolve.findIdent
(Resolve.java:986)
[javac] at com.sun.tools.javac.comp.Resolve.resolveIdent
(Resolve.java:1162)
[javac] at com.sun.tools.javac.comp.Attr.visitIdent
(Attr.java:1663)
[javac] at com.sun.tools.javac.tree.JCTree$JCIdent.accept
(JCTree.java:1546)
[javac] at com.sun.tools.javac.comp.Attr.attribTree
(Attr.java:314)
[javac] at com.sun.tools.javac.comp.Attr.attribType
(Attr.java:342)
[javac] at com.sun.tools.javac.comp.MemberEnter.visitVarDef
(MemberEnter.java:607)
[javac] at com.sun.tools.javac.tree.JCTree
$JCVariableDecl.accept(JCTree.java:690)
[javac] at com.sun.tools.javac.comp.MemberEnter.memberEnter
(MemberEnter.java:387)
[javac] at com.sun.tools.javac.comp.MemberEnter.memberEnter
(MemberEnter.java:399)
[javac] at com.sun.tools.javac.comp.MemberEnter.finishClass
(MemberEnter.java:410)
[javac] at com.sun.tools.javac.comp.MemberEnter.finish
(MemberEnter.java:978)
[javac] at com.sun.tools.javac.comp.MemberEnter.complete
(MemberEnter.java:945)
[javac] at com.sun.tools.javac.code.Symbol.complete
(Symbol.java:383)
[javac] at com.sun.tools.javac.code.Symbol
$ClassSymbol.complete(Symbol.java:756)
[javac] at com.sun.tools.javac.comp.Enter.complete
(Enter.java:430)
[javac] at com.sun.tools.javac.comp.Enter.main(Enter.java:408)
BUILD FAILED
/Users/yvon/bin/xml-batik/build.xml:453: Compile failed; see the
compiler error output for details.
Total time: 1 minute 17 seconds
and that after i quit all apps except one browser...
i didn't have that prob the first time i've build batik (1 or 2 days
ago).
>
>> java.util.MissingResourceException: Can't find bundle for base name
>> org.apache.batik.svggen.font.resources.Messages, locale en_US
>
>> then i thought something is missing in the class path, i've added **
>> ALL ** the jars below JAVA_HOME into the class path with the same
>> result.
>
> You need to add the 'resources' directory to the classpath.
> This is where the localized messages files are located.
yes fine, it seems to me that "build.sh" doesn't add this folder
however it might be the ant task afterwards ?
Also i have to say i had to change one line of build.sh :
#CP=$JAVA_HOME/lib/tools.jar:$ANT_HOME/lib/build/ant_1_4_1.jar:./lib/
build/crimson-ant.jar:./lib/build/jaxp.jar
(around line 50)
to :
CP=$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/ant-launcher.jar:./lib/build/
crimson-ant.jar:./lib/build/jaxp.jar:resources
because no "lib/tools.jar" at all on my box (Mac OS X the latest)
with the following java versions :
1.3.1
1.4.2
1.5.0
1.6.0 (the one i'm using)
i'm impatient to play with batik from jRuby ;-)
best,
Yvon
Re: [Batik from source] ttf2svg Can't find bundle
Posted by th...@kodak.com.
Hi Une,
Une Bévue <yt...@free.fr> wrote on 11/20/2006 03:38:27 AM:
> then after that i wanted to give a try to "svggen.font" using again
> the build.sh script but get a "NullPointerException" )))
This is odd. Since you are building from source you might
try turning on line numbers by creating a file 'build.properties'
with the line 'debug=on' in it, in top directory of Batik
(same directory that has 'build.xml').
> java.util.MissingResourceException: Can't find bundle for base name
> org.apache.batik.svggen.font.resources.Messages, locale en_US
> then i thought something is missing in the class path, i've added **
> ALL ** the jars below JAVA_HOME into the class path with the same
> result.
You need to add the 'resources' directory to the classpath.
This is where the localized messages files are located.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org