我正在尝试将我的应用程序从JBoss 5.1升级到Jboss 7.1,这反过来迫使我的应用程序升级到Hibernate 4.x.除了与hibernate相关的错误之外,我几乎解决了这个过程中的所有错误。我在启动服务器时遇到与我的一个持久性类相关的以下错误。相同的持久化类在Jboss 5.1中与hibernate 3.x完美配合,我使用EntityManager接口作为持久层。看起来服务器正确识别数据库中的其他表(Oracle)
org.hibernate.hql.internal.ast.QuerySyntaxException: XXXXXis not mapped [from XXXXX]
服务器日志在这里:
21:39:17,550 INFO [org.quartz.simpl.SimpleThreadPool] (MSC service thread 1-2) Job execution threads will use class loader of thread: MSC service thread 1-2
21:39:17,560 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1-2) Quartz Scheduler v.1.5.2 created.
21:39:17,560 INFO [org.quartz.simpl.RAMJobStore] (MSC service thread 1-2) RAMJobStore initialized.
21:39:17,565 INFO [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-2) Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
21:39:17,565 INFO [org.quartz.impl.StdSchedulerFactory] (MSC service thread 1-2) Quartz scheduler version: 1.5.2
21:39:17,565 INFO [org.quartz.core.QuartzScheduler] (MSC service thread 1-2) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
21:39:17,625 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/nbdx]] (MSC service thread 1-2) StandardWrapper.Throwable: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: CronJob is not mapped [select c from CronJob c]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1348) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:288) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at com.pearson.nbdx.persistence.PersistenceUtil.getCronJobs(PersistenceUtil.java:347) [nbdx.jar:]
at com.pearson.nbdx.scheduler.Scheduler.startCronJobs(Scheduler.java:119) [classes:]
at com.pearson.nbdx.NbdxServlet.init(NbdxServlet.java:61) [classes:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: CronJob is not mapped [select c from CronJob c]
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.tree.FromClause.addFromElement(FromClause.java:93) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:326) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3252) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3141) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:694) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:550) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:287) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:248) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:119) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1537) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:285) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
... 13 more
21:39:17,640 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/nbdx]] (MSC service thread 1-2) Servlet /nbdx threw load() exception: org.hibernate.hql.internal.ast.QuerySyntaxException: CronJob is not mapped [select c from CronJob c]
at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:180) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.tree.FromClause.addFromElement(FromClause.java:93) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:326) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3252) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3141) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:694) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:550) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:287) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:235) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:248) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:183) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:119) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1537) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:285) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at com.pearson.nbdx.persistence.PersistenceUtil.getCronJobs(PersistenceUtil.java:347) [nbdx.jar:]
at com.pearson.nbdx.scheduler.Scheduler.startCronJobs(Scheduler.java:119) [classes:]
at com.pearson.nbdx.NbdxServlet.init(NbdxServlet.java:61) [classes:]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
21:39:17,665 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /nbdx
21:39:17,760 INFO [org.hibernate.tool.hbm2ddl.SchemaValidator] (MSC service thread 1-16) HHH000229: Running schema validator
21:39:17,760 INFO [org.hibernate.tool.hbm2ddl.SchemaValidator] (MSC service thread 1-16) HHH000102: Fetching database metadata
21:39:17,830 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ANSWER_SHEETS
21:39:17,830 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [item_name]
21:39:17,835 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ART_EXERCISE_ONE
21:39:17,835 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [item_name, score_prompt_item_name]
21:39:17,835 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUDIO
21:39:17,835 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [item_id_fk, contents, name, sent_to_clip, rec_from_vue]
21:39:17,845 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH
21:39:17,845 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, spec, last_rec_from_nbric, auth_id, initial_cycle, assess_exer_del, double_time, type, clip_batches, end_date, cert, only_dates_updated, reauthorized, last_sent_to_vue, start_date, cert_version, exam_type]
21:39:17,850 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH_ASSESS_EXER
21:39:17,850 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [idx, assess_exer, auth_id_fk]
21:39:17,850 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH_PORT_EXER
21:39:17,850 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [port_exer, idx, auth_id_fk]
21:39:17,855 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH_RES
21:39:17,855 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [sent_to_vue, dt, id, accepted, auth_id_fk, mesg, rec_from_vue]
21:39:17,860 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH_TO_AUTH_RES
21:39:17,860 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [idx, auth_res_id_fk, auth_id_fk]
21:39:17,860 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.AUTH_TO_REG
21:39:17,865 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [idx, reg_id_fk, auth_id_fk]
21:39:17,870 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND
21:39:17,870 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [school_type, teaching_status, teaching_level, last_rec_from_nbric, state, nces_school, city, country, addr_1, first_name, cand_id, phone_num, email, postal_code, addr_2, last_name, gender, last_sent_to_vue, district_type, teaching_years, phone_cntry_code, ethnicity, cert_version, nces_district]
21:39:17,875 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_EMAIL_LOG
21:39:17,875 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [content, cand_id_fk, sent_to_cand, template_name, created, subject, type, log_id, exam_type, email_address]
21:39:17,880 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_RES
21:39:17,880 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, sent_to_vue, dt, id, accepted, mesg, rec_from_vue]
21:39:17,885 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_TO_AUTH
21:39:17,885 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, idx, auth_id_fk]
21:39:17,890 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_TO_CAND_RES
21:39:17,890 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, idx, cand_res_id_fk]
21:39:17,890 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_TO_RESP
21:39:17,890 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, resp_id_fk]
21:39:17,895 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CAND_VOUCHER
21:39:17,895 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, last_modified, created, is_active, voucher_id_fk, last_sent_to_nbric, cand_voucher_id, auth_id_fk, delete_sent_to_es]
21:39:17,900 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CERTIFICATES
21:39:17,900 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cert_code, cert_id, cert_name]
21:39:17,905 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CERT_DATES
21:39:17,905 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [enabled, end_date, nbric_code, cert_dates_id, type, start_date, time_stamp]
21:39:17,910 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CLIENT_CFG
21:39:17,910 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [port, user_name, local_get_dir, host, ext_sys, processed_dir, local_put_dir, remote_get_dir, sftp_key, type, remote_put_dir, sftp_key_type, pass]
21:39:17,910 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.COUNTRIES
21:39:17,910 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [ctry_code, phone_code]
21:39:17,915 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.CRON_JOB
21:39:17,915 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [expression, processor, disabled]
21:39:17,915 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ENTRY_MAPPING
21:39:17,920 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [entry_id, exercise_num, entry_num]
21:39:17,920 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ES_REGISTRATION
21:39:17,920 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_voucher_id_fk, first_name, last_modified_date, cand_id, last_name, date_received, gender, reg_id, type, is_valid]
21:39:17,930 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.EXAM
21:39:17,930 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [attempt, exam_language, form, exam_series_code, exam_version, score, reg_id_fk, rec_from_vue, nda_refused, id, tcid, exam_name, passing_score, no_show, skipped, correct, time_used, exam_date, grade, voucher, unscored, incorrect]
21:39:17,935 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.EXERCISE_CODES
21:39:17,935 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [ex3, ex4, ex5, ex6, ex2, code_name, ex1]
21:39:17,945 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.FIELD_TEST
21:39:17,945 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [school_type, spec, cri_auth_created, cand_created, retest_cri_created, teaching_level, state, nces_school, type, city, first_name, last_rec_from_nbpts, cert, sri, gender, district_type, cri, sri_auth_created, nces_district, retest, teaching_status, retest_sri_created, retest_sri, country, addr_1, cand_id, email, phone_num, postal_code, addr_2, last_name, retest_cri, phone_cntry_code, teaching_years, ethnicity]
21:39:17,950 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.IMPORT_ITEM_MAPPING
21:39:17,950 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [exam_series_code, type, import_item_id]
21:39:17,955 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ITEM
21:39:17,955 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [clip_ignore, scored, status, score, reg_id_fk, audio_id_fk, sent_to_clip, type, section, rec_from_vue, id, response, time, item_name, key, cert_version]
21:39:17,960 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.ITEM_MAPPING
21:39:17,960 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [seq_nbr, exam_series_code, item_name, booklet_item, exer_nbr, type, cert_version]
21:39:17,960 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.NBDX_CFG
21:39:17,965 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [value, key]
21:39:17,965 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.NBDX_RES
21:39:17,965 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [dt, id, time, ext_sys, status, data_type, type, mesg]
21:39:17,975 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.PORTFOLIOS
21:39:17,975 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [clip_name, resource_id, submittal_date, priority, dart_status_code, port_id, date_received, dart_status_message, scoring_rule_id_fk, reg_id_fk, sent_to_dart, epen_doc_id]
21:39:17,975 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.PRODUCT_GROUP
21:39:17,975 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [program_number, product_grp_name, imp_proj_id, ssn, epen_enabled, product_grp_id]
21:39:17,980 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.PSC_NBRIC_CODES
21:39:17,980 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [nbric_code, psc_key]
21:39:17,990 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.REGISTRATION
21:39:17,990 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [site_city, exam_state, site_state, exam_series_code, last_sent_to_nbric, site_id, site_phone, site_name, site_postal_code, reg_date, exam_series_title, rec_from_vue, reg_type, sent_to_cand_dat, first_name, site_country, exam_date, last_name, site_address1, reg_id, site_address2, site_address3, auth_id_fk, cert_version]
21:39:17,990 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.REG_TO_EXAM
21:39:17,995 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [idx, exam_id_fk, reg_id_fk]
21:39:17,995 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.REG_TO_ITEM
21:39:17,995 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [item_id_fk, idx, reg_id_fk]
21:39:18,000 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.REPORT_LOG
21:39:18,000 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [message, dt, id, time, component, severity, type]
21:39:18,005 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.RESPONSE
21:39:18,005 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [cand_id_fk, orig_item_id, prog_num, ssn, received, uin, type, auto_blank, pas, item_id, batch_num, client_batch, response_id]
21:39:18,005 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.RESP_TO_SCORE
21:39:18,010 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [score_id_fk, resp_id_fk]
21:39:18,010 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.SCORE
21:39:18,015 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [score_type, trait_code, score_point, external_review, illegible, score_time, auto_score, score_id, received, employee_id, resp_id_fk]
21:39:18,015 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.SCORE_COMMENT_CODE
21:39:18,015 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [comment_code, score_id_fk]
21:39:18,020 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.SCORING_RULE
21:39:18,020 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [scoring_rule_id, scoring_rule]
21:39:18,020 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.STATES
21:39:18,025 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [ctry_code, state_code]
21:39:18,025 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000261: Table found: NBDX_DEV.VOUCHERS
21:39:18,025 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-16) HHH000037: Columns: [certificate, voucher_code, voucher_id, entry, sent_from_es, product_grp_id]
21:39:18,120 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "nbdx.ear"
我正在为我的持久化类使用注释,因此在我的persistence.xml中没有提供任何外部映射
看起来hibernate 4无法自动扫描我的持久化类,即使我的类和persistence.xml存在于同一个类路径中。同样的方法在hibernate 3中完美运行。
更新
我通过显式声明persistence.xml文件中的所有持久性类来解决所有错误。现在我得到一个与事务管理器相关的异常。错误日志如下所示。
02:53:09,700 ERROR [com.pearson.nbdx.Reporter] (pool-10-thread-1) Received an exception while trying to create a transaction.: javax.naming.NameNotFoundException: UserTransaction -- service jboss.naming.context.java.UserTransaction
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_65]
at com.pearson.nbdx.Reporter.processReportLogs(Reporter.java:158) [classes:]
at com.pearson.nbdx.Reporter.access$000(Reporter.java:28) [classes:]
at com.pearson.nbdx.Reporter$1.run(Reporter.java:63) [classes:]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_65]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]