java - Errors in named queries: findByName in JBoss AS7 with Hibernate 3.6 and OJdbc6 -


i trying migrate ejb application oc4j jboss as7, application using ojdbc 6 , hibernate 3, jboss runs on hibernate 4, configured jboss support hibernate 3.6. while deploying ear getting below error in console(application using oracle 11g database):

19:23:21,794 info  [org.hibernate.cfg.configuration] (serverservice thread pool -- 51) hibernate validator not found: ignoring 19:23:21,893 info  [org.hibernate.validator.internal.util.version] (serverservice thread pool -- 51) hv000001: hibernate validator 4.3.2.final-redhat-1 19:23:22,131 info  [org.hibernate.cfg.search.hibernatesearcheventlistenerregister] (serverservice thread pool -- 51) unable find org.hibernate.search.event.f ulltextindexeventlistener on classpath. hibernate search not enabled. 19:23:22,146 info  [org.hibernate.connection.connectionproviderfactory] (serverservice thread pool -- 51) initializing connection provider: org.hibernate.ejb.co nnection.injecteddatasourceconnectionprovider 19:23:22,160 info  [org.hibernate.ejb.connection.injecteddatasourceconnectionprovider] (serverservice thread pool -- 51) using provided datasource 19:23:23,995 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) database ->        name : oracle     version : oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production partitioning option       major : 11       minor : 2 19:23:24,026 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) driver ->        name : oracle jdbc driver     version : 11.2.0.4.0       major : 11       minor : 2 19:23:24,076 info  [org.hibernate.dialect.dialect] (serverservice thread pool -- 51) using dialect: org.hibernate.dialect.oracle10gdialect 19:23:24,369 info  [org.hibernate.transaction.transactionfactoryfactory] (serverservice thread pool -- 51) transaction strategy: org.hibernate.ejb.transaction.j oinablecmttransactionfactory 19:23:24,379 info  [org.hibernate.transaction.transactionmanagerlookupfactory] (serverservice thread pool -- 51) instantiating transactionmanagerlookup: org.jbo ss.as.jpa.hibernate3.jbossappserverjtaplatform 19:23:24,395 info  [org.hibernate.transaction.transactionmanagerlookupfactory] (serverservice thread pool -- 51) instantiated transactionmanagerlookup 19:23:24,401 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) automatic flush during beforecompletion(): disabled 19:23:24,407 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) automatic session close @ end of transaction: disabled 19:23:24,413 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) jdbc batch size: 15 19:23:24,421 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) jdbc batch updates versioned data: disabled 19:23:24,430 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) scrollable result sets: enabled 19:23:24,436 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) jdbc3 getgeneratedkeys(): disabled 19:23:24,443 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) connection release mode: auto 19:23:24,449 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) default batch fetch size: 1 19:23:24,455 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) generate sql comments: disabled 19:23:24,463 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) order sql updates primary key: disabled 19:23:24,471 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) order sql inserts batching: disabled 19:23:24,478 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) query translator: org.hibernate.hql.ast.astquerytranslatorfactory 19:23:24,488 info  [org.hibernate.hql.ast.astquerytranslatorfactory] (serverservice thread pool -- 51) using astquerytranslatorfactory 19:23:24,494 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) query language substitutions: {} 19:23:24,500 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) jpa-ql strict compliance: enabled 19:23:24,506 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) second-level cache: enabled 19:23:24,511 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) query cache: disabled 19:23:24,518 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) cache region factory : org.hibernate.cache.impl.nocachingregionfactory 19:23:24,529 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) optimize cache minimal puts: disabled 19:23:24,535 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) structured second-level cache entries: disabled 19:23:24,547 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) statistics: disabled 19:23:24,553 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) deleted entity synthetic identifier rollback: disabled 19:23:24,559 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) default entity-mode: pojo 19:23:24,566 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) named query checking : enabled 19:23:24,573 info  [org.hibernate.cfg.settingsfactory] (serverservice thread pool -- 51) check nullability in core (should disabled when bean validation o n): disabled 19:23:24,600 info  [org.hibernate.impl.sessionfactoryimpl] (serverservice thread pool -- 51) building session factory 19:23:24,610 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [wrapper_materialized_blob] overrides previous : o rg.hibernate.type.wrappedmaterializedblobtype@1e65667 19:23:24,619 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [materialized_blob] overrides previous : org.hiber nate.type.materializedblobtype@132a704 19:23:24,633 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [blob] overrides previous : org.hibernate.type.blo btype@731c20 19:23:24,644 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [java.sql.blob] overrides previous : org.hibernate .type.blobtype@731c20 19:23:24,656 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [clob] overrides previous : org.hibernate.type.clo btype@13ba11c 19:23:24,671 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [java.sql.clob] overrides previous : org.hibernate .type.clobtype@13ba11c 19:23:24,684 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [materialized_clob] overrides previous : org.hiber nate.type.materializedclobtype@1ce6a36 19:23:24,696 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [characters_clob] overrides previous : org.hiberna te.type.primitivecharacterarrayclobtype@9f3eba 19:23:24,708 info  [org.hibernate.type.basictyperegistry] (serverservice thread pool -- 51) type registration [wrapper_characters_clob] overrides previous : org .hibernate.type.characterarrayclobtype@cf3c39 19:23:24,775 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.vmsearchresultscmpbean (class must instantiated interceptor) 19:23:24,839 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.infequipmentroomscmpbean (class must instantiated interceptor) 19:23:24,863 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.pmnotificationscmpbean (class must instantiated interceptor) 19:23:24,883 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.infstandortalternativencmpbean (class must instantiated interceptor) 19:23:24,927 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.infadressencmpbean (class must instantiated interceptor) 19:23:24,947 info  [org.hibernate.tuple.pojoinstantiator] (serverservice thread pool -- 51) no default (no-argument) constructor class: com.tmobile.itnetdev .fixedbuild.vminfra.business.searchresults.vmsearchresultheadcmpbean (class must instantiated interceptor) 19:23:24,999 info  [org.hibernate.impl.sessionfactoryobjectfactory] (serverservice thread pool -- 51) not binding factory jndi, no jndi name configured 19:23:25,052 error [org.hibernate.hql.parser] (serverservice thread pool -- 51) line 1:77: unexpected token: : 19:23:25,058 warn  [org.hibernate.hql.ast.hqlparser] (serverservice thread pool -- 51) processequalityexpression() : no expression process! 19:23:25,065 error [org.hibernate.impl.sessionfactoryimpl] (serverservice thread pool -- 51) error in named query: findbyname: org.hibernate.hql.ast.querysyntax exception: unexpected token: : near line 1, column 77 [select object(alt) infstandortalternativencmp alt alt.altename:alternativenname]         @ org.hibernate.hql.ast.querysyntaxexception.convert(querysyntaxexception.java:54) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.hql.ast.querysyntaxexception.convert(querysyntaxexception.java:47) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.hql.ast.errorcounter.throwqueryexception(errorcounter.java:82) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.hql.ast.querytranslatorimpl.parse(querytranslatorimpl.java:284) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.hql.ast.querytranslatorimpl.docompile(querytranslatorimpl.java:182) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.hql.ast.querytranslatorimpl.compile(querytranslatorimpl.java:136) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.engine.query.hqlqueryplan.<init>(hqlqueryplan.java:101) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.engine.query.hqlqueryplan.<init>(hqlqueryplan.java:80) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.engine.query.queryplancache.gethqlqueryplan(queryplancache.java:124) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.impl.sessionfactoryimpl.checknamedqueries(sessionfactoryimpl.java:549) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.impl.sessionfactoryimpl.<init>(sessionfactoryimpl.java:413) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1842) [hibernate-core-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:902) [hibernate-entitymanager-3.6.1.final.jar:3.6.1.final]         @ org.hibernate.ejb.hibernatepersistence.createcontainerentitymanagerfactory(hibernatepersistence.java:74) [hibernate-entitymanager-3.6.1.final.jar:3.6 .1.final]         @ org.jboss.as.jpa.service.persistenceunitserviceimpl.createcontainerentitymanagerfactory(persistenceunitserviceimpl.java:200) [jboss-as-jpa-7.4.2.fina l-redhat-2.jar:7.4.2.final-redhat-2]         @ org.jboss.as.jpa.service.persistenceunitserviceimpl.access$600(persistenceunitserviceimpl.java:57) [jboss-as-jpa-7.4.2.final-redhat-2.jar:7.4.2.final -redhat-2]         @ org.jboss.as.jpa.service.persistenceunitserviceimpl$1.run(persistenceunitserviceimpl.java:99) [jboss-as-jpa-7.4.2.final-redhat-2.jar:7.4.2.final-redh at-2]         @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886) [rt.jar:1.6.0_18]         @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) [rt.jar:1.6.0_18]         @ java.lang.thread.run(thread.java:619) [rt.jar:1.6.0_18]         @ org.jboss.threads.jbossthread.run(jbossthread.java:122)  19:23:25,238 error [org.jboss.msc.service.fail] (serverservice thread pool -- 51) msc000001: failed start service jboss.persistenceunit."demo.ear/pegabas e-fixedbuild-ejb.jar#manager1": org.jboss.msc.service.startexception in service jboss.persistenceunit."demo.ear/demo-fixedbuild-ejb.jar#manager1": javax .persistence.persistenceexception: [persistenceunit: manager1] unable build entitymanagerfactory         @ org.jboss.as.jpa.service.persistenceunitserviceimpl$1.run(persistenceunitserviceimpl.java:103)         @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886) [rt.jar:1.6.0_18]         @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) [rt.jar:1.6.0_18]         @ java.lang.thread.run(thread.java:619) [rt.jar:1.6.0_18]         @ org.jboss.threads.jbossthread.run(jbossthread.java:122) caused by: javax.persistence.persistenceexception: [persistenceunit: manager1] unable build entitymanagerfactory         @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:911)         @ org.hibernate.ejb.hibernatepersistence.createcontainerentitymanagerfactory(hibernatepersistence.java:74)         @ org.jboss.as.jpa.service.persistenceunitserviceimpl.createcontainerentitymanagerfactory(persistenceunitserviceimpl.java:200)         @ org.jboss.as.jpa.service.persistenceunitserviceimpl.access$600(persistenceunitserviceimpl.java:57)         @ org.jboss.as.jpa.service.persistenceunitserviceimpl$1.run(persistenceunitserviceimpl.java:99)         ... 4 more caused by: org.hibernate.hibernateexception: errors in named queries: findbyname         @ org.hibernate.impl.sessionfactoryimpl.<init>(sessionfactoryimpl.java:426)         @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1842)         @ org.hibernate.ejb.ejb3configuration.buildentitymanagerfactory(ejb3configuration.java:902)         ... 8 more  19:23:25,459 info  [org.jboss.as.server] (serverservice thread pool -- 26) jbas018559: deployed "demo.ear" (runtime-name : "demo.ear") 19:23:25,468 info  [org.jboss.as.controller] (controller boot thread) jbas014774: service status report jbas014775:    new missing/unsatisfied dependencies:       service jboss.naming.context.java.jboss.resources.jdbc.demomanagementdatasource (missing) dependents: [service jboss.naming.context.java.comp.demo .demo-framework-ejb.demo/framework/performancemeasurementhome.env.jdbc.demomanagementdatasource, service jboss.naming.context.java.comp.demo.peg abase-framework-ejb.demo/framework/visualizationenvironmenthome.env.jdbc.demomanagementdatasource, service jboss.naming.context.java.comp.demo.test-framework-ejb.demo/framework/usecasehome.env.jdbc.demomanagementdatasource] jbas014777:   services failed start:      service jboss.persistenceunit."demo.ear/demo-fixedbuild-ejb.jar#manager1": org.jboss.msc.service.star texception in service jboss.persistenceunit."demo.ear/demo-fixedbuild-ejb.jar#manager1": javax.persistence.persistenceexception: [persistenceunit: manag er1] unable build entitymanagerfactory  19:23:25,628 info  [org.jboss.as] (controller boot thread) jbas015961: http management interface listening on http://127.0.0.1:9990/management 19:23:25,631 info  [org.jboss.as] (controller boot thread) jbas015951: admin console listening on http://127.0.0.1:9990 19:23:25,639 error [org.jboss.as] (controller boot thread) jbas015875: jboss eap 6.3.2.ga (as 7.4.2.final-redhat-2) started (with errors) in 24156ms - started 2 087 of 2232 services (108 services failed or missing dependencies, 99 services lazy, passive or on-demand) 

you seem have error in query,

select object(alt) infstandortalternativencmp alt alt.altename:alternativenname 

and should

select object(alt) infstandortalternativencmp alt alt.altename = :alternativenname 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -