You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Amit <am...@hotmail.com> on 2001/02/02 21:20:54 UTC
mod_jserv/7181: Bind Exception + Classnotfound error
>Number: 7181
>Category: mod_jserv
>Synopsis: Bind Exception + Classnotfound error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri Feb 02 12:30:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: amitks@hotmail.com
>Release: 1.3
>Organization:
apache
>Environment:
WinNT 4x
jdk1.2.2
classpath properly set with all jars including also a file called jndi.jar
Code used in Servlet where prob occurs is :
-----------------------------------------
import javax.naming.InitialContext;
...
public class urs extends HttpServlet
{
public void doGet( HttpServletRequest.., HttpServletResponse res) ..
{
InitialContext intx=new InitialContext(); // crash!!!
....
}
>Description:
Problem 1:
WHEN STARTING APACHE ::
In "error.log" in Apache >
ApacheJServ/1.1.1: Exception creating the server socket: java.net.BindException: Address in use: bind
ApacheJServ/1.1.1: Exception creating the server socket: java.net.BindException: Address in use: bind
http:// localhost works perfectly after starting ::
Problem 2: Now I load a Servlet using JServ: a perfect working servlet, throws following errors:
In error.log in Apache
: null at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
at java.lang.Thread.run(Thread.java:479)
In access.log in Apache
:h127.0.0.1 - - [02/Feb/2001:12:11:17 -0800] "GET /servlets/urs HTTP/1.1" 500 611
In "Jserv.log in Apache Jserv 1.1.1\logs\jserv.log"
:d[02/02/2001 12:11:17:732 PST] java.lang.NoClassDefFoundError: javax/naming/InitialContext
at urs.doGet(urs.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
at java.lang.Thread.run(Thread.java:479)
In "Jserv.log in Apache Jserv 1.1.1\logs\mod_jserv.log"
:h[02/02/2001 20:11:17:722] (ERROR) ajp12: Servlet Error: java.lang.NoClassDefFoundError: javax/naming/InitialContext: javax/naming/InitialContext
[02/02/2001 20:11:17:732] (ERROR) an error returned handling request via protocol "ajpv12"
>How-To-Repeat:
just create a simple servlet having three lines of code, as above
start the apache webs server, the First error occurs
load the servelet . the second error occurs
>Fix:
Nopes, I tried setting classpath, in jserv.properties by using followwing code,
wrapper.classpath=C:\Program Files\Apache JServ 1.1.1\jndi.jar
but nothing works, Also i trid putting giving the jar file in every possible way but it doesnt work.
please help !!!
regards
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]