Senior |
|
Joined: Wed Dec 17, 2003 4:24 am Posts: 188
|
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
3.0.5
<hibernate-mapping package="lyo.test.domain"> <class name="Author" table="author" > <id name="id" type="string" column="AUTHOR_ID" > <generator class="uuid.hex"/> </id>
<property name="authorSex" column="AUTHOR_SEX" type="string" not-null="false" length="1" /> <property name="authorJoinTime" column="AUTHOR_JOIN_TIME" type="timestamp" not-null="false" length="19" /> <property name="authorEmail" column="AUTHOR_EMAIL" type="string" not-null="false" length="100" /> <property name="authorHabit" column="AUTHOR_HABIT" type="string" not-null="false" length="200" /> <property name="authorProvince" column="AUTHOR_PROVINCE" type="string" not-null="false" length="50" /> <property name="authorName" column="AUTHOR_NAME" type="string" not-null="false" length="40" /> <property name="authorPassword" column="AUTHOR_PASSWORD" type="string" not-null="false" length="40" /> <property name="authorAge" column="AUTHOR_AGE" type="integer" not-null="false" length="11" />
<set inverse="true" lazy="true" name="articleSet" > <key column="AUTHOR_ID" /> <one-to-many class="Article" /> </set>
<set inverse="true" lazy="true" name="pictureSet" > <key column="PICTURE_ID" /> <one-to-many class="Picture" /> </set>
</class> </hibernate-mapping> :
public Author findAuthor(String username, String password) { List list= this.getHibernateTemplate().find("from Author a where a.authorName='"+username+"' and a.authorPassword='"+password+"'"); Author au=null; if(null!=list&&!list.isEmpty()){ au=(Author)list.get(0); } return au; }
started in RUNNING mode> <2005-7-10 上午09时28分06秒 CST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*> <2005-7-10 上午09时29分06秒 CST> <Warning> <HTTP> <BEA-101248> <[null]: Deployme nt descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXPars eException: The content of element type "web-app" must match "(icon?,display-nam e?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*, servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error -page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config ?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". (line 43, column 11).> Get username: yo 2005-07-10 09:33:12,810 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [org/springframework/jdbc/support /sql-error-codes.xml] 2005-07-10 09:33:12,840 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'DB2' 2005-07-10 09:33:12,860 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'HSQL' 2005-07-10 09:33:12,860 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'MS-SQL' 2005-07-10 09:33:12,860 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'MySQL' 2005-07-10 09:33:12,870 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'Oracle' 2005-07-10 09:33:12,870 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'Informix' 2005-07-10 09:33:12,870 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'PostgreSQL' 2005-07-10 09:33:12,880 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'Sybase' 2005-07-10 09:33:12,890 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default '] INFO org.springframework.jdbc.support.SQLErrorCodesFactory - SQLErrorCodes l oaded: [DB2, HSQL, MS-SQL, MySQL, Oracle, Informix, PostgreSQL, Sybase] CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken
MySQL 4.1
NO
INFO:
Tapestry code is: Code: public void doLogon(IRequestCycle cycle){ System.out.println("Get username: "+this.getUsername()); Author au=this.getUserDao().findAuthor(this.getUsername(),this.getPassword()); if(null!=au){ Visit v=(Visit)this.getVisit(); v.setUsername(au.getAuthorName()); v.setPassword(au.getAuthorPassword()); cycle.activate("main"); }else{ this.setErrorMessage("³ö´íÁË:error in logon!"); cycle.activate("logon"); } } When this Exception happen,weblogic8.1 shutdown!? But this application could run in Tomcat5.0 property,why it couldn't find the HqlToken class in Weblogic8? What's meaning of this sentence ? Code: CharScanner; panic: ClassNotFoundException: org.hibernate.hql.ast.HqlToken Thks![/code]
_________________ You are not alone...
|
|