这个问题我已解决了,我在做jpa实例时总报错:
[TopLink Info]: 2008.01.16 10:41:03.968--ServerSession(14440411)--TopLink, version: Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))
[TopLink Info]: 2008.01.16 10:41:04.265--ServerSession(14440411)--file:/C:/Documents%20and%20Settings/USER/workspace/JPA/bin/-JPAPU login successful
[TopLink Warning]: 2008.01.16 10:41:04.375--ServerSession(14440411)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]数据库 'dbo' 不存在。
Error Code: 2702
Call: CREATE TABLE dbo.test.myuser (id INTEGER UNIQUE IDENTITY NOT NULL, username VARCHAR(200) NOT NULL, password VARCHAR(20) NOT NULL, PRIMARY KEY (id))
Query: DataModifyQuery()
2008-1-16 10:41:04 jpadao.EntityManagerHelper log
信息: saving Myuser instance
2008-1-16 10:41:04 jpadao.EntityManagerHelper log
信息: save successful
[TopLink Warning]: 2008.01.16 10:41:04.437--UnitOfWork(14069849)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]对象名 'dbo.test.myuser' 无效。
Error Code: 208
Call: INSERT INTO dbo.test.myuser (username, password) VALUES (?, ?)
bind => [jpa test, jpa password]
Query: InsertObjectQuery(jpadao.Myuser@1758500)
Exception in thread "main" javax.persistence.RollbackException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]对象名 'dbo.test.myuser' 无效。
Error Code: 208
Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]数据库 'dbo' 不存在。明明存在,怎么说不存在呢?我都做四遍了,都是这样的错,大家帮帮我吧!下面是配置的persistence.xml
<properties>
<property name="toplink.jdbc.driver"
value="com.microsoft.jdbc.sqlserver.SQLServerDriver" />
<property name="toplink.jdbc.url"
value="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test" />
<property name="toplink.jdbc.user" value="sa" />
<property name="toplink.jdbc.password" value="sa" />
<property name="toplink.ddl-generation"
value="create-tables" />
</properties>