hi friends:
I want to use jboss microkernel with Hibernate3,but when I run my console app,I get an exception:
Code:
java.lang.NoSuchMethodError: org.jboss.util.CollectionsFactory.createConcurrentReaderMap()Ljava/util/Map;
at org.jboss.kernel.plugins.event.AbstractEventEmitter.<init>(AbstractEventEmitter.java:55)
at org.jboss.kernel.plugins.AbstractKernelObject.<init>(AbstractKernelObject.java:57)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.<init>(AbstractBootstrap.java:53)
at org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap.<init>(BasicBootstrap.java:59)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.<init>(StandaloneBootstrap.java:72)
at org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap.main(StandaloneBootstrap.java:60)
at lyo.test.ioc.TestDao.main(TestDao.java:42)
Exception in thread "main"
No Hibernate mapping.
My code is :
Code:
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.bootstrap.standalone.StandaloneBootstrap;
public class TestDao extends BasicBootstrap{
public TestDao() throws Exception {
super();
// TODO Auto-generated constructor stub
}
ITestBean beanpro;
public void setBeanpro(ITestBean beanpro) {
this.beanpro = beanpro;
System.out.println("Set Into it>>>> "+this.beanpro.getStr());
}
/**
* @param args
*/
public static void main(String[] args)throws Exception {
// TODO Auto-generated method stub
StandaloneBootstrap.main(args);
}
}
I find that the Hibernate's jboss-common.jar come into conflict with jbossmicrokernel 's jboss-common.jar.
Code:
Hibernate's jboss-common.jar
///////////////////////////////////////////
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.)
Specification-Title: JBoss
Specification-Version: 5.0.0
Specification-Vendor: JBoss (http://www.jboss.org/)
Implementation-Title: JBoss [TheOne]
Implementation-URL: http://www.jboss.org/
Implementation-Version: 5.0.0alpha (build: CVSTag=HEAD date=2005022415
59)
Implementation-Vendor: JBoss.org
Implementation-Vendor-Id: http://www.jboss.org/
Microkernel's
Code:
Microkernel's jboss-common
/////////////////////////////////////////////////////////////////
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_09-b05 (Sun Microsystems Inc.)
Specification-Title: JBoss
Specification-Version: 5.0.0
Specification-Vendor: JBoss (http://www.jboss.org/)
Implementation-Title: JBoss [TheOne]
Implementation-URL: http://www.jboss.org/
Implementation-Version: 5.0.0alpha (build: CVSTag=HEAD date=2006012522
03)
Implementation-Vendor: JBoss.org
Implementation-Vendor-Id: http://www.jboss.org/
So which should I use it? If I replace the hibernate's jboss-common.jar with jbossmicrokernel 's jboss-common.jar,could Hibernate work property ? Thks!