-
Feb 20th, 2007, 12:01 PM
#1
springs deployed on tomcat
any clue why this occurs?
ERROR springframework.web.servlet.DispatcherServlet : [] Context initialization failed
-
Feb 20th, 2007, 01:14 PM
#2
Erroneous application-servlet file.
One of the bean couldn't able to load properly in the application context and caused error. Please set the log level to debug and see the exact error.
-
Feb 20th, 2007, 02:06 PM
#3
its the JNDI Naming, any known way of dealing this?
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/config/applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:403)
org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:233)
org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:145)
org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:277)
org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:313)
org.springframework.web.context.support.AbstractRe freshableWebApplicationContext.refresh(AbstractRef reshableWebApplicationContext.java:139)
org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:246)
org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:184)
org.springframework.web.context.ContextLoaderServl et.init(ContextLoaderServlet.java:83)
javax.servlet.GenericServlet.init(GenericServlet.j ava:258)
org.apache.catalina.startup.Catalina.start(Catalin a.java:551)
sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:294)
org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:432)
-
Feb 20th, 2007, 02:11 PM
#4
It's a matter of configuration. Apparently you haven't set up your jndi datasource correctly.
-
Feb 20th, 2007, 02:11 PM
#5
Data source is not defined in the JNDI
You need to set-up the connection pool at appliaction level and register with jndi.
-
Feb 20th, 2007, 02:13 PM
#6
jndi config
<bean id="securityDataSource" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiName" value="jdbc/adfSecurityOra" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSou rceTransactionManager">
<property name="dataSource">
<ref bean="securityDataSource" />
</property>
</bean>
-
Feb 20th, 2007, 02:16 PM
#7
That isn't the JNDI configuration, that is the lookup of the datasource from jndi. It doesn't register the datasource with jndi. Check the tomcat docs on how to register a datasource.
If you are sure everything is configured ok in tomcat and the error still occurs prefixing the jndi name with java:/comp/env/ might help.
-
Feb 20th, 2007, 02:16 PM
#8
cp at app level
<Context path="/adfsrWeb" debug="99" reloadable="true"
antiJARLocking="true" antiResourceLocking="false">
<Resource name="jdbc/adfsrcOra" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
driverClassName="oracle.jdbc.driver.OracleDriver"
username="ADF_WEB" password="webdev"
url="jdbc:oracle:thin:@xxxxxxxxxx"
defaultAutoCommit="true" removeAbandoned="true"
removeAbandonedTimeout="60" logAbandoned="true"/>
<Resource name="jdbc/adfSecurityOra" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
driverClassName="oracle.jdbc.driver.OracleDriver"
username="ADF_WEB" password="webdev"
url="jdbc:oracle:thin:@xxxxxxxxxxxxxxxxx"
defaultAutoCommit="true" removeAbandoned="true"
removeAbandonedTimeout="60" logAbandoned="true"/>
</Context>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules