Announcement Announcement Module
Collapse
No announcement yet.
jpa inbound adapter with polling Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jpa inbound adapter with polling

    i have the below configuration
    Code:
    <int:channel id="jpaInboundChannel">
            <int:interceptors>
    	         <int:wire-tap channel="logger"/>
    	    </int:interceptors>
        </int:channel>
        <int:channel id="jpaOutboundChannel">
            <int:interceptors>
                 <int:wire-tap channel="logger"/>
            </int:interceptors>
        </int:channel>
        <bean id="entityTransformer" class="a.b.c.PortalOrderTransformer" />
    	<int-jpa:inbound-channel-adapter channel="jpaInboundChannel" 
    	                    entity-manager-factory="entityManagerFactory" 
    	                    auto-startup="true" 
    	                    named-query="ORDER_SYNC_QUERY"
    	                    entity-class="a.b.e.Order">
    	      <int:poller fixed-rate="60000" >
    	       <int:transactional propagation="REQUIRED" synchronization-factory="syncFactory"/>
    	      </int:poller>
    	</int-jpa:inbound-channel-adapter>
    	<int:transaction-synchronization-factory id="syncFactory">
    	    <int:before-commit expression="@syncProcessor.process(payload)"/>
    	</int:transaction-synchronization-factory>
    
        <bean id="syncProcessor" class="a.b.c.PreCommitProcessor"/>
    
        <int:transformer ref="entityTransformer" method="doTransform" input-channel="jpaInboundChannel"  output-channel="jpaOutboundChannel" />

    it throws me below message in logs

    2013-06-18 19:31:18,130 ERROR msgerrortask-scheduler-9):27 - [Payload=org.springframework.integration.transforme r.MessageTransformationException: failed to transform message][Headers={timestamp=1371564078130, id=4e069421-bc6e-43f2-bc1b-8edb230a4128}]
    2013-06-18 19:31:19,482 ERROR msgerrortask-scheduler-9):27 - [Payload=org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: a.b.c.OrderRelease.orderLines, no session or session was closed][Headers={timestamp=1371564079481, id=85c3f94f-fc91-4c9d-946f-3fa9b5f90614}]

    and the exception is

    SEVERE: failed to lazily initialize a collection of role: a.b.c.OrderRelease.orderLines, no session or session was closed
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: a.b.c.OrderRelease.orderLines, no session or session was closed


    can any one help me on this?

  • #2
    Please attach a TRACE level log, starting with the poll and ending with a full stack trace of the exception.

    Comment

    Working...
    X