2 Replies Latest reply on Apr 13, 2006 5:44 AM by Ales Justin

    Problems with latest versions of JBoss and Spring

    Steve Baker Newbie

      (Note: I've already emailed Ales about these issues, I'm just posting here for posterity)

      I have been using the current release of jboss-spring-integration_version2.

      I want to integrate JBoss 4.0.4 CR2 with Spring 2.0 m3 but came up with a couple of problems deploying jboss-spring-example.

      First, I got the following stack trace on startup due to a package reorganization in EJB3:
      10:03:26,925 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=business.ejb3
      java.lang.TypeNotPresentException: Type javax.ejb.PreDestroy not present
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:351)
      at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:175)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
      at java.lang.reflect.Method.declaredAnnotations(Method.java:676)
      at java.lang.reflect.Method.getAnnotation(Method.java:663)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository$AnnotationInitialiser.getAnnotation(InterceptorInfoRepository.java:722)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository$AnnotationInitialiser.resolveAroundInvoke(InterceptorInfoRepository.java:669)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository$AnnotationInitialiser.getInfo(InterceptorInfoRepository.java:658)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.initialiseFromAnnotations(InterceptorInfoRepository.java:454)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.getOrInitialiseFromAnnotations(InterceptorInfoRepository.java:436)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.initialiseFromAnnotations(InterceptorInfoRepository.java:450)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.getOrInitialiseFromAnnotations(InterceptorInfoRepository.java:436)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.getInterceptorsFromAnnotation(InterceptorInfoRepository.java:326)
      at org.jboss.ejb3.interceptor.InterceptorInfoRepository.getClassInterceptors(InterceptorInfoRepository.java:128)
      at org.jboss.ejb3.EJBContainer.initialiseInterceptors(EJBContainer.java:726)
      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:261)
      at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:77)
      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:429)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:478)
      at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      ...

      The second problem is the version of Spring bundled with jboss-spring-integration_version2. I'm not sure but it looks like the spring version is currently 1.2.x. There is a lot of EJB3 stuff in Spring 2.0.x so it would be good if jboss-spring-integration_version2 depended on the latest released version (currently 2.0 M3).
      I tried putting the latest Spring jars in the deployer directory but got the following stacktrace on startup:
      09:56:35,691 ERROR [MainDeployer] Could not create deployment: file:/D:/dev/apps/appserver/jboss-4.0.4.CR2/server/default/tmp/deploy/tmp17204JBoss-Spring.ear-contents/spring-pojo.spring
      java.lang.NoSuchMethodError: org.jboss.spring.factory.NamedXmlBeanDefinitionParser.registerBeanDefinitions(Lorg/springframework/beans/factory/support/BeanDefinitionReader;Lorg/w3c/dom/Document;Lorg/springframework/core/io/Resource;)I
      at org.jboss.spring.factory.NamedXmlBeanDefinitionReader.registerBeanDefinitions(NamedXmlBeanDefinitionReader.java:49)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:358)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:308)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:283)
      at org.jboss.spring.factory.NamedXmlApplicationContext.loadBeanDefinitions(NamedXmlApplicationContext.java:74)
      at org.jboss.spring.factory.NamedXmlApplicationContext.loadBeanDefinitions(NamedXmlApplicationContext.java:70)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:279)
      at org.jboss.spring.factory.NamedXmlApplicationContext.(NamedXmlApplicationContext.java:52)
      at org.jboss.spring.factory.ApplicationContextLoaderImpl.createBeanFactory(ApplicationContextLoaderImpl.java:36)
      at org.jboss.spring.factory.AbstractBeanFactoryLoader.create(AbstractBeanFactoryLoader.java:85)
      at org.jboss.spring.deployment.SpringDeployer.create(SpringDeployer.java:117)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      ...