Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

init() method invocation

瀏覽次數:0 次
跳到第一則未讀訊息

vamsi

未讀,
2001年3月16日 凌晨1:43:492001/3/16
收件者:

hi all

iam using weblogic5.1 servicepack 7 as my servlet container.
if i get an error in the init() method of the servlet and the servlet
throws
a ServletException,
then according to the spec, the server may put that servlet into
service
after some time (this may be when another request
comes for the same servlet) by again calling it's init() method.

but in weblogic server, if a servlet throws a ServletException
in the init()
method and if another request comes to it
it gives the following exception and gives an internal error 500:

weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ getServlet()
returned null!
! ]
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:94)
at java.lang.Error.<init>(Error.java:50)
at weblogic.utils.NestedError.<init>(NestedError.java:15)
at weblogic.utils.AssertionError.<init>(AssertionError.java:49)
at weblogic.utils.Debug.assert(Debug.java:73)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:
104)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l
.java:742)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l
.java:686)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
M
anager.java:247)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

the spec is as follows:

During initialization, the servlet instance can signal that it
is not to be
placed into active service by
throwing an UnavailableException or ServletException. If a servlet
instance
throws
an exception of this type, it must not be placed into active service
and the
instance must be
immediately released by the servlet container. The destroy method
is not
called in this case as
initialization was not considered to be successful.

After the instance of the failed servlet is released, a new instance
may be
instantiated and initialized
by the container at any time. The only exception to this rule is
if the
UnavailableException
thrown by the failed servlet which indicates the minimum time of
unavailability. In this case, the
container must wait for the minimum time of unavailability to pass
before
creating and initializing a
new servlet instance.

is there any property to be set in weblogic property files or am
i missing
something.
vamsi


Tom Mitchell

未讀,
2001年3月28日 上午8:31:432001/3/28
收件者:
Vamsi,

You will probably get a response by posting this question to
weblogic.developer.interest.servlet.

HTH.

vamsi wrote:

--
Tom Mitchell
t...@tom.org
Very Current Stoneham, MA Weather
http://www.tom.org


0 則新訊息