Announcement Announcement Module
Collapse
No announcement yet.
using SimpleMessageStore as queue for channel throws java.lang.InstantiationException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • using SimpleMessageStore as queue for channel throws java.lang.InstantiationException

    for channel defind queue with message-store as SimpleMessageStore...
    But this is resulting in below exception...


    11 Nov 2011 07:48:32 DEBUG [main] beans.TypeConverterDelegate - Cannot create copy of Collection type [org.springframework.integration.store.MessageGroup Queue] - injecting original Collection as-is

    java.lang.InstantiationException: java.util.concurrent.BlockingQueue

    at java.lang.Class.newInstance0(Class.java:340)

    at java.lang.Class.newInstance(Class.java:308)

    at org.springframework.beans.TypeConverterDelegate.co nvertToTypedCollection(TypeConverterDelegate.java: 502)

    at org.springframework.beans.TypeConverterDelegate.co nvertIfNecessary(TypeConverterDelegate.java:173)

    at org.springframework.beans.TypeConverterDelegate.co nvertIfNecessary(TypeConverterDelegate.java:93)

    at org.springframework.beans.BeanWrapperImpl.convertI fNecessary(BeanWrapperImpl.java:428)

    at org.springframework.beans.factory.support.Construc torResolver.createArgumentArray(ConstructorResolve r.java:686)

    at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:196)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:1003)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:907)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:485)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)

    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)

    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)

    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )

    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)

    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:322)

    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:106)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1325)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1086)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)

    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)

    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)

    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)

    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )

    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)

    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:580)

    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)

    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)

    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:276)

    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)

    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)

    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3827)

    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4334)

    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:791)

    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:771)


    Following is the config used...

    <si:channel id="CNJ_REGULATORY_CATEGORY_CHANNEL_CJ">
    <si:queue message-store="messageStoreCJ"/>
    </si:channel>

    <bean id="messageStoreCJ" class="org.springframework.integration.store.Simpl eMessageStore" >
    </bean>

    Pls let me know how to resolve this...

    Thanks...
    Hima Bindu

  • #2
    I'll look at this in a minute, but quick question. Why are you injecting SimpleMessageStore explicitly if it is the default one that will be used by QueueChannel anyway?

    Comment


    • #3
      You must be doing something else since I just tried it and it works fine:
      Code:
      <int:channel id="input">
      		<int:queue message-store="ms"/>
      	</int:channel>
      
      	<bean id="ms" class="org.springframework.integration.store.SimpleMessageStore"/>
      Also, what version of SI you are using?

      Comment


      • #4
        Hi oleg zhurakousky,

        rite now as guided by you....shown below..
        Code:
        <int:channel id="input">
        		<int:queue message-store="ms"/>
        	</int:channel>
        
        	<bean id="ms" class="org.springframework.integration.store.SimpleMessageStore"/>
        so in this you are trying to guide that there is a channel named input which is a pollable channel but in the queue section instead of specifying the capacity in integer , you have specified the message store reference so the data inside the queue will bbe stored in message store ...this what you are trying to guide...please advise..!!Thanks in advance...!!

        Comment


        • #5
          @Saral

          As stated before, I can guarantee that you'll find your answer here: http://static.springsource.org/sprin...ce/htmlsingle/

          Comment


          • #6
            Originally posted by oleg.zhurakousky View Post
            @Saral

            As stated before, I can guarantee that you'll find your answer here: http://static.springsource.org/sprin...ce/htmlsingle/
            Hi Oleg,

            thanks for the guidance but I request if you could explain a little bit..I will be really grateful to you, it would make my understandings more clear..!! thanks in advance..!!

            Comment


            • #7
              I need to do some changes in some methods of SimpleMessageStore, since that was throwing above exception, I tried with SimpleMessageStore.. But this is also throwing the same exception..

              Comment


              • #8
                What changes? Can you describe them? Perhaps the changes you have made have triggered this error and until we know what they are we can't answer them.
                I've tested it against the SimpleMessageStore that comes with the framework and it works fine.

                Comment


                • #9
                  What changes? Can you describe them? Perhaps the changes you have made have triggered this error and until we know what they are we can't answer them.
                  I've tested it against the SimpleMessageStore that comes with the framework and it works fine.

                  Comment


                  • #10
                    Originally posted by SARAL SAXENA View Post
                    Hi oleg zhurakousky,

                    rite now as guided by you....shown below..
                    Code:
                    <int:channel id="input">
                    		<int:queue message-store="ms"/>
                    	</int:channel>
                    
                    	<bean id="ms" class="org.springframework.integration.store.SimpleMessageStore"/>
                    so in this you are trying to guide that there is a channel named input which is a pollable channel but in the queue section instead of specifying the capacity in integer , you have specified the message store reference so the data inside the queue will bbe stored in message store ...this what you are trying to guide...please advise..!!Thanks in advance...!!
                    please guide ...!!

                    Comment


                    • #11
                      Since I'm not at the sytem in which I tried, I'm not sure about the exact version, but it would be latest jar only..
                      Tomorrow morning when I'm back to office I'll give the exact version...
                      attaching the complete config file applicationContext_ris.xml which I'm using

                      Initially I tried to use EhCachemessageStore defined by us, but later removed tht and used SimpleMessageStore...

                      Comment


                      • #12
                        There is a lot going on in your file which is hard for me to decipher without the context, so I would suggest to strip it down to a bare minimum (a configuration i sent earier) and you will see that it will work and than start adding things.

                        Comment

                        Working...
                        X