hoangduit / openmeetings

Automatically exported from code.google.com/p/openmeetings
0 stars 0 forks source link

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken #746

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
every time the server is started there is a Classloader problem with some
Hibernate related classes:

ERROR 05-27 12:25:10.747 Configurationmanagement.java 19090 65
org.openmeetings.app.data.basic.Configurationmanagement [NioProcessor-1] -
[getConfKey]: 
org.hibernate.QueryException: ClassNotFoundException:
org.hibernate.hql.ast.HqlToken [select c from
org.openmeetings.app.hibernate.beans.basic.Configuration as c where
c.conf_key = :conf_key and c.deleted = :deleted]
    at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:80) [hibernate3.jar:na]
    at antlr.CharScanner.setTokenObjectClass(CharScanner.java:338)
[antlr-3.1.2.jar:na]
    at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:54)
[hibernate3.jar:na]
    at antlr.CharScanner.<init>(CharScanner.java:49) [antlr-3.1.2.jar:na]
    at antlr.CharScanner.<init>(CharScanner.java:58) [antlr-3.1.2.jar:na]
    at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)
[hibernate3.jar:na]
    at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)
[hibernate3.jar:na]
    at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)
[hibernate3.jar:na]
    at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:49) [hibernate3.jar:na]
    at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:67)
[hibernate3.jar:na]
    at
org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:265)
[hibernate3.jar:na]
    at
org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180
)
[hibernate3.jar:na]
    at
org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
[hibernate3.jar:na]
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
[hibernate3.jar:na]
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
[hibernate3.jar:na]
    at
org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94
)
[hibernate3.jar:na]
    at
org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:
156)
[hibernate3.jar:na]
    at
org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
[hibernate3.jar:na]
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
[hibernate3.jar:na]
    at
org.openmeetings.app.data.basic.Configurationmanagement.getConfKey(Configuration
management.java:52)
[openmeetings.jar:na]
    at
org.openmeetings.utils.crypt.ManageCryptStyle.getInstanceOfCrypt(ManageCryptStyl
e.java:30)
[openmeetings.jar:na]
    at
org.openmeetings.app.remote.red5.ClientListManager.addClientListItem(ClientListM
anager.java:43)
[openmeetings.jar:na]
    at
org.openmeetings.app.remote.red5.ScopeApplicationAdapter.roomJoin(ScopeApplicati
onAdapter.java:157)
[openmeetings.jar:na]
    at
org.red5.server.adapter.MultiThreadedApplicationAdapter.join(MultiThreadedApplic
ationAdapter.java:430)
[red5.jar:na]
    at
org.red5.server.adapter.ApplicationAdapter.join(ApplicationAdapter.java:72)
[red5.jar:na]
    at org.red5.server.Scope.connect(Scope.java:323) [red5.jar:na]
    at org.red5.server.BaseConnection.connect(BaseConnection.java:293)
[red5.jar:na]
    at
org.red5.server.net.rtmp.RTMPConnection.connect(RTMPConnection.java:292)
[red5.jar:na]
    at
org.red5.server.net.rtmp.RTMPMinaConnection.connect(RTMPMinaConnection.java:81)
[red5.jar:na]
    at org.red5.server.net.rtmp.RTMPHandler.onInvoke(RTMPHandler.java:282)
[red5.jar:na]
    at
org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:14
6)
[red5.jar:na]
    at
org.red5.server.net.rtmp.RTMPMinaIoHandler.messageReceived(RTMPMinaIoHandler.jav
a:129)
[red5.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived
(DefaultIoFilterChain.java:721)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(De
faultIoFilterChain.java:433)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilte
rChain.java:47)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceive
d(DefaultIoFilterChain.java:801)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush
(ProtocolCodecFilter.java:375)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFi
lter.java:229)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(De
faultIoFilterChain.java:433)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilte
rChain.java:47)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceive
d(DefaultIoFilterChain.java:801)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter
.java:119)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(De
faultIoFilterChain.java:433)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(Defaul
tIoFilterChain.java:425)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoPr
ocessor.java:603)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingI
oProcessor.java:563)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingI
oProcessor.java:552)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPolli
ngIoProcessor.java:56)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPo
llingIoProcessor.java:891)
[mina-core-2.0.0-M6.jar:na]
    at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
[mina-core-2.0.0-M6.jar:na]
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:8
85)
[na:1.6.0_07]
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
[na:1.6.0_07]
    at java.lang.Thread.run(Thread.java:637) [na:1.6.0_07]
ERROR 05-27 12:25:10.752 ManageCryptStyle.java 19095 39
org.openmeetings.utils.crypt.ManageCryptStyle [NioProcessor-1] -

Original issue reported on code.google.com by seba.wag...@gmail.com on 27 May 2009 at 10:27

GoogleCodeExporter commented 9 years ago
For my server I see the following problem in ~100% of cases. I believe there is 
some 
non-critical bug in hibernate binding description. 

org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlT
oken [select c from org.openmeetings.app.hibernate.beans.recording.Recording as
c where c.whiteBoardConverted = :whiteBoardConverted AND c.deleted != :deleted]

Original comment by alexei.f...@gmail.com on 27 May 2009 at 3:30

GoogleCodeExporter commented 9 years ago
I have reproduced the problem with 

[select c from org.openmeetings.app.hibernate.beans.basic.Configuration as
c where c.conf_key = :conf_key and c.deleted = :deleted] 

