2

我在互联网上发现了许多类似的问题并尝试了许多解决方案,但即使在 10 小时后仍然无法解决此错误。因此,请在将其标记为重复之前提供任何建议。我也不熟悉,hsqldb所以如果我遗漏了一些非常明显的东西,请告诉我。

我有一个带有 cTAKES 管道代码和 spring-boot 的 jar 构建。jar 在 Windows 中执行良好,但是当我在 ubuntu 中执行此操作时,我收到错误:user lacks privilege or object not found. 到目前为止我已经尝试过

  • 在 qoutes 中添加表名并在描述符文件中大写表名(“cui_terms”)(在 windows 中工作正常,在 ubuntu 中不起作用)
  • 在描述符中提供脚本文件的绝对路径(相同)在 application.properties 文件中添加以下属性

    hibernate.dialect=org.hibernate.dialect.HSQLDialect
    hibernate.format_sql=true
    hibernate.show_sql=true
    hibernate.hbm2ddl.auto=create
    sql.ignore_case=true
    

任何建议都会非常有帮助 在此先感谢


这是脚本文件

SET DATABASE UNIQUE NAME HSQLDB5B3BA0CBCC
SET DATABASE GC 0
SET DATABASE DEFAULT RESULT MEMORY ROWS 0
SET DATABASE EVENT LOG LEVEL 0
SET DATABASE TRANSACTION CONTROL LOCKS
SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
SET DATABASE TEXT TABLE DEFAULTS ''
SET DATABASE SQL NAMES FALSE
SET DATABASE SQL REFERENCES FALSE
SET DATABASE SQL SIZE TRUE
SET DATABASE SQL TYPES FALSE
SET DATABASE SQL TDC DELETE TRUE
SET DATABASE SQL TDC UPDATE TRUE
SET DATABASE SQL TRANSLATE TTI TYPES TRUE
SET DATABASE SQL TRANSLATE TTI TYPES TRUE
SET DATABASE SQL CONCAT NULLS TRUE
SET DATABASE SQL UNIQUE NULLS TRUE
SET DATABASE SQL CONVERT TRUNCATE TRUE
SET DATABASE SQL AVG SCALE 0
SET DATABASE SQL DOUBLE NAN TRUE
SET DATABASE SQL SYNTAX ORA TRUE
SET FILES WRITE DELAY 10
SET FILES BACKUP INCREMENT TRUE
SET FILES CACHE SIZE 10000
SET FILES CACHE ROWS 50000
SET FILES SCALE 32
SET FILES LOB SCALE 32
SET FILES DEFRAG 0
SET FILES NIO TRUE
SET FILES NIO SIZE 256
SET FILES LOG TRUE
SET FILES LOG SIZE 50
CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
ALTER USER SA SET LOCAL TRUE
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
SET SCHEMA PUBLIC
CREATE MEMORY TABLE PUBLIC.CUI_TERMS(CUI BIGINT,RINDEX INTEGER,TCOUNT INTEGER,TEXT VARCHAR(255),RWORD VARCHAR(48))
CREATE INDEX IDX_CUI_TERMS ON PUBLIC.CUI_TERMS(RWORD)
CREATE MEMORY TABLE PUBLIC.TUI(CUI BIGINT,TUI INTEGER)
CREATE INDEX IDX_TUI ON PUBLIC.TUI(CUI)
CREATE MEMORY TABLE PUBLIC.PREFTERM(CUI BIGINT,PREFTERM VARCHAR(511))
CREATE INDEX IDX_PREFTERM ON PUBLIC.PREFTERM(CUI)
CREATE MEMORY TABLE PUBLIC.RXNORM(CUI BIGINT,RXNORM BIGINT)
CREATE INDEX IDX_RXNORM ON PUBLIC.RXNORM(CUI)
CREATE MEMORY TABLE PUBLIC.SNOMEDCT_US(CUI BIGINT,SNOMEDCT_US BIGINT)
CREATE INDEX IDX_SNOMEDCT_US ON PUBLIC.SNOMEDCT_US(CUI)
ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
GRANT DBA TO SA
SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)
SET SCHEMA PUBLIC
INSERT INTO CUI_TERMS VALUES(97,0,1,'mptp','mptp')
INSERT INTO CUI_TERMS VALUES(97,0,1,'methylphenyltetrahydropyridine','methylphenyltetrahydropyridine')
INSERT INTO CUI_TERMS VALUES(102,0,1,'naphthalidine','naphthalidine')

