JDBC Driver has been forcibly unregistered by Tomcat 6 - tomcat6

I am getting this error about mysql:
INFO: Shutting down log4j
09-ene-2014 9:57:21 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
09-ene-2014 9:57:21 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
GRAVE: A web application appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
There're a lot information about it in others questions. I already updated my mysql lib to the version 5.1.28 (before, I was working with 5.0.8 which contains a bug about it) but it doesn't still work. I have checked that I have that lib in my war. Like a test, I deleted my mysql lib from WEB-INF/lib and I copied to TOMCAT/lib and I missed that error, why?. I don't want to copy that jar in TOMCAT/lib. I'm working with Tomcat6.

Related

Upgrading Apache Flink need to update pom.xml?

I've just upgraded my flink from version 1.9.1 to 1.11.2 (using docker)
I have already many flink jobs running in version 1.9.1
When I try to upgrade to 1.11.1 and re run my job, it shows error.
2020-11-12 06:49:17,731 WARN org.apache.zookeeper.ClientCnxn []
- SASL configuration failed: javax.security.auth.login.LoginException: No JAAS configuration section named 'Client' was found in specified JAAS configuration file: '/tmp/jaas-1135609831848314731.conf'. Will continue connection to Zookeeper server without SASL authentication, if Zookeeper server allows it.
2020-11-12 06:49:17,739 INFO org.apache.zookeeper.ClientCnxn [] - Opening socket connection to server xxxxxx:2181
2020-11-12 06:49:17,741 ERROR org.apache.curator.ConnectionState [] - Authentication failed
And this is the error after deploying my flink job:
Caused by: java.lang.RuntimeException: API paths not defined
and also:
java.lang.NoSuchMethodError: org.apache.flink.api.common.state.OperatorStateStore.getSerializableListState(Ljava/lang/String;)Lorg/apache/flink/api/common/state/ListState;
Do I need to change every pom for my flink jobs?
Is there any work around without changing my source code?
Thanks
Yes, you do have to rebuild your Flink jobs whenever you update the Flink version being used to run them. The libraries you use should be from the same exact version used by the Job Manager and Task Managers.
If you are trying to automate deployments for a CI/CD pipeline, you could inject the version number into the pom.xml using an environment variable -- but doing things like that can make it hard to debug when things go wrong.

How to configure pgadmin4 (PostgreSQL)

