首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 应用服务器 >

Not binding factory to JNDI, no JNDI name configured(按解决先后顺序,First50分,逐次递减),该怎么解

2012-03-14 
Not binding factory to JNDI, no JNDI name configured(按解决先后顺序,First50分,逐次递减)WebApp配置问

Not binding factory to JNDI, no JNDI name configured(按解决先后顺序,First50分,逐次递减)
WebApp配置问题
部署到Linux服务器上
最后卡到 Not binding factory to JNDI, no JNDI name configured,没有任何信息提示了
似乎启动一半就停了
可以访问webapp
配置文件见下(已去敏感信息)

web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<display-name>******</display-name>

<description>whtxm</description>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webApp.root</param-value>
</context-param>

<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>

<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext_hibernate.xml /WEB-INF/applicationContext_service.xml</param-value>
</context-param>

<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>GBK</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<listener>  
  <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>  
</listener> 

<servlet>
<servlet-name>SpringLog4jConfigServlet</servlet-name>
<servlet-class>org.springframework.web.util.Log4jConfigServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>web</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>whtxm</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet>
<servlet-name>axis</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>whtxm</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>whtxm</servlet-name>
<url-pattern>*.xml</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>axis</servlet-name>


<url-pattern>/axis/*</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>60</session-timeout> 
  </session-config>
   
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>


whtm-servlet.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean name="******" class="com.****.****.web.******">
<property name="******" ref="******"/>
</bean>
</beans>


applicationContext-service.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>WEB-INF/****.properties</value>
<value>WEB-INF/****.properties</value>
</list>
</property>
</bean>

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${****}"/>
<property name="url" value="${****}"/>
<property name="username" value="${****}"/>
<property name="password" value="${****}"/>
</bean>

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>

<property name="mappingResources">
<list>
<value>******.hbm.xml</value>
</list>
</property>

<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
</props>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<bean id="txProxyTemplate" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
  <property name="transactionManager">
  <ref bean="transactionManager" />
  </property>
  <property name="transactionAttributes">
  <props>
<prop key="t_*">PROPAGATION_REQUIRED</prop>
  </props>
  </property>
  </bean>
  <bean id="t*******" class="*******">
  <property name="*******" ref="*******"/>
  </bean>  
</beans>



applicationContext-hibernate.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="******" class="******">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
</beans>


[解决办法]
容器(服务器)是启动起来了?还是没有呀?你说的
"
似乎启动一半就停了
可以访问webapp 
"
第一句是没启动开
第二句是启动开了
[解决办法]
我也遇到同样的问题了,但程序暂且还能运行

热点排行