-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: onPostInsert signature: (Lorg/hibernate/event/PostInsertEven
PostPosted: Wed Mar 12, 2008 3:21 pm 
Newbie

Joined: Wed Mar 12, 2008 11:45 am
Posts: 5
Hello,

I am getting the below error while creating lucene indexes using Hibernate annotations... I have updated the hibernate.jar and hibernate-anootations.jar files after reading fdew topics in this forum but I am still getting the error.

Thanks in advance



Here is my config file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.sybase.jdbc2.jdbc.SybDriver</property>

<property name="hibernate.connection.url">jdbc:sybase:Tds:cib-teemd-var.mark.bb.com:17000/</property>
<property name="hibernate.connection.database">DBTEMP</property>
<property name="hibernate.connection.username">dbtest</property>
<property name="hibernate.connection.password">dbtest</property>
<property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
<property name="hibernate.show_sql">false</property>

<!-- Default Lucene Index Dir -->
<property name="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</property>
<!--property name="hibernate.search.default.indexBase">/home/asm/muni/lucene</property-->
<property name="hibernate.search.default.indexBase">/servers/apps/index</property>
<mapping resource="com/wach/muni/agent/msrb/vo/MSRBControlMessage.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MSRBPricingMessage.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MSRBPricingMessageHistory.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MSRBSystemMessage.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MuniBondReferences.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MuniTradePricingMeasures.hbm.xml"/>
<mapping resource="com/wach/muni/agent/msrb/vo/MSRBCalcTradeHistory.hbm.xml"/>

<event type="post-update">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-insert">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-delete">
<listener class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>

</session-factory>

</hibernate-configuration>


Error

java.lang.VerifyError: (class: org/hibernate/search/event/FullTextIndexEventListener, method: onPostInsert signature: (Lorg/hibernate/event/PostInsertEvent;)V) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.hibernate.cfg.Configuration.setListeners(Configuration.java:1584)
at org.hibernate.cfg.Configuration.parseEvent(Configuration.java:1567)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1498)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1002)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1432)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:990)
at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:69)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:972)
at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:69)
at com.wach.muni.agent.util.MSRBMuniAgentImpl.init(MSRBMuniAgentImpl.java:61)
at com.wachovia.agentframework.AgentManager.registerAgent(AgentManager.java:166)
at com.wachovia.agentframework.AgentManager.startAgent(AgentManager.java:229)
at com.wachovia.agentframework.AgentManager.startAutoStartAgents(AgentManager.java:113)
at com.wachovia.agentframework.console.AdminControllerServlet.init(AdminControllerServlet.java:105)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)


NOTE: The above config works fine in my local JBoss environment but failing in different environment (UAT/PROD)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 3:58 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
In which environment are you trying to run Hibernate Search? JBoss? This looks very much like a class loading/version problem. Are you sure that you do not have any duplicate classes in the classpath. If you run within a application server you might have some libraries in the common shared lib directory.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 12, 2008 4:43 pm 
Newbie

Joined: Wed Mar 12, 2008 11:45 am
Posts: 5
I have bundled all this code as an ear file and deployed to Jboss app server. In the ear file I have a lib directory which have the hibernate and annotations and other dependent jar files

hibernate 3.2.6
hibernate-annotations-3.3.1
hibernate-entitymanager-3.3.2

JDK 1.5
JBoss 4.04.GA


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 3:11 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you will probably need to update the hibernate version embedded in JBoss AS as well (in server/default/lib/)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 19, 2008 1:21 pm 
Newbie

Joined: Wed Mar 12, 2008 11:45 am
Posts: 5
Thanks it worked... This the problem with different sets of hibernate jars


Top
 Profile  
 
 Post subject: For me: this was the reason
PostPosted: Sat Jan 10, 2009 7:35 am 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
For me this was the reason:
having
Code:
<event type="post-update" >
         <listener class="org.hibernate.search.event.FullTextIndexEventListener" />
      </event>
      <event type="post-insert" >
         <listener class="org.hibernate.search.event.FullTextIndexEventListener" />
      </event>
      <event type="post-delete" >
         <listener class="org.hibernate.search.event.FullTextIndexEventListener" />
      </event>


in the hibernate.cfg.xml in stead of having

Code:
<property name="hibernate.ejb.event.post-insert"
                value="org.hibernate.search.event.FullTextIndexEventListener"/>
         <property name="hibernate.ejb.event.post-update"
                value="org.hibernate.search.event.FullTextIndexEventListener"/>
         <property name="hibernate.ejb.event.post-delete"
                value="org.hibernate.search.event.FullTextIndexEventListener"/>


in persistence.xml

This is using hibernate search 3.0.1, hibernate entitymanager 3.3.2 and hibernate core 3.2.6

Cheers,

Marc[/code]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.