Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DCA14D890 for ; Fri, 14 Dec 2012 20:52:50 +0000 (UTC) Received: (qmail 53957 invoked by uid 500); 14 Dec 2012 20:52:48 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 53922 invoked by uid 500); 14 Dec 2012 20:52:48 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 53914 invoked by uid 99); 14 Dec 2012 20:52:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 20:52:48 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [98.139.212.168] (HELO nm9.bullet.mail.bf1.yahoo.com) (98.139.212.168) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2012 20:52:39 +0000 Received: from [98.139.212.153] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 14 Dec 2012 20:52:17 -0000 Received: from [98.139.215.228] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 14 Dec 2012 20:52:17 -0000 Received: from [127.0.0.1] by omp1068.mail.bf1.yahoo.com with NNFMP; 14 Dec 2012 20:52:17 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 628125.76790.bm@omp1068.mail.bf1.yahoo.com Received: (qmail 30940 invoked by uid 60001); 14 Dec 2012 20:52:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1355518337; bh=YlqQwOQoeHeqnuqzvHquS16cG1f0u4hSSGjxqLoCsT0=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=fbF98/tg9pnqnYxj/E80y0vpLeVLActKKe+CnlO4S2uZJSQvD7IqNk8eKtoL9f8UvErYAgIRGeq5RtX3UkD2KC89bDvD/VFTNB3qDqR70IwMpwlvekxmkLXNwX4/mQw8yVo2NhlXaCAWEdHAeJZ5JDrSn/g/dwiydDO0XWfWDNY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=wztx+eTQfZ90GuEwH/PA/ygZhwTPgmcWe/8K9Vi7W2y7j6kgYBqFgLQGM79SQaf6F7o6cnLJn6jt8c/PVpNSKHDRx4SUk8i4ewIyIq9ue9fVQEvjUXGLOTeXxmBStCUoHrEOsAkJj/y8tuy0rL1FH/QAcXnlKp30v0UWsYn8o0Y=; X-YMail-OSG: V214vQoVM1kKOOl9ymxwnWX9pWOCbp4eIvTy_jp1J2o8EkU fWDiq.O5GtH9J8Cs__D7FVeVjDLukjLtH140bGO7JN4UMQ8a9QWEwPe7PPfV Fh_TzUtrLEG18ioY.nkYzXrxd0QpTG7dzzS8O.KV0def3qzPfN7ZaJ6lGlyf 60S9gqm1tKTCOfFu5Jlp0ftjVrLrOyn73H5.aLYbwQbVFmCbKk3sXFTuhFif SKTlXttLP0tmp2vfkNCzW9r77eGVt19wLlH2RWe1dWc_n7BtM104qVPBHJPG yTYzPVF9hccM8nxQ.L9JX7d3PZWqgoIcPokaPM5rr5pzz9MKcejAxR04xTEF 6ZD_uqi7d6NSCGY2Twf45qt3D7Cz2v3xTpQ6QftrPzhzDsU3tGkd9IgPxOu1 t9UWbhUmJFEEm4BFZShavOrR5kkbGtx_ydgvQn3fV12J8C_x.xagO.puAOfM H0ud2ycLn8Gr4g6SjNpf6RgW9OyZSS2S6KWExuVuMy8RJR3XqgWWLsQxngkw TrROrVjBR_GWoAxQvbajPkXwbqQPj7lf29DBx96MOasWfELuNur2JXCfZpjN Z7EZwQ.vSOG.8sDXisPN6b44V_vczXLuIXUqNag615UujSIsIaHS5rH51mwT XdWcBt4tK04EbB3yvJ1.mpu0MH5SaC.kQAQluzfMEiEas4lsd8hMEE0u4OD8 PdrfSzNv3SiC7S2uun42AxshsEfjZ.PfZVazXYVo- Received: from [65.168.98.60] by web140706.mail.bf1.yahoo.com via HTTP; Fri, 14 Dec 2012 12:52:16 PST X-Rocket-MIMEInfo: 001.001,dGtzIGZvciByZXBseS4KwqAKaXQgaXMgYXQgbG9jYWwsIG5vIHByb3h5LCBubyBmaXJ3YWxsCsKgCmFsc28sIGkganVzdCBjaGFuZ2UgdG8gU1lTVEVNIGZvciBnaXZlIGFuIHRyeSwgYnV0IGFsc28gcmVjZWl2ZSBzYW1lIGVycm9yIG1lc3NhZ2UuCsKgCsKgCgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KRnJvbTogSmVmZiBCbGFjayA8amVmZnJleS5ibGFja0B5YWhvby5jb20.ClRvOiBTdHJ1dHMgVXNlcnMgTWFpbGluZyBMaXN0IDx1c2VyQHN0cnV0cy5hcGFjaGUub3JnPjsgam9obiBsZWUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.128.478 References: <1355514383.88680.YahooMailNeo@web140704.mail.bf1.yahoo.com> <1355517867.36951.YahooMailNeo@web162104.mail.bf1.yahoo.com> Message-ID: <1355518336.29606.YahooMailNeo@web140706.mail.bf1.yahoo.com> Date: Fri, 14 Dec 2012 12:52:16 -0800 (PST) From: john lee Reply-To: john lee Subject: Re: struts2+hiberate org.hibernate.cfg.Configuration To: Jeff Black , Struts Users Mailing List In-Reply-To: <1355517867.36951.YahooMailNeo@web162104.mail.bf1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-637016289-1109222081-1355518336=:29606" X-Virus-Checked: Checked by ClamAV on apache.org ---637016289-1109222081-1355518336=:29606 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable tks for reply.=0A=A0=0Ait is at local, no proxy, no firwall=0A=A0=0Aalso, i= just change to SYSTEM for give an try, but also receive same error message= .=0A=A0=0A=A0=0A=0A=0A________________________________=0AFrom: Jeff Black <= jeffrey.black@yahoo.com>=0ATo: Struts Users Mailing List ; john lee =0ASent: Friday, December 14, 20= 12 2:44 PM=0ASubject: Re: struts2+hiberate org.hibernate.cfg.Configuration = =0A=0A=0AJohn,=0A=0AAre you behind a proxy?=0A=0ADouble-check that you can = access the DTD from your system.=0A=0AYou might consider changing your DOCT= YPE to reference the DTD contained in your Hibernate.jar (i.e. from PUBLIC = to SYSTEM) so it won't try to look things up remotely.=0A=0ABest,=0A=0AJeff= =0A=0A=0A=0A=0A=0A________________________________=0AFrom: john lee =0ATo: "user@struts.apache.org" = =0ASent: Friday, December 14, 2012 1:46 PM=0ASubject: struts2+hiberate org.= hibernate.cfg.Configuration =0A=0Ai am new to struts2+hiberate,=A0 i can su= ccessfuly make struts2 sample project working, but not hiberate, i just mak= e an simple test program, and compile is good, but when execute, the error = is at following, the project tree is also include=0A=A0=0Aplease help, than= ks in advance=0A=A0=0A=A0=0A=A0=0A=A0=0A=A0=0Aalpha:/var/apache-tomcat-7.0.= 34/webapps/ecommerce/WEB-INF/classes # java Test=0A=A0=0ADec 14, 2012 2:56:= 28 PM org.hibernate.cfg.Configuration getConfigurationInputStream=0AINFO: H= HH000040: Configuration resource: /hibernate.cfg.xml=0AException in thread = "main" org.hibernate.MappingException: invalid configuration=0A=A0=A0=A0=A0= =A0=A0=A0 at org.hibernate.cfg.Configuration.doConfigure(Configuration.java= :2018)=0A=A0=A0=A0=A0=A0=A0=A0 at org.hibernate.cfg.Configuration.configure= (Configuration.java:1935)=0A=A0=A0=A0=A0=A0=A0=A0 at org.hibernate.cfg.Conf= iguration.configure(Configuration.java:1914)=0A=A0=A0=A0=A0=A0=A0=A0 at Tes= t.main(Test.java:12)=0ACaused by: org.xml.sax.SAXParseException: Document i= s invalid: no grammar found.=0A=A0=A0=A0=A0=A0=A0=A0 at com.sun.org.apache.= xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandl= erWrapper.java:195)=0A=A0=0A=A0=0Aalpha:/var/apache-tomcat-7.0.34/webapps/e= commerce/WEB-INF # ls -R=0A.:=0Aclasses=A0 compile.sh=A0 lib=A0 src=A0 web.= xml=A0 =0A=A0=0A./classes:=0AStudent.hbm.xml=A0 Test.class=A0 example=A0 hi= bernate.cfg.xml=A0 =A0=A0struts.xml=0A=A0=0A./classes/example:=0AStudent.cl= ass=0A=A0=0A./lib:=0Acommons-fileupload-1.2.2.jar=A0 freemarker-2.3.19.jar= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 ognl-3.0.5.jar=0Acommons-io-2.0.1.jar=A0=A0=A0=A0=A0=A0=A0=A0=A0 hibern= ate-commons-annotations-4.0.1.Final.jar=A0=A0 spring-test-3.0.5.RELEASE.jar= =0Acommons-lang-2.4.jar=A0=A0=A0=A0=A0=A0=A0=A0=A0 hibernate-core-4.1.8.Fin= al.jar=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struts2-core-2.3.= 7.jar=0Acommons-lang3-3.1.jar=A0=A0=A0=A0=A0=A0=A0=A0 javassist-3.11.0.GA.j= ar=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = xwork-core-2.3.7.jar=0Acommons-logging-1.1.1.jar=A0=A0=A0=A0 jboss-logging-= 3.1.0.GA.jar=0Adom4j-1.6.1.jar=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 jb= oss-transaction-api_1.1_spec-1.0.0.Final.jar=0A=A0=0A./src:=0Aexample=0A=A0= =0A./src/example:=0AStudent.java=A0 Test.java=A0 =0A=A0=0A*****************= ****************************=0Aalpha:/var/apache-tomcat-7.0.34/webapps/ecom= merce/WEB-INF/classes # cat Student.hbm.xml=0A=A0=0A= =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0=0A=0A=A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 =0A=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 =0A=A0=A0=A0=A0=A0=A0=A0 =0A=0A=A0=0A= =A0=0Aalpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/classes # c= at hibernate.cfg.xml=0A=0A=A0=0A=A0=A0=A0=A0=A0=A0= =A0 =0A=A0=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= com.mysql.jdbc.Driver=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 jdbc:mysql://10.1.1.37/mytest=0A=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 test=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 password=0A=A0=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 org.hibernate.dialect.MySQLInnoD= BDialect=0A=A0=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <= property name=3D"show_sql">true=0A=A0=0A=A0=0A=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A=A0= =0A=A0=A0=A0=A0=A0=A0=A0 =0A=A0=0A=0A=A0=0A=A0=0Aalpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF= /src/example # cat Test.java=0A=A0=0Aimport org.hibernate.Session;=0Aimport= example.Student;=0Aimport org.hibernate.SessionFactory;=0Aimport org.hiber= nate.cfg.Configuration;=0A=A0=0Apublic class Test {=0A=A0=A0=A0=A0=A0=A0=A0= public static void main(String[] args) {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 //Session session =3D HibernateUtil.getSessionFactory().get= CurrentSession();=0A=A0=0A=A0=A0=A0=A0=A0=A0=A0 Configuration conf=3Dnew Co= nfiguration().configure();=0A=A0=A0=A0=A0=A0=A0=A0 SessionFactory sf=3Dconf= .buildSessionFactory();=0A=A0=A0=A0=A0=A0=A0=A0 Session session=3Dsf.openSe= ssion();=0A=A0=A0=A0=A0=A0=A0=A0 session.beginTransaction();=A0=A0=A0=A0 = =0A=A0=A0=A0=A0=A0=A0=A0 Student s =3D new Student("firstname", "lastname",= "address");=0A=A0=A0=A0=A0=A0=A0=A0 session.save(s);=0A=A0=A0=A0=A0=A0=A0= =A0 session.getTransaction().commit();=0A=A0=A0=A0=A0=A0=A0=A0 }=0A}=0A=A0= =0A=A0=0Amysql> desc student;=0A+------------+---------------------+------+= -----+---------+----------------+=0A| Field=A0=A0=A0=A0=A0 | Type=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | Null | Key | Default | Extra=A0=A0= =A0=A0=A0=A0=A0=A0=A0 |=0A+------------+---------------------+------+-----+= ---------+----------------+=0A| student_id | bigint(10) unsigned | NO=A0=A0= | PRI | NULL=A0=A0=A0 | auto_increment | =0A| first_name | varchar(50)=A0= =A0=A0=A0=A0=A0=A0=A0 | YES=A0 |=A0=A0=A0=A0 | NULL=A0=A0=A0 |=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | =0A| last_name=A0 | varchar(50)=A0=A0= =A0=A0=A0=A0=A0=A0 | YES=A0 |=A0=A0=A0=A0 | NULL=A0=A0=A0 |=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | =0A| address=A0=A0=A0 | varchar(50)=A0=A0= =A0=A0=A0=A0=A0=A0 | YES=A0 |=A0=A0=A0=A0 | NULL=A0=A0=A0 |=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | =0A+------------+---------------------+---= ---+-----+---------+----------------+=0A4 rows in set (0.00 sec) ---637016289-1109222081-1355518336=:29606--