On Jan 24, 2009, at 8:14 PM, laxmiraghu wrote:


Again, today our web site experienced "CapabilityMap returned a null media type" error. Anyone, please help to resolve this error. It will be great
help to us.

I saw in /usr/local/Jetspeed-2.1.3/webapps/jetspeed/logs/ jetspeed.log and
found the following exception.


2009-01-25 07:33:28,674 [http-8080-Processor21] ERROR
org.apache.jetspeed.capabilities.impl.JetspeedCapabilities -
CapabilityServiceImpl: getMediaTypesForMimeTypes -> getMediaTypeClass query
used invalid class
org.springframework.dao.DataAccessResourceFailureException: OJB operation;
SQL []; The last packet successfully received from the server was61841
seconds ago.The last packet sent successfully to the server was 61841
seconds ago, which  is longer than the server configured value of
'wait_timeout'. You should consider either expiring and/or testing
connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was61841 seconds ago.The last packet sent successfully to the server was 61841 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
Caused by:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was61841 seconds ago.The last packet sent successfully to the server was 61841 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. at sun.reflect.GeneratedConstructorAccessor71.newInstance(Unknown
Source)
       at


Sounds like your MySQL connection is timing out due to inactivity.
I used to believe there was a MySQL JDBC autoreconnect property you can use for ex:

jdbc:mysql://localhost/test?autoReconnect=true

I think this setting may be deprecated.
I just tested it and it does not work for me. I killed the connection using MySQL Administrator, and this setting had no effect.
Im using 5.1.6 of the MySQL Connector, and  MySQL version  5.0.67

There are two my.cnf settings you can add to your My SQL configuration. Look at "interactive-timeout" and "wait-timeout" settings. Or you can set that via the MySQL Admin program under Options- >Advanced Networking. Set it to a value greater than the longest period of interactivity It defaults to 28800, which is 8 hours. Try some value greater than your longest inactivity, say a long weekend

# 3 days
interactive-timeout=259200
wait-timeout=259200

I think a better solution would be to shorten the timeout of the JDBC connection pool on the Jetspeed side (OJB), I will look into this, but for now the settings above should solve the problem



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to