tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33307] - jspInit() method is throwing an NamingException when extracting a factory object from a JNDI context
Date Tue, 01 Feb 2005 08:04:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33307





------- Additional Comments From seshagiri.shyam@wipro.tcpn.com  2005-02-01 09:04 -------
Created an attachment (id=14149)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=14149&action=view)
testcase required to reproduce the naming exception( for the bug:33307)

1) unzip the above attachment in some directory(say test)under
webapps(directory) and add the following lines in conf\server.xml:
<Context path="/test" docBase="d:\jakarta-tomcat-4.1.30\webapps\test"
debug="0"/>
     
	 <!-- DefaultContext -->
	<DefaultContext reloadable="true" crossContext="true" useNaming="true">

		<!-- bean/MyBeanFactory -->
		   <Resource name="bean/MyBeanFactory" auth="Container"
type="com.mycompany.MyBean"/>
		   <ResourceParams name="bean/MyBeanFactory">
			<parameter>
				<name>factory</name>
			       
<value>org.apache.naming.factory.BeanFactory</value>
			</parameter>
			<parameter>
				<name>bar</name>
				<value>23</value>
			</parameter>
		   </ResourceParams>
	   </DefaultContext>
	<!-- /DefaultContext -->  
2) start the server.
3) the exception will be reported :

Starting service Tomcat-Standalone
Apache Tomcat/4.1.30
>>>>>>>>>>>>>jspInit04<<<<<<<<<<<<<
Getting InitialContext
Doing initContext lookup
Extracting factory bean object
javax.naming.NamingException: Cannot create resource instance
	at org.apache.naming.factory.ResourceEnvFactory.getObjectInstance(Resou

ceEnvFactory.java:146)
	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:

01)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
	at org.apache.jsp.samplequery04_jsp.jspInit(samplequery04_jsp.java:26)
	at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:119)
	at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWra

per.java:158)
	at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:440)
	at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:390)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContex

.java:471)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrappe

.java:190)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:

95)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper

java:943)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:8

3)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardConte

t.java:3427)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:

628)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188


	at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188


	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:36

)
	at org.apache.catalina.core.StandardService.start(StandardService.java:

97)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:21

0)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl

java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce

sorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
Feb 1, 2005 1:25:44 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tr

e
Feb 1, 2005 1:25:44 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNu

l=true
Feb 1, 2005 1:25:45 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retu

nNull=true
Feb 1, 2005 1:25:47 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Feb 1, 2005 1:25:47 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Feb 1, 2005 1:25:47 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=16/47  config=D:\jakarta-tomcat-4.1.30\conf\jk2.prop

rties


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message