<2008-7-11 上午09时53分23秒 CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.5.0_04-b05 from Sun Microsystems Inc.>
<2008-7-11 上午09时53分25秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.1 Mon Dec 12 19:26:33 EST 2005 689178 >
<2008-7-11 上午09时53分31秒 CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : D:\bea\license.bea>
<2008-7-11 上午09时53分31秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2008-7-11 上午09时53分31秒 CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<2008-7-11 上午09时53分33秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file D:\bea\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
<2008-7-11 上午09时53分37秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<2008-7-11 上午09时53分43秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<2008-7-11 上午09时53分43秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
log4j:WARN No appenders could be found for logger (org.springframework.util.ClassUtils).
log4j:WARN Please initialize the log4j system properly.
<2008-7-11 上午09时54分22秒 CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
<2008-7-11 上午09时54分23秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2008-7-11 上午09时54分23秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2008-7-11 上午09时54分24秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.1.4:7001 for protocols iiop, t3, ldap, http.>
<2008-7-11 上午09时54分24秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, http.>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "base_domain" running in Development Mode>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
---------------------LoginAction;userName=1password=1
Hibernate: select user0_.USERID as USERID5_, user0_.USERTYPEID as USERTYPEID5_, user0_.USERNAME as USERNAME5_, user0_.PASSWORD as PASSWORD5_ from XTYHUSER user0_
<2008-7-11 上午09时56分42秒 CST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@18f5a04 - name: 'HRM', context-path: '/HRM'] Root cause of ServletException.
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:615)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:917)
Truncated. see log file for complete stacktrace
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2216)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
Truncated. see log file for complete stacktrace
java.sql.SQLException: ORA-00942: 表或视图不存在 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
Truncated. see log file for complete stacktrace
>
请问这是什么错?
原代码如下:
/**
*
*/
package hrm.action;import java.util.List;import hrm.model.User;
import hrm.model.logic.HrmFacade;import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.Preparable;/**
* @author Cheng Cheng
* Kikuya
* 2008-7-3
*/
public class LoginAction implements Preparable {
private String userName;
private String password;
private HrmFacade hrmFacade;
/**
*
*/
public LoginAction() {
// TODO Auto-generated constructor stub
} /* (non-Javadoc)
* @see com.opensymphony.xwork2.Preparable#prepare()
*/
public void prepare() throws Exception {
// TODO Auto-generated method stub }
public String execute() {
System.out.println("---------------------LoginAction;userName=" + userName + "password=" + password);
if(isInvalid(getUserName()))
{
return Action.INPUT;
}
if(isInvalid(getPassword()))
{
return Action.INPUT;
} List list = this.hrmFacade.findByName(userName);
System.out.println("-----------------" + list);
if(list == null || list.size() == 0)
{
return Action.INPUT;
} else {
User user = (User)list.get(0);
if(getPassword().equalsIgnoreCase(user.getPassword()))
{
return Action.SUCCESS;
} else {
}
return Action.INPUT;
}
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub } public void setHrmFacade(HrmFacade hrmFacade) {
this.hrmFacade = hrmFacade;
}
private boolean isInvalid(String value) {
return (value == null || value.length() == 0);
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public String getUserName() {
return userName;
} public void setUserName(String userName) {
this.userName = userName;
}}
<2008-7-11 上午09时53分25秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.1 Mon Dec 12 19:26:33 EST 2005 689178 >
<2008-7-11 上午09时53分31秒 CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : D:\bea\license.bea>
<2008-7-11 上午09时53分31秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2008-7-11 上午09时53分31秒 CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<2008-7-11 上午09时53分33秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file D:\bea\user_projects\domains\base_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.>
<2008-7-11 上午09时53分37秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<2008-7-11 上午09时53分43秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<2008-7-11 上午09时53分43秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
log4j:WARN No appenders could be found for logger (org.springframework.util.ClassUtils).
log4j:WARN Please initialize the log4j system properly.
<2008-7-11 上午09时54分22秒 CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
<2008-7-11 上午09时54分23秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2008-7-11 上午09时54分23秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2008-7-11 上午09时54分24秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.1.4:7001 for protocols iiop, t3, ldap, http.>
<2008-7-11 上午09时54分24秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, http.>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "base_domain" running in Development Mode>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2008-7-11 上午09时54分24秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
---------------------LoginAction;userName=1password=1
Hibernate: select user0_.USERID as USERID5_, user0_.USERTYPEID as USERTYPEID5_, user0_.USERNAME as USERNAME5_, user0_.PASSWORD as PASSWORD5_ from XTYHUSER user0_
<2008-7-11 上午09时56分42秒 CST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@18f5a04 - name: 'HRM', context-path: '/HRM'] Root cause of ServletException.
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:615)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:917)
Truncated. see log file for complete stacktrace
org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2216)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
Truncated. see log file for complete stacktrace
java.sql.SQLException: ORA-00942: 表或视图不存在 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
Truncated. see log file for complete stacktrace
>
请问这是什么错?
原代码如下:
/**
*
*/
package hrm.action;import java.util.List;import hrm.model.User;
import hrm.model.logic.HrmFacade;import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.Preparable;/**
* @author Cheng Cheng
* Kikuya
* 2008-7-3
*/
public class LoginAction implements Preparable {
private String userName;
private String password;
private HrmFacade hrmFacade;
/**
*
*/
public LoginAction() {
// TODO Auto-generated constructor stub
} /* (non-Javadoc)
* @see com.opensymphony.xwork2.Preparable#prepare()
*/
public void prepare() throws Exception {
// TODO Auto-generated method stub }
public String execute() {
System.out.println("---------------------LoginAction;userName=" + userName + "password=" + password);
if(isInvalid(getUserName()))
{
return Action.INPUT;
}
if(isInvalid(getPassword()))
{
return Action.INPUT;
} List list = this.hrmFacade.findByName(userName);
System.out.println("-----------------" + list);
if(list == null || list.size() == 0)
{
return Action.INPUT;
} else {
User user = (User)list.get(0);
if(getPassword().equalsIgnoreCase(user.getPassword()))
{
return Action.SUCCESS;
} else {
}
return Action.INPUT;
}
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub } public void setHrmFacade(HrmFacade hrmFacade) {
this.hrmFacade = hrmFacade;
}
private boolean isInvalid(String value) {
return (value == null || value.length() == 0);
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public String getUserName() {
return userName;
} public void setUserName(String userName) {
this.userName = userName;
}}
解决方案 »
- Applet 加载异常 ClassFormatError Incompatible magic value 218762506
- 求助:webSphere中部署web service的问题
- 删除报Connection is read-only异常,为什么?
- struts+hibernate实现用户管理出现的问题
- 100分!!! 上午的时候已经发过了,可以不满意! 请高手继续赐教!!!
- struts2 标签使用问题
- 大家开发J2EE用什么开发工具?
- 大家在开发Java WebServices & XML/Soap 项目的时候用的是什么开发工具?不防说说?
- mm求教,高手赐招!急。。。急。。。(jwsdp1.3 上生成的web service例子在weblogic7.0上部署的问题)
- 作spring , j2ee的话,open jdk和oracle jdk 有区别么?推荐
- hibernate自动生成
- weblogic8 ejb2.0 调试错误 帮帮忙
楼主【eclipse1008】截止到2008-07-11 10:41:50的历史汇总数据(不包括此帖):
发帖的总数量:1 发帖的总分数:0 每贴平均分数:0
回帖的总数量:0 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:1 结贴的总分数:0
无满意结贴数:1 无满意结贴分:100
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:---------------------
无满意结贴率:100.00% 无满意结分率:---------------------
敬礼!
*
*/
package hrm.dao.hibernate;import java.util.List;import hrm.dao.UserDao;
import hrm.model.User;import org.springframework.orm.hibernate3.support.HibernateDaoSupport; /**
* @author hp
*
*/
public class UserMapDao extends HibernateDaoSupport implements UserDao {
public UserMapDao(){
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub } public List findByName(String userName) {
// TODO Auto-generated method stub
return getHibernateTemplate().find("from hrm.model.User");
}}/**
*
*/
package hrm.model;import java.io.Serializable;/**
* @author Cheng Cheng
* Kikuya
* 2008-6-28
*/
public class User implements Serializable {
private Integer userID; // 用户ID
private UserType userType; // 用户类型
private String userName; // 用户名称
private String password; // 用户密码
public User() {
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub } public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public Integer getUserID() {
return userID;
} public void setUserID(Integer userID) {
this.userID = userID;
} public String getUserName() {
return userName;
} public void setUserName(String userName) {
this.userName = userName;
} public UserType getUserType() {
return userType;
} public void setUserType(UserType userType) {
this.userType = userType;
}
}<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="hrm.model.User" table="XTYHUSER" >
<id name="userID" type="integer">
<column name="USERID"/>
<generator class="sequence">
<param name="sequence">XTYHUSER_SEQ</param>
</generator>
</id>
<many-to-one
name="userType"
column="USERTYPEID"
class="hrm.model.UserType"
not-null="true"/>
<property name="userName" type="string">
<column name="USERNAME" length="20" />
</property>
<property name="password" type="string">
<column name="PASSWORD" length="20" />
</property>
</class>
</hibernate-mapping>
<%@ taglib prefix="s" uri="/struts-tags" %><%
String cssDir = "/HRM/css/";
String imagesDir = "/HRM/images/";
String jsDir = "/HRM/js/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="<s:url value="<%=cssDir %>hrmcs.css"/>" type="text/css" rel="stylesheet"/>
<title>人力资源管理系统</title>
<style type="text/css">
<!--
.style3 {color: #FFFFFF}
-->
</style>
</head><body onload="self.focus();document.Login.username.focus()" class="body">
<table height="100" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td><img src="<%=imagesDir %>common/Logo-1.jpg" height="80"></td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br><s:form name="form1" method="post" action="login.do" validate="true">
<tr>
<td width="31%"><div align="right"><img src="<%=imagesDir %>common/1.gif" width="16" height="16"></div></td>
</tr>
<s:textfield key="userName" />
<s:password key="password" />
<s:submit key="button.submit" />
<s:reset key="button.reset" />
</s:form>
</body>
</html>
<class table="XTYHUSER" name="User">
......
连接数据库是怎么连接的?