我正在使用EJB 3.0开发一个Web项目,每当EclipseLink尝试与数据库交互时,它都说我正在使用的模式不存在(它 ) 。

我从GlassFish 2.1获得了一个巨大的,无益的堆栈跟踪,它以:

开头
EclipseLink, version: Eclipse Persistence Services - 1.1.0.r3639-SNAPSHOT
file:/C:/Documents%20and%20Settings/nick/.personalDomain/personalDomain/applications/j2ee-apps/ScienceEar/lib/ScienceJpa-1.0-SNAPSHOT.jar-SciencePU login successful
Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.1.0.r3639-SNAPSHOT): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Schema 'BEAMLINE' does not exist
Error Code: -1
Call: SELECT exp_id, fac_family, public_viewable, group_name, created_ts, status, exp_num, date_received, exp_type, title, updated_ts, text_only_title, experiment_url, proposed_eec, start_of_prep FROM beamline.eec_exp_toc
Query: ReadAllQuery(name="Experiment.findAll" referenceClass=Experiment sql="SELECT exp_id, fac_family, public_viewable, group_name, created_ts, status, exp_num, date_received, exp_type, title, updated_ts, text_only_title, experiment_url, proposed_eec, start_of_prep FROM beamline.eec_exp_toc")

我可以发布更多的堆栈跟踪,但它真的很无聊。有关EclipseLink无法查看架构的任何想法吗?

更多信息:" beamline"是我使用的唯一模式。堆栈跟踪中的SQL是由NamedQuery生成的东西,是我程序中与该数据库的第一次交互(以及所有的第一次JPA交互)。

有帮助吗?

解决方案

知道了 - 当我应该使用GlassFish的连接池时,我正在直接连接到数据库。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top