Tag Archives: Problem record

[Solved] Sprintboot hikari initialize error: ERROR 27468 — [nio-8080-exec-1] com.zaxxer.hikari.pool.HikariPoolHikariPool

Problem description

The following error occurred while connecting Hikari. Initialization failed
ERROR 27468 — [nio-8080-exec-1] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 – Exception during pool initialization.


Cause analysis:

It may be a driving problem

The MySQL version on this machine is higher than the driver version used. Unable to connect. You can check the version of MySQL and compare it with the driver used. Then look at dependency import.


Solution:

My solution is as follows: because my MySQL version is 8.0, then I use the connection package of 5. So the connection failed. So I first import the 8.0 connection package, and then modify the dependent version number. Note: if you use the 8.0 connection package, you need to change the class forname to: com.mysql.cj.jdbc.Driver. Then the problem was solved

[Solved] rocketmq Startup Error: Error: Could not create the Java Virtual Machine.

Java HotSpot ™ 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated

It may be a JDK version problem

jdk1.8 is OK
if you want to use a higher version, such as jdk11

Windows:
Modify bin\runserver.cmd
Linux:
Modify bin\runserver.sh
before modification:

set "JAVA_OPT=%JAVA_OPT% -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"

After modification:

set "JAVA_OPT=%JAVA_OPT%  -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8"

[Solved] Error creating bean with name ‘entityManagerFactory‘ defined in class path resource

Spring Boot self-learning records.
JPA automatic table structure generation error log.
Error log.
Error:

The primary key is set to self-grow by default, so it has to be of Integer type, adjusted and started, and the table structure is generated automatically.

Error Messages:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-12-03 17:21:09.006 ERROR 4132 --- [           main] o.s.boot.SpringApplication               : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:857) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at com.example.demo.DemoApplication.main(DemoApplication.java:10) [classes/:na]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:882) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:360) ~[spring-orm-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:382) ~[spring-orm-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:371) ~[spring-orm-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:336) ~[spring-orm-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    ... 16 common frames omitted
Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [create table user_info (userid varchar(255) not null auto_increment, password varchar(255), username varchar(255), primary key (userid))]
    at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaMigratorImpl.createTable(SchemaMigratorImpl.java:236) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:167) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:134) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:101) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:472) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-core-5.0.12.Final.jar:5.0.12.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:879) ~[hibernate-entitymanager-5.0.12.Final.jar:5.0.12.Final]
    ... 23 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Incorrect column specifier for column 'userid'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_192]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_192]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_192]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_192]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2483) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480) ~[mysql-connector-java-5.1.44.jar:5.1.44]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_192]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_192]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_192]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_192]
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) ~[tomcat-jdbc-8.5.23.jar:na]
    at com.sun.proxy.$Proxy70.executeUpdate(Unknown Source) ~[na:na]
    at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.

 

Lifecyclebase.java: 154 Error [How to Solve]

Error Messages:

Warning: ContainerBase.addChild: start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HelloS]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1760)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1427)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    at sun.rmi.transport.Transport$1.run(Transport.java:177)
    at sun.rmi.transport.Transport$1.run(Transport.java:174)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsupportedClassVersionError: org/springframework/web/SpringServletContainerInitializer : Unsupported major.minor version 52.0 (unable to load class org.springframework.web.SpringServletContainerInitializer)
    at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2961)
    at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.apache.catalina.startup.WebappServiceLoader.loadServices(WebappServiceLoader.java:187)
    at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:152)
    at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1559)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1281)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5380)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 42 more

 

Reason & Solution:

It’s the version problem
Just contacted idea, downloaded the version of 2020.3, created the web version is 5.0, when creating the project can not be modified to reduce the version, and jdk configuration of 1.7, tomcat with 7, so it reported this error. Later, jdk was changed to 1.8 and tomcat was changed to 9 and started normally.
And then continue to reproduce the problem, left for the record, found that only the impact of jdk, jdk1.8 with tomcat7 can also start the project normally.
The long time to do have a love of the old plot, jdk1.7 has been used to the present, too lazy to replace, so ignore the version of the problem.

 

[Solved] Redis Error: Error condition on socket for SYNC: No route to host

When we set up redis master-slave replication, we may encounter the following problems due to various problems:
error condition on socket for Sync: no route to host

