Coder Social home page Coder Social logo

ebms-core's Introduction

ebms-core's People

Contributors

eluinstra avatar wentinkj avatar

Stargazers

 avatar  avatar Eduard Witteveen avatar  avatar Jeroen Steggink avatar  avatar Martin van der Plas avatar

Watchers

Erno Marks avatar

ebms-core's Issues

JTA exception with Atomikos and handling Pong

Hi,

We've come to an issue with receiving an EbMS Pong. The message is received properly, validated and all that, but in the end the client receives an HTTP 500. With some trickery, the following logs could be observed:

org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is com.atomikos.jms.internal.AtomikosTransactionRequiredJMSException: The JMS session you are using requires a JTA transaction context for the calling thread and none was found.
Please correct your code to do one of the following: 
1. start a JTA transaction if you want your JMS operations to be subject to JTA commit/rollback, or
2. create a non-transacted session and do session acknowledgment yourself, or
3. set localTransactionMode to true so connection-level commit/rollback are enabled.
        at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:311) ~[app.jar:?]
        at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:185) ~[app.jar:?]
        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:507) ~[app.jar:?]
        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:584) ~[app.jar:?]
        at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:691) ~[app.jar:?]
        at nl.clockwork.ebms.delivery.JMSDeliveryManager.handleResponseMessage(JMSDeliveryManager.java:100) ~[app.jar:?]
        at nl.clockwork.ebms.delivery.JMSDeliveryManager$$FastClassBySpringCGLIB$$d9519577.invoke(<generated>) ~[app.jar:?]
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[app.jar:?]
        at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386) ~[app.jar:?]
        at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85) ~[app.jar:?]
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704) ~[app.jar:?]
        at nl.clockwork.ebms.delivery.JMSDeliveryManager$$EnhancerBySpringCGLIB$$2a7a12f.handleResponseMessage(<generated>) ~[app.jar:?]
        at nl.clockwork.ebms.processor.PongProcessor.processPong(PongProcessor.java:72) ~[app.jar:?]
        at nl.clockwork.ebms.processor.EbMSMessageProcessor.processRequest(EbMSMessageProcessor.java:210) ~[app.jar:?]
        at nl.clockwork.ebms.processor.EbMSMessageProcessor.processRequest(EbMSMessageProcessor.java:155) ~[app.jar:?]
        at nl.clockwork.ebms.server.EbMSInputStreamHandler.handleRequest(EbMSInputStreamHandler.java:101) ~[app.jar:?]
        at nl.clockwork.ebms.server.EbMSInputStreamHandler.handle(EbMSInputStreamHandler.java:62) ~[app.jar:?]
        at nl.clockwork.ebms.server.EbMSHttpHandler.handle(EbMSHttpHandler.java:103) ~[app.jar:?]
        at nl.clockwork.ebms.server.servlet.EbMSServlet.service(EbMSServlet.java:53) ~[app.jar:?]

I was able to reproduce this, using this fork.

Steps to reproduce:

  1. Clone https://github.com/krpors/ebms-core and checkout dev-2.19.x
  2. Run PostgreSQL: docker run --name some-postgres -e POSTGRES_PASSWORD=ebms -e POSTGRES_USER=ebms -p 5432:5432 -d postgres
  3. Load any CPA into the database
  4. Run the EbMS Server from my branch. I used nl/clockwork/ebms/EbMSServer.java.
  5. Change the From and To PartyIds in ./debugging/pong.xml, according to the CPA
  6. Execute the ./debugging/send_pong.sh

The JMSDeliveryManager should output the stacktrace above.

Possible fix

I was able to fix the error by making two changes:

  1. In JMSConfig.java, change result.setLocalTransactionMode(false); to result.setLocalTransactionMode(true);
  2. In /src/test/resources/nl/clockwork/ebms/default.properties, I changed the JMS broker URL to include an extra property as follows: jms.brokerURL=vm://localhost?jms.xaAckMode=1. This is according to this JIRA issue.

I am unaware though if the above fix is a proper one, since the ConnectionFactory is used in other places.

Any thoughts? Thanks!

Clarification Request ebMS core element name updates

We have been working with the ebMS core code for awhile, but have refrained from upgrading because of the element name updates. For example, an element like "InsertCPA" has been renamed to "insertCPA"

This is, in our case, introducing breaking changes for any user that tries to send a request for "InsertCPA" since it doesn't comply with a schema anymore.
What is the best way forward for upgrading, but retaining backwards compatibility? Our 600+ suppliers that make use of the Digikoppeling connections we have take a long time to upgrade, so this is a change that has a lot of impact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.