Catalina.log - repeating errors

2009-04-04 Thread Don Millhofer
Hi, we have an application that was developed using NetBeans VisualWeb, 
JSF/JSTL, Tomcat 6.0.16, and
MySQL 5.0.  The application appears to work fine for about a week - 
through all our tests, no problem. Then for some reason it begins to 
generate the following sequence of five errors/warnings every five 
minutes in the Catalina.log until it exceeds a gigabit, then crashes the 
site.   

We have examined the user logs and the apache error logs for the same 
time looking for a trigger and have found that this error ALWAYS occurs 
during a period of inactivity.  An hour or two on each side of the start 
of this repeating log process.


This has been going on for months and we have not been able to identify 
the root cause.  Please if anyone can point us in the right direction we 
would be very great full.  


Thanks much, Don

--
Apr 2, 2009 2:51:42 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
   at 
org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:995)

   at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
   at 
com.sun.webui.theme.SPIThemeFactory.findJarThemeResources(SPIThemeFactory.java:759)
   at 
com.sun.webui.theme.SPIThemeFactory.getThemeResources(SPIThemeFactory.java:468)
   at 
com.sun.webui.theme.SPIThemeFactory.getTheme(SPIThemeFactory.java:178)
   at 
com.sun.webui.jsf.util.ThemeUtilities.getTheme(ThemeUtilities.java:138)

   at com.sun.webui.jsf.component.DropDown.getWidth(DropDown.java:469)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:597)
   at 
javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1585)
   at 
javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1499)
   at 
javax.faces.component.UIComponent.setValueExpression(UIComponent.java:251)
   at 
com.sun.webui.jsf.component.Selector.setValueExpression(Selector.java:514)
   at 
com.sun.webui.jsf.component.DropDownTag.setProperties(DropDownTag.java:92)
   at 
javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:219)

   at

javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:476)
   at

javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:660)
   at

javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1126)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_webuijsf_005fdropDown_005f0(RecTop_jsp.java:3692)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f23(RecTop_jsp.java:3645)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f22(RecTop_jsp.java:3602)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f20(RecTop_jsp.java:3388)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f4(RecTop_jsp.java:816)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f2(RecTop_jsp.java:650)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_h_005fpanelGrid_005f0(RecTop_jsp.java:514)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_webuijsf_005fform_005f0(RecTop_jsp.java:465)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_webuijsf_005fbody_005f0(RecTop_jsp.java:420)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_webuijsf_005fhtml_005f0(RecTop_jsp.java:280)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_webuijsf_005fpage_005f0(RecTop_jsp.java:235)
   at 
org.apache.jsp.RecTop_jsp._jspx_meth_f_005fview_005f0(RecTop_jsp.java:192)

   at org.apache.jsp.RecTop_jsp._jspService(RecTop_jsp.java:158)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)

   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
   at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
   at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
   at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
   at 

Re: Tomcat for Dummies

2009-03-14 Thread Don Millhofer
Thanks André, my favorite thread ever. 


I got so much more from this then reading the spec.

Don


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6 and javamail

2008-11-27 Thread Don Millhofer
Hi Lyallex, for everybody that is still struggling with this issue, here is a 
base non-authentication email class.  Once you get this working start adding 
the special features you need.   This worked with my hosting provider (Kattare) 
who were absolutely worthless in providing any guidance, after much testing.

import java.util.Date;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;


public class Email{
String  d_email, d_password, d_host, d_port;

public Email(String email, String password, String host, String port) {
d_email = email;
d_password = password;
d_host = host;
d_port  = port;
}

public boolean send(String m_to, String m_subject, String m_text) {
// email address
String to = m_to;
String from = d_email;
//  ISP mail server
String host = d_host;
// 
Properties props = new Properties();
// static transport.send() - need to specify which host to send it to
props.put(mail.smtp.host, host);
// To see what is going on
props.put(mail.debug, false);
//
Session session = Session.getInstance(props);
try {
// message
Message msg = new MimeMessage(session);
//message attributes
msg.setFrom(new InternetAddress(from));
InternetAddress[] address = {new InternetAddress(to)};
msg.setRecipients(Message.RecipientType.TO, address);
msg.setSubject(m_subject);
msg.setSentDate(new Date());
// message content
msg.setText(m_text);
//send
Transport.send(msg);
return true;
}
catch (MessagingException mex) {
// 
mex.printStackTrace();
return false;
}
}
 }
 
Happy holidays

Don


At 09:15 AM 11/27/2008, you wrote:
2008/11/27 Rainer Frey [EMAIL PROTECTED]:
 On Thursday 27 November 2008 12:52:56 Lyallex wrote:


 (It would be easier to answer if you'd stop top quoting - but I won't correct
 this whole mail)

Well that's most kind of you, you are being very patient.

