0 0

websphere发布的web应用无法访问数据库3

做了个web小例子 在tomcat下一切运行正常,然后把tomcat的程序打了个war包,用was7发布,发布和启动都是成功的,访问页面但是没有从数据库获取任何数据,页面访问也正常,就是没有数据,请问各位还需其他配置吗????

问题补充:
yanq12 写道
你是用什么方式连接数据库的?用数据链接池呢,还是写JDBC链接串?
如果是用连接池,请检查下数据源有没有配
可以看看控制台有没有抛错


使用spring+hibernate+flex做的,那些配置文件都配置好了,发布到tomcat中一切正常,
想问下,单独的一个web应用,打成war包是不是就可以直接用was发布,需不需要做其他额外的配置?

问题补充:
yanq12 写道
你是用什么方式连接数据库的?用数据链接池呢,还是写JDBC链接串?
如果是用连接池,请检查下数据源有没有配
可以看看控制台有没有抛错


"D:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1\SystemOut.log下日志

[11-11-25 17:00:05:298 CST] 00000024 CompositionUn A   WSVR0190I: 正在启动 BLA WebSphere:blaname=integrateSHF_war 中的组合单元 WebSphere:cuname=integrateSHF_war。
[11-11-25 17:00:05:468 CST] 00000024 ApplicationMg A   WSVR0200I: 正在启动应用程序:integrateSHF_war
[11-11-25 17:00:05:472 CST] 00000024 ApplicationMg A   WSVR0204I: 应用程序:integrateSHF_war,应用程序构建级别:未知
[11-11-25 17:00:08:114 CST] 00000024 webapp        I com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup SRVE0169I: 正在装入 Web 模块:BlazeDS。
[11-11-25 17:00:08:477 CST] 00000024 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: 将为应用程序键 default_host/shf 创建新的会话上下文
[11-11-25 17:00:09:781 CST] 00000024 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet 消息 - [integrateSHF_war#integrateSHF.war]:.Set web app root system property: 'webName.root' = [D:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\jyaoNode01Cell\integrateSHF_war.ear\integrateSHF.war]
[11-11-25 17:00:09:989 CST] 00000024 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet 消息 - [integrateSHF_war#integrateSHF.war]:.Initializing Log4J from [D:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\jyaoNode01Cell\integrateSHF_war.ear\integrateSHF.war\WEB-INF\log4j.properties]
[11-11-25 17:00:12:262 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:12.262 [INFO] [Configuration] BlazeDS - Community Edition: 4.0.0.14931
[11-11-25 17:00:12:272 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:12.272 [WARN] [Configuration] No login command was found for 'IBM WebSphere Application Server/7.0'. Please ensure that the login-command tag has the correct server attribute value, or use 'all' to use the login command regardless of the server.
[11-11-25 17:00:12:633 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:12.633 [INFO] [Configuration] Endpoint 'my-secure-amf' created with security: None
at URL: https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure
[11-11-25 17:00:12:634 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:12.634 [INFO] [Configuration] Endpoint 'my-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amf
[11-11-25 17:00:12:634 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:12.634 [INFO] [Configuration] Endpoint 'my-polling-amf' created with security: None
at URL: http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling
[11-11-25 17:00:13:434 CST] 00000024 SystemOut     O [TEST-BlazeDS]11/25/2011 17:00:13.413 [DEBUG] [Configuration] MessageBroker id: __default__ classLoader is: the MessageBroker's class loader and the context class loader (classLoader hashCode: 1284590737 (parent hashCode: 1249135220 (parent hashCode: 961231179 (parent hashCode: 840839710 (parent hashCode: 592257869 (parent system)))))
[11-11-25 17:00:14:380 CST] 00000024 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [integrateSHF_war] [/shf] [MessageBrokerServlet]: 初始化成功。
[11-11-25 17:00:14:465 CST] 00000024 ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization started
[11-11-25 17:00:14:468 CST] 00000024 webapp        I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0292I: Servlet 消息 - [integrateSHF_war#integrateSHF.war]:.Loading Spring root WebApplicationContext
[11-11-25 17:00:14:989 CST] 00000024 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/sping-config/applicationContext.xml]
[11-11-25 17:00:15:396 CST] 00000024 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/sping-config/sping-dao.xml]
[11-11-25 17:00:15:445 CST] 00000024 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/sping-config/spring-service.xml]
[11-11-25 17:00:15:467 CST] 00000024 XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/sping-config/spring-web.xml]
[11-11-25 17:00:15:508 CST] 00000024 XmlWebApplica I org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [sessionFactory,propertyConfigurer,dataSource,myTransactionManager,jdbcTransactionManager,userDAO,userService,userAction]; root of BeanFactory hierarchy
[11-11-25 17:00:15:593 CST] 00000024 XmlWebApplica I org.springframework.context.support.AbstractApplicationContext refresh 8 beans defined in application context [Root WebApplicationContext]
[11-11-25 17:00:15:957 CST] 00000024 PropertyPlace I org.springframework.core.io.support.PropertiesLoaderSupport loadProperties Loading properties file from ServletContext resource [/WEB-INF/dbconfig.properties]
[11-11-25 17:00:16:001 CST] 00000024 CollectionFac I org.springframework.core.CollectionFactory <clinit> Commons Collections 3.x available
[11-11-25 17:00:16:020 CST] 00000024 XmlWebApplica I org.springframework.context.support.AbstractApplicationContext initMessageSource Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@6df26df2]
[11-11-25 17:00:16:043 CST] 00000024 XmlWebApplica I org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@3de83de8]
[11-11-25 17:00:16:080 CST] 00000024 UiApplication I org.springframework.ui.context.support.UiApplicationContextUtils initThemeSource Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@48f548f5]
[11-11-25 17:00:16:090 CST] 00000024 DefaultListab I org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [sessionFactory,propertyConfigurer,dataSource,myTransactionManager,jdbcTransactionManager,userDAO,userService,userAction]; root of BeanFactory hierarchy]
[11-11-25 17:00:16:327 CST] 00000024 DriverManager I org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName Loaded JDBC driver: com.mysql.jdbc.Driver
[11-11-25 17:00:16:454 CST] 00000024 Environment   I org.hibernate.cfg.Environment <clinit> Hibernate 3.0.5
[11-11-25 17:00:16:482 CST] 00000024 Environment   I org.hibernate.cfg.Environment <clinit> hibernate.properties not found
[11-11-25 17:00:16:495 CST] 00000024 Environment   I org.hibernate.cfg.Environment <clinit> using CGLIB reflection optimizer
[11-11-25 17:00:16:547 CST] 00000024 Environment   I org.hibernate.cfg.Environment <clinit> using JDK 1.4 java.sql.Timestamp handling
[11-11-25 17:00:18:754 CST] 00000024 HbmBinder     I org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues Mapping class: com.flex.model.User -> user
[11-11-25 17:00:18:940 CST] 00000024 LocalSessionF I org.springframework.orm.hibernate3.LocalSessionFactoryBean afterPropertiesSet Building new Hibernate SessionFactory
[11-11-25 17:00:18:944 CST] 00000024 Configuration I org.hibernate.cfg.Configuration secondPassCompile processing extends queue
[11-11-25 17:00:18:951 CST] 00000024 Configuration I org.hibernate.cfg.Configuration secondPassCompile processing collection mappings
[11-11-25 17:00:18:955 CST] 00000024 Configuration I org.hibernate.cfg.Configuration secondPassCompile processing association property references
[11-11-25 17:00:18:961 CST] 00000024 Configuration I org.hibernate.cfg.Configuration secondPassCompile processing foreign key constraints
[11-11-25 17:00:19:455 CST] 00000024 ConnectionPro I org.hibernate.connection.ConnectionProviderFactory newConnectionProvider Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
[11-11-25 17:00:19:772 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings RDBMS: MySQL, version: 5.1.59-community
[11-11-25 17:00:19:777 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.15 ( Revision: ${bzr.revision-id} )
[11-11-25 17:00:19:927 CST] 00000024 Dialect       I org.hibernate.dialect.Dialect <init> Using dialect: org.hibernate.dialect.MySQLDialect
[11-11-25 17:00:19:963 CST] 00000024 TransactionFa I org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory Using default transaction strategy (direct JDBC transactions)
[11-11-25 17:00:19:981 CST] 00000024 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[11-11-25 17:00:19:989 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic flush during beforeCompletion(): disabled
[11-11-25 17:00:19:993 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic session close at end of transaction: disabled
[11-11-25 17:00:19:997 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch size: 15
[11-11-25 17:00:20:002 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch updates for versioned data: disabled
[11-11-25 17:00:20:010 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Scrollable result sets: enabled
[11-11-25 17:00:20:014 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC3 getGeneratedKeys(): enabled
[11-11-25 17:00:20:053 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Connection release mode: on_close
[11-11-25 17:00:20:057 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Maximum outer join fetch depth: 2
[11-11-25 17:00:20:060 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default batch fetch size: 1
[11-11-25 17:00:20:065 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Generate SQL with comments: disabled
[11-11-25 17:00:20:188 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL updates by primary key: disabled
[11-11-25 17:00:20:193 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory Query translator: org.hibernate.hql.classic.ClassicQueryTranslatorFactory
[11-11-25 17:00:20:234 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query language substitutions: {}
[11-11-25 17:00:20:238 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Second-level cache: enabled
[11-11-25 17:00:20:243 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query cache: disabled
[11-11-25 17:00:20:247 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory createCacheProvider Cache provider: org.hibernate.cache.EhCacheProvider
[11-11-25 17:00:20:279 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Optimize cache for minimal puts: disabled
[11-11-25 17:00:20:283 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Structured second-level cache entries: disabled
[11-11-25 17:00:20:331 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Echoing all SQL to stdout
[11-11-25 17:00:20:339 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Statistics: disabled
[11-11-25 17:00:20:343 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Deleted entity synthetic identifier rollback: disabled
[11-11-25 17:00:20:349 CST] 00000024 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default entity-mode: pojo
[11-11-25 17:00:21:172 CST] 00000024 SessionFactor I org.hibernate.impl.SessionFactoryImpl <init> building session factory
[11-11-25 17:00:21:349 CST] 00000024 Configuration W net.sf.ehcache.config.ConfigurationFactory parseConfiguration No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: wsjar:file:/D:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/jyaoNode01Cell/integrateSHF_war.ear/integrateSHF.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml
[11-11-25 17:00:23:031 CST] 00000024 SessionFactor I org.hibernate.impl.SessionFactoryObjectFactory addInstance Not binding factory to JNDI, no JNDI name configured
[11-11-25 17:00:23:037 CST] 00000024 SessionFactor I org.hibernate.impl.SessionFactoryImpl checkNamedQueries Checking 0 named queries
[11-11-25 17:00:23:290 CST] 00000024 HibernateTran I org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource@59945994] of Hibernate SessionFactory for HibernateTransactionManager
[11-11-25 17:00:23:457 CST] 00000024 ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext
[11-11-25 17:00:23:490 CST] 00000024 ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext Root WebApplicationContext: initialization completed in 9025 ms
[11-11-25 17:00:23:493 CST] 00000024 servlet       I com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0242I: [integrateSHF_war] [/shf] [SpringContextServlet]: 初始化成功。
[11-11-25 17:00:23:543 CST] 00000024 webcontainer  I com.ibm.ws.wswebcontainer.VirtualHost addWebApplication SRVE0250I: Web 模块 BlazeDS 已绑定到 default_host[*:9080,*:80,*:9443,*:5060,*:5061,*:443]。
[11-11-25 17:00:23:623 CST] 00000024 ApplicationMg A   WSVR0221I: 应用程序已启动:integrateSHF_war
[11-11-25 17:00:23:625 CST] 00000024 CompositionUn A   WSVR0191I: 已启动 BLA WebSphere:blaname=integrateSHF_war 中的组合单元 WebSphere:cuname=integrateSHF_war。
2011年11月25日 16:26

1个答案 按时间排序 按投票排序

0 0

你是用什么方式连接数据库的?用数据链接池呢,还是写JDBC链接串?
如果是用连接池,请检查下数据源有没有配
可以看看控制台有没有抛错

2011年11月25日 16:30

相关推荐

    websphere上web应用发布

    总结,发布 Web 应用到 Websphere 需要理解 Websphere 的架构和管理机制,掌握打包、部署、配置、调试等基本技能,并熟悉应用所依赖的框架和数据库的集成。在实际操作中,经常需要查阅文档、调整配置以及分析日志来...

    webSphere安装、配置和WEB应用部署

    ### WebSphere安装、配置与WEB应用部署详尽指南 #### WebSphere Application Server 安装流程详解 WebSphere Application Server 的安装是一项关键任务,涉及到多个步骤,确保系统的稳定性和应用程序的高效运行。...

    WebspherePortal的Oracle数据库迁移

    在IT行业中,数据库迁移是一项常见的任务,特别是在企业级应用中,如WebSphere Portal。WebSphere Portal是一款由IBM提供的强大企业门户平台,它依赖于数据库来存储配置信息、用户数据以及各种门户组件的状态。本篇...

    WebSphere+DB2应用发布手册.doc

    ### WebSphere+DB2应用发布手册关键知识点解析 #### 一、登录WebSphere控制台 登录WebSphere控制台是进行所有后续操作的基础。通常通过浏览器访问控制台的URL,例如`http://10.25.77.81:9060/admin`。在登录界面上...

    AIX系统中Websphere的安装和站点发布

    3. **应用关联**:将创建的数据源关联至特定的Web应用,确保应用能够正确访问数据库。 #### 结语 在AIX系统下安装和配置WebSphere,以及发布Web应用和数据库连接,是一项技术含量较高的工作。本文通过详细的步骤...

    websphere5.1应用部署

    3. **配置应用访问端口**: - 若要更改应用的默认端口(9080),在“环境”菜单下选择“虚拟主机”并新建一个虚拟主机。 - 设置主机别名为`*`,表示所有主机,端口为应用所需的端口号。 - 在“服务器”-&gt;“应用...

    websphere上发布基于jndi的应用

    下面我们将详细探讨在WebSphere上发布基于JNDI的应用的相关知识点。 首先,理解JNDI的基本概念至关重要。JNDI允许开发者查找和绑定数据对象,如Java对象、数据库连接等,通过一个全局的名字空间。这个名字空间可以...

    WebSphere应用服务器和应用编程

    WebSphere应用服务器是IBM提供的一款强大的企业级Java应用程序托管平台,它支持J2EE(Java 2 Platform, Enterprise Edition)规范,为企业级应用提供全面的运行环境。在本教程中,我们将深入探讨WebSphere应用服务器...

    websphere项目发布

    WAR文件用于单一的Web应用,而EAR文件则用于包含多个组件,如EJB(Enterprise JavaBeans)和Web应用的多模块项目。这通常通过构建工具如Maven或Gradle完成,它们会根据项目的配置自动打包。 2、**进入WebSphere...

    Websphere Application Server 6.0 应用指南

    - IBM Rational Web Developer for WebSphere Software 是一款专注于Web应用开发的集成开发环境(IDE),它支持WebSphere Application Server 6.0,提供了强大的开发工具,包括代码编辑器、调试器以及一系列的开发...

    Websphere部署发布步骤

    本文将详细介绍Websphere 7.0的部署和发布过程,帮助你理解如何在该平台上配置和管理应用程序。 1. **安装Websphere 7.0** - 首先,你需要下载并安装Websphere Application Server 7.0。安装过程中,只需选择安装...

    WebSphere6.1配置

    ### WebSphere 6.1 配置指南:发布 Web 应用及数据库连接池设置 #### 一、概述 在本篇文章中,我们将详细介绍如何在 IBM WebSphere Application Server 6.1 版本中配置并发布一个 Web 应用程序,并特别关注于...

    was6.1_上部署Web应用程序详解(图)

    在IBM WebSphere Application Server (WAS) 6.1中部署Web应用程序是一个涉及多个步骤的过程,包括配置数据库连接池和安装应用程序。以下是对这个过程的详细解析: **数据库连接池配置** 在WAS中,配置数据库连接池...

    websphere常用目录

    此外,这个目录还可能包含其他配置文件,如数据库连接池、消息队列、安全设置等,这些都是WebSphere管理和调整应用环境的重要手段。 ### 总结 综上所述,WebSphere的缓存目录、日志目录和配置目录各自承担着不同的...

    websphere常见问题及解决办法

    3. 优化数据库连接:优化数据库连接可以减少数据库的负载,提高应用服务器的性能。 结语 在本文中,我们讨论了一些常见的 WebSphere 问题及其解决方法。同时,我们也讨论了一些常见的优化方法来提高 WebSphere ...

    websphere 6 应用部署指南

    Websphere是IBM提供的一款企业级的应用服务器,它支持Java EE(Java Platform, Enterprise Edition)标准,为企业提供了一个强大、可扩展的平台来运行各种Web应用程序。 在开始部署过程之前,首先需要了解Websphere...

    Websphere6.0应用部署文档

    【Websphere6.0应用部署】是IBM的一款企业级应用服务器的部署流程,涉及到的主要步骤包括安装、配置环境变量、设置数据源、发布应用程序、修改类装载策略以及启动应用等关键环节。以下是对这些步骤的详细解释: 一...

Global site tag (gtag.js) - Google Analytics