#52 【ご教示願います】組込DBからPostgresqlへのコピーが正常になされない問題

 [Public]
icon t.furuya was written at Dec 5, 2017 2:27 PM
  Edit(Sign in)
  Stock
  Answer survey   Answer survey

  TOC

一点ご相談させてください。
現在、組込DBからPostgreSQLへ接続・コピーを試みてるのですが、正常にコピーができない状況に陥っています
下記に現状とバージョン、logを載せましたので、もしアドバイス等があればご教示いただけますと幸いです。

現状

  • 接続できる
  • データコピーを開始すると、一瞬で終了する(オレンジの表示が現れて、すぐ消える)
  • 実際はPostgreSQLにレコードがコピーできていない。
    • テーブルはコピーされている

バージョン

項目詳細
OSCentOS7.3
Postgresql9.2.23
Knowledge1.10.2

app.log

INFO  2017-12-05 13:07:17,970 [LoggingFilter(100)] GET    https://gita.ft.nttcloud.net/knowledge/admin.database/connect    200    115.69.230.244    6[ms]
INFO  2017-12-05 13:07:18,010 [LoggingFilter(100)] GET    https://gita.ft.nttcloud.net/knowledge/open.account/icon/2    200    115.69.230.244    0[ms]
INFO  2017-12-05 13:07:42,403 [Intercepter(213)] error. [object]class org.support.project.web.dao.SystemsDao_$$_jvst542_0[proceed]_d17executeQuerySingle[param0]SELECT * FROM SYSTEMS WHERE SYSTEM_NAME = ?  AND DELETE_FLAG = 0[param1]class org.support.project.web.entity.SystemsEntity[param2][Ljava.lang.Object;@53d63f1e
[throwable.getMessage()] ERROR: relation "systems" does not exist
  Position: 15 [cause] ERROR: relation "systems" does not exist
  Position: 15
----- SQL Infomation -----
[sql]SELECT * FROM SYSTEMS WHERE SYSTEM_NAME = ?  AND DELETE_FLAG = 0
[params]
    [params][0]knowledge
[execute]SELECT * FROM SYSTEMS WHERE SYSTEM_NAME = knowledge  AND DELETE_FLAG = 0

ERROR 2017-12-05 13:07:42,404 [Transaction(58)] Error(Rollback) : org.support.project.web.dao.SystemsDao_$$_jvst542_0#_d46selectOnKey
INFO  2017-12-05 13:07:42,405 [Intercepter(213)] error. [object]class org.support.project.web.dao.SystemsDao_$$_jvst542_0[proceed]_d46selectOnKey[param0]knowledge
[throwable.getMessage()] ERROR: relation "systems" does not exist
  Position: 15 [cause] ERROR: relation "systems" does not exist
  Position: 15
----- SQL Infomation -----
[sql]SELECT * FROM SYSTEMS WHERE SYSTEM_NAME = ?  AND DELETE_FLAG = 0
[params]
    [params][0]knowledge
[execute]SELECT * FROM SYSTEMS WHERE SYSTEM_NAME = knowledge  AND DELETE_FLAG = 0

INFO  2017-12-05 13:07:42,576 [InitializeDao(43)] Database initialize start.
INFO  2017-12-05 13:07:43,217 [InitializeDao(49)] /org/support/project/web/database/ddl.sql is loaded.
INFO  2017-12-05 13:07:43,883 [InitializeDao(49)] /org/support/project/knowledge/database/ddl.sql is loaded.
INFO  2017-12-05 13:07:43,888 [InitializeDao(49)] /org/support/project/knowledge/database/init_datas.sql is loaded.
INFO  2017-12-05 13:07:43,888 [InitializeDao(51)] Database initialize finish.
INFO  2017-12-05 13:07:44,330 [InitDB(148)] Migrate to 1.10.2
INFO  2017-12-05 13:07:44,408 [LoggingFilter(100)] POST    https://gita.ft.nttcloud.net/knowledge/admin.database/custom_save    200    115.69.230.244    2177[ms]
INFO  2017-12-05 13:07:44,477 [LoggingFilter(100)] GET    https://gita.ft.nttcloud.net/knowledge/open.account/icon/2    200    115.69.230.244    10[ms]
ERROR 2017-12-05 13:07:56,681 [ControlManagerFilter(206)] ERROR SEND
ERROR 2017-12-05 13:07:56,682 [LoggingFilter(64)] Any exception is thrown. [javax.servlet.ServletException]
javax.servlet.ServletException: javax.servlet.ServletException: org.support.project.common.exception.SystemException: 
    at org.support.project.web.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:300)
    at org.support.project.knowledge.listener.CloseAbleAuthenticationFilter.doFilter(CloseAbleAuthenticationFilter.java:98)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.knowledge.filter.ApiFilter.doFilter(ApiFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.web.filter.LoggingFilter.doFilter(LoggingFilter.java:62)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.web.filter.SeqFilter.doFilter(SeqFilter.java:31)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.web.filter.EncodingFilter.doFilter(EncodingFilter.java:36)
    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.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
    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:799)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.servlet.ServletException: org.support.project.common.exception.SystemException: 
    at org.support.project.web.filter.ControlManagerFilter.doFilter(ControlManagerFilter.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.web.filter.MultipartFilter.doFilter(MultipartFilter.java:63)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.support.project.web.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:293)
    ... 31 more
Caused by: org.support.project.common.exception.SystemException: 
    at org.support.project.common.util.ObjectUtils.invoke(ObjectUtils.java:136)
    at org.support.project.web.common.InvokeTarget.invoke(InvokeTarget.java:106)
    at org.support.project.web.filter.ControlManagerFilter.doInvoke(ControlManagerFilter.java:345)
    at org.support.project.web.filter.ControlFilter.invoke(ControlFilter.java:31)
    at org.support.project.web.filter.ControlManagerFilter.doFilter(ControlManagerFilter.java:184)
    ... 37 more
Caused by: java.lang.reflect.InvocationTargetException
    at org.support.project.common.util.ObjectUtils.invoke(ObjectUtils.java:132)
    ... 41 more
Caused by: java.lang.UnsatisfiedLinkError: no nio in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at sun.nio.fs.UnixCopyFile$2.run(UnixCopyFile.java:612)
    at sun.nio.fs.UnixCopyFile$2.run(UnixCopyFile.java:609)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.fs.UnixCopyFile.<clinit>(UnixCopyFile.java:609)
    at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
    at java.nio.file.Files.move(Files.java:1395)
    at org.support.project.knowledge.logic.DataTransferLogic.backupAndInitH2(DataTransferLogic.java:317)
    at org.support.project.knowledge.control.admin.DatabaseControl.data_transfer_back(DatabaseControl.java:300)
    ... 42 more

 Attach Files     - [0]


 Comment
[Registration] Dec 5, 2017 10:02 PM [Koda]
icon

v.1.10 系のデータコピーの機能には不具合がありコピーができません。
v1.11 で修正していますので、 v1.11にバージョンアップ後にお試しください。

こちらもも参照願います: https://github.com/support-project/knowledge/issues/832


 Like! × 1  
Collapsed
[Registration] Dec 7, 2017 1:17 PM [t.furuya]
icon

バージョンアップ後リトライしたところ、無事完了することができました。
お手数おかけしました。


 Like! × 2  
Collapsed
[Registration] Dec 9, 2017 6:00 AM [Koda]
icon

:smile:


 Like! × 0  
Collapsed
[Registration] Feb 10, 2018 10:35 PM [mamma]
[Update] Feb 13, 2018 7:29 PM [mamma]
icon

(ご参考)V1.5→V1.12へバージョンアップと組み込みDBからpostgresへ変更で手間取りましたが解決しました。

今までv1.5を使っていました。knowledgeのサーバを変更するにあたりv1.12へバージョンアップし、DBを組み込みからpostgresへ変更しました。

v1.5の組み込みDBのバックアップ機能によりデータを新サーバのV1.12へ移行します。

うまく動いた手順

  • v1.12へ組み込みDB復元
  • 組み込みDBバックアップ
  • 集計実施必要かも(2月13日追加)
  • 先ほどバックアップしたDBを再び復元
  • postgresへ変更

テーブルはコピーされるが、レコードはコピーされない手順

  • V1.12へ組み込みDB復元
  • 組み込みDBからpostgresへコピー

 Like! × 1  
Collapsed



 Add Comment