Today, tomcat in myeclipse cannot start again...

Source: Internet
Author: User
Tags time in milliseconds apache tomcat

In fact, this is about character ..

These two days, I have been confused ..

I decided to calm down and solve a bug ..

Starting from the problem with the least headers, start myeclipse and stop:

Info: initializing spring root webapplicationcontext
Abandonedobjectpool is used (Org. Apache. commons. DBCP. abandonedobjectpool @ 71e5987)
Logabandoned: false
Removeabandoned: True
Removeabandonedtimeout: 180

The following information is displayed:

Info: the APR based Apache Tomcat native library which allows optimal performance in production environments was not found on the java. library. path: D: \ Program Files \ Java \ jdk1.7.0 _ 10 \ bin; D: \ Program Files \ Apache Software Foundation \ Tomcat 7.0 \ bin

I thought this error, some people said to download a tomcat tcnative-1.dll put in C: \ windows \ system32 directory, tried useless. However, some people say that this error is not an error, but Tomcat prompts that it is not loaded to Tomcat's own library. It turns out that it is not in your way.

Back to the question, saying that Tomcat cannot be started, I tried all kinds of methods. Restart tomcat, restart myeclipse, restart the PC, and change the Tomcat port. Once again, I had to turn it off and try again, and the result was never started again ..

Later, the boss reminded me that it was useless to restart the Oracle server because the number of Oracle connections in the database was not full.

The final trick was to unload Tomcat and reinstall it. Started successfully!

Info: server startup in 327 MS

After a few times, the database of the deployed project cannot be connected because of the network environment. You can try to check the connection locally. If the connection fails, Tomcat will basically fail.

 

Some people on the Internet say the solution is: (I have not tried it yet. Write it down first)

SetDatasourceConfigurationRemoveabandoned = trueRemove it.

Http://hi.baidu.com/javashow/item/be24eb77c574382d5c1789df

The following is an excerpt:

During configuration, the following problems are hard to understand:Removeabandoned , Java. Lang. instantiationexceptionlogabandoned , Removeabandonedtimeout , Maxwait The four parameters are set Rmoveabandoned = true In Getnumactive () Coming soon Getmaxactive () The system will be invalid Connection Recycling, recycling Connection Is Removeabandonedtimeout ( Default 300 Seconds ) Is not used after the specified number of seconds in Connection , Activating the recycle mechanism seems to be Getnumactive () = getmaxactive ()-2 . A little forgotten.
Logabandoned = true Then, Arrayindexoutofboundsexception Log Print out Recycle Connection Error information, including where the error message is used Connection It is useful for debugging.
Private suggestion here Maxwait Do not set the time to be too long, Maxwait If the setting is too long, the client will wait a long time to trigger the recycle event.

The following is my configurationPropertiesFile:

#Connection settings

JDBC. driverclassname = oracle. JDBC. Driver. oracledriver
JDBC. url = JDBC: oracle: thin: @ 127.0.0.1: 1521: dbserver
JDBC. Username = user
JDBC. Password = pass
# <! -- Initialize connection -->
Datasource. initialsize = 10
# <! -- Maximum idle connections -->
Datasource. maxidle = 20
# <! -- Minimum idle connection -->
Datasource. minidle = 5
# Maximum number of connections
Datasource. maxactive = 50
# Whether to print the connection timeout error when the timeout connection is automatically recycled
Datasource. logabandoned = true
# Whether to automatically recycle timeout connections
Datasource. removeabandoned = true
# Timeout ( In seconds )
Datasource. removeabandonedtimeout = 180
# <! -- Timeout wait time in milliseconds 6000 Millisecond /1000 Equal 60 Seconds -->
Datasource. maxwait = 1000

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.