Original comment by alexei.f...@gmail.com on 27 May 2009 at 5:06

GoogleCodeExporter commented 9 years ago
We will have to add certain JARs to the servers-lib directory.
I have found a combination of JARs that works BUT that brings new problems:
1) Some of the features (espacially batik) does not harmony when you copy it to
servers-lib
2) It will make the BUild_From-Source process more complex when you have to add 
some
JARs to your red5 installation everytime, we will need to update the ANT-Script 
to do
that JOb, once we found a combination that works for all our features.

Original comment by seba.wag...@gmail.com on 27 May 2009 at 5:18

GoogleCodeExporter commented 9 years ago
I put this down from Priority, this is not Critical I think. 
We may search for an alternative that let us use stay with the current setup.

Original comment by seba.wag...@gmail.com on 28 May 2009 at 8:04

GoogleCodeExporter commented 9 years ago
Issue 747 has been merged into this issue.

Original comment by alexei.f...@gmail.com on 2 Jun 2009 at 5:36

GoogleCodeExporter commented 9 years ago
Please pay attention. In comment to the issue 747, I proposed a temporary 
solution (and 
patch) to this problem.

As I understand, in general, to solve this problem, we will have to use the 
same version of antlr, 
that red5 uses. I will try to find out later about it

Original comment by CTpaH...@gmail.com on 3 Jun 2009 at 6:03

GoogleCodeExporter commented 9 years ago
I have noticed that the problem started to manifest itself during 0.7 to 0.8
transition. In 0.7 red5 used openmeetings_0_7_rc2/lib/antlr-2.7.6.jar. In 0.8 
red5
uses red5-0.8.RC3-build-hudson-red5_jdk6_stable-79_2/lib/antlr-3.1.2.jar. Could 
the
change of ANTLR version be a reason of AST parser failure?

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 1:10

GoogleCodeExporter commented 9 years ago
It seems I found a root of the problem. We have 6 antlr distribution copies in 
the
classpath including incompatible ones. For me the following jar removal fixed 
the
"whiteboard sql request" problem. Could anyone confirm that this fixes 
"configuration
sql request" as well?

$ mv webapps/openmeetings/WEB-INF/lib/antlr-2.7.6.jar
webapps/openmeetings/WEB-INF/lib/antlr-2.7.6.jar.1

If yes, I will remove jar from svn.

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 1:41

GoogleCodeExporter commented 9 years ago
Well, in my environment I also deleted the following jars from Red5 
distribution.
Restoring antlr-3.1.2.jar restores the problem.

lib/antlr-3.1.2.jar.1  lib/groovy-all-1.5.7.jar.1  lib/jython-2.5.jar.1

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 1:54

GoogleCodeExporter commented 9 years ago
Restored lib/groovy-all-1.5.7.jar and lib/jython-2.5.jar, and the system 
worked. So
the final solution is to remove (or rename) lib/antlr-3.1.2.jar and
webapps/openmeetings/WEB-INF/lib/antlr-2.7.6.jar

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 2:02

GoogleCodeExporter commented 9 years ago
The antlr which works resides in 
webapps/openmeetings/WEB-INF/lib/jalopy-1.5rc3.jar
It  is a part of axis.

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 2:28

GoogleCodeExporter commented 9 years ago
The ANTLR embedded into jalopy has version 2.7.5 (20050128) which is different 
from
2.7.6. I have removed jalopy (why should we have a source formatter in our 
bundle?)
and replaced webapps/openmeetings/WEB-INF/lib/antlr-2.7.6.jar with 
antlr-2.7.5.jar.
That worked for me.

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 3:23

GoogleCodeExporter commented 9 years ago
Vasya,
Could you please check if downgrading ANTLR version works for your/Sebastian's
problem? I used the following version:

http://www.antlr2.org/download/antlr-2.7.5.jar

Original comment by alexei.f...@gmail.com on 3 Jun 2009 at 3:44

GoogleCodeExporter commented 9 years ago
Let me summarize. Here goes an algorithm how to fix the problem.

1. Remove lib/antlr-3.1.2.jar, 
webapps/openmeetings/WEB-INF/lib/jalopy-1.5rc3.jar,
webapps/openmeetings/WEB-INF/lib/antlr-2.7.6.jar
2. Add webapps/openmeetings/WEB-INF/lib/antlr-2.7.5.jar from
http://www.antlr2.org/download/antlr-2.7.5.jar

Original comment by alexei.f...@gmail.com on 4 Jun 2009 at 9:20

GoogleCodeExporter commented 9 years ago
This works for me too 

Only found some differences. I do not have lib/antlr-3.1.2.jar - instead, I 
deleted  lib/antlr-
2.7.5.jar. 

What is the reason for lower version of the library? It looks like DLL hell on 
windowse.

Original comment by CTpaH...@gmail.com on 4 Jun 2009 at 10:24

GoogleCodeExporter commented 9 years ago
I was able to reproduce it, seems to be fixed that way.

Original comment by seba.wag...@gmail.com on 5 Jun 2009 at 9:04

GoogleCodeExporter commented 9 years ago
For public review, fixed in r2051
=> the removal of lib/antlr-3.1.2.jar from the red5-common lib has to be done 
by hand
as this is not part of our project-codebase.

Original comment by seba.wag...@gmail.com on 5 Jun 2009 at 9:11