I copied the PJA jar files to the jre/lib/ext directory and added the following line to the catalina.sh file

CATALINA_OPTS='-Xbootclasspath/p:/usr/local/pja/lib/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava2d.font.usePlatformFont=false -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava.awt.fonts=/usr/local/jdk1.3.1_02/jre/lib/fonts -Duser.home=/usr/local/pja -cp /usr/local/jdk1.3.1_02/jre/lib/ext/pjatools.jar'

works fine on a headless SuSE 7.3 machine.  You might have to change the paths a little.

Bert

At 16:15 12/02/2002 +0000, you wrote:

Apologies in advance for the long windedness of this post, I wanted to
get all the details down.

I'm trying to install cocoon on a tomcat server on a solaris box
cocoon=2.0.1
tomcat=4.0.1
solaris=2.8
jdk=1.3 (in j2se)

I have been successful in deploying cocoon in tomcat on windows xp as a
test, but I need it on my solaris box to do actual work on.

I tried straight deployment off dropping the .war into webapps and going
to the cocoon url but got the sitemap errors in the page.
After reading the cocoon install guide and cocoons error.log I realized
I was operating in a headless environment.

So I downloaded the pja jars and installed them in /usr/j2se/jre/lib/.

I have put the pja jars in the classpath tomcat uses by altering
bin/catalina.sh, so the classpath setting line now reads:
<QUOTE>
CP=$CP:"$JAVA_HOME/lib/tools.jar":"$JAVA_HOME/jre/lib/pja.jar":"$JAVA_HO
ME/jre/lib/pjatools.jar"
</QUOTE>

($JAVA_HOME=/usr/j2se)

I added suitable CATALINA_OPTS to bin/startup.sh and bin/shutdown.sh as
suggested on the cocoon site

<QUOTE>
CATALINA_OPTS='
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.fonts=/usr/j2se/jre/lib/fonts'
export CATALINA_OPTS
</QUOTE>

my tomcat start up confirms this
<QUOTE>
sandpit [sparc] 14% ./startup.sh
Guessing CATALINA_HOME from catalina.sh to ./..
Setting CATALINA_HOME to ./..
Using CLASSPATH:
./../bin/bootstrap.jar:/usr/j2se/lib/tools.jar:/usr/j2se/jre/lib/pja.jar
:/usr/j2se/jre/lib/pjatools.jar
Using CATALINA_BASE: ./..
Using CATALINA_HOME: ./..
Using JAVA_HOME:     /usr/j2se
Using CATALINA_OPTS:
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.fonts=/usr/j2se/jre/lib/fonts
</QUOTE>

Tomcat works as expected.

Cocoon is deployed as a war file (and has been redeployed several
times),
but it still doesn't work I get the usual sitemap error page.
The errors in cocoons error log to match this are are:

<QUOTE>
ERROR   (2002-02-12) 12:05.21:493   [sitemap.generator.velocity]
(/cocoon/) Http
Processor[8080][4]/VelocityGenerator: ResourceManager : unable to find
resource
'VM_global_library.vm' in any resource loader.
ERROR   (2002-02-12) 12:05.21:618   [sitemap.generator.velocity]
(/cocoon/) Http
Processor[8080][4]/VelocityGenerator: ResourceManager : unable to find
resource
'VM_global_library.vm' in any resource loader.
ERROR   (2002-02-12) 12:05.21:671   [sitemap.generator.xmldb] (/cocoon/)
HttpPro
cessor[8080][4]/XMLDBGenerator: There was a problem setting up the
connection
ERROR   (2002-02-12) 12:05.21:673   [sitemap.generator.xmldb] (/cocoon/)
HttpPro
cessor[8080][4]/XMLDBGenerator: Make sure that your driver is available
ERROR   (2002-02-12) 12:05.21:696   [sitemap.generator.xmldb] (/cocoon/)
HttpPro
cessor[8080][4]/XMLDBGenerator: There was a problem setting up the
connection
ERROR   (2002-02-12) 12:05.21:698   [sitemap.generator.xmldb] (/cocoon/)
HttpPro
cessor[8080][4]/XMLDBGenerator: Make sure that your driver is available
ERROR   (2002-02-12) 12:05.21:741   [sitemap.generator.xmldbcollection]
(/cocoon
/) HttpProcessor[8080][4]/XMLDBCollectionGenerator: There was a problem
setting
up the connection
ERROR   (2002-02-12) 12:05.21:746   [sitemap.generator.xmldbcollection]
(/cocoon
/) HttpProcessor[8080][4]/XMLDBCollectionGenerator: Make sure that your
driver i
s available
ERROR   (2002-02-12) 12:05.21:763   [sitemap.generator.xmldbcollection]
(/cocoon
/) HttpProcessor[8080][4]/XMLDBCollectionGenerator: There was a problem
setting
up the connection
ERROR   (2002-02-12) 12:05.21:765   [sitemap.generator.xmldbcollection]
(/cocoon/) HttpProcessor[8080][4]/XMLDBCollectionGenerator: Make sure
that your driver is available
ERROR   (2002-02-12) 12:05.24:392   [sitemap] (/cocoon/)
HttpProcessor[8080][4]/Handler: Error compiling sitemap
java.lang.Error: Could not find class:
com.eteks.java2d.PJAGraphicsEnvironment
        at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron
ment.java:61)
        at java.awt.Font.initializeFont(Font.java:264)
        at java.awt.Font.<init>(Font.java:298)
---note I have got rid of the rest of the error stack as it goes on
listing all to problems that not finding the PJAGraphics environment
causes and isn't that informative and is very long
</QUOTE>


It looks like it can't find the pja jars so i test to see if the pja
jars are available

I deploy a jsp page in tomcat with import of the pja classes to see if
they are available.
jsp code being <%@ page import="java.util.*, com.eteks.awt.PJAToolkit,
com.eteks.java2d.PJAGraphicsEnvironment, java.awt.fonts" %>

This page gives the error

<QUOTE>
org.apache.jasper.JasperException: Unable to compile class for JSP
/usr/local/tomcat/jakarta-tomcat-4.0.1/work/localhost/test/work$jsp.java
:6: Class java.awt.fonts not found in import.
import  java.awt.fonts;
</QUOTE>

so the jars are there but it can't find java.awt.fonts

I confirm the pja jars being available from command line java

<QUOTE>
% /usr/j2se/bin/java com.eteks.java2d.PJAGraphicsEnvironment
Exception in thread "main" java.lang.NoSuchMethodError: main

% /usr/j2se/bin/java com.eteks.awt.PJAToolkit
This method is deprecated. Run PJANativeToolkitComparison class

/usr/j2se/bin/java java.awt.fonts
Exception in thread "main" java.lang.NoClassDefFoundError:
java/awt/fonts

</QUOTE>


The pja jar errors are those that you'de expect if they are in the
classpath, so again it looks like pja jars are there and available but
the java.awt.fonts aren't.

So it either looks like my setting for java.awt.fonts in CATALINA_OPTS
is wrong (they are set as -Djava.awt.fonts=/usr/j2se/jre/lib/fonts) or
something is screwy.
Does anyone know what fonts setting should be?

an ls of /usr/j2se/jre/lib/fonts shows

<QUOTE>
LucidaBrightDemiBold.ttf         LucidaSansRegular.ttf
LucidaBrightDemiItalic.ttf       LucidaTypewriterBold.ttf
LucidaBrightItalic.ttf           LucidaTypewriterBoldOblique.ttf
LucidaBrightRegular.ttf          LucidaTypewriterOblique.ttf
LucidaSansDemiBold.ttf           LucidaTypewriterRegular.ttf
LucidaSansDemiOblique.ttf        fonts.dir
LucidaSansOblique.ttf
</QUOTE>

I have searched this mailing list for solutions but can't find any.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to