Communication link failure
by findbestopensource
Hello all,
We have launched a new website www.findbestopensource.com which lists
the best opensource product across platforms.
We are using hibernate and MySQL and c3p0 as connection pool provider.
I am getting the below error very frequently. Could you please guide
me.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: The last packet successfully received from the server was
45,172,983 milliseconds ago. The last packet sent successfully to the
server was 45,172,993 milliseconds ago. 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.
Regards
Aditya
www.findbestopensource.com
14 years, 2 months
Exceptions thrown in a tx synchronization are eaten
by Adam Warski
Hello,
if a transaction synchronization throws an exception, is it only logged, and not thrown further (see org.hibernate.transaction.JDBCTransaction, line 273). Is there some reason for this?
As Envers uses tx synchronizations quite extensively, when an exception is thrown in the synchronization, I roll back the transaction manually. So, no data is persisted (which is the desired behavior), but the client isn't notified in any way that something went wrong; for the client, the operation behaves as if the tx commited successfully.
I suspect that maybe some applications rely on the fact that the exception is eaten and not re-thrown. If there are no contra-arguments to throw the exceptions, maybe a good solution would be to re-throw the exception is the transaction is already marked for rollback? Or if it was marked for rollback in the synchronization?
The related JIRA issues are:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3543
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4721
By the way, how does Hibernate Search deal with such situations? I looked at PostTransactionWorkQueueSynchronization, and it seems that it's possible that the transaction commits, but the data isn't indexed properly, if the queueingProcessor.performWorks throws an exception?
--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu
14 years, 3 months
R: [HSearch] Configuration properties
by Sanne Grinovero
Hi Hardy! because it's the key for the static weakhashmap for the
autoregistration of listeners, that would introduce a memory leak.
I had proposed to care for registration of listeners in other ways, don't
have the reference now from the phone (I'd +1 to remove the static
weakhashmap)
cheers,
Sanne
Il giorno 09/lug/2010 18:47, "Hardy Ferentschik" <hibernate(a)ferentschik.de>
ha scritto:
Hi,
just wondering whether there is a reason why we don't expose the
configuration properties in SearchFactory?
I think we talked about this once, but I cannot remember exactly.
I noticed that the properties are now exposed in
StateSearchFactoryImplementor anyways. Maybe
we could push this all the way down to SearchFactory?
I need would need access to the properties and several places to for
example check for hibernate.search.generate_statistics or
"hibernate.search.jmx_enabled.
While looking at the code I also started to wonder whether we need all
these sub-interfaces for SearchFactory. Currently we have
SearchFactory -> SearchFactoryIntegrator -> SearchFactoryImplementor ->
StateSearchFactoryImplementor -> Mutable-/Immutable-SearchFactory
Is this really all needed?
--Hardy
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
14 years, 3 months
Re: [hibernate-dev] [infinispan-dev] Possible error of dependency on infinispan-query pom
by Ceki Gülcü
Galder Zamarreño wrote:
> Hmmm, these looks like a problem in Hibernate Search since they're the
> ones using slf4j.
>
> I don't see why Infinispan Query should explicitly declare a
> dependency on slf4j.
>
Hello Galder,
The issue reported by Israel Lacerra, that is the NoClassDefFoundError
for org.slf4j.impl.StaticLoggerBinder, no longer occurs in SLF4J 1.6
and later. Upgrading to SLF4J v1.6 will cause the problem to
disappear.
Quoting the SLF4J manual [1]:
Libraries
Authors of widely-distributed components and libraries may code
against the SLF4J interface in order to avoid imposing an logging
framework on the end-user of the component or library. He or she may
choose the desired logging framework at deployment time by inserting
the desired slf4j binding on the classpath, which may be changed later
by replacing an existing binding with another on the class path and
restarting the application. This approach has proven to be simple and
very robust.
As of SLF4J version 1.6.0, if no binding is found on the class path,
then slf4j-api will default to a no-operation implementation
discarding all log requests. Thus, instead of throwing an exception,
SLF4J will emit a single warning message about the absence of a
binding and proceed to discard all log requests without further
protest. For example, let Wombat be some biology-related framework
depending on SLF4J for logging. In order to avoid imposing a logging
framework on the end-user, Wombat's distribution includes
slf4j-api.jar but no binding. Even in the absence of any SLF4J binding
on the class path, Wombat's distribution will still work
out-of-the-box, and without requiring the end-user to download a
binding from SLF4J's web-site. Only when the end-user wishes to enable
logging will she need to install a binding.
I hope this sheds lights onto the matter,
--
Ceki
[1] http://slf4j.org/manual.html#libraries
14 years, 3 months
Re: [hibernate-dev] [infinispan-dev] Possible error of dependency on infinispan-query pom
by Galder Zamarreño
Hmmm, these looks like a problem in Hibernate Search since they're the ones using slf4j.
I don't see why Infinispan Query should explicitly declare a dependency on slf4j.
Emmanuel, wdyt?
http://anonsvn.jboss.org/repos/hibernate/search/tags/v3_2_0_Final/hiberna... needs slf4j, so it would appear to me that Hibernate Search should define dependencies on slf4j and not query module.
I see https://repository.jboss.org/nexus/content/groups/developer/org/hibernate... having the same stuff query has, a dependency on slf4j-log4j with test scope.
On Jul 14, 2010, at 1:01 AM, Israel Lacerra wrote:
> Hi everybody,
>
> I'm making some tests and I am using infinispan-gui-demo. So I have to include "infispan-query" as a dependency in infinispan-gui-demo. After this, and including my code that make some use of infispan-query module, I get this when I start the cache:
>
> Exception in thread "pool-1-thread-1" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
> at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
> at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
> at org.hibernate.search.util.LoggerFactory.make(LoggerFactory.java:38)
> at org.hibernate.search.Version.<clinit>(Version.java:40)
> at org.hibernate.search.impl.SearchFactoryImpl.<clinit>(SearchFactoryImpl.java:102)
> at org.infinispan.query.backend.QueryHelper.<init>(QueryHelper.java:104)
> at org.infinispan.demo.InfinispanDemo$10.run(InfinispanDemo.java:377)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> ... 13 more
>
>
> If I change the scope of slf4j-log4j12 to default scope in infinispan-query's pom, the problem disappears.
>
> Probably I miss something on the maven behaviour or something like it. But maybe the scope is incorrect.
>
>
> thanks!
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
14 years, 3 months
New HSQLDialect
by Fred Toussi
I have attached the new version to HHH-5381.
The Hibernate test suite runs with few errors with HSQLDB 2.0.1 snapshot
(jars are at http://hsqldb.org/support/)
Several tests contain SQL that works only with a few products. I have
listed these issues on Jira HHH-5376 and HHH-5325. Most of the issues
can be fixed with minor changes to the SQL.
HSQLDB 2.0.1 has some rule enforcement settings that can be used as
connection or URL properties, all listed here:
http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#N13D18
See the properties beginning with "sql.".
Some rules are relaxed by default, but if they are all turned on, more
tests result in failure.
Please review and ask any questions. I will help both with HSQLDB issues
and with general SQL issues.
Fred Toussi
14 years, 3 months
JIRA issues to be fixed for core 3.5.4
by Gail Badner
We are planning to release Hibernate core 3.5.4 on Wednesday next week
(7/21/10).
If you are working on issues for 3.5.4, then please change the fix
version from 3.5.x to 3.5.4.
If your fix is relevant to both Branch_3_5 and trunk (3.6), then please
commit your fix to both branches and make sure that the fix versions on
the issue are set to 3.5.4 and 3.6.
Thanks,
Gail
14 years, 3 months
[HSearch] Configuration properties
by Hardy Ferentschik
Hi,
just wondering whether there is a reason why we don't expose the
configuration properties in SearchFactory?
I think we talked about this once, but I cannot remember exactly.
I noticed that the properties are now exposed in
StateSearchFactoryImplementor anyways. Maybe
we could push this all the way down to SearchFactory?
I need would need access to the properties and several places to for
example check for hibernate.search.generate_statistics or
"hibernate.search.jmx_enabled.
While looking at the code I also started to wonder whether we need all
these sub-interfaces for SearchFactory. Currently we have
SearchFactory -> SearchFactoryIntegrator -> SearchFactoryImplementor ->
StateSearchFactoryImplementor -> Mutable-/Immutable-SearchFactory
Is this really all needed?
--Hardy
14 years, 3 months