It logs it as a warn, but fails the test. Should there it assertNotNull only if UMLS setup else, pass the test? That way, for those folks are doing a default 'maven clean install, they won't have to skipTests? // UMLSDaoTest .testGetAllAuiStr() - Check to see if UMLS is setup before checking? Assert.assertNotNull(auis); CTAKES-308
> -----Original Message----- > From: vijay garla [mailto:[email protected]] > Sent: Monday, August 25, 2014 4:30 PM > To: [email protected] > Subject: Re: org.apache.ctakes.ytex.umls.dao.UMLSDaoTest > > That is an expected error having to do with the fact that UMLS isn't installed > in the test database that get's fired up for unit tests. That is actually a > warning (and should be interpreted as an error only if you do have UMLS set > up) > > > On Mon, Aug 25, 2014 at 9:02 PM, Pei Chen <[email protected]> wrote: > > > Hi VJ, > > While on the subject of unit tests- > > > > I didn't get a chance to dig deeper and was hoping you would know the > > cause of this unit test failure: > mvn clean install > > > > 2014-08-25 13:33:50,830 WARN net.sf.ehcache.CacheManager - Creating > > a new instance of CacheManager using the diskStorePath > > "/var/folders/qc/d7xd4zzs0_xcybv88skt5_7m0000gn/T/" which is already > > used by an existing CacheManager. > > > > The source of the configuration was > > > > > net.sf.ehcache.config.generator.ConfigurationSource$InputStreamConfigura > tionSource@7433a719. > > > > The diskStore path for this CacheManager will be set to > > > > > /var/folders/qc/d7xd4zzs0_xcybv88skt5_7m0000gn/T//ehcache_auto_creat > ed_1408988030830. > > > > To avoid this warning consider using the CacheManager factory methods > > to create a singleton CacheManager or specifying a separate ehcache > > configuration (ehcache.xml) for each CacheManager instance. > > > > 2014-08-25 13:33:51,082 WARN > > org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 62, > > SQLState: S0010 > > > > 2014-08-25 13:33:51,082 ERROR > > org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Unknown JDBC > > escape sequence: {{db.schema}.MRCONSO mrconso0_ where > mrconso0_.aui>? > > and length(mrconso0_.aui)>0 and length(mrconso0_.str)<200 and > > mrconso0_.lat='ENG' order by mrconso0_.aui > > > > 2014-08-25 13:33:51,085 WARN > > org.apache.ctakes.ytex.umls.dao.UMLSDaoTest - sql exception - mrconso > > probably doesn't exist, check error > > > > org.hibernate.exception.SQLGrammarException: could not prepare > > statement > > > > at > > org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQ > > LStateConversionDelegate.java:123) > > > > at > > org.hibernate.exception.internal.StandardSQLExceptionConverter.convert > > (StandardSQLExceptionConverter.java:49) > > > > at > > org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionH > > elper.java:125) > > > > at > > > org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPrep > > arationTemplate.prepareStatement(StatementPreparerImpl.java:188) > > > > at > > org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryS > > tatement(StatementPreparerImpl.java:159) > > > > at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1859) > > > > at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1836) > > > > at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1816) > > > > at org.hibernate.loader.Loader.doQuery(Loader.java:900) > > > > at > > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loa > > der.java:342) > > > > at org.hibernate.loader.Loader.doList(Loader.java:2526) > > > > at org.hibernate.loader.Loader.doList(Loader.java:2512) > > > > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2342) > > > > at org.hibernate.loader.Loader.list(Loader.java:2337) > > > > at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495) > > > > at > > org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslato > > rImpl.java:357) > > > > at > > > org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.j > > ava:195) > > > > at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269) > > > > at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101) > > > > at > > > org.apache.ctakes.ytex.umls.dao.UMLSDaoImpl.getAllAuiStr(UMLSDaoImpl.j > > ava:106) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > > ava:57) > > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > s > > orImpl.java:43) > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > at > > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio > > n(AopUtils.java:319) > > > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi > > npoint(ReflectiveMethodInvocation.java:183) > > > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > R > > eflectiveMethodInvocation.java:150) > > > > at > > org.springframework.transaction.interceptor.TransactionInterceptor.inv > > oke(TransactionInterceptor.java:110) > > > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > R > > eflectiveMethodInvocation.java:172) > > > > at > > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke > > (ExposeInvocationInterceptor.java:90) > > > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( > R > > eflectiveMethodInvocation.java:172) > > > > at > > > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDyna > mic > > AopProxy.java:202) > > > > at com.sun.proxy.$Proxy11.getAllAuiStr(Unknown Source) > > > > at > > > org.apache.ctakes.ytex.umls.dao.UMLSDaoTest.testGetAllAuiStr(UMLSDaoT > e > > st.java:53) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > > ava:57) > > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > s > > orImpl.java:43) > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > at > > > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framework > M > > ethod.java:45) > > > > at > > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCall > > able.java:15) > > > > at > > > org.junit.runners.model.FrameworkMethod.invokeExplosively(Framework > Met > > hod.java:42) > > > > at > > > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMeth > > od.java:20) > > > > at > > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.j > > ava:28) > > > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > > > > at > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunn > > er.java:68) > > > > at > > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunn > > er.java:47) > > > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > > > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > > > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > > > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > > > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > > > > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > > > > at > > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider > > .java:249) > > > > at > > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4P > > rovider.java:142) > > > > at > > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider. > > java:113) > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j > > ava:57) > > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > s > > orImpl.java:43) > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > at > > org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(R > > eflectionUtils.java:189) > > > > at > > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke( > > ProviderFactory.java:165) > > > > at > > org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(Provid > > erFactory.java:85) > > > > at > > > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Forke > > dBooter.java:104) > > > > at > > > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:7 > > 5) > > > > Caused by: java.sql.SQLException: Unknown JDBC escape sequence: > > {{db.schema}.MRCONSO mrconso0_ where mrconso0_.aui>? and > > length(mrconso0_.aui)>0 and length(mrconso0_.str)<200 and > > mrconso0_.lat='ENG' order by mrconso0_.aui > > > > at org.hsqldb.jdbc.jdbcConnection.onStartEscapeSequence(Unknown > > Source) > > > > at org.hsqldb.jdbc.jdbcConnection.nativeSQL(Unknown Source) > > > > at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) > > > > at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) > > > > at > > > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(Delega > ti > > ngConnection.java:281) > > > > at > > > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapp > er.p > > repareStatement(PoolingDataSource.java:313) > > > > at > > org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(S > > tatementPreparerImpl.java:161) > > > > at > > > org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPrep > > arationTemplate.prepareStatement(StatementPreparerImpl.java:182) > > > > ... 60 more > > > > Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.202 > > sec > > > > > > Results : > > > > > > Tests in error: > > > > setSchema(org.apache.ctakes.jdl.data.xml.ValidationTest) > >
