- 浏览: 21142 次
最近访客 更多访客>>
最新评论
-
jzx19770812:
我是jsf+hibernate+jpa(hibernate实现 ...
jsf+spring+hibernate开发 优缺点 -
jzx19770812:
我现在就用这个开发,上手不容易,比struts难
jsf+spring+hibernate开发 优缺点 -
InnocentBoy:
有可能遇到性能问题。我有个朋友他们公司用的就是这个。一直有性能 ...
jsf+spring+hibernate开发 优缺点 -
kjj:
看不懂,天书!
项目发布到服务器上的问题,本地测试功过。 -
kjj:
晕了,天书?难看懂!
项目发布到服务器上的问题,本地测试功过。
本机运行 jdk1.5 + tomcat5.5
开始开始的时候,部署到服务器上是正确,但是过了几天突然就出现这个问题了。
现在服务处于停滞状态,还请处理一下,我已经处理了一天一夜了,没有结果。
希望大家能帮忙处理以下。
2007-1-25 12:31
现在经过大家整理,感觉像是
hibernate.cfg.xml验证错误问题。
这个问题,可能跟什么有关系呢?
2007-1-25 12:56
问题已经解决具体错误原因我会在稍后
写入此处,非常感谢:
山里有鬼,抛出异常的爱,foxty,Allen,leelun,leelun,codeutil
等仁兄的指点,还有javaeye平台,呵呵感谢大家!
log4 日志如下:
[INFO ] 2007-01-25 09:55:22,062 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:479)
Hibernate 3.1.3
[INFO ] 2007-01-25 09:55:22,093 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:509)
hibernate.properties not found
[INFO ] 2007-01-25 09:55:22,109 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:525)
using CGLIB reflection optimizer
[INFO ] 2007-01-25 09:55:22,109 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:555)
using JDK 1.4 java.sql.Timestamp handling
[INFO ] 2007-01-25 09:55:22,359 method:org.hibernate.cfg.Configuration.configure(Configuration.java:1308)
configuring from resource: /hibernate.cfg.xml
[INFO ] 2007-01-25 09:55:22,359 method:org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1285)
Configuration resource: /hibernate.cfg.xml
[WARN ] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.warning(XMLHelper.java:68)
Warning parsing XML: /hibernate.cfg.xml(1) Valid documents must have a <!DOCTYPE declaration.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
[ERROR] 2007-01-25 09:55:22,531 method:org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
Servlet.service() for servlet BlogIndex threw exception
java.lang.NullPointerException
at connection.HibConnection.currentSession(HibConnection.java:56)
at bean.ProductBean.getProductListByMainType(ProductBean.java:1207)
at blog.bean.IndexBean.<init>(IndexBean.java:48)
at blog.servlet.BlogIndexServlet.doGet(BlogIndexServlet.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
sessionfactory 配置如下:
package connection;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
public class HibConnection {
// private static Logger logger=null;
/**
* Location of hibernate.cfg.xml file.
* NOTICE: Location should be on the classpath as Hibernate uses
* #resourceAsStream style lookup for its configuration file. That
* is place the config file in a Java package - the default location
* is the default Java package.
* Examples:
* CONFIG_FILE_LOCATION = "/hibernate.conf.xml".
* CONFIG_FILE_LOCATION = "/com/foo/bar/myhiberstuff.conf.xml".
*/
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
/** Holds a single instance of Session */
private static final ThreadLocal threadLocal = new ThreadLocal();
/** The single instance of hibernate configuration */
private static final Configuration cfg = new Configuration();
/** The single instance of hibernate SessionFactory */
private static org.hibernate.SessionFactory sessionFactory;
/**
* Returns the ThreadLocal Session instance. Lazy initialize
* the SessionFactory if needed.
*
* @return Session
* @throws HibernateException
*/
public static Session currentSession() throws HibernateException {
Session session = (Session) threadLocal.get();
// System.out.println("sssssss");
if (session == null) {
if (sessionFactory == null) {
try {
// System.out.println("sssssss1");
cfg.configure(CONFIG_FILE_LOCATION);
// System.out.println("sssssss2");
sessionFactory = cfg.buildSessionFactory();
}
catch (Exception e) {
System.err.println("%%%% Error Creating SessionFactory %%%%");
e.getMessage();
e.printStackTrace();
}
}
session = sessionFactory.openSession();
threadLocal.set(session);
}
return session;
}
/**
* Close the single hibernate session instance.
*
* @throws HibernateException
*/
public static void closeSession() throws HibernateException {
Session session = (Session) threadLocal.get();
threadLocal.set(null);
if (session != null) {
session.close();
}
}
/**
* Default constructor.
*/
private HibConnection() {
}
}
Hibernate.cfg.xml 配置
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- data connection -->
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=test</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- connection pool-->
<!-- <property name="connection.pool_size">10</property>-->
<!-- c3p0 -->
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">15</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">1000</property>
<property name="hibernate.c3p0.idle_test_period">30000</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.validate">false</property>
<!-- sql dialect -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- -->
<property name="current_session_context_class">thread</property>
<!-- -->
<!-- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>-->
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">true</property>
<!-- 映射定义文件 -->
<mapping resource="JvmMapDB.hbm.xml" />
<mapping resource="PersonMapDB.hbm.xml" />
<mapping resource="ProductMapDB.hbm.xml" />
<mapping resource="ClubMapDB.hbm.xml" />
<mapping resource="MemberMapDB.hbm.xml" />
<mapping resource="CompetitionMapDB.hbm.xml" />
<!-- 缓存设置 -->
<!--<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
<class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
<collection-cache class="org.hibernate.auction.Item.bids" usage="read-write"/> -->
</session-factory>
</hibernate-configuration>
页面前台错误代码:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
connection.HibConnection.currentSession(HibConnection.java:56)
bean.ProductBean.getProductListByMainType(ProductBean.java:1207)
blog.bean.IndexBean.<init>(IndexBean.java:48)
blog.servlet.BlogIndexServlet.doGet(BlogIndexServlet.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
我把我本地日志文档也贴出来。
我还没碰到过这样的问题,看看是否有什么隐含的错误呢?
2007-1-25 11:16:24 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\java\jdk1.5\bin;E:\3.共享\Application Server\apache-tomcat-5.5.20\bin
2007-1-25 11:16:24 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-80
2007-1-25 11:16:24 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 828 ms
2007-1-25 11:16:24 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-1-25 11:16:24 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.20
2007-1-25 11:16:24 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
2007-1-25 11:16:26 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-80
2007-1-25 11:16:26 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2007-1-25 11:16:26 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47 config=null
2007-1-25 11:16:26 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2007-1-25 11:16:26 org.apache.catalina.startup.Catalina start
信息: Server startup in 2437 ms
84219 INFO [http-80-Processor25] org.hibernate.cfg.Environment - Hibernate 3.1.3
84282 INFO [http-80-Processor25] org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=5000, hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.c3p0.max_statements=100, hibernate.c3p0.max_size=2, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.c3p0.validate=false, hibernate.c3p0.idle_test_period=3000, hibernate.c3p0.min_size=2, hibernate.connection.username=gxfc, hibernate.c3p0.acquire_increment=2, hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2, hibernate.show_sql=true, hibernate.connection.password=****}
84282 INFO [http-80-Processor25] org.hibernate.cfg.Environment - using CGLIB reflection optimizer
84297 INFO [http-80-Processor25] org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
84532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
84532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
84672 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: JvmMapDB.hbm.xml
85000 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonMenu -> psn_menu
85063 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubMenu -> club_menu
85063 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProvinceType -> Z_ZX
85078 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProvince -> Z_PROVINCE
85266 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCity -> Z_CITY
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicMainType -> MusicMainType
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicSecondeType -> MusicSecondeType
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicType -> MusicType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPictureMainType -> PictureMainType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnNovelMainType -> NovelMainType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnConstellation -> Constellation
85313 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnEducation -> Education
85313 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnShengxiao -> Shengxiao
85328 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnColType -> ColType
85328 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCollection -> Collection
85360 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnNote -> Note
85375 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSeek -> Seek
85375 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSeekRe -> SeekRe
85391 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommend -> Commend
85438 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnTVProgram -> TV_program
85453 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnTVProgramPlayTime -> TV_program_play_time
85453 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: PersonMapDB.hbm.xml
85500 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPerson -> DbnPerson
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonPassword -> DbnPersonPassword
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonIndividuation -> DbnPersonIndividuation
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonUp -> PersonUp
85532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: ProductMapDB.hbm.xml
85563 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProduct -> DbnProduction
85563 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductMusic -> Music
85578 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductVideo -> Video
85594 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductFlash -> Flash
85594 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductPicture -> Picture
85610 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductNovel -> Novel
85625 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicRelType -> MusicRelType
85625 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnVideoRelType -> VideoRelType
85641 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnFlashRelType -> FlashRelType
85641 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSelfIntro -> SelfIntro
85657 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductIntro -> ProductIntro
85657 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductRead -> ProductRead
85672 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: ClubMapDB.hbm.xml
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubAuthType -> Club_auth_type
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubType -> Club_type
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClub -> DbnClub
85813 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubLogo -> ClubLogo
85813 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubInitSet -> ClubInitSet
85813 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: MemberMapDB.hbm.xml
85828 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMember -> member
85844 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubProduct -> ClubProduction
85844 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: CompetitionMapDB.hbm.xml
85860 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompetitionType -> CompetitionType
85860 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommendType -> CommendType
85875 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommendAuthType -> CommendAuthType
85875 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompProdFormat -> CompProdFormat
85891 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompetition -> ClubCompetition
85891 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubCompProduction -> ClubCompProduction
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompCommend -> CompCommend
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubCompProdScore -> ClubCompProdScore
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompPerson -> CompPerson
85922 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Configured SessionFactory: null
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProvinceType.provinces -> Z_PROVINCE
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProvince.citys -> Z_CITY
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicMainType.musicTypes -> MusicType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.musicRelTypes -> MusicRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.videoRelTypes -> VideoRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.flashRelTypes -> FlashRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPictureMainType.pictures -> Picture
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnNovelMainType.novels -> Novel
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnSeek.seekRes -> SeekRe
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnTVProgram.tv_play_times -> TV_program_play_time
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myClub -> DbnClub
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.member -> member
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.products -> DbnProduction
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myCol -> Collection
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myPassivecol -> Collection
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.sendNotes -> Note
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.receNotes -> Note
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.seeks -> Seek
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.seekRes -> SeekRe
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.personUps -> PersonUp
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.players -> CompPerson
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.productSelfIntros -> SelfIntro
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.send_commends -> Commend
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.rece_commends -> Commend
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.clubProducts -> ClubProduction
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productSelfIntros -> SelfIntro
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productOtherIntros -> ProductIntro
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productReads -> ProductRead
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.rece_commends -> Commend
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.myPassivecol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductMusic.catalogs -> MusicRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductVideo.catalogs -> VideoRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductFlash.catalogs -> FlashRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubAuthType.clubs -> DbnClub
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubType.clubs -> DbnClub
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.member -> member
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.competitions -> ClubCompetition
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.myCol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.myPassivecol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.productSelfIntros -> SelfIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.rece_commends -> Commend
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMember.products -> ClubProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMember.compProds -> ClubCompProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.compProds -> ClubCompProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productSelfIntros -> SelfIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productOtherIntros -> ProductIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productReads -> ProductRead
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.rece_commends -> Commend
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.myPassivecol -> Collection
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnCompetition.compProds -> ClubCompProduction
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnCompetition.players -> CompPerson
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.compCommends -> CompCommend
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.scores -> ClubCompProdScore
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.productReads -> ProductRead
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.rece_commends -> Commend
86000 INFO [http-80-Processor25] org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - C3P0 using driver: net.sourceforge.jtds.jdbc.Driver at URL: jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - Connection properties: {user=gxfc, password=****}
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - autocommit mode: false
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@17b6643 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@14dd758 [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, idleConnectionTestPeriod -> 30000, initialPoolSize -> 1, maxIdleTime -> 1800, maxPoolSize -> 15, maxStatements -> 1000, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@19ec4ed [ description -> null, driverClass -> null, factoryClassLocation -> null, jdbcUrl -> jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2, properties -> {user=******, password=******} ] , preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ] , factoryClassLocation -> null, numHelperThreads -> 3, poolOwnerIdentityToken -> 17b6643 ]
87032 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - RDBMS: Microsoft SQL Server, version: 08.00.0760
87032 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 0.9.1
87110 INFO [http-80-Processor25] org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.SQLServerDialect
87125 INFO [http-80-Processor25] org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
87141 INFO [http-80-Processor25] org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Connection release mode: auto
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
87188 INFO [http-80-Processor25] org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query cache: disabled
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
87203 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
87203 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Statistics: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
87328 INFO [http-80-Processor25] org.hibernate.impl.SessionFactoryImpl - building session factory
89297 INFO [http-80-Processor25] org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
89813 INFO [http-80-Processor25] servlet.Log4jInitServlet - 通行证、密码存在!
89844 INFO [http-80-Processor25] servlet.Log4jInitServlet - 判断用户名、密码是否正确
89860 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到在线用户
89860 INFO [http-80-Processor25] servlet.Log4jInitServlet - 判断是否登陆,否则登陆
89875 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:通过通行证fenger888得到用户信息成功!
89875 INFO [http-80-Processor25] servlet.Log4jInitServlet - 增加在线用户
90500 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90657 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90813 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90922 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
91172 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:video:success得到各个作品的主类前几名成功!
91375 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:video:success得到各个作品的主类前几名成功!
91594 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91625 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91625 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91735 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:正在进行的活动显示成功!
91735 INFO [http-80-Processor25] servlet.Log4jInitServlet - 按照结束时间倒序
91938 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:得到活动历史回顾成功!
91969 INFO [http-80-Processor25] servlet.Log4jInitServlet - 按照注册时间排列
92110 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:在线俱乐部列表成功!
92219 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:按照某一种排法得到俱乐部列表成功!
92235 INFO [http-80-Processor25] servlet.Log4jInitServlet - 当前TV节目存在!
100938 INFO [http-80-Processor25] org.directwebremoting.util.Logger - Logging using commons-logging.
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - DWR Version 2.0.M3 starting.
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Servlet Engine: Apache Tomcat/5.5.20
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Java Version: 1.5.0_08
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Java Vendor: Sun Microsystems Inc.
103188 INFO [http-80-Processor25] org.directwebremoting.convert.HibernateBeanConverter - Found Hibernate3 class: org.hibernate.Hibernate
103250 INFO [http-80-Processor25] org.directwebremoting.dwrp.DefaultConverterManager - Type 'org.jdom.Document' is not convertable due to missing converter 'jdom'. This is only an problem if you wanted to use it.
103250 INFO [http-80-Processor25] org.directwebremoting.dwrp.DefaultConverterManager - Type 'org.jdom.Element' is not convertable due to missing converter 'jdom'. This is only an problem if you wanted to use it.
105438 INFO [http-80-Processor24] org.directwebremoting.impl.DefaultRemoter - Exec: NoteNumberBean.getUnReadNoteNum()
105469 INFO [http-80-Processor24] servlet.Log4jInitServlet - 成功日志:得到接收的未读短信成功!
麻烦您能帖出来么?
这部分是否有问题?
在本机上没有那么大的访问量所以
缓存有问题看不出来
日志上大约说是第十一个session出的问题
问题应该出在配置文件上。
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- data connection -->
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=test</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- connection pool-->
<!-- <property name="connection.pool_size">10</property>-->
<!-- c3p0 -->
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">15</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">1000</property>
<property name="hibernate.c3p0.idle_test_period">30000</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.validate">false</property>
<!-- sql dialect -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- -->
<property name="current_session_context_class">thread</property>
<!-- -->
<!-- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>-->
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">true</property>
<!-- 映射定义文件 -->
<mapping resource="JvmMapDB.hbm.xml" />
<mapping resource="PersonMapDB.hbm.xml" />
<mapping resource="ProductMapDB.hbm.xml" />
<mapping resource="ClubMapDB.hbm.xml" />
<mapping resource="MemberMapDB.hbm.xml" />
<mapping resource="CompetitionMapDB.hbm.xml" />
<!-- 缓存设置 -->
<!--<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
<class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
<collection-cache class="org.hibernate.auction.Item.bids" usage="read-write"/> -->
</session-factory>
</hibernate-configuration>
问题应该出在配置文件上。
开始开始的时候,部署到服务器上是正确,但是过了几天突然就出现这个问题了。
现在服务处于停滞状态,还请处理一下,我已经处理了一天一夜了,没有结果。
希望大家能帮忙处理以下。
2007-1-25 12:31
现在经过大家整理,感觉像是
hibernate.cfg.xml验证错误问题。
这个问题,可能跟什么有关系呢?
2007-1-25 12:56
问题已经解决具体错误原因我会在稍后
写入此处,非常感谢:
山里有鬼,抛出异常的爱,foxty,Allen,leelun,leelun,codeutil
等仁兄的指点,还有javaeye平台,呵呵感谢大家!
log4 日志如下:
[INFO ] 2007-01-25 09:55:22,062 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:479)
Hibernate 3.1.3
[INFO ] 2007-01-25 09:55:22,093 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:509)
hibernate.properties not found
[INFO ] 2007-01-25 09:55:22,109 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:525)
using CGLIB reflection optimizer
[INFO ] 2007-01-25 09:55:22,109 method:org.hibernate.cfg.Environment.<clinit>(Environment.java:555)
using JDK 1.4 java.sql.Timestamp handling
[INFO ] 2007-01-25 09:55:22,359 method:org.hibernate.cfg.Configuration.configure(Configuration.java:1308)
configuring from resource: /hibernate.cfg.xml
[INFO ] 2007-01-25 09:55:22,359 method:org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1285)
Configuration resource: /hibernate.cfg.xml
[WARN ] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.warning(XMLHelper.java:68)
Warning parsing XML: /hibernate.cfg.xml(1) Valid documents must have a <!DOCTYPE declaration.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
[ERROR] 2007-01-25 09:55:22,531 method:org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
Servlet.service() for servlet BlogIndex threw exception
java.lang.NullPointerException
at connection.HibConnection.currentSession(HibConnection.java:56)
at bean.ProductBean.getProductListByMainType(ProductBean.java:1207)
at blog.bean.IndexBean.<init>(IndexBean.java:48)
at blog.servlet.BlogIndexServlet.doGet(BlogIndexServlet.java:34)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
sessionfactory 配置如下:
package connection;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;
public class HibConnection {
// private static Logger logger=null;
/**
* Location of hibernate.cfg.xml file.
* NOTICE: Location should be on the classpath as Hibernate uses
* #resourceAsStream style lookup for its configuration file. That
* is place the config file in a Java package - the default location
* is the default Java package.
* Examples:
* CONFIG_FILE_LOCATION = "/hibernate.conf.xml".
* CONFIG_FILE_LOCATION = "/com/foo/bar/myhiberstuff.conf.xml".
*/
private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";
/** Holds a single instance of Session */
private static final ThreadLocal threadLocal = new ThreadLocal();
/** The single instance of hibernate configuration */
private static final Configuration cfg = new Configuration();
/** The single instance of hibernate SessionFactory */
private static org.hibernate.SessionFactory sessionFactory;
/**
* Returns the ThreadLocal Session instance. Lazy initialize
* the SessionFactory if needed.
*
* @return Session
* @throws HibernateException
*/
public static Session currentSession() throws HibernateException {
Session session = (Session) threadLocal.get();
// System.out.println("sssssss");
if (session == null) {
if (sessionFactory == null) {
try {
// System.out.println("sssssss1");
cfg.configure(CONFIG_FILE_LOCATION);
// System.out.println("sssssss2");
sessionFactory = cfg.buildSessionFactory();
}
catch (Exception e) {
System.err.println("%%%% Error Creating SessionFactory %%%%");
e.getMessage();
e.printStackTrace();
}
}
session = sessionFactory.openSession();
threadLocal.set(session);
}
return session;
}
/**
* Close the single hibernate session instance.
*
* @throws HibernateException
*/
public static void closeSession() throws HibernateException {
Session session = (Session) threadLocal.get();
threadLocal.set(null);
if (session != null) {
session.close();
}
}
/**
* Default constructor.
*/
private HibConnection() {
}
}
Hibernate.cfg.xml 配置
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- data connection -->
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=test</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- connection pool-->
<!-- <property name="connection.pool_size">10</property>-->
<!-- c3p0 -->
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">15</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">1000</property>
<property name="hibernate.c3p0.idle_test_period">30000</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.validate">false</property>
<!-- sql dialect -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- -->
<property name="current_session_context_class">thread</property>
<!-- -->
<!-- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>-->
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">true</property>
<!-- 映射定义文件 -->
<mapping resource="JvmMapDB.hbm.xml" />
<mapping resource="PersonMapDB.hbm.xml" />
<mapping resource="ProductMapDB.hbm.xml" />
<mapping resource="ClubMapDB.hbm.xml" />
<mapping resource="MemberMapDB.hbm.xml" />
<mapping resource="CompetitionMapDB.hbm.xml" />
<!-- 缓存设置 -->
<!--<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
<class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
<collection-cache class="org.hibernate.auction.Item.bids" usage="read-write"/> -->
</session-factory>
</hibernate-configuration>
页面前台错误代码:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
connection.HibConnection.currentSession(HibConnection.java:56)
bean.ProductBean.getProductListByMainType(ProductBean.java:1207)
blog.bean.IndexBean.<init>(IndexBean.java:48)
blog.servlet.BlogIndexServlet.doGet(BlogIndexServlet.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
我把我本地日志文档也贴出来。
我还没碰到过这样的问题,看看是否有什么隐含的错误呢?
2007-1-25 11:16:24 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\java\jdk1.5\bin;E:\3.共享\Application Server\apache-tomcat-5.5.20\bin
2007-1-25 11:16:24 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-80
2007-1-25 11:16:24 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 828 ms
2007-1-25 11:16:24 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-1-25 11:16:24 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.20
2007-1-25 11:16:24 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
2007-1-25 11:16:26 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-80
2007-1-25 11:16:26 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2007-1-25 11:16:26 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47 config=null
2007-1-25 11:16:26 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2007-1-25 11:16:26 org.apache.catalina.startup.Catalina start
信息: Server startup in 2437 ms
84219 INFO [http-80-Processor25] org.hibernate.cfg.Environment - Hibernate 3.1.3
84282 INFO [http-80-Processor25] org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties: {hibernate.c3p0.timeout=5000, hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver, hibernate.cglib.use_reflection_optimizer=true, hibernate.c3p0.max_statements=100, hibernate.c3p0.max_size=2, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.c3p0.validate=false, hibernate.c3p0.idle_test_period=3000, hibernate.c3p0.min_size=2, hibernate.connection.username=gxfc, hibernate.c3p0.acquire_increment=2, hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2, hibernate.show_sql=true, hibernate.connection.password=****}
84282 INFO [http-80-Processor25] org.hibernate.cfg.Environment - using CGLIB reflection optimizer
84297 INFO [http-80-Processor25] org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
84532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
84532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
84672 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: JvmMapDB.hbm.xml
85000 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonMenu -> psn_menu
85063 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubMenu -> club_menu
85063 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProvinceType -> Z_ZX
85078 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProvince -> Z_PROVINCE
85266 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCity -> Z_CITY
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicMainType -> MusicMainType
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicSecondeType -> MusicSecondeType
85282 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicType -> MusicType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPictureMainType -> PictureMainType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnNovelMainType -> NovelMainType
85297 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnConstellation -> Constellation
85313 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnEducation -> Education
85313 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnShengxiao -> Shengxiao
85328 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnColType -> ColType
85328 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCollection -> Collection
85360 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnNote -> Note
85375 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSeek -> Seek
85375 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSeekRe -> SeekRe
85391 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommend -> Commend
85438 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnTVProgram -> TV_program
85453 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnTVProgramPlayTime -> TV_program_play_time
85453 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: PersonMapDB.hbm.xml
85500 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPerson -> DbnPerson
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonPassword -> DbnPersonPassword
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonIndividuation -> DbnPersonIndividuation
85516 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnPersonUp -> PersonUp
85532 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: ProductMapDB.hbm.xml
85563 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProduct -> DbnProduction
85563 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductMusic -> Music
85578 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductVideo -> Video
85594 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductFlash -> Flash
85594 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductPicture -> Picture
85610 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductNovel -> Novel
85625 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMusicRelType -> MusicRelType
85625 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnVideoRelType -> VideoRelType
85641 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnFlashRelType -> FlashRelType
85641 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnSelfIntro -> SelfIntro
85657 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductIntro -> ProductIntro
85657 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnProductRead -> ProductRead
85672 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: ClubMapDB.hbm.xml
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubAuthType -> Club_auth_type
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubType -> Club_type
85782 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClub -> DbnClub
85813 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubLogo -> ClubLogo
85813 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubInitSet -> ClubInitSet
85813 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: MemberMapDB.hbm.xml
85828 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnMember -> member
85844 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubProduct -> ClubProduction
85844 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Reading mappings from resource: CompetitionMapDB.hbm.xml
85860 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompetitionType -> CompetitionType
85860 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommendType -> CommendType
85875 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCommendAuthType -> CommendAuthType
85875 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompProdFormat -> CompProdFormat
85891 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompetition -> ClubCompetition
85891 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubCompProduction -> ClubCompProduction
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompCommend -> CompCommend
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnClubCompProdScore -> ClubCompProdScore
85907 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping class: dataBean.DbnCompPerson -> CompPerson
85922 INFO [http-80-Processor25] org.hibernate.cfg.Configuration - Configured SessionFactory: null
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProvinceType.provinces -> Z_PROVINCE
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProvince.citys -> Z_CITY
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicMainType.musicTypes -> MusicType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.musicRelTypes -> MusicRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.videoRelTypes -> VideoRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMusicType.flashRelTypes -> FlashRelType
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPictureMainType.pictures -> Picture
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnNovelMainType.novels -> Novel
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnSeek.seekRes -> SeekRe
85922 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnTVProgram.tv_play_times -> TV_program_play_time
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myClub -> DbnClub
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.member -> member
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.products -> DbnProduction
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myCol -> Collection
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.myPassivecol -> Collection
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.sendNotes -> Note
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.receNotes -> Note
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.seeks -> Seek
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.seekRes -> SeekRe
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.personUps -> PersonUp
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.players -> CompPerson
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.productSelfIntros -> SelfIntro
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.send_commends -> Commend
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnPerson.rece_commends -> Commend
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.clubProducts -> ClubProduction
85938 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productSelfIntros -> SelfIntro
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productOtherIntros -> ProductIntro
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.productReads -> ProductRead
85953 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.rece_commends -> Commend
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProduct.myPassivecol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductMusic.catalogs -> MusicRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductVideo.catalogs -> VideoRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnProductFlash.catalogs -> FlashRelType
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubAuthType.clubs -> DbnClub
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubType.clubs -> DbnClub
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.member -> member
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.competitions -> ClubCompetition
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.myCol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.myPassivecol -> Collection
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.productSelfIntros -> SelfIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClub.rece_commends -> Commend
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMember.products -> ClubProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnMember.compProds -> ClubCompProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.compProds -> ClubCompProduction
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productSelfIntros -> SelfIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productOtherIntros -> ProductIntro
85969 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.productReads -> ProductRead
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.rece_commends -> Commend
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubProduct.myPassivecol -> Collection
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnCompetition.compProds -> ClubCompProduction
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnCompetition.players -> CompPerson
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.compCommends -> CompCommend
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.scores -> ClubCompProdScore
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.productReads -> ProductRead
85985 INFO [http-80-Processor25] org.hibernate.cfg.HbmBinder - Mapping collection: dataBean.DbnClubCompProduction.rece_commends -> Commend
86000 INFO [http-80-Processor25] org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - C3P0 using driver: net.sourceforge.jtds.jdbc.Driver at URL: jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - Connection properties: {user=gxfc, password=****}
86016 INFO [http-80-Processor25] org.hibernate.connection.C3P0ConnectionProvider - autocommit mode: false
Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@17b6643 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@14dd758 [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, idleConnectionTestPeriod -> 30000, initialPoolSize -> 1, maxIdleTime -> 1800, maxPoolSize -> 15, maxStatements -> 1000, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@19ec4ed [ description -> null, driverClass -> null, factoryClassLocation -> null, jdbcUrl -> jdbc:jtds:sqlserver://localhost:1433;DatabaseName=5loveart2, properties -> {user=******, password=******} ] , preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ] , factoryClassLocation -> null, numHelperThreads -> 3, poolOwnerIdentityToken -> 17b6643 ]
87032 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - RDBMS: Microsoft SQL Server, version: 08.00.0760
87032 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 0.9.1
87110 INFO [http-80-Processor25] org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.SQLServerDialect
87125 INFO [http-80-Processor25] org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
87141 INFO [http-80-Processor25] org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
87141 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Connection release mode: auto
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
87157 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
87188 INFO [http-80-Processor25] org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Query cache: disabled
87188 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Cache provider: org.hibernate.cache.NoCacheProvider
87203 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
87203 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Statistics: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
87235 INFO [http-80-Processor25] org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
87328 INFO [http-80-Processor25] org.hibernate.impl.SessionFactoryImpl - building session factory
89297 INFO [http-80-Processor25] org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
89813 INFO [http-80-Processor25] servlet.Log4jInitServlet - 通行证、密码存在!
89844 INFO [http-80-Processor25] servlet.Log4jInitServlet - 判断用户名、密码是否正确
89860 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到在线用户
89860 INFO [http-80-Processor25] servlet.Log4jInitServlet - 判断是否登陆,否则登陆
89875 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:通过通行证fenger888得到用户信息成功!
89875 INFO [http-80-Processor25] servlet.Log4jInitServlet - 增加在线用户
90500 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90657 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90813 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
90922 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:music:success得到各个作品的主类前几名成功!
91172 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:video:success得到各个作品的主类前几名成功!
91375 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:video:success得到各个作品的主类前几名成功!
91594 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91625 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91625 INFO [http-80-Processor25] servlet.Log4jInitServlet - 得到会员作品推荐排行
91735 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:正在进行的活动显示成功!
91735 INFO [http-80-Processor25] servlet.Log4jInitServlet - 按照结束时间倒序
91938 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:得到活动历史回顾成功!
91969 INFO [http-80-Processor25] servlet.Log4jInitServlet - 按照注册时间排列
92110 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:在线俱乐部列表成功!
92219 INFO [http-80-Processor25] servlet.Log4jInitServlet - 成功日志:按照某一种排法得到俱乐部列表成功!
92235 INFO [http-80-Processor25] servlet.Log4jInitServlet - 当前TV节目存在!
100938 INFO [http-80-Processor25] org.directwebremoting.util.Logger - Logging using commons-logging.
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - DWR Version 2.0.M3 starting.
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Servlet Engine: Apache Tomcat/5.5.20
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Java Version: 1.5.0_08
101188 INFO [http-80-Processor25] org.directwebremoting.impl.ContainerUtil - - Java Vendor: Sun Microsystems Inc.
103188 INFO [http-80-Processor25] org.directwebremoting.convert.HibernateBeanConverter - Found Hibernate3 class: org.hibernate.Hibernate
103250 INFO [http-80-Processor25] org.directwebremoting.dwrp.DefaultConverterManager - Type 'org.jdom.Document' is not convertable due to missing converter 'jdom'. This is only an problem if you wanted to use it.
103250 INFO [http-80-Processor25] org.directwebremoting.dwrp.DefaultConverterManager - Type 'org.jdom.Element' is not convertable due to missing converter 'jdom'. This is only an problem if you wanted to use it.
105438 INFO [http-80-Processor24] org.directwebremoting.impl.DefaultRemoter - Exec: NoteNumberBean.getUnReadNoteNum()
105469 INFO [http-80-Processor24] servlet.Log4jInitServlet - 成功日志:得到接收的未读短信成功!
评论
4 楼
抛出异常的爱
2007-01-25
java_zhanghui 写道
请问是 hibernate.cfg.xml配置问题吗?
为什么我在本地测试通过呢?
麻烦你能具体指出来吗?
为什么我在本地测试通过呢?
麻烦你能具体指出来吗?
麻烦您能帖出来么?
<!-- Disable the second-level cache --> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> <property name="hibernate.c3p0.max_size">15</property> <property name="hibernate.c3p0.min_size">1</property> <property name="hibernate.c3p0.timeout">1800</property> <property name="hibernate.c3p0.max_statements">1000</property> <property name="hibernate.c3p0.idle_test_period">30000</property> <property name="hibernate.c3p0.acquire_increment">1</property> <property name="hibernate.c3p0.validate">false</property>
这部分是否有问题?
在本机上没有那么大的访问量所以
缓存有问题看不出来
日志上大约说是第十一个session出的问题
3 楼
java_zhanghui
2007-01-25
山里有鬼 写道
引用
Warning parsing XML: /hibernate.cfg.xml(1) Valid documents must have a <!DOCTYPE declaration.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
问题应该出在配置文件上。
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- data connection -->
<property name="connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
<property name="connection.url">jdbc:jtds:sqlserver://localhost:1433;DatabaseName=test</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<!-- connection pool-->
<!-- <property name="connection.pool_size">10</property>-->
<!-- c3p0 -->
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">15</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">1000</property>
<property name="hibernate.c3p0.idle_test_period">30000</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.validate">false</property>
<!-- sql dialect -->
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- -->
<property name="current_session_context_class">thread</property>
<!-- -->
<!-- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>-->
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">true</property>
<!-- 映射定义文件 -->
<mapping resource="JvmMapDB.hbm.xml" />
<mapping resource="PersonMapDB.hbm.xml" />
<mapping resource="ProductMapDB.hbm.xml" />
<mapping resource="ClubMapDB.hbm.xml" />
<mapping resource="MemberMapDB.hbm.xml" />
<mapping resource="CompetitionMapDB.hbm.xml" />
<!-- 缓存设置 -->
<!--<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
<class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
<collection-cache class="org.hibernate.auction.Item.bids" usage="read-write"/> -->
</session-factory>
</hibernate-configuration>
2 楼
java_zhanghui
2007-01-25
请问是 hibernate.cfg.xml配置问题吗?
为什么我在本地测试通过呢?
麻烦你能具体指出来吗?
为什么我在本地测试通过呢?
麻烦你能具体指出来吗?
1 楼
山里有鬼
2007-01-25
引用
Warning parsing XML: /hibernate.cfg.xml(1) Valid documents must have a <!DOCTYPE declaration.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
[ERROR] 2007-01-25 09:55:22,515 method:org.hibernate.util.XMLHelper$ErrorLogger.error(XMLHelper.java:61)
Error parsing XML: /hibernate.cfg.xml(1) Document root element is missing.
问题应该出在配置文件上。
相关推荐
"功过格.rar"这个压缩包文件包含了两个用于记录个人功过行为的应用程序,分别针对安卓设备和桌面用户。在当今社会,越来越多的人开始关注自我成长和道德修养,这种工具便成为了他们自我反省和提升的有效助手。 首先...
事实上,人生路上,经常是功少过多,而且经常是犯了过而不自知,或者口说想改过,但是没行动。 人生境界提升有三个方法:知过、悔过、改过,借助软件敦促自己改变自己,真正做到了”时时勤拂拭,勿使惹尘埃“,人生...
人无完人,知错能改,善莫大焉,后不再造。 1)菜单键 -> insert: 将上次犯错的时间作为起始时间,如2014年6月21日; 并设置一个立志不再犯错的周期, 没犯错的天数会在主界面显示。 循序渐进的改正自己的错误...
在数据库管理中,存储过程(Stored Procedures)是一种预编译的SQL语句集合,它在数据库服务器上驻留并可由应用程序调用执行。存储过程在IT领域扮演着重要的角色,既有利也有弊,让我们深入探讨一下。 **一、存储...
探析网络流行语的功过是非-论文.zip
新版功过格.doc
刘晓媚 千秋功过秦始皇.ppt
抗生素的功过评说和合理使用.ppt
10. **课堂小结**:让学生以“我是……”为主题写作,促使他们反思自我,将历史人物的分析方法应用到自我认知上,实现知识的迁移和深化。 总的来说,这个教案展现了中学历史教学如何通过活动课形式,培养学生的批判...
标题中的“五年级下册综合实践活动——塑料的功过分析”是一个教育活动的主题,旨在让学生了解塑料在日常生活和工业中的应用及其对环境的影响。在这个活动中,学生们将学习关于塑料的基本知识,包括它如何被广泛使用...
浮点数的表示涉及到阶码和尾数,这两个部分决定了数值的范围和精度。如果一个浮点数的阶码较长而尾数较短,与另一个阶码短、尾数长的浮点数相比,前者可以表示的数的范围更大,但精度相对较低。这是因为长尾数可以...
五年级下册综合实践活动——塑料的功过分析PPT学习教案.pptx
云南省芒市中学高中历史 4.1.1 千秋功过秦始皇教案 人民版选修4
行锁功过:怎么减少行锁对性能的影响? 行锁是数据库系统中的一种锁机制,用于保护数据的一致性和完整性。然而,行锁也可能会对性能产生影响,特别是在高并发场景下。 本文将讨论行锁的实现机制、影响性能的原因,...
8 文件支持功能 支持文档保存到服务器上的指定目录中。 9 模版套红功能 支持拟稿时选择模版套红,也支持定稿后的模版套红功能。 10 版本支持功能 支持版本自由控制,可以由用户创建多个版本。 11 保存HTML功能...
外语考试-英国_第三条道路_评析——兼评布莱尔十年执政之功过.docx
人民版高中历史选修4专题一古代中国的政治家第1节《千秋功过秦始皇》参考教案.doc
本程序只是WAP 网站入门例题 功过说明文件配置成功之后 ,页面代码,可用多重语言,随意搭配
同时,提出了目前市场上产品同质化严重和竞争激烈的问题,并给出了具体的产品案例,如嗨体针、童颜针等。 4. 除皱塑形产品 除皱塑形产品中,肉毒素针剂占据核心地位。报告分析了国内和国际上肉毒素产品的审批情况和...
商贸零售:医美产业链深度剖析之五:绘医美产品图谱,鉴他山之石功过(2021)(82页).pdf