When I finished installation postgresql-10.5 and ran pgadmin4 (that came installed with postgresql) I get a configuration error that says:
An error occurred initializing the application server:
Failed to launch application server, server thread existing
It then asks me to input a python path and an application path.
Can anybody help me and and advise what to do to run pgadmin4. I tried find problem solution, but nothing helped me(

MS SQL JDBC driver create memory leak with JNDI Hikari on Tomcat 9

I am using JNDI + HikariCP on Tomcat 9.0.7 with the following configuration :
<Resource name="jdbc/mydb" auth="Container"
factory="com.zaxxer.hikari.HikariJNDIFactory"
type="javax.sql.DataSource"
minimumIdle="5"
maximumPoolSize="20"
connectionTimeout="300000"
dataSourceClassName="com.microsoft.sqlserver.jdbc.SQLServerDataSource"
dataSource.url="jdbc:sqlserver://server:1433;databaseName=mydb"
dataSource.user="fantomas"
dataSource.password="somepassword"
closeMethod="close"
/>
When I run tomcat without any of my WAR deployed (just standard installation, nothing more), I have the following WARNING in Catalina log:
09-May-2018 10:15:16.971 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [host-manager] appears to have started a thread named [mssql-jdbc-TimeoutTimer-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1073)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
What is wrong and why there is a leak ? How can I fix it ?
UPDATE-1
Custom libraries in ./lib of Tomcat installation are:
ms-sql-6.4.0.jre8.jar
slf4j-api-1.7.25.jar
HikariCP-2.7.8.jar
UPDATE-2
Same problem also with Hikari 3.1.0 & Tomcat 9.0.8
The thread in question (mssql-jdbc-TimeoutTimer) belongs to the MSSQL driver. It shows up when you use HikariCP, but not Tomcat JDBC, because HikariCP appropriately uses JDBC timeout APIs for reliability.
This is a known issue with the MSSQL driver, search for 'mssql-jdbc-TimeoutTimer' here.
It seems that the timer is started by HikariCP's call to the MSSQL driver implementation of Connection.isValid(). So, you may be able to avoid the issue by setting a connectionTestQuery, which will disable the use of isValid().
Related issue with similar leak reported to hikari and it seems that the final solution doesn't use Hikari JNDI factory but Tomcat's Datasource
Try to change the factory to:
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
EDIT
You created a new issue for Hikari

WLP :: Worklight :: Can't install runtime

I'm using Worklight 6.2 server edition and I can't deploy a working runtime (of other environments) on my server.
I'm using webpshere liberty profile v8.5.5 and when I deploy the runtime via GUI it says success and on server.xml I can see the new configuration for the app.
However when I go to the worklightconsole I don't see my runtime to upload the app.
On messages.log there is a error regarding JMX connection.
The quoted error is
Failed to obtain JMX connection to access an MBean. There might be a JMX configuration error: No JMX connector is configured
I'm refering this because I've seen some post on SO saying that these issues might be connected. However I have the restConnector-1.0 on my WLP features.
Reference: No runtime on my Worklight 6.2 Console after installing analytics
On messages.log there is some other things that I found interesting, like the correct start of the runtime I've deployed
[11/12/14 5:50:45:177 CST] 00000012 com.worklight.server.bundle.project.JeeProjectActivator I FWLST0002I: ========= Project /HelloWorld started. The project WAR file version is 6.2.0.00.20140922-2259,running on server version 6.2.0.00.20140613-0730. [project HelloWorld]
and two erros while starting my server
[11/12/14 5:50:49:911 CST] 00000012 SystemErr R 24 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
Second error:
java.lang.RuntimeException: Timeout while waiting for the management service to start up
I don't know what these are but I think it might be related to my problem and this errors eventually appear when I start my server.
Does anyone have any tips for troubleshooting this issue?
Thanks in advance.
This is a known issue from Websphere.
There is a APAR to fix that, a workaround is to restart the server with the --clean option to force a refresh onto the shared libraries.
http://www-01.ibm.com/support/docview.wss?uid=swg1PI17830

Grails MS SQLServer 2008 jdbc driver causes problems in tomcat

What is the official way to use the microsoft jdbc driver for mssql in a grails application?
The general opinion that I found through googling is that I only have to drop the jar in the lib directory of the grails app. This works if I do a grails clean and grails compile --refresh-dependencies. But when I deploy on a real server I have two problems.
When redeploying there is this a warning in the logs.
24.05.2013 16:03:03 com.microsoft.sqlserver.jdbc.AuthenticationJNI
WARNUNG: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
I'm not sure if its something to care about since its a warning. But I would like to have my logs clean and I have the dll in the lib directory of the application just as google is saying. Additionally on redeployment there are several messages like this that might relate to the first one:
24.05.2013 16:03:02 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SCHWERWIEGEND: A web application created a ThreadLocal with key of type [org.codehaus.groovy.runtime.GroovyCategorySupport.MyThreadLocal] (value [org.codehaus.groovy.runtime.GroovyCategorySupport$MyThreadLocal#76fe8d1b]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
And the last thing is that my coworker said, that she thinks the driver should not be installed on a per application basis but directly into tomcat. I actually don't know how to do this, but if I did it, this would cause a problem on the development machine since I don't know how to get grails run-app going without the driver in the applications lib directory.
You can still place the library in the lib folder of your project and just exclude this from the war generation.
You don't need to exclude the jar everytime you build your project, just follow this post tip.
In your Tomcat server the jar will be placed in the shared lib folder instead of each web application.
If after that you still get the warning about sqljdbc_auth.dll you will need to locate this file and add the folder in the Tomcat classpath (or copy to Tomcat lib folder).

Resources