5 Replies Latest reply on May 23, 2006 10:07 AM by Tim Vandeplas

    Problem spring-deployer and jboss 4.0.4GA

    Tim Vandeplas Newbie

      Is it possible that there is a problem with the spring deployer and jboss 4.0.4GA.

      It used to work fine with rc2 but now with the GA version is doesn't inject the spring beans any more.
      It still deploys the name.spring jar and the
      "org.jboss.spring.factory.NamedXmlApplicationContext" is bound to the correct jndi name.

      Has something changed or have I overlooked something?

        • 1. Re: Problem spring-deployer and jboss 4.0.4GA
          Ales Justin Master

          What's the exception (it should be there I believe)?

          It's possible that some ejb3 dependency failed - since ejb3 stuff changes a lot.

          If you give me exact problem, I'll try to bild you a new Spring deployer budle.

          Rgds, Ales

          • 2. Re: Problem spring-deployer and jboss 4.0.4GA
            Tim Vandeplas Newbie

            There isn't realy an exception I get a null pointer when i use the bean because it isn't injected.

            15:19:38,946 INFO [Server] Starting JBoss (MX MicroKernel)...
            15:19:38,946 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200
            605151000)
            15:19:38,956 INFO [Server] Home Dir: C:\jboss-4.0.4.GA
            15:19:38,956 INFO [Server] Home URL: file:/C:/jboss-4.0.4.GA/
            15:19:38,956 INFO [Server] Patch URL: null
            15:19:38,956 INFO [Server] Server Name: default
            15:19:38,956 INFO [Server] Server Home Dir: C:\jboss-4.0.4.GA\server\default
            15:19:38,956 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4.GA/server/default/
            15:19:38,966 INFO [Server] Server Log Dir: C:\jboss-4.0.4.GA\server\default\log
            15:19:38,966 INFO [Server] Server Temp Dir: C:\jboss-4.0.4.GA\server\default\tmp
            15:19:38,966 INFO [Server] Root Deployment Filename: jboss-service.xml
            15:19:39,467 INFO [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
            15:19:39,467 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-b05,Sun Microsystems In
            c.
            15:19:39,477 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
            15:19:40,048 INFO [Server] Core system initialized
            15:19:43,453 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
            15:20:39,013 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec
             correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
            15:20:47,595 WARN [Digester] [NavigationRuleRule]{faces-config/navigation-rule} Merge(/generic/Item
            UserView.jsp)
            15:20:50,399 ERROR [ExceptionFilter] INIT Filter
            15:21:01,495 WARN [MethodInvokingJobDetailFactoryBean$MethodInvokingJob] Could not invoke method 'r
            un' on target object [RssGeneratorFeederTaskPandoraImpl]
            javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
             at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
             at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor
            .java:62)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.jav
            a:78)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:1
            06)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
             at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:55)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
             at $Proxy128.createRSSFeed(Unknown Source)
             at be.jcs.pandora.rss.RssGeneratorFeederTaskPandoraImpl.createFeedForCategory(RssGeneratorFe
            ederTaskPandoraImpl.java:86)
             at be.jcs.pandora.rss.RssGeneratorFeederTaskPandoraImpl.run(RssGeneratorFeederTaskPandoraImp
            l.java:73)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
             at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
             at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor
            .java:63)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedE
            ntityManagerInterceptor.java:54)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor
            .java:62)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.jav
            a:78)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:1
            06)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
             at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
             at $Proxy132.run(Unknown Source)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335
            )
             at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:165)
             at $Proxy193.run(Unknown Source)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:248)
             at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJo
            b.executeInternal(MethodInvokingJobDetailFactoryBean.java:165)
             at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:66)
             at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
             at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
            Caused by: java.lang.NullPointerException
             at be.jcs.agnostic.property.rss.rome.RssFeedGeneratorRome.createFilePath(RssFeedGeneratorRom
            e.java:132)
             at be.jcs.agnostic.property.rss.rome.RssFeedGeneratorRome.createRSSFeed(RssFeedGeneratorRome
            .java:84)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
             at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
             at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor
            .java:63)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedE
            ntityManagerInterceptor.java:54)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
             at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
             ... 63 more
            
            


            This is the line where i use the spring bean and get the null pointer
            be.jcs.agnostic.property.rss.rome.RssFeedGeneratorRome.createFilePath(RssFeedGeneratorRome.java:132
            


            This is how is use the @spring
            /**
             * The configParameters
             */
             @Spring(jndiName="prop", bean="configParams")
             private ConfigParams configParams;


            And the jar is called prop.spring.

            I can find it in the jndi list(jboss jmx console)
            prop
            org.jboss.spring.factory.NamedXmlApplicationContext


            The jboss-spring-jdk5.deployer dir is in my deploy dir.
            Is there anything i have forgotten.


            • 3. Re: Problem spring-deployer and jboss 4.0.4GA
              Ales Justin Master

              Did you fix ejb3-annotations-aop.xml?

              • 4. Re: Problem spring-deployer and jboss 4.0.4GA
                Ales Justin Master

                Or are you using Interceptors?

                • 5. Re: Problem spring-deployer and jboss 4.0.4GA
                  Tim Vandeplas Newbie

                  It works great now.
                  I forgot the

                  <bind pointcut="execution(*->new(..))">
                   <interceptor-ref name="org.jboss.spring.interceptor.SpringInjectionInterceptor"/>
                  </bind>


                  in the ejb3-interceptors-aop.xml.

                  Sorry that I wasted your time with this stupid mistake.