0

I have follwed the tutorial on JSP database connectivity according to Model View Controller (MVC) Model 2 for login servlet. I use ServletConfig servlet and init- parameters from web.xml according to the tutorial.
I am using Netbeans IDE. Bu I receive this exception whan I try to use login form.

javax.servlet.ServletException: Servlet.init() for servlet UserLogin threw exception
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:140)
	org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	java.lang.Thread.run(Unknown Source)

here is my web.xml for NetBeans project:

<servlet>
        <init-param>
          <param-name>postrgesqlDriver</param-name>    
          <param-value>org.postgresql.Driver</param-value>
        </init-param>
        
        <init-param>
            <param-name>dbURL</param-name>
            <param-value>jdbc:postgresql://127.0.0.1:port/database</param-value>
        </init-param>
        
        <init-param>
            <param-name>dbUserName</param-name>
            <param-value>user</param-value>
        </init-param>
        
         <init-param>
            <param-name>dbPass</param-name>
            <param-value>password</param-value>
        </init-param>
        
           
     </servlet>
     
    
      <servlet>
        <servlet-name>UserLogin</servlet-name>
        <servlet-class>root.web.Login</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>UserLogin</servlet-name>
        <url-pattern>/Login.do</url-pattern>
    </servlet-mapping>
    
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
</web-app>

I searched the forums and googled, but cannot find any explanation what does this org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
and etc mean?. Maybe it is something obvious, just can't see it ?

All other servlets were working fine in NetBeans and when run on tomcat.

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by peter_budo
0

solved. created new servlet and copy-pasted the code. somehow error message disappeared.

1

Sometimes this is the issue with copy&paste, some characters do sneak in, even though they remind hidden to programmer eye. Best solution at times like that is write it line by line

PS: Thanx for reading that article :)

Edited by peter_budo: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.