这是定义配置的注释器描述符文件

<?xml version="1.0" encoding="UTF-8"?>

<lookupSpecification>
<dictionaries>
   <dictionary>
      <name>sno_rx_16abTerms</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.dictionary.UmlsJdbcRareWordDictionary</implementationName>
      <properties>
<!-- urls for hsqldb memory connections must be file types in hsql 1.8.
These file urls must be either absolute path or relative to current working directory.
They cannot be based upon the classpath.
Though JdbcConnectionFactory will attempt to "find" a db based upon the parent dir of the url
for the sake of ide ease-of-use, the user should be aware of these hsql limitations.
-->
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="rareWordTable" value="cui_terms"/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
      </properties>
   </dictionary>
</dictionaries>

<conceptFactories>
   <conceptFactory>
      <name>sno_rx_16abConcepts</name>
      <implementationName>org.apache.ctakes.dictionary.lookup2.concept.UmlsJdbcConceptFactory</implementationName>
      <properties>
         <property key="jdbcDriver" value="org.hsqldb.jdbcDriver"/>
         <property key="jdbcUrl" value="jdbc:hsqldb:file:resources/org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab"/>
         <property key="jdbcUser" value="sa"/>
         <property key="jdbcPass" value=""/>
         <property key="umlsUrl" value="https://uts-ws.nlm.nih.gov/restful/isValidUMLSUser"/>
         <property key="umlsVendor" value="NLM-6515182895"/>
         <property key="umlsUser" value="CHANGE_ME"/>
         <property key="umlsPass" value="CHANGE_ME"/>
         <property key="tuiTable" value="tui"/>
         <property key="prefTermTable" value="prefTerm"/>
<!-- Optional tables for optional term info.
Uncommenting these lines alone may not persist term information;
persistence depends upon the TermConsumer.  -->
         <property key="rxnormTable" value="long"/>
         <property key="snomedct_usTable" value="long"/>
      </properties>
   </conceptFactory>
</conceptFactories>

<!--  Defines what terms and concepts will be used  -->
<dictionaryConceptPairs>
   <dictionaryConceptPair>
      <name>sno_rx_16abPair</name>
      <dictionaryName>sno_rx_16abTerms</dictionaryName>
      <conceptFactoryName>sno_rx_16abConcepts</conceptFactoryName>
   </dictionaryConceptPair>
</dictionaryConceptPairs>


<rareWordConsumer>
   <name>Term Consumer</name>
   <implementationName>org.apache.ctakes.dictionary.lookup2.consumer.DefaultTermConsumer</implementationName>


</rareWordConsumer>

</lookupSpecification>

这是建立连接的java类

package org.apache.ctakes.dictionary.lookup2.dictionary;

import org.apache.ctakes.dictionary.lookup2.term.RareWordTerm;
import org.apache.ctakes.dictionary.lookup2.util.JdbcConnectionFactory;
import org.apache.log4j.Logger;
import org.apache.uima.UimaContext;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Properties;

import static org.apache.ctakes.dictionary.lookup2.util.JdbcConnectionFactory.*;


final public class JdbcRareWordDictionary extends AbstractRareWordDictionary {

   /**
    * Column (field) indices in the database.  Notice that these are constant and not configurable.
    * If a configurable implementation is desired then create an extension.
    */
   static private enum FIELD_INDEX {
      CUI( 1 ), RINDEX( 2 ), TCOUNT( 3 ), TEXT( 4 ), RWORD( 5 );
      final private int __index;

      private FIELD_INDEX( final int index ) {
         __index = index;
      }
   }


   static final private Logger LOGGER = Logger.getLogger( "JdbcRareWordDictionary" );


   static public final String RARE_WORD_TABLE = "rareWordTable";


   private PreparedStatement _selectTermCall;


   public JdbcRareWordDictionary( final String name, final UimaContext uimaContext, final Properties properties )
         throws SQLException {
      this( name,
            properties.getProperty( JDBC_DRIVER ), properties.getProperty( JDBC_URL ),
            properties.getProperty( JDBC_USER ), properties.getProperty( JDBC_PASS ),
            properties.getProperty( RARE_WORD_TABLE ) );
   }


   public JdbcRareWordDictionary( final String name,
                                  final String jdbcDriver,
                                  final String jdbcUrl,
                                  final String jdbcUser,
                                  final String jdbcPass,
                                  final String tableName )
         throws SQLException {
      super( name );
      boolean connected = false;
      try {
         // DO NOT use try with resources here.  Try with resources uses a closable and closes it when exiting the try
         final Connection connection = JdbcConnectionFactory.getInstance()
               .getConnection( jdbcDriver, jdbcUrl, jdbcUser, jdbcPass );
         connected = connection != null;
         _selectTermCall = createSelectCall( connection, tableName );
      } catch ( SQLException sqlE ) {
         if ( !connected ) {
            LOGGER.error( "Could not Connect to Dictionary " + name );
         } else {
            LOGGER.error( "Could not create Term Data Selection Call", sqlE );
         }
         throw sqlE;
      }
      LOGGER.info( "Connected to cui and term table " + tableName.toUpperCase() );
   }



   @Override
   public Collection<RareWordTerm> getRareWordHits( final String rareWordText ) {
      final List<RareWordTerm> rareWordTerms = new ArrayList<>();
      try {
         fillSelectCall( rareWordText );
         final ResultSet resultSet = _selectTermCall.executeQuery();
         while ( resultSet.next() ) {
            final RareWordTerm rareWordTerm = new RareWordTerm( resultSet.getString( FIELD_INDEX.TEXT.__index ),
                  resultSet.getLong( FIELD_INDEX.CUI.__index ),
                  resultSet.getString( FIELD_INDEX.RWORD.__index ),
                  resultSet.getInt( FIELD_INDEX.RINDEX.__index ),
                  resultSet.getInt( FIELD_INDEX.TCOUNT.__index ) );
            rareWordTerms.add( rareWordTerm );
         }

         resultSet.close();
      } catch ( SQLException e ) {
         LOGGER.error( e.getMessage() );
      }
      return rareWordTerms;
   }

   static private PreparedStatement createSelectCall( final Connection connection, final String tableName )
         throws SQLException {
      final String lookupSql = "SELECT * FROM " + tableName + " WHERE RWORD = ?";
      return connection.prepareStatement( lookupSql );
   }

   /**
    * @param rareWordText text of the rare word to use for term lookup
    * @return an sql call to use for term lookup
    * @throws SQLException if the {@code PreparedStatement} could not be created or changed
    */
   private PreparedStatement fillSelectCall( final String rareWordText ) throws SQLException {
      _selectTermCall.clearParameters();
      _selectTermCall.setString( 1, rareWordText );
      return _selectTermCall;
   }


}

以下是发生的异常

11 Apr 2019 12:14:47  INFO AbstractJCasTermAnnotator - Exclusion tagset loaded: CC CD DT EX IN LS MD PDT POS PP PP$ PRP PRP$ RP TO VB VBD VBG VBN VBP VBZ WDT WP WPS WRB 
11 Apr 2019 12:14:47  INFO AbstractJCasTermAnnotator - Using minimum term text span: 3
11 Apr 2019 12:14:47  INFO AbstractJCasTermAnnotator - Using Dictionary Descriptor: org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab.xml
11 Apr 2019 12:14:48  INFO DictionaryDescriptorParser - Parsing dictionary specifications: 
11 Apr 2019 12:14:49  INFO JdbcConnectionFactory - Connecting to jdbc:hsqldb:file:org/apache/ctakes/dictionary/lookup/fast/sno_rx_16ab/sno_rx_16ab:
2019-04-11 12:14:49.223  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : Checkpoint start
2019-04-11 12:14:49.224  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : checkpointClose start
2019-04-11 12:14:49.300  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : checkpointClose synched
2019-04-11 12:14:49.317  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : checkpointClose script done
2019-04-11 12:14:49.323  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : checkpointClose end
2019-04-11 12:14:49.327  INFO 5458 --- [nio-8080-exec-1] hsqldb.db.HSQLDB6A0B3FC2C1.ENGINE        : Checkpoint end - txts: 1

11 Apr 2019 12:14:49  INFO JdbcConnectionFactory -  Database connected
11 Apr 2019 12:14:49 ERROR JdbcRareWordDictionary - Could not create Term Data Selection Call
java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CUI_TERMS in statement [SELECT * FROM CUI_TERMS WHERE RWORD = ?]
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source)
    at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source)
    at org.apache.ctakes.dictionary.lookup2.dictionary.JdbcRareWordDictionary.createSelectCall(JdbcRareWordDictionary.java:139)
    at org.apache.ctakes.dictionary.lookup2.dictionary.JdbcRareWordDictionary.<init>(JdbcRareWordDictionary.java:93)
    at org.apache.ctakes.dictionary.lookup2.dictionary.JdbcRareWordDictionary.<init>(JdbcRareWordDictionary.java:75)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
    at org.apache.ctakes.dictionary.lookup2.dictionary.DictionaryDescriptorParser.parseDictionary(DictionaryDescriptorParser.java:196)
    at org.apache.ctakes.dictionary.lookup2.dictionary.DictionaryDescriptorParser.parseDictionaries(DictionaryDescriptorParser.java:156)
    at org.apache.ctakes.dictionary.lookup2.dictionary.DictionaryDescriptorParser.parseDescriptor(DictionaryDescriptorParser.java:128)
    at org.apache.ctakes.dictionary.lookup2.ae.AbstractJCasTermAnnotator.initialize(AbstractJCasTermAnnotator.java:129)
    at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:261)
    at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:175)
    at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
    at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
    at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279)
    at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:407)
    at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:256)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:435)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:379)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:192)
    at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
    at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
    at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279)
    at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:407)
    at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:256)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:435)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:379)
    at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:192)
    at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
    at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
    at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279)
    at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:331)
    at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:448)
    at org.apache.uima.fit.pipeline.SimplePipeline.runPipeline(SimplePipeline.java:140)
    at com.canehealth.spring.ctakes.service.CtakesService.runCollectionProccesingEngine(CtakesService.java:284)
    at com.canehealth.spring.ctakes.service.CtakesService.Jcas2json(CtakesService.java:146)
    at com.canehealth.spring.ctakes.controller.RestApiController.post_text(RestApiController.java:61)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at com.canehealth.spring.ctakes.configuration.CORSFilter.doFilter(CORSFilter.java:30)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: CUI_TERMS
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.error.Error.error(Unknown Source)
    at org.hsqldb.ParserDQL.readTableName(Unknown Source)
    at org.hsqldb.ParserDQL.readTableOrSubquery(Unknown Source)
    at org.hsqldb.ParserDQL.XreadTableReference(Unknown Source)
    at org.hsqldb.ParserDQL.XreadFromClause(Unknown Source)
    at org.hsqldb.ParserDQL.XreadTableExpression(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQuerySpecification(Unknown Source)
    at org.hsqldb.ParserDQL.XreadSimpleTable(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryPrimary(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryTerm(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryExpressionBody(Unknown Source)
    at org.hsqldb.ParserDQL.XreadQueryExpression(Unknown Source)
    at org.hsqldb.ParserDQL.compileCursorSpecification(Unknown Source)
    at org.hsqldb.ParserCommand.compilePart(Unknown Source)
    at org.hsqldb.ParserCommand.compileStatement(Unknown Source)
    at org.hsqldb.Session.compileStatement(Unknown Source)
    at org.hsqldb.StatementManager.compile(Unknown Source)
    at org.hsqldb.Session.execute(Unknown Source)
    ... 128 more
4

1 回答 1

3

这里的问题是:数据库文件在哪里?默认情况下,当给定 URL 中不存在任何数据库时,HSQLDB 会创建一个空数据库。为了确保您的数据库 URL 指向正确的位置,;ifexists=true请在两个jdbcUrl属性的末尾附加。请参阅http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_props

其次,您指定的 jdbcUrl 中的路径是file:,这意味着目录结构,但路径看起来像指向 jar ( res:) 资源。如果数据库在 jar 中,请使用正确类型的 URL。

如果数据库文件不在 jar 中,而是存储在给定目录结构中的只读位置,您仍然可以使用res:.

于 2019-04-11T16:28:34.560 回答