Install itracker on oracle iAS10 with an oracle 11g Database

Help
Mario
2013-10-24
2013-10-25
  • Mario
    Mario
    2013-10-24

    Hello

    I'll try to install itracker on an oracle iAS10 (running with jdk1.6) with an oracle 11g Database. After some issues with the JNDI-configuration, I swaped the application.properties to a static dataSource. So the database connection during the deployment works fine. But there is still an error with the hibernate.

    First I got this errors:

    Operation failed with error: Error creating bean with name 'sessionFactory' defined in class path resource [persistence-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: IssuesByOwnerInAvailableProjectsQuery, LanguagesByKeyQuery, UserByLoginQuery, NotificationsByIssueQuery, ProjectsAvailableQuery, ProjectsLastModifiedIssueDate, IssueCountByComponentQuery, IssuesByStatusLessThanEqualToQuery, IssuesBySeverityQuery, AttachmentsCountAllQuery, UsersByStatusQuery, IssuesByStatusLessThanQuery, IssuesUnassignedQuery, IssuesByComponentQuery, MaxIssueModificationDateQuery, AttachmentsAllQuery, PermissionsByUserQuery, IssueCountAll, ProjectsAllQuery, IssueCountByVersionQuery, UsersSuperQuery, IssueCountByProjectQuery, IssuesByNotificationInAvailableProjectsQuery, AttachmentsByIssueQuery, IssuesByStatusLessThanEqualToInAvailableProjectsQuery, IssueCountByProjectAndLowerStatusQuery, LanguagesByLocaleQuery, TotalAttachmentsSizeQuery, IssueHistoryByIssueQuery, AttachmentByFileNameQuery, UsersActiveQuery, IssuesAllQuery, IssueActivitiesByIssueQuery, IssuesByCreatorInAvailableProjectsQuery, IssuesByProjectAndLowerStatusQuery, IssuesByProjectAndHigherStatusQuery, UsersByRegistrationTypeQuery, ProjectScriptsByProjectQuery, UsersAllQuery, IssuesByStatusQuery, FindByTargetVersion, ProjectsByStatusQuery, LanguagesByKeyAndLocaleQuery, ProjectScriptsAllQuery, IssueActivitiesByIssueAndNotificationQuery, ReportsAllQuery, IssuesByCreatorQuery, ProjectByNameQuery, IssuesByOwnerQuery, IssuesByNotificationQuery, PermissionsByProjectAndTypeQuery, IssueCountByProjectAndHigherStatusQuery, ProjectScriptsByProjectAndFieldQuery, IssuesByVersionQuery, IssueRelationsByIssueQuery, IssuesByProjectQuery

    Then I add this to the hibernate.properties

    hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory

    Now the following error occures

    Operation failed with error: Error creating bean with name 'sessionFactory' defined in class path resource [persistence-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: FindByTargetVersion

    In the opmn.log I found a bit more detailed exceptions.

    14:55:35,379 ERROR [org.hibernate.impl.SessionFactoryImpl] Error in named query: FindByTargetVersion
    org.hibernate.QueryException: Incorrect query syntax
    select issue
    from org.itracker.model.Issue as issue
    where issue.targetVersion.id = :versionId)
    at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:232)
    at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:185)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
    at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:449)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:361)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1313)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:860)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:779)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1280)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:849)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1833)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:304)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:120)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:92)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:825)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:276)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.util.NoSuchElementException
    at java.util.LinkedList.remove(LinkedList.java:788)
    at java.util.LinkedList.removeLast(LinkedList.java:144)
    at org.hibernate.hql.classic.WhereParser.closeExpression(WhereParser.java:291)
    at org.hibernate.hql.classic.WhereParser.token(WhereParser.java:247)
    at org.hibernate.hql.classic.WhereParser.end(WhereParser.java:287)
    at org.hibernate.hql.classic.ClauseParser.endChild(ClauseParser.java:99)
    at org.hibernate.hql.classic.ClauseParser.end(ClauseParser.java:107)
    at org.hibernate.hql.classic.PreprocessingParser.end(PreprocessingParser.java:122)
    at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:29)
    at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:216)
    ... 41 more

    I dont know, how to go on. If anybody can help me with this hibernate issue?

     
  • Marco
    Marco
    2013-10-24

    Hello

    Just try using MySQL, this should work better and is supported officially by itracker.org.
    If you like, you can investigate into supporting 11g, but you would need to implement it on your own, maybe join the project as a committer and make sure not to break Derby/MySQL support.

    Best regards,
    Marco

     
  • Mario
    Mario
    2013-10-25

    Hello Marco

    Hm, you mean it realy just depends on the database? Okay, worth a try. I will install a local mysql database and test the installation again.

    I thougth, I just have to configure hibernate (dialect) for oracle database. But it seems to be more complex ;)

    If anybody have an other solution, please let me know.

    Regards,
    Mario