I think I need to take a step back here. The boss is happy that
sending email from within the application is now working. I on the
other hand want to know why something that works in Tomcat 5 doesn't
work in Tomcat 6. He's less than inclined to pay for that information
however :-(

Anyway, I will certainly do some more testing, maybe install a clean
Tomcat 6 and create a simple web app that just sends email to a
preconfigured address ... whatever, I'll post results here including
code, mail debug and anything else that might help

Thanks again for your time

lyallex


 OK, firstly thanks for the feedback so far

 Let me be quite clear about one thing.
 I am using the same mail server in both cases. Tomcat and Eclipse are
 running on the same physical device with the same IP address.
 The mail server does not require authentication when accessed from the
 office subnet. The server guys have confirmed this.

 So the problem is certainly on Java side.

 If I configure a JavaMail session as described in the following resource

 http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
 (JavaMail section)

 and set auth to false in context.xml everything works perfectly when
 sending mail from the web application.

 It then should not be anything related to Javamail or Java version,
 incompatible jar files ...

 I am using the same mail server for the standalone test, the test
 where the mail component is configured to use the JNDI resource
 configured in context.xml and the test where the mail component uses
 the same configuration mechanism as the standlone test. The only test
 that fails is the last one.

 Something has changed since Tomcat 5.  I have exactly the same
 component running in several webapps on Tomcat 5 servers without any
 need to configure JNDI resources/Mail sessions etc

 In such a setup, a javamail session is no managed resource for tomcat. I 
 can't
 imagine how the tomcat version could have any influence on that. There must
 be any other difference between your eclipse runtime and this failing tomcat.

 JAVA_OPTS and CATALINA_OPTS have not been modified by me and do not
 contain anything other that the default settings (none of which appear
 to have anything to do with mail config settings).

 Is there any other webapp that might set system properties with mail related
 content? I'd make sure and use an empty Properties object for your test. the
 only reason to use System.getProperties() is the ability to pass JavaMail
 configuration to the JVM command line. I'm not sure what static variables and
 Singletons Javamail has, so I'd test without the resource 

Re: Tomcat 6 and javamail

2008-11-19 Thread Don Millhofer
Are you sure that the mail server, serving the host you are deploying to does 
not require authentication?  I got this same error trying to go through the 
Google Mail Server without proper authentication.

when I invoke the component in the webapp I get
javax.mail.AuthenticationFailedException
debug output shows that my components configuration parameters are
IDENTICAL to those used in standalone mode.

You say in Eclipse you use -  (mail.smtp.auth = false) and sends the email.  
Try sending authentication.

private class SMTPAuthenticator extends javax.mail.Authenticator {
@ Override
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(d_email, d_password);
}
}

Don


At 06:41 AM 11/25/2008, you wrote:
Start by making sure there is only one copy of the javamail jar.   
Remove either the one in tomcat's lib directory or your webapp's lib  
directory.

-- David


On Nov 19, 2008, at 6:04 AM, Lyallex [EMAIL PROTECTED] wrote:

Hi

Tomcat 6.0.16
jdk1.6.0_06
javamail 1.4.1

I have a simple component that uses javamail 1.4.1 to send e-mail
It works perfectly 'standalone' (executed from Eclipse).
It connects to the server (mail.smtp.auth = false)
and sends the email

I've read the available docs at
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
which talk about activation.jar among others
As I am using jdk 1.6 I understand that this is no longer required (it
is included in the distro).

The javamail 1.4.1 jars are in CATALINA_HOME/lib
I have also tried them in WEB-INF/classes/lib

when I invoke the component in the webapp I get
javax.mail.AuthenticationFailedException
debug output shows that my components configuration parameters are
IDENTICAL to those used in standalone mode.

I am not using jndi resources or resources defined in context.xml, I
am not using tomcats JavaMail session management.

I just need this to work as a simple component without lots of config
to start with.

Can anyone let me in on the 'secret' to getting this to work. I've had
similar components working in earlier releases (and they are still
working)
Something must have changed, I'm rather hoping it's not a securuity
thing but I suspect it might be.

I'm not asking anyone to debug my application I could just do with a
pointer or two.

Any help much appreciated

Cheers
lyallex

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat Hosting

2008-07-28 Thread Don Millhofer
Fairly new but Kattare seems to be working for us.

Don

At 10:12 PM 7/27/2008, you wrote:
Having been burnt a number of times,
I was wondering if anyone knew of a reliable
host that specializes in Java Hosting for Tomcat.
Especially if they offer some sort of trial service, 
so I can evaluate the service without making any commitments.

Thanks,
Kerry



  


JSF dataTable with Calendar component

2008-06-19 Thread Don Millhofer
Hi, I am moving an application from glassfish to tomcat and have run into a 
problem with a dataTable component, where I have placed a group panel which 
contains a Calendar component.  This arrangement worked fine with glassfish but 
with tomcat the component acts as a single component rather than a collection.  

When I run the application in glassfish the calendar control is render 
completely in each table row (i.e., both the textfield and the calendar icon) 
however in tomcat the calendar component is rendered completely in the first 
row of the table (textfield and icon) but only the textfield appears in 
subsequent rows.   Also when a date is entered with tomcat the same date 
appears in all textfields in all table rows.   With glassfish the date only 
appears in the row it is entered.

So what I want is what glassfish does - is there away to get the same behavior 
in tomcat?

Is this a bug?

Your assistance is greatly appreciated.

Don