Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject PJAToolkitDemo on Solaris/Websphere env

forreg

Member since : Jan 22, 2004
Messages : 5
 Jan 28, 2004 at 7:14 PM
Hi,

I am trying to run the demo file - but getting an error for drawing the 4th Gif file.
The script file & the output is given below.

What would be wrong here? Java version - 1.3.1

I need to know - if we specify the properties in serverStartup.sh script file - is it ok or do we need to specify as command line arguments for just our application?

Also, I am trying to use PJAToolkit b'cos of the problem in using JFreeReport. I am generating a report using a servlet. Will I need just the pja.jar or anything extra?


Thanks in advance for your help/direction.



###### PJAToolkitDemo Script
#
#!/bin/sh
# With JDK <= 1.1, use PJAToolkitDemo.sh
#
# pja.jar must be in bootclasspath or Toolkit.getDefaultToolkit ()
# and GraphicsEnvironment.getLocalGraphicsEnvironment () will fail to
# load com.eteks.awt.PJAToolkit and com.eteks.java2d.PJAGraphicsEnvironment classes.
#
# Check java.awt.fonts path : default is set to /.../jdk.../jre/lib/fonts
# where Lucida True Type fonts delivered with JDK 1.2 are.
# You can add other directories to this path separated by :
#
# user.home system property must be set to the directory where lib/font.properties file
# will be found during GraphicsEnvironment.getLocalGraphicsEnvironment () call.
# ../lib/font.properties file delivered with PJA uses Lucida True Type default fonts.
#
# Under JDK 1.2, you may have to add an other True Type font file in java.awt.fonts path
# if a "No fonts were found in ..." message appears when you use
# GraphicsEnvironment.getLocalGraphicsEnvironment ().getAvailableFontFamilyNames () or
# GraphicsEnvironment.getLocalGraphicsEnvironment ().getAllFonts () methods.
# This font file can be a copy of one of Lucida True Type default fonts (this is due
# to a bug that doesn't take into account all the fonts already used in lib/font.properties)
#
# Run this command in the bin directory of pja or check user.home directory
#
java -Xbootclasspath/a:/opt/WebSphere/AppServer/installedApps/bowstest.ear/BowsEARWeb.war/app/pja.jar \
-Dawt.toolkit=com.eteks.awt.PJAToolkit \
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \
-Djava2d.font.usePlatformFont=false \
-Djava.awt.fonts=/opt/WebSphere/AppServer/java/jre/lib/fonts \
-Duser.home=:/opt/WebSphere/AppServer/java/jre/lib/font.properties \
-classpath /opt/WebSphere/AppServer/installedApps/bowstest.ear/BowsEARWeb.war/app/pjatools.jar \
ToolkitDemo


****************************************************************

The output is


#
# Output of the run
#
Toolkit demo
? Copyright 2000-2001 eTeks <info@eteks.com>.
? Copyright 1996,1998 by Jef Poskanzer <jef@acme.com>.

Font specified in font.properties not found [-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-bold-i---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-bold-r---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1]
Toolkit class in use is com.eteks.awt.PJAToolkit
Disabling platform fonts
Computing ArcDrawer image (instance of com.eteks.java2d.PJABufferedImage)
Saving image to PJAToolkitArcDrawer.gif
Computing PolygonDrawer image (instance of com.eteks.java2d.PJABufferedImage)
Saving image to PJAToolkitPolygonDrawer.gif
Computing TextDrawer image (instance of com.eteks.java2d.PJABufferedImage)
Saving image to PJAToolkitTextDrawer.gif
Computing ImageDrawer image (instance of com.eteks.java2d.PJABufferedImage)
Exception in thread "main" java.lang.NullPointerException
at sun.awt.image.BufferedImageGraphics2D.drawImage(BufferedImageGraphics2D.java:363)
at ToolkitDemo$GraphicsImageDrawer.paint(ToolkitDemo.java:416)
at ToolkitDemo.ComputeImageFiles(ToolkitDemo.java:157)
at ToolkitDemo.main(ToolkitDemo.java:120)



amit

Location : Boston
Member since : Jun 16, 2003
Messages : 11
 Jan 29, 2004 at 10:05 PM
> -Duser.home=:/opt/WebSphere/AppServer/java/jre/lib/font.properties \
This should be
-Duser.home=:/opt/WebSphere/AppServer/java/jre.
since PJA looks for "user.home"/lib/font.properties

forreg

Member since : Jan 22, 2004
Messages : 5
 Jan 29, 2004 at 11:24 PM
Hi Amit,

We did try with this first -
-Duser.home=:/opt/WebSphere/AppServer/java/jre.


But even then - we were getting the same errors that was listed. Thats when we made the current setting. But not much difference.
Any other suggestions?

forreg

Member since : Jan 22, 2004
Messages : 5
 Feb 2, 2004 at 4:17 PM
Can anyone help ?????

[Message from moderator : Posting twice the same message is useless]

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Feb 3, 2004 at 2:06 AM
First it looks like you use a font.properties that requires Arial, Times and Courier fonts that may not be installed on a Unix system like Solaris. The JRE comes only with Lucida True Type fonts. You should better replace the font.properties file(s) in /opt/WebSphere/AppServer/java/jre/lib/fonts by the one provided with PJA Toolkit. Once you don't get "Font specified in font.properties not found" error anymore, have a look at http://www.javasoft.com/products/jdk/1.2/docs/guide/internat/fontprop.html and try to use the True Type fonts you want.
If you search information about using PJA Toolkit with Websphere, read http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=206 or use the forum search engine http://www.eteks.com/pja/en/forum/search.jsp?search=websphere
---
Manu (moderator/modérateur)

forreg

Member since : Jan 22, 2004
Messages : 5
 Feb 6, 2004 at 9:28 PM
Hi,

We could not get the example work. But since we were not interested in drawing images (but only text boxes/rectangles), we followed the steps given in the link http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=236#236

This worked. Thanks a lot for your help/direction.
forreg

monkeydog

Location : Denver, CO
Member since : Mar 4, 2004
Messages : 1
 Mar 4, 2004 at 10:45 PM
I had this same problem and finally figured out that I didn't have photo.jpg and logoeteks.gif in the folder from which I was running the PJAToolkitDemo script. The 4th image drawer uses these two images to create a new merged image.

Note that this resolves the NullPointerException, not the font messages.


Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation