From users-return-265505-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Mon Sep 10 09:50:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2BF6C180656 for ; Mon, 10 Sep 2018 09:50:19 +0200 (CEST) Received: (qmail 21643 invoked by uid 500); 10 Sep 2018 07:50:18 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 21632 invoked by uid 99); 10 Sep 2018 07:50:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2018 07:50:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 676BDC017A for ; Mon, 10 Sep 2018 07:49:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.611 X-Spam-Level: ** X-Spam-Status: No, score=2.611 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id MRdIhPwib1Mq for ; Mon, 10 Sep 2018 07:49:54 +0000 (UTC) Received: from smtp-out11.electric.net (smtp-out11.electric.net [185.38.181.34]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C1CD35F402 for ; Mon, 10 Sep 2018 07:49:53 +0000 (UTC) Received: from 1fzGx8-000BxR-Ve by out11c.electric.net with emc1-ok (Exim 4.90_1) (envelope-from ) id 1fzGx9-000BzM-TH for users@tomcat.apache.org; Mon, 10 Sep 2018 00:49:47 -0700 Received: by emcmailer; Mon, 10 Sep 2018 00:49:47 -0700 Received: from [194.103.242.42] (helo=AFSESTHEX11.af.se) by out11c.electric.net with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fzGx8-000BxR-Ve for users@tomcat.apache.org; Mon, 10 Sep 2018 00:49:46 -0700 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (10.40.86.132) by mail.afconsult.com (10.40.86.224) with Microsoft SMTP Server (TLS) id 14.3.279.2; Mon, 10 Sep 2018 09:49:46 +0200 Received: from VI1PR01MB4045.eurprd01.prod.exchangelabs.com (20.177.54.11) by VI1PR01MB1487.eurprd01.prod.exchangelabs.com (10.163.248.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Mon, 10 Sep 2018 07:38:42 +0000 Received: from VI1PR01MB4045.eurprd01.prod.exchangelabs.com ([fe80::bcfd:e039:d3c6:fa93]) by VI1PR01MB4045.eurprd01.prod.exchangelabs.com ([fe80::bcfd:e039:d3c6:fa93%2]) with mapi id 15.20.1122.019; Mon, 10 Sep 2018 07:38:42 +0000 From: Saleem Haseeb To: "users@tomcat.apache.org" Subject: tomcat and sqlite Thread-Topic: tomcat and sqlite Thread-Index: AdRI2Ut1TW0nuzObRneV4XBp4G1BCQ== Date: Mon, 10 Sep 2018 07:38:42 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=haseeb.saleem@afconsult.com; x-originating-ip: [194.103.240.26] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR01MB1487;6:6OvCIpfpfz2ecpPxE4AMNSc1b+iH9zlpd6xutwTqzKd0K5GNWSxngfOFV/28T0CPYiosPPQ78Et9lKSaVru/Skj/CzFVu8K0FSopvO/FZ3QZddFYWXm5RP9PBJVwnYjyIVKLZ4oYGy05XuXMYRMQp27MNuRU0todjao6B4LU/YGHxfAgUUx0T7RWxkxeHJNIyunaDwLvvYVWa4UINQtOsvbLRtIpeWDJN+5ZVhfPEe5lSkOE2SpglTcLhN7gNTzoihuo/QwuTpbM1glsk63bzg4FnZMLu2u8mV/gSInvEQV4raDy9kVAffQDYzX0E1JeaEmbqVbAyc/4z6FL/wPctDLPRV4Qs7xu9wALx98vBn77JIKGtCJy+eHy45OWjcpPjmeh2E6vljHm2GOckXLtrW8zihgzU2khm10Zcor4gv4unBZWpq0/olfjCL7QN9YOgo5quSK1YtyEriohYCQprw==;5:JN7Boeh4FH0Z2zsjMKri6LmPTqF0V0gLysL73hV7m5LdGc9Bdhr7Xmwe1S7XJy6XUn61vNW2U3oj7VZpFYn9s299oboBdvaiUR2pOk3XNVtFFTcLNfiOWW1njiSrfBkKyQWGJFqRAY7IdJ4I1kprsSu0akvJPsc79tuFaCRLllw=;7:kpUt+pcGx9m8+v5K3EEK2aW0zGMcQayfeAo1eZwO54AN9FJKF/Y4O1nK/j4ZuAfClsChKJsCxMAtcg91s6g2cfxjE8B8dVnDPj96vIqSHwHxKR5F3sf9MABGISIpupF8w7YxXW8kF4rXzOT3nPhdTY9urHV/NamyEJ5SgNIlD6rCplHXqJk7WgDsP5Bhpx+MeNnRbQPN2CTFHwXDwLCV/Of9YSIhDrcF7yZjONQShPZyUOI30jhgUreem7sOmgx9 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 8676b675-cbfc-46b9-bc3e-08d616f06eab x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:VI1PR01MB1487; x-ms-traffictypediagnostic: VI1PR01MB1487: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(127540120423786)(21748063052155)(163750095850)(21532816269658); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699050);SRVR:VI1PR01MB1487;BCL:0;PCL:0;RULEID:;SRVR:VI1PR01MB1487; x-forefront-prvs: 07915F544A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(366004)(136003)(396003)(39850400004)(346002)(189003)(199004)(26005)(478600001)(74316002)(7696005)(7736002)(8676002)(8936002)(14444005)(6306002)(256004)(6916009)(68736007)(5640700003)(99286004)(54896002)(55016002)(6436002)(6506007)(66066001)(186003)(14454004)(316002)(9686003)(81166006)(81156014)(2900100001)(5660300001)(2906002)(1730700003)(7116003)(3480700004)(105586002)(86362001)(790700001)(6116002)(3846002)(2351001)(106356001)(25786009)(53936002)(102836004)(2501003)(97736004)(476003)(33656002)(5250100002)(486006);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR01MB1487;H:VI1PR01MB4045.eurprd01.prod.exchangelabs.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: afconsult.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: BPEnQpXorv+kNbryuPZj0TdKJ8nVTOW8foqFAQUTV6EGwfguLU7pGgxar8/x2TmUz2eD0UxtB5R8cbQhUzQpPE9LgUZKPa8hKjR/ROfBAheTu9MyKEhYnB0B/hH7cvnzXWAboll7fYYDnA6WUa6BC5fEp4qLH6fMGoYxRiFc79gTuX+dUZhbtRwaaMLUk7DbTRXms4orjlbwTfh1BqY8SSkxm2l4Xi3mxr4H4yPMYcP1VyoIX6RVBbbbWwNg1wum5IAJHm8k71qMvQjWql8aUxWTe3dnriG6E8kT6Zjbj69hvfyDjLh/T/4he0Gnnm9FHsGIpYTWsqoaZ5gC71sZC2GYYBGW1aGjn8BizuIN2EA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_VI1PR01MB40457A0D8DEE912CEEB411A5EB050VI1PR01MB4045eurp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 8676b675-cbfc-46b9-bc3e-08d616f06eab X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2018 07:38:42.3120 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 58af3eba-510e-4544-8cfd-85f5e0206382 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR01MB1487 X-OriginatorOrg: afconsult.com X-Outbound-IP: 194.103.242.42 X-Env-From: haseeb.saleem@afconsult.com X-Proto: esmtps X-Revdns: X-HELO: AFSESTHEX11.af.se X-TLS: TLSv1.2:ECDHE-RSA-AES256-SHA384:256 X-Authenticated_ID: X-Virus-Status: Scanned by VirusSMART (c) X-Virus-Status: Scanned by VirusSMART (s) X-PolicySMART: 5766542 --_000_VI1PR01MB40457A0D8DEE912CEEB411A5EB050VI1PR01MB4045eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I am trying to use sqlite in a web application on tomcat version 8.0.41 The driver that I use to connect to sqlite from within the web application = is org.xerial sqlite-jdbc 3.23.1 I am using Linux to deploy the application and whenever there is a connecti= on first made to the database I get the driver .so files created as below: sqlite-3.23.1-71f96c59-5318-4b40-8505-8000876a12e7-libsqlitejdbc.so sqlite-3.23.1-71f96c59-5318-4b40-8505-8000876a12e7-libsqlitejdbc.so.lck in the contextDestroyed() hook I am trying to do something as following to = deregister the driver on my classloader for the webapp like private void deregisterDrivers() { Enumeration drivers =3D DriverManager.getDrivers(); ClassLoader cl =3D Thread.currentThread().getContextClassLoader(); while (drivers.hasMoreElements()) { Driver driver =3D drivers.nextElement(); if (driver.getClass().getClassLoader() =3D=3D cl) { try { logger.info("Deregistering jdbc driver: {}", driver); DriverManager.deregisterDriver(driver); } catch (SQLException e) { logger.info("Error deregistering driver {} due to {}", driv= er, e); } } } } the above as pointed out in some questions at stackoverflow says is impleme= ntation dependent, so I verified and found out that it does not delete thos= e so and lck files. As a workaround, I then tried in the same contextDestroyed method, to delet= e the .so and .so.lck files but then that creates files with the pattern .n= fsyyyyyyy on my disk. These files seem like the driver files and for some r= eason, if I try to delete those as part of clean up, I get the message "Dev= ice is Busy" and the .nfs* files hang on the disk and also don't get remove= d by the OS. I am struggling here to get rid of the drivers gracefully on application un= deployment. Any help is appreciated! Regards, Haseeb --_000_VI1PR01MB40457A0D8DEE912CEEB411A5EB050VI1PR01MB4045eurp_--