You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jessica Niewint <j....@kiosco.org> on 2002/08/09 17:20:37 UTC

Cocoon & mysql

Ok I want to connect to mysql and I heard that there will be problems with 
jdk1.4. and the mm.mysql.driver ... so I actually have:

jdk 1.2.2
cocoon 2.0.3
tomcat 4.0.4 ...

everything works fine until I try to implement the mm.mysql.driver 
(2.0.14). I downloaded the driver , unjared it.  I tried to install the 
driver by enter the extra-classpath for the driver in the 
$COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is 
"/jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar") and by copy the 
mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib directory 
and add in both cases to the load-class element in the web.xml file 
"org.gjt.mm.msyql.Driver" ...
When I try to open the httpd://localhost:8181/cocoon page I got an internal 
server error ... so what did I forget ? Where was I wrong ???


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Cocoon & mysql

Posted by Michael Mangeng <mi...@ideefix.net>.
Yep..

The .jar´s in /WEB-INF/lib are automatically added to the classpath by
tomcat. The same is true for the /WEB-INF/classes/ dir. (you can check the
classpath´s value in /WEB-INF/logs/core.log

Here this line looks like:
DEBUG   (2002-08-09) 17:02.08:026   [core] (Unknown-URI)
Unknown-thread/Cocoon: Classpath =
/usr/local/tomcat/webapps/cocoon/WEB-INF/classes:/usr/[a-lot-of-files/dirs]

I think your internal server error is of another nature.
Check TOMCAT_HOME/logs/*.log and CONTEXT_ROOT/WEB-INF/logs/*.log for
furthere information.

greetings
mike
----- Original Message -----
From: "Jessica Niewint" <j....@kiosco.org>
To: <co...@xml.apache.org>
Sent: Friday, August 09, 2002 6:05 PM
Subject: Re: Cocoon & mysql


> Sorry but I think I haven't understand you,
>
> You do not have to mention a JARs in <contextroot>/WEB-INF/lib/ in
web.xml.
> Restoring the old web.xml and restart tomcat.
>
> what does it mean, I can add my mm.mysql driver to the web-inf/lib folder
> without changing the web.xml file? If I do this I got a Internal Sever
Error.
> If I add an extra-classpath and list the driver in the load class
> element  I got no internal server error but I got the java-exception in
the
> log file.  I really have no idea what I made wrong with my driver
> installation ...
>
>
> At 17.39 09/08/2002 +0200, you wrote:
> >Hi Jessica
> >
> >You do not have to mention a JARs in <contextroot>/WEB-INF/lib/ in
web.xml.
> >Restoring the old web.xml and restart tomcat.
> >
> >If the error is still there, try to locate it in
> ><contextroot>/WEB-INF/logs/*.logs.
> >
> >greetings
> >mike
> >----- Original Message -----
> >From: "Jessica Niewint" <j....@kiosco.org>
> >To: <co...@xml.apache.org>
> >Sent: Friday, August 09, 2002 5:20 PM
> >Subject: Cocoon & mysql
> >
> >
> > > Ok I want to connect to mysql and I heard that there will be problems
with
> > > jdk1.4. and the mm.mysql.driver ... so I actually have:
> > >
> > > jdk 1.2.2
> > > cocoon 2.0.3
> > > tomcat 4.0.4 ...
> > >
> > > everything works fine until I try to implement the mm.mysql.driver
> > > (2.0.14). I downloaded the driver , unjared it.  I tried to install
the
> > > driver by enter the extra-classpath for the driver in the
> > > $COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is
> > > "/jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar") and by copy the
> > > mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib
directory
> > > and add in both cases to the load-class element in the web.xml file
> > > "org.gjt.mm.msyql.Driver" ...
> > > When I try to open the httpd://localhost:8181/cocoon page I got an
> >internal
> > > server error ... so what did I forget ? Where was I wrong ???
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question  has not already been answered in the
> > > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> > >
> > > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > > For additional commands, e-mail:   <co...@xml.apache.org>
> > >
> > >
> >
> >
> >---------------------------------------------------------------------
> >Please check that your question  has not already been answered in the
> >FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> >To unsubscribe, e-mail:     <co...@xml.apache.org>
> >For additional commands, e-mail:   <co...@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Cocoon & mysql

Posted by Jessica Niewint <j....@kiosco.org>.
Sorry but I think I haven't understand you,

You do not have to mention a JARs in <contextroot>/WEB-INF/lib/ in web.xml.
Restoring the old web.xml and restart tomcat.

what does it mean, I can add my mm.mysql driver to the web-inf/lib folder 
without changing the web.xml file? If I do this I got a Internal Sever Error.
If I add an extra-classpath and list the driver in the load class 
element  I got no internal server error but I got the java-exception in the 
log file.  I really have no idea what I made wrong with my driver 
installation ...


At 17.39 09/08/2002 +0200, you wrote:
>Hi Jessica
>
>You do not have to mention a JARs in <contextroot>/WEB-INF/lib/ in web.xml.
>Restoring the old web.xml and restart tomcat.
>
>If the error is still there, try to locate it in
><contextroot>/WEB-INF/logs/*.logs.
>
>greetings
>mike
>----- Original Message -----
>From: "Jessica Niewint" <j....@kiosco.org>
>To: <co...@xml.apache.org>
>Sent: Friday, August 09, 2002 5:20 PM
>Subject: Cocoon & mysql
>
>
> > Ok I want to connect to mysql and I heard that there will be problems with
> > jdk1.4. and the mm.mysql.driver ... so I actually have:
> >
> > jdk 1.2.2
> > cocoon 2.0.3
> > tomcat 4.0.4 ...
> >
> > everything works fine until I try to implement the mm.mysql.driver
> > (2.0.14). I downloaded the driver , unjared it.  I tried to install the
> > driver by enter the extra-classpath for the driver in the
> > $COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is
> > "/jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar") and by copy the
> > mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib directory
> > and add in both cases to the load-class element in the web.xml file
> > "org.gjt.mm.msyql.Driver" ...
> > When I try to open the httpd://localhost:8181/cocoon page I got an
>internal
> > server error ... so what did I forget ? Where was I wrong ???
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> >
>
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Cocoon & mysql

Posted by Michael Mangeng <mi...@ideefix.net>.
Hi Jessica

You do not have to mention a JARs in <contextroot>/WEB-INF/lib/ in web.xml.
Restoring the old web.xml and restart tomcat.

If the error is still there, try to locate it in
<contextroot>/WEB-INF/logs/*.logs.

greetings
mike
----- Original Message -----
From: "Jessica Niewint" <j....@kiosco.org>
To: <co...@xml.apache.org>
Sent: Friday, August 09, 2002 5:20 PM
Subject: Cocoon & mysql


> Ok I want to connect to mysql and I heard that there will be problems with
> jdk1.4. and the mm.mysql.driver ... so I actually have:
>
> jdk 1.2.2
> cocoon 2.0.3
> tomcat 4.0.4 ...
>
> everything works fine until I try to implement the mm.mysql.driver
> (2.0.14). I downloaded the driver , unjared it.  I tried to install the
> driver by enter the extra-classpath for the driver in the
> $COCOON_HOME/WEB-INF/web.xml file (my ABSOLUTE-PATH-TO-ARCHIVE is
> "/jdbc/mm.mysql-2.0.14/mm.mysql-2.0.14-bin.jar") and by copy the
> mm.mysql-2.0.14-bin.jar file  into the $COCOON_HOME/WEB-INF/lib directory
> and add in both cases to the load-class element in the web.xml file
> "org.gjt.mm.msyql.Driver" ...
> When I try to open the httpd://localhost:8181/cocoon page I got an
internal
> server error ... so what did I forget ? Where was I wrong ???
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Problems with 2.0.3

Posted by Artur Bialecki <ar...@digitalfairway.com>.
> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim.gritsenko@verizon.net]
> > From: Artur Bialecki [mailto:artur@digitalfairway.com]
> > 
> > 
> > I'm upgrading from 2.0.2 to 2.0.3 and now I get the following error:
> > 
> > ERROR   (2002-08-09) 11:15.00:338   [sitemap]
> > (/NASApp/dfc/common/controlpanel.xml) Thread-39/Handler: Error
> compiling
> > sitemap
> > java.io.FileNotFoundException: /WEB-
> > INF/work/org/apache/cocoon/www/sitemap_xmap.java (No such file or
> directory)
> > 	at java.io.FileOutputStream.open(Native Method)
> > 	at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
> > 	at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
> > 	at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
> > 	at java.io.FileWriter.<init>(FileWriter.java:63)
> > 	at
> org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:96)
> > 	at
> org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:83)
> > 	at
> >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.gen
> erateR
> > esource(ProgramGeneratorImpl.java:385)
> > 	at
> >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.cre
> ateRes
> > ource(ProgramGeneratorImpl.java:333)
> > 	at
> >
> org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loa
> d(Prog
> > ramGeneratorImpl.java:292)
> > 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
> > 	at java.lang.Thread.run(Thread.java:484)
> > 
> > Is the / in front of WEB-INF what's causing the problem?
> > Any ideas how to fix this?
> 
> If it were some other servlet engine, I would suggest following
> checklist:
> 
> 1. Clean work directory
> 2. Set incremental processing to false (should help with Xalan error
> reporting)
> 3. Restart engine
> 4. Try some url, if fails check sitemap_xmap.java: If file is absent,
> something is wrong with the XSLT processing; if file is 0 size, search
> for the message from the stylesheet; if file is more then 0 bytes, try
> compiling it.
> 
> My bet would be on some invalid syntax in the sitemap.
> 
> 
> But because you are using iPlanet, were it is miracle when it works, I
> don't know what to suggest to you. May be (if above does not help) you
> should try launching your app under Tomcat 4.0.4, just to try it out?
> 
> Vadim

To solve the problem I had to change my web.xml so the work-directory
is set to WEB-INF/work instead of /WEB-INF/work. The upload-directory
and cache-directory work fine the old way.

And yes iPlanet == BIG SUCKAGE

Artur...

> 
> 
> > I also noticed that src/webapp/WEB-INF/cocoon.xconf
> > is missing "compiler" parameter for <java-language name="java" .../>
> > 
> > (iAS6.5, win/solaris, jdk1.3.1, cocoon is one of many servlets in
> ear(war))
> > 
> > Thanks,
> > 
> > Artur...
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Problems with 2.0.3

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Artur Bialecki [mailto:artur@digitalfairway.com]
> 
> 
> I'm upgrading from 2.0.2 to 2.0.3 and now I get the following error:
> 
> ERROR   (2002-08-09) 11:15.00:338   [sitemap]
> (/NASApp/dfc/common/controlpanel.xml) Thread-39/Handler: Error
compiling
> sitemap
> java.io.FileNotFoundException: /WEB-
> INF/work/org/apache/cocoon/www/sitemap_xmap.java (No such file or
directory)
> 	at java.io.FileOutputStream.open(Native Method)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
> 	at java.io.FileWriter.<init>(FileWriter.java:63)
> 	at
org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:96)
> 	at
org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:83)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.gen
erateR
> esource(ProgramGeneratorImpl.java:385)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.cre
ateRes
> ource(ProgramGeneratorImpl.java:333)
> 	at
>
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.loa
d(Prog
> ramGeneratorImpl.java:292)
> 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> Is the / in front of WEB-INF what's causing the problem?
> Any ideas how to fix this?

If it were some other servlet engine, I would suggest following
checklist:

1. Clean work directory
2. Set incremental processing to false (should help with Xalan error
reporting)
3. Restart engine
4. Try some url, if fails check sitemap_xmap.java: If file is absent,
something is wrong with the XSLT processing; if file is 0 size, search
for the message from the stylesheet; if file is more then 0 bytes, try
compiling it.

My bet would be on some invalid syntax in the sitemap.


But because you are using iPlanet, were it is miracle when it works, I
don't know what to suggest to you. May be (if above does not help) you
should try launching your app under Tomcat 4.0.4, just to try it out?

Vadim


> I also noticed that src/webapp/WEB-INF/cocoon.xconf
> is missing "compiler" parameter for <java-language name="java" .../>
> 
> (iAS6.5, win/solaris, jdk1.3.1, cocoon is one of many servlets in
ear(war))
> 
> Thanks,
> 
> Artur...


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Problems with 2.0.3

Posted by Artur Bialecki <ar...@digitalfairway.com>.
I'm upgrading from 2.0.2 to 2.0.3 and now I get the following error:

ERROR   (2002-08-09) 11:15.00:338   [sitemap] (/NASApp/dfc/common/controlpanel.xml) Thread-39/Handler: Error compiling sitemap
java.io.FileNotFoundException: /WEB-INF/work/org/apache/cocoon/www/sitemap_xmap.java (No such file or directory)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:132)
	at java.io.FileWriter.<init>(FileWriter.java:63)
	at org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:96)
	at org.apache.cocoon.util.IOUtils.serializeString(IOUtils.java:83)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:385)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createResource(ProgramGeneratorImpl.java:333)
	at org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:292)
	at org.apache.cocoon.sitemap.Handler.run(Handler.java:265)
	at java.lang.Thread.run(Thread.java:484)

Is the / in front of WEB-INF what's causing the problem?
Any ideas how to fix this?

I also noticed that src/webapp/WEB-INF/cocoon.xconf
is missing "compiler" parameter for <java-language name="java" .../>

(iAS6.5, win/solaris, jdk1.3.1, cocoon is one of many servlets in ear(war))

Thanks,

Artur...

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>