Re: sendmail xsl problem

2002-04-23 Thread Christian Haul

On 17.Apr.2002 -- 10:38 AM, Perry Molendijk wrote:
 Hello,
 
 When I run the sendmail logicsheet I get a problem with the
 transformation of sendmail.xsl.
 
 Somewhere in the process the values of sendmail:subject, sendmail:body
 and sendmail:smtphost are not added to the generated java code.

I've just checked a version into CVS that works for me (while the
previous showed the errors you see). Please check with CVS version.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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]




RE: sendmail xsl problem - singleton mail session?

2002-04-23 Thread Christopher Watson

Hello,

I've played with sendmail.xsl a bit recently.
I notice that it uses
javax.mail.Session.getDefaultInstance

I had trouble getting this one to change mail hosts via the parameter:
subsequent messages continued to use the host I'd used in the first message

I haven't delved into javax.mail far enough to be sure,
but my guess from the behaviour is that getDefaultInstance sets up a
Singleton session.

To get round the not-changing-mailhosts problem
I did myself a clone of sendmail.xsl but using
javax.mail.Session.getInstance instead of
javax.mail.Session.getDefaultInstance
and whacked into
\WEB-INF\classes\org\apache\cocoon\components\language\markup\xsp\java

and now I can use different hosts at will

I'm wondering whether it might be a useful improvement to have a parameter
to decide between

javax.mail.Session.getDefaultInstance and javax.mail.Session.getInstance

Hope this is of use to someone

Christopher Watson
 -Original Message-
 From: Christian Haul [mailto:[EMAIL PROTECTED]]
 Sent: 23 April 2002 12:07
 To: [EMAIL PROTECTED]
 Subject: Re: sendmail xsl problem


 On 17.Apr.2002 -- 10:38 AM, Perry Molendijk wrote:
  Hello,
 
  When I run the sendmail logicsheet I get a problem with the
  transformation of sendmail.xsl.
 
  Somewhere in the process the values of sendmail:subject,
 sendmail:body
  and sendmail:smtphost are not added to the generated java code.

 I've just checked a version into CVS that works for me (while the
 previous showed the errors you see). Please check with CVS version.

   Chris.

 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

 -
 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. http://xml.apache.org/cocoon/faqs.html

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




sendmail xsl problem

2002-04-16 Thread Perry Molendijk

Hello,

When I run the sendmail logicsheet I get a problem with the
transformation of sendmail.xsl.

Somewhere in the process the values of sendmail:subject, sendmail:body
and sendmail:smtphost are not added to the generated java code.

e.g. (from .java file in tomcat\work)

if (!null.equals(String.valueOf())) {
_sendmail_properties.put(mail.smtp.host,String.valueOf());
  }

instead of:

if (!null.equals(String.valueOf(my.mail.host))) {

_sendmail_properties.put(mail.smtp.host,String.valueOf(my.mail.host));
  }

I got this by running sendmail.xsl against may XSP with Saxon from the
commandline, so not problem with the XSL.

Below are all the details:

environment: Win2K, Tomcat 4, Cocoon-2.0.2, JDK1.3.1

The XSP:

?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
 page
  sendmail:send-mail
   sendmail:from[EMAIL PROTECTED]/sendmail:from
   sendmail:to[EMAIL PROTECTED]/sendmail:to
   sendmail:subjecta/sendmail:subject
   sendmail:bodya/sendmail:body
   sendmail:smtphostmail.m.iinet.net.au/sendmail:smtphost
  /sendmail:send-mail
 /page
/xsp:page

original message

org.apache.cocoon.components.language.LanguageException: Error compiling
mail_xsp:
Line 128, column 32: method valueOf() not found in class java.lang.String
Line 129, column 57: method valueOf() not found in class java.lang.String
Line 146, column 42: method valueOf() not found in class java.lang.String
Line 147, column 39: method valueOf() not found in class java.lang.String
Line 0, column 0:
4 errors

Full Exception Chain Stacktrace

Original exception :
org.apache.cocoon.components.language.LanguageException: Error compiling
mail_xsp:
Line 128, column 32: method valueOf() not found in class java.lang.String
Line 129, column 57: method valueOf() not found in class java.lang.String
Line 146, column 42: method valueOf() not found in class java.lang.String
Line 147, column 39: method valueOf() not found in class java.lang.String
Line 0, column 0:
4 errors

at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
JavaLanguage.java:243)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
e.load(CompiledProgrammingLanguage.java:197)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:383)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:328)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:291)
at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
.java:203)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:202)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:142)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:320)
at
org.apache.cocoon.www.sitemap_xmap.matchN10585(C:\tomcat\work\localhost\coco
on\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:7214)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat\work\localhost\cocoon\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3102)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat\work\localhost\cocoon\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2571)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at