[
https://issues.apache.org/jira/browse/TUSCANY-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837732#action_12837732
]
Simon Nash commented on TUSCANY-3461:
-------------------------------------
There are two problems that are causing this launcher to fail.
1) The ODE runtime requires the ode-dao-jpa-ojpa-xxx.zip file to be unzipped
before running ODE. In the Tuscany SCA 1.6 binary distribution this file is
zipped. This is the cause of the stack trace in the issue description.
2) The Tuscany implementation-bpel-ode module requires BPEL process definition
files to be in a file system directory contribution and doesn't work if they
are in a jar file contribution. Fixing problem 1) exposes this problem because
the payment-bpel contribution is a jar contribution which contains the
payment.bpel file.
The proposed solutions for the travel sample are as follows:
1) Remove ode-dao-jpa-ojpa-1.1.1.zip file from the
scatours-launcher-payment-bpel.jar file. Instead, add an unzipped copy of the
contents of this file to the "target/classes" directory in the ant build and to
a new directory "ode" in the travel sample binary distribution. Also modify
the maven build for scatours-launcher-payment-bpel.jar to add the "ode"
directory to the jar file manifest classpath. This is consistent with the
principle that the travel sample should package all dependencies not provided
by the Tuscany SCA 1.6 binary distribution.
In a future Tuscany SCA 1.x release it would be good to consider whether it
makes sense to package ode-dao-jpa-ojpa-1.1.1.zip in its unzipped form so that
this can be used directly by the travel sample.
2) Refactor the payment-bpel contribution to move the payment.bpel file into a
new contribution payment-bpel-process which is implemented as a file system
directory contribution instead of a jar contribution. The rest of the code in
the payment-bpel contribution remains unchanged, and the payment-bpel
contribution remains a jar contribution. This solution is the smallest change
to the current travel sample packaging that allows the travel sample to work
with Tuscany SCA 1.6.
In a future Tuscany SCA 1.x release it would be good to consider whether it
makes sense to change the implementation-bpel-ode module to allow jar
contributions to contain BPEL process definitions.
> Travel sample launcher for payment-bpel gets runtime errors
> -----------------------------------------------------------
>
> Key: TUSCANY-3461
> URL: https://issues.apache.org/jira/browse/TUSCANY-3461
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Travel Sample
> Reporter: Simon Nash
> Assignee: Simon Nash
>
> With the fix for TUSCANY-3460, the launcher for payment-bpel gets runtime
> errors when run from the development build using "ant run" and when run from
> the distribution using "java -jar".
> The following output is from the distribution. The output from the
> development build is similar.
> E:\td\book\ts4\travelsample\distribution\target\apache-tuscany-scatours-1.0-SNAP
> SHOT\tuscany-scatours-1.0-SNAPSHOT\launchers>java -jar
> scatours-launcher-payment
> -bpel.jar
> 10-Feb-2010 08:59:06 org.apache.tuscany.sca.node.impl.NodeImpl <init>
> INFO: Creating node: null
> 10-Feb-2010 08:59:07 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading contribution:
> file:/E:/td/book/ts4/travelsample/distribution/targe
> t/apache-tuscany-scatours-1.0-SNAPSHOT/tuscany-scatours-1.0-SNAPSHOT/launchers/.
> ./contributions/scatours-contribution-payment-bpel.jar
> 10-Feb-2010 08:59:08 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading contribution:
> file:/E:/td/book/ts4/travelsample/distribution/targe
> t/apache-tuscany-scatours-1.0-SNAPSHOT/tuscany-scatours-1.0-SNAPSHOT/launchers/.
> ./contributions/scatours-contribution-creditcard-payment-jaxb.jar
> 10-Feb-2010 08:59:08 org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading contribution:
> file:/E:/td/book/ts4/travelsample/distribution/targe
> t/apache-tuscany-scatours-1.0-SNAPSHOT/tuscany-scatours-1.0-SNAPSHOT/launchers/.
> ./contributions/scatours-contribution-emailgateway.jar
> 10-Feb-2010 08:59:08 org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: null
> - Using embedded Geronimo transaction manager
> 10-Feb-2010 08:59:09 org.apache.tuscany.sca.http.jetty.JettyServer
> addServletMap
> ping
> INFO: Added Servlet mapping: http://GrosMorne:8080/Payment
> - Starting Payment
> - Using Embedded Derby:
> jdbc:derby:file:\E:\td\book\ts4\travelsample\distributio
> n\target\apache-tuscany-scatours-1.0-SNAPSHOT\tuscany-scatours-1.0-SNAPSHOT\laun
> chers\scatours-launcher-payment-bpel.jar!/jpadb
> - Using DAO Connection Factory class
> org.apache.ode.dao.jpa.BPELDAOConnectionFac
> toryImpl.
> Exception in thread "main" java.lang.RuntimeException: BPEl Component Type
> Imple
> mentation initialization failure : null
> at
> org.apache.tuscany.sca.implementation.bpel.ode.provider.BPELImplement
> ationProvider.start(BPELImplementationProvider.java:124)
> at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(Com
> positeActivatorImpl.java:644)
> at
> org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(Com
> positeActivatorImpl.java:560)
> at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:728)
> at scatours.payment.PaymentLauncher.main(PaymentLauncher.java:37)
> Caused by: java.lang.NullPointerException
> at
> org.tranql.connector.jdbc.ConnectionHandle.getMetaData(ConnectionHand
> le.java:321)
> at
> org.apache.ode.scheduler.simple.JdbcDelegate.guessDialect(JdbcDelegat
> e.java:290)
> at
> org.apache.ode.scheduler.simple.JdbcDelegate.<init>(JdbcDelegate.java
> :78)
> at
> org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer.crea
> teScheduler(EmbeddedODEServer.java:224)
> at
> org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer.init
> BpelServer(EmbeddedODEServer.java:155)
> at
> org.apache.tuscany.sca.implementation.bpel.ode.EmbeddedODEServer.init
> (EmbeddedODEServer.java:105)
> at
> org.apache.tuscany.sca.implementation.bpel.ode.provider.BPELImplement
> ationProvider.start(BPELImplementationProvider.java:95)
> ... 4 more
> Exception in thread "Thread-1" java.lang.IllegalStateException: Shutdown in
> prog
> ress
> at java.lang.ApplicationShutdownHooks.remove(Unknown Source)
> at java.lang.Runtime.removeShutdownHook(Unknown Source)
> at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(T
> uscanyListenerManager.java:87)
> at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager$Listen
> erManagerShutdownThread.run(TuscanyListenerManager.java:100)
> java.lang.IllegalStateException: Shutdown in progress
> at java.lang.ApplicationShutdownHooks.remove(Unknown Source)
> at java.lang.Runtime.removeShutdownHook(Unknown Source)
> at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListenerManager.stop(T
> uscanyListenerManager.java:87)
> at
> org.apache.axis2.context.ConfigurationContext.terminate(Configuration
> Context.java:744)
> at
> org.apache.axis2.transport.http.AxisServlet.destroy(AxisServlet.java:
> 465)
> at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.destroy(A
> xis2ServiceServlet.java:295)
> at
> org.mortbay.jetty.servlet.ServletHolder.destroyInstance(ServletHolder
> .java:315)
> at
> org.mortbay.jetty.servlet.ServletHolder.doStop(ServletHolder.java:286
> )
> at
> org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:6
> 5)
> at
> org.mortbay.jetty.servlet.ServletHandler.doStop(ServletHandler.java:1
> 70)
> at
> org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:6
> 5)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:1
> 29)
> at
> org.mortbay.jetty.servlet.SessionHandler.doStop(SessionHandler.java:1
> 24)
> at
> org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:6
> 5)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:1
> 29)
> at
> org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:5
> 66)
> at
> org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:6
> 5)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:1
> 29)
> at org.mortbay.jetty.Server.doStop(Server.java:281)
> at
> org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:6
> 5)
> at org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)
> E:\td\book\ts4\travelsample\distribution\target\apache-tuscany-scatours-1.0-SNAP
> SHOT\tuscany-scatours-1.0-SNAPSHOT\launchers>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.