首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

Not binding factory to JNDI, no JNDI name configured解决思路

2013-12-26 
Not binding factory to JNDI, no JNDI name configured我用Struts2,Hibernate,Spring写的项目,数据库使用

Not binding factory to JNDI, no JNDI name configured
我用Struts2,Hibernate,Spring写的项目,数据库使用Microsoft SQL Server,多个Action的class都是UserAction,在运行时出现
impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured,请帮我看看是哪里出的问题
action的配置如下所示:
<action name="login" method="login" class="com.chinasei.struts2.user.web.UserAction">
        <result name="input">/login.jsp</result>
</action>
<action name="user" method="list" class="com.chinasei.struts2.user.web.UserAction">
            <result name="userlist">/pages/users.jsp</result>
</action>
<action name="regist" method="regist" class="com.chinasei.struts2.user.web.UserAction">
            <interceptor-ref name="tokenStack"></interceptor-ref>
            <result name="invalid.token">/pages/regist.jsp</result>
            <result name="input">/pages/regist.jsp</result>
</action> 
2013-12-10 15:13:55,000 WARN  [169625] [http-8080-3] components.ServletUrlRenderer - No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2013-12-10 15:13:55,812 WARN  [170437] [http-8080-3] components.ServletUrlRenderer - No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2013-12-10 15:14:07,218 INFO  [181843] [http-8080-3] cfg.Environment - Hibernate 3.3.2.GA
2013-12-10 15:14:07,218 INFO  [181843] [http-8080-3] cfg.Environment - hibernate.properties not found
2013-12-10 15:14:07,234 INFO  [181859] [http-8080-3] cfg.Environment - Bytecode provider name : javassist
2013-12-10 15:14:07,250 INFO  [181875] [http-8080-3] cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
2013-12-10 15:14:07,671 INFO  [182296] [http-8080-3] cfg.Configuration - Reading mappings from file: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Chapter32-1\WEB-INF\classes\config\hibernate-hbm\Users.hbm.xml
2013-12-10 15:14:08,328 INFO  [182953] [http-8080-3] cfg.HbmBinder - Mapping class: com.chinasei.lwframework.user.model.Users -> USERS
2013-12-10 15:14:08,437 INFO  [183062] [http-8080-3] hibernate3.LocalSessionFactoryBean - Building new Hibernate SessionFactory
2013-12-10 15:14:08,875 INFO  [183500] [http-8080-3] connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
2013-12-10 15:14:10,625 INFO  [185250] [http-8080-3] cfg.SettingsFactory - RDBMS: Microsoft SQL Server, version: 9.00.1399
2013-12-10 15:14:10,625 INFO  [185250] [http-8080-3] cfg.SettingsFactory - JDBC driver: Microsoft SQL Server JDBC Driver 3.0, version: 3.0.1301.101
2013-12-10 15:14:10,828 INFO  [185453] [http-8080-3] dialect.Dialect - Using dialect: org.hibernate.dialect.SQLServerDialect
2013-12-10 15:14:10,859 INFO  [185484] [http-8080-3] transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Automatic session close at end of transaction: disabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Scrollable result sets: enabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Connection release mode: auto
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Default batch fetch size: 1
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Generate SQL with comments: disabled


2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Order SQL updates by primary key: disabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Order SQL inserts for batching: disabled
2013-12-10 15:14:10,875 INFO  [185500] [http-8080-3] cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Query language substitutions: {}
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - JPA-QL strict compliance: disabled
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Second-level cache: enabled
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Query cache: disabled
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Optimize cache for minimal puts: disabled
2013-12-10 15:14:10,890 INFO  [185515] [http-8080-3] cfg.SettingsFactory - Structured second-level cache entries: disabled
2013-12-10 15:14:10,921 INFO  [185546] [http-8080-3] cfg.SettingsFactory - Echoing all SQL to stdout
2013-12-10 15:14:10,921 INFO  [185546] [http-8080-3] cfg.SettingsFactory - Statistics: disabled
2013-12-10 15:14:10,937 INFO  [185562] [http-8080-3] cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
2013-12-10 15:14:10,937 INFO  [185562] [http-8080-3] cfg.SettingsFactory - Default entity-mode: pojo
2013-12-10 15:14:10,937 INFO  [185562] [http-8080-3] cfg.SettingsFactory - Named query checking : enabled
2013-12-10 15:14:11,093 INFO  [185718] [http-8080-3] impl.SessionFactoryImpl - building session factory
2013-12-10 15:14:11,812 INFO  [186437] [http-8080-3] impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
[解决办法]
你先弄清楚INFO,WARNING,ERROR都是什么意思再说。
[解决办法]
hibernate.cfg.xml里配置的JNDI检查一下吧
[解决办法]
我觉得应该贴配置数据库的代码,要贴也是贴error吧

热点排行