`
java_zhanghui
  • 浏览: 20732 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

项目发布到服务器上的问题,本地测试功过。

阅读更多
本机运行 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 - 成功日志:得到接收的未读短信成功!
分享到:
评论
44 楼 kjj 2007-01-26  
看不懂,天书!
43 楼 kjj 2007-01-26  
晕了,天书?难看懂!
42 楼 java_zhanghui 2007-01-25  
codeutil 写道


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 



把dtd映射到本地试一下.


非常感谢大家问题已经解决
41 楼 codeutil 2007-01-25  


<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 



把dtd映射到本地试一下.

40 楼 java_zhanghui 2007-01-25  
现在经过大家整理,感觉像是
hibernate.cfg.xml验证错误问题。
这个问题,可能跟什么有关系呢?
39 楼 java_zhanghui 2007-01-25  
Allen 写道
java_zhanghui 写道
leelun 写道
你要使用hibernate.cfg.xml要这样得 
new  Configuration().configure()

我也想知道,为什么会深成一个hibernate.cfg.xml(1)这个文件。


No No No!
log中的"hibernate.cfg.xml(1)"怎么会是一个文件。

注意看XMLHelper的源代码这里:
		public void warning(SAXParseException warn) {
			log.warn( "Warning parsing XML: " + file + '(' + warn.getLineNumber() + ") " + warn.getMessage() );
		}

"hibernate.cfg.xml(1)"指的是hibernate.cfg.xml这个文件在解析的时候于文件第一行发生了异常。

多谢:
是这样啊。我重新传一个测试一下看看。
38 楼 Allen 2007-01-25  
java_zhanghui 写道
leelun 写道
你要使用hibernate.cfg.xml要这样得 
new  Configuration().configure()

我也想知道,为什么会深成一个hibernate.cfg.xml(1)这个文件。


No No No!
log中的"hibernate.cfg.xml(1)"怎么会是一个文件。

注意看XMLHelper的源代码这里:
		public void warning(SAXParseException warn) {
			log.warn( "Warning parsing XML: " + file + '(' + warn.getLineNumber() + ") " + warn.getMessage() );
		}

"hibernate.cfg.xml(1)"指的是hibernate.cfg.xml这个文件在解析的时候于文件第一行发生了异常。
37 楼 java_zhanghui 2007-01-25  
Allen 写道
也许我下面的问题会有点多余:

1] 你的xml文件在本地的时候确实是UTF-8编码的吗?
2] 到了服务器上以后又是什么编码了呢?
3] 发布的过程中是不是有了文件转码的动作?

谢谢您的回复:
我所有的文件编码都是 UTF-8编码,
谢谢您的提醒,我在查查看。
36 楼 Allen 2007-01-25  
也许我下面的问题会有点多余:

1] 你的xml文件在本地的时候确实是UTF-8编码的吗?
2] 到了服务器上以后又是什么编码了呢?
3] 发布的过程中是不是有了文件转码的动作?
35 楼 java_zhanghui 2007-01-25  
leelun 写道
你要使用hibernate.cfg.xml要这样得 
new  Configuration().configure()

我也想知道,为什么会深成一个hibernate.cfg.xml(1)这个文件。
34 楼 java_zhanghui 2007-01-25  
抛出异常的爱 写道
一。把日志文件的debug打开
# This is the configuring for logging displayed in the Application Server
log4j.rootCategory=INFO,stdout

#stdout configure
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern= %d %p [%c] - <%m>%n

# Changing the log level to DEBUG will display SQL Hibernate generated
log4j.logger.org.hibernate=DEBUG
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.hibernate.cache=DEBUG
log4j.logger.net.sf.ehcache=DEBUG

二。org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties:
本地用了hibernate.properties但服务器没用
三。是否能找到错误产生规率?

谢谢您的回复:
好的,我马上测试一下。
33 楼 java_zhanghui 2007-01-25  
leelun 写道
为什么服务器上是“hibernate.properties not found ”
而本地日志上是有hibernate.properties的 ?

谢谢回复:
本地上没有。
32 楼 leelun 2007-01-25  
你要使用hibernate.cfg.xml要这样得 
new  Configuration().configure()
31 楼 leelun 2007-01-25  
为什么服务器上是“hibernate.properties not found ”
而本地日志上是有hibernate.properties的 ?
30 楼 抛出异常的爱 2007-01-25  
一。把日志文件的debug打开
# This is the configuring for logging displayed in the Application Server
log4j.rootCategory=INFO,stdout

#stdout configure
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern= %d %p [%c] - <%m>%n

# Changing the log level to DEBUG will display SQL Hibernate generated
log4j.logger.org.hibernate=DEBUG
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.hibernate.cache=DEBUG
log4j.logger.net.sf.ehcache=DEBUG

二。org.hibernate.cfg.Environment - loaded properties from resource hibernate.properties:
本地用了hibernate.properties但服务器没用
三。是否能找到错误产生规率?
29 楼 山里有鬼 2007-01-25  
抛出异常的爱 写道

你的机器自动生成了一个hibernate.cnf.xml(1)
并且里面没有内容所以会出这个错误。


确实,一开始没仔细看
应该先检查一下代码,为什么会自动创建这个文件?
抛出NullPointerException的直接原因应该是数据库链接池创建有问题.
导致底层getConnection()取不到数据库链接.

而数据库链接池创建失败的原因很可能就是那个自动生成的配置文件引起的.
28 楼 java_zhanghui 2007-01-25  
leelun 写道
升级到Hibernate3.2.1试试

谢谢您的回复:
这个根Hibernate3.2.1好像没有关系吧。
因为本地测试是通过的。
27 楼 java_zhanghui 2007-01-25  
Allen 写道
我想xml配置文件在应用程序运行的过程里应该不大可能损坏……
connection.HibConnection类里面的currentSession()方法是怎么写的?是不是SessionFactory建立的过程中出了什么问题?

另外,以下是我的一点小疑问:
引用
<property name="hbm2ddl.auto">true</property>

hbm2ddl.auto可以取的值的就是" validate | update | create | create-drop "这4个吧,应该是没有"true"的。

引用
<!-- Disable the second-level cache --> 
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

这个"org.hibernate.cache.NoCacheProvider"是怎么来的,IDE生成配置文件的时候推荐这样的方式来禁用二级缓存?我想一般都是通过设置cache.use_second_level_cache为false来禁用二级缓存的吧。

sessionFactory 已经贴出:
http://www.iteye.com/topic/50333?page=2
26 楼 leelun 2007-01-25  
升级到Hibernate3.2.1试试
25 楼 java_zhanghui 2007-01-25  
Allen 写道
我想xml配置文件在应用程序运行的过程里应该不大可能损坏……
connection.HibConnection类里面的currentSession()方法是怎么写的?是不是SessionFactory建立的过程中出了什么问题?

另外,以下是我的一点小疑问:
引用
<property name="hbm2ddl.auto">true</property>

hbm2ddl.auto可以取的值的就是" validate | update | create | create-drop "这4个吧,应该是没有"true"的。

引用
<!-- Disable the second-level cache --> 
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

这个"org.hibernate.cache.NoCacheProvider"是怎么来的,IDE生成配置文件的时候推荐这样的方式来禁用二级缓存?我想一般都是通过设置cache.use_second_level_cache为false来禁用二级缓存的吧。

谢谢您的回复:
我也是这样的认为的,
但是我本地测试都是通过的,
您能给出好的意见吗?
SessionFactotry 建立过程中要注意的问题吗?

相关推荐

Global site tag (gtag.js) - Google Analytics