-
1. Re: Is there a method to turn off hibernate use in JBoss
ohmygod Dec 8, 2010 8:32 PM (in response to ohmygod)UP
-
2. Re: Is there a method to turn off hibernate use in JBoss
ohmygod Dec 8, 2010 8:57 PM (in response to ohmygod)Current issue is when putting hibernate3.jar in .ear\lib, there will be a class cast exception like
"java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to org.hibernate.hql.ast.HqlToken,;
When removing it from .ear\lib, error of "class not found on c3p0 class" reports as I am using c3p0 settings in hibernate.cfg.xml.
I think this is a common issue. Anyone is willing to share a solution or a walkaround on this?
-
3. Re: Is there a method to turn off hibernate use in JBoss
meetoblivion Dec 11, 2010 4:26 PM (in response to ohmygod)you probably want to tweak these.
http://community.jboss.org/wiki/classloadingconfiguration
you'll likely need to include other dependent libraries in your ear. as 6 comes with hibernate 3.6, which has different dependencies than the version you're using.
-
4. Re: Is there a method to turn off hibernate use in JBoss
ohmygod Dec 12, 2010 8:36 PM (in response to meetoblivion)Thanks for your reply, john.
I have read and tried with your link for hundreads of times but never succeeded to configure the so called classloading configuration. I am abandoning JBoss.
-
5. Re: Is there a method to turn off hibernate use in JBoss
meetoblivion Dec 12, 2010 10:12 PM (in response to ohmygod)well, i know that it does work. maybe you'd like to share your configuration as well as what libraries you are bundling in both the EAR and WAR files, to help sort it out?
-
6. Re: Is there a method to turn off hibernate use in JBoss
ohmygod Dec 12, 2010 11:31 PM (in response to meetoblivion)hibernate3.jar for hibernate in .ear\lib. classcast exception in my anothe thread. http://community.jboss.org/message/574839#574839.
And this is the only one conflict. I would not like to mention those other conflicts any more.
I used jboss-app.xml at deploy\globalsight.ear\META-INF with following configuration and there was no any conflict issue under JBoss 4.0.3.
<!DOCTYPE jboss-app PUBLIC
"-//JBoss//DTD J2EE Application 1.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
<jboss-app >
<loader-repository>
org.w3c:loader=globalsight.ear
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</jboss-app>Anyway, thanks John for your time. You need not look into this problem as I think this is definitely a BUG in new version of JBoss
And it seems there always be far more people viewing the problem than replying it. I think I shoud not have searched for any solutions in this place.
-
7. Re: Is there a method to turn off hibernate use in JBoss
ventmonkey Feb 4, 2011 7:11 PM (in response to meetoblivion)John/Anyone else, I am having the same problem, and seem to be having no luck.
I'm running jboss AS 6, and the following Hibernate libraries in my app (ear)
hibernate-commons-annotations-3.1.0.GA.jar hibernate-entitymanager-3.4.0.GA.jar hibernate-search-3.3.0.Final.jar hibernate-validator-3.1.0.GA.jar hibernate-annotations-3.4.0.GA.jar hibernate-search-analyzers-3.3.0.Final.jar hibernate-core-3.3.1.GA.jar
My jboss-app.xml looks like..
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd"> <jboss-app> <loader-repository> com.myproj:loader=myproj-ear-1.0-SNAPSHOT.ear <loader-repository-config>java2ParentDelegaton=false</loader-repository-config> </loader-repository> </jboss-app>
WHen I deploy, I get the following error...
00:03:27,121 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:ear=myproj-ear-1.0-SNAPSHOT.ear,jar=myproj-ejb-1.0-SNAPSHOT.jar,name=ObjectTypeBean,service=EJB3 state=Create: java.lang.ClassCastException: org.hibernate.hql.ast.HqlToken cannot be cast to antlr.Token at antlr.CharScanner.makeToken(Unknown Source) [:6.0.0.Final] at org.hibernate.hql.ast.HqlLexer.makeToken(HqlLexer.java:62) [:3.6.0.Final] at org.hibernate.hql.antlr.HqlBaseLexer.mIDENT(HqlBaseLexer.java:599) [:3.6.0.Final] at org.hibernate.hql.antlr.HqlBaseLexer.nextToken(HqlBaseLexer.java:270) [:3.6.0.Final] at antlr.TokenBuffer.fill(Unknown Source) [:6.0.0.Final] at antlr.TokenBuffer.LA(Unknown Source) [:6.0.0.Final] at antlr.LLkParser.LA(Unknown Source) [:6.0.0.Final] at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:141) [:3.6.0.Final] at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:274) [:3.6.0.Final] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:182) [:3.6.0.Final] ...
If I only include hibernate-search, and search-analyzers it will deploy, but I cannot use hibernate-annotations, which I need.
Thank you very much for your help. I've been trying to figure this out for several days now.
Mason