Solution:

First, modify the related configurations in redis.conf:

#Original configuration
bind 127.0.0.1
#Modify to
bind 0.0.0.0
# Although it is said that commenting it out can also solve the above problem, it is not recommended to comment out this method. Because another problem will occur.
#or comment it out
#bind 127.0.0.1

Turn off the firewall of the host. Note: it is the firewall of the host, and then restart the service.

In CentOS 7, systemctl stop firewalld turns off the firewall. Other versions can turn off the firewall through service iptables stop.

Turn off the firewall:

 systemctl stop firewalld

Turn off redis service

ps -ef |grep -i redis # Find a process

kill -9 3667 #Shut down the process

Restart related services

SSL error of urllib3 when Python uploads files using Minio

Problems arise

Minio’s server always uses HTTP for access, but recently, due to business requirements, all requests have been replaced with HTTPS requests. After changing to HTTPS, this error will be reported when uploading the file: urlib3. Exceptions. Maxretryerror: httpsconnectionpool (host = ‘10.10.30.241’, port = 9000): Max retries exceeded with URL:/Facebook?Location = (caused by sslerror (sslcertverificationerror (1, ‘[SSL: Certificate_ VERIFY_ FAILED] certificate verify failed: self signed certificate (_ ssl.c:1124)’)))

Solution 1

Because I saw that the error was reported by urlib, I directly searched the urlib source code and directly modified the urlib 3 source code to solve the problem.
the modified file is: connectionpool.py

modify line 775 of connectionpool.py file:

self.cert_reqs = 'CERT_NONE'

Solution 2

The first method is solved, but it is extremely inconvenient
because you need to modify the source code every time you need to change the deployment script or reinstall it
then I went through the Minio source code and found the problem

the urliib in Minio did not turn off SSL verification. I wanted to change it here, but I thought of changing the source code here. I looked carefully and found the next parameter: http_ client

We only need to customize this parameter when creating Minio objects

    minioClient = Minio(
        '1.1.1.1:9000',
        access_key='mxxxxxxx',
        secret_key='mxxxxxxx',
        http_client=urllib3.PoolManager(
            timeout=urllib3.util.Timeout(connect=10, read=10),
            maxsize=10,
            cert_reqs='CERT_NONE',
            ca_certs= os.environ.get('SSL_CERT_FILE') or certifi.where(),
            retries=urllib3.Retry(
                total=5,
                backoff_factor=0.2,
                status_forcelist=[500, 502, 503, 504]
            )
        )
        # secure=False
    )

So far, the problem is solved

Attach Minio file to upload all codes

import logging
from minio import Minio
from minio.error import S3Error
import urllib3
import certifi
import os
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
logging.basicConfig(
    level=logging.INFO,
    filename='../mysqlbackup_up.log',
    filemode='a',
    format='%(asctime)s %(name)s %(levelname)s--%(message)s'
)



def upload_file(file_name, file_path):

    minioClient = Minio(
        '1.1.3.1:9000',
        access_key='mxxxxx',
        secret_key='mxxxxxx',
        http_client=urllib3.PoolManager(
            timeout=urllib3.util.Timeout(connect=10, read=10),
            maxsize=10,
            cert_reqs='CERT_NONE',
            ca_certs= os.environ.get('SSL_CERT_FILE') or certifi.where(),
            retries=urllib3.Retry(
                total=5,
                backoff_factor=0.2,
                status_forcelist=[500, 502, 503, 504]
            )
        )
        # secure=False
    )

    check_bucket = minioClient.bucket_exists("test")

    if not check_bucket:
        minioClient.make_bucket("test")
    try:
        logging.info("start upload file")
        minioClient.fput_object(bucket_name="test", object_name=file_name, file_path=file_path)
        logging.info("file {0} is successfully uploaded".format(file_name))
        print('success')
    except FileNotFoundError as err:
        print(err)
        logging.error('upload_failed: ' + str(err))
    except S3Error as err:
        print(err)
        logging.error("upload_failed:", err)

