cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Castagnaro <russ...@synctank.com>
Subject problem using XSP in Weblogic
Date Fri, 21 Jan 2000 05:58:21 GMT
OK, so if I've got this right Cocoon will use the tools.jar in the classpath to
call javac.
In Weblogic there are many different classpaths, the two most important being
the system classpath and the weblogic classpath.
They do this because there are different classloaders running.

When I try to use XSP, I get the following error:
Cocoon 1.6

Error found handling the request.

      java.lang.Exception: XSP Java Compiler: Compilation failed for _page.java
      6: Package org.w3c.dom not found in import.
          import org.w3c.dom.*;
                 ^
      7: Package org.xml.sax not found in import.
          import org.xml.sax.*;
etc..

It seems to me that this would indicate that javac uses the system classpath
instead of the weblogic class path. Classes cannot be in both classpaths at the
same time, so best as I can figure, I can't get XSP to run using weblogic.

I've tried including the classes in the system classpath, but that won't work.
Is there a way to indicate the classpath for javac to use?  It would really be a
bummer if we couldn't use XSP in Weblogic.
Regardless the docs should probably be updated to warn users about this until
there is a workaround.


-rrc
For those interested I've tried:
REM This worked
set CLASSPATH=.;%WL%\classes\boot;%WL%\eval\cloudscape\lib\cloudscape.jar
set
WEBLOGICCLASSPATH=%WL%\classes;%WL%\license;%WL%\lib\weblogicaux.jar;%WL%\myserver\serverclasses;c:\development\castagnaro\classes

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;c:\student\com\bea\EJBD\examples\PrePackagedSessionEJB.jar

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;C:\jdk1.2\lib\tools.jar;c:\downloads\xml-apache\cocoon\bin\Cocoon.jar;c:\downloads\xml-apache\cocoon\bin\fop_bin_0_12_0.jar;c:\downloads\xml-apache\cocoon\bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;C:\java\xalan_0_19_2\xalan.jar;C:\java\xerces-1_0_1\xerces.jar

REM This did not work
set CLASSPATH=.;%WL%\classes\boot;%WL%\eval\cloudscape\lib\cloudscape.jar
set
WEBLOGICCLASSPATH=%WL%\classes;%WL%\license;%WL%\lib\weblogicaux.jar;%WL%\myserver\serverclasses;c:\development\castagnaro\classes

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;c:\student\com\bea\EJBD\examples\PrePackagedSessionEJB.jar

set
CLASSPATH=%CLASSPATH%;C:\jdk1.2\lib\tools.jar;c:\downloads\xml-apache\cocoon\bin\Cocoon.jar;c:\downloads\xml-apache\cocoon\bin\fop_bin_0_12_0.jar;c:\downloads\xml-apache\cocoon\bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;C:\java\xalan_0_19_2\xalan.jar;C:\java\xerces-1_0_1\xerces.jar

REM neither did this
set CLASSPATH=.;%WL%\classes\boot;%WL%\eval\cloudscape\lib\cloudscape.jar
set
WEBLOGICCLASSPATH=%WL%\classes;%WL%\license;%WL%\lib\weblogicaux.jar;%WL%\myserver\serverclasses;c:\development\castagnaro\classes

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;c:\student\com\bea\EJBD\examples\PrePackagedSessionEJB.jar

set
CLASSPATH=%CLASSPATH%;C:\jdk1.2\lib\tools.jar;c:\downloads\xml-apache\cocoon\bin\Cocoon.jar;c:\downloads\xml-apache\cocoon\bin\fop_bin_0_12_0.jar;c:\downloads\xml-apache\cocoon\bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;C:\java\xalan_0_19_2\xalan.jar;C:\java\xerces-1_0_1\xerces.jar

WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;C:\jdk1.2\lib\tools.jar;c:\downloads\xml-apache\cocoon\bin\Cocoon.jar;c:\downloads\xml-apache\cocoon\bin\fop_bin_0_12_0.jar;c:\downloads\xml-apache\cocoon\bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;C:\java\xalan_0_19_2\xalan.jar;C:\java\xerces-1_0_1\xerces.jar



And then to run it:
java -ms64m -mx64m -classpath %CLASSPATH%
-Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager
-Djava.security.policy=%WL%\weblogic.policy weblogic.Server

"Curro, Joseph" wrote:

> Yes, I had the same problem yesterday.  It looks like you have only the JRE
> installed on your machine (or referenced by the classpath).  You need to
> have the full JDK, as the XSP files are compiled into bytecode on the fly.
>
> Joe
>
> -----Original Message-----
> From: Steven Maring [mailto:Steven.Maring@trcinc.com]
> Sent: Thursday, January 20, 2000 11:16 AM
> To: 'cocoon-users@xml.apache.org'
> Cc: Alan M. Sourk
> Subject: tools.jar problem on Solaris
>
> I just installed Cocoon_1.6 with the latest Xalan and Xerces on a Solaris
> box.  I added the tools.jar to a CLASSPATH in the apachectl startup script
> and as a wrapper.classpath in jserv.properties.  But still, everytime I try
> to run the XSP examples I get:
>
> java.lang.NoClassDefFoundError: sun/tools/javac/Main
>                               at
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(Compi
> led Code)
>
> I didn't have this problem on the Linux box.  Anyone know anything about
> this?
>
> -Steve M.
> Tampa, FL  USA
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--

Russell Castagnaro
Chief Mentor
SyncTank Solutions
http://www.synctank.com

Earth is the cradle of mankind; one does not remain in the cradle forever
-Tsiolkovsky



Mime
View raw message