The file is generated, but an error is still reported. Error: CreateProcess failed

         Remember, when using keil compiler in the past, there were such problems:

          At the first glance, I saw “1 error (s)”, and subconsciously thought that my program had made a mistake. I looked for it for a long time and didn’t find it.

         Later, I took a closer look and found that this error can be completely ignored because the required. Bin and. Hex files have been generated.

          This error is just that the file copy.bat is not generated, and I don’t need this file.

         But the bitch of OCD is itching. It’s uncomfortable to see an error hanging.

         In the option, I removed the check box before “run #2”.

         Just compile the unnecessary copy.bat file without parameters.

          At this point, compile again and 0 error will pass.

When Maven hits the jar package, an error is reported when executing install, and the symbol cannot be found in a line

Record the problems encountered:

Since the problem has been solved before posting, there is no picture, please watch and think patiently!

Today, when preparing to deploy a project with a jar package, an error is reported in install. According to the idea prompt, it is locked in a line of a class

According to the error prompt, I found that I created a new class in package B, and the jar package I am typing is package a,

1. So I checked pom.xml in project a to see if the dependency of package B was introduced. It was confirmed that it had been introduced

2. I thought it might be that I didn’t print jar package for project B, so I tried to package project B first and then print package a

The springboot project does not start and has no error messages

Project scenario: the project cannot be started after merging code branches

project scenario: after the code branches are merged, the project cannot be started and no error message is reported

try {
            ConfigurableApplicationContext context = SpringApplication.run(TestApplication.class, args);
            SpringContextUtils.setContext(context);
        }catch (Exception e){
            e.printStackTrace();
        }

Solution:

add try catch to the startup class to catch the exception information, and modify it according to the prompt to save the exception information

Record once the solution of gradle dependency problem: failed to determine a suitable driver class

problem keyword

Failed to determine a suitable driver class

problem description

error message is as follows:

2019-03-06 09:53:43.991|localhost-startStop-1|INFO |o.s.cloud.alibaba.sentinel.SentinelWebAutoConfiguration.servletRequestListener:73|[Sentinel Starter] register Sentinel with urlPatterns: [/*].
2019-03-06 09:53:44.723|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'commonFilter' to urls: [/*]
2019-03-06 09:53:44.723|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'characterEncodingFilter' to: [/*]
2019-03-06 09:53:44.723|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'requestContextFilter' to: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'cat-filter' to urls: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'sentinelFilter' to urls: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'httpCatCrossFliter' to urls: [/*]
2019-03-06 09:53:44.724|localhost-startStop-1|INFO |o.s.boot.web.servlet.FilterRegistrationBean.log:87|Mapping filter: 'corsInterceptor' to: [/*]
2019-03-06 09:53:44.725|localhost-startStop-1|INFO |o.s.boot.web.servlet.ServletRegistrationBean.log:87|Servlet dispatcherServlet mapped to [/]
2019-03-06 09:53:44.795|restartedMain|INFO |org.springframework.aop.framework.CglibAopProxy.log:87|Method [void com.zaxxer.hikari.HikariConfig.seal()] is package-visible across different ClassLoaders and cannot get proxied via CGLIB: Declare this method as public or protected if you need to support invocations through the proxy.
2019-03-06 09:53:44.956|restartedMain|WARN |o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext.log:87|Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2019-03-06 09:53:44.961|restartedMain|WARN |o.s.beans.factory.support.DisposableBeanAdapter.log:87|Invocation of destroy method failed on bean with name 'inMemoryDatabaseShutdownExecutor': org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2019-03-06 09:53:44.997|restartedMain|INFO |org.apache.catalina.core.StandardService.log:180|Stopping service [Tomcat]
2019-03-06 09:53:45.024|localhost-startStop-1|WARN |org.apache.catalina.loader.WebappClassLoaderBase.log:180|The web application [api] appears to have started a thread named [sentinel-datasource-auto-refresh-task-thread-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.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
2019-03-06 09:53:45.025|localhost-startStop-1|WARN |org.apache.catalina.loader.WebappClassLoaderBase.log:180|The web application [api] appears to have started a thread named [sentinel-metrics-record-task-thread-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.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
Disconnected from the target VM, address: '127.0.0.1:59182', transport: 'socket'

Process finished with exit code 1

think about the cause

after adding a dependency

check cause

to see if this dependency depends on some other dependency,
looks and does so;

solution

excludes the dependency

    compile 'com.xxx.cloud:xxx-client:0.0.1-SNAPSHOT' , {
        exclude(module: 'spring-boot-starter-data-jpa')
    }