Unable to execute XmlConfiguration: java.lang.ClassNotFoundException: org.eclipse.jetty.ee8.plus.jndi.Transaction #13045
-
am getting different error while starting jetty server, Error log is as below,
I have all the dependencies in place also I have included the jetty-ee8-plus.jar (org.eclipse.jetty.ee8:jetty-ee8-plus) dependency as well. Still I am facing the issue of classnotfound exception. Also server fails to start after continuous message ".State (now): INIT StateLifeCycleListener@4dfe8b37" on console . Below is my jta.xml, ee8 <New id="tx" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>java:/TransactionManager</Arg>
<Arg>
<New class="com.atomikos.icatch.jta.UserTransactionManager">
</New>
</Arg>
</New> Assistance in this will be great help to me to move forward. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
That looks like it's coming from start.jar, as I can see You cannot reference ee# classes (eg: Transaction entries are typically setup in the webapps directory, associated with that specific webapp. Example: Lets setup a fresh jetty.base with the ee8-demos
There are changes coming to deploy in Jetty 12.1.0 to allow for |
Beta Was this translation helpful? Give feedback.
-
@joakime when I change the jta.xml file as below i.e. using the org.eclipse.jetty.plus.jndi.Transaction class ,
at that time I am getting below exception, 2025-04-24 18:50:19.714:WARN :oejx.XmlConfiguration:main: Config error java.lang.IllegalStateException: No suitable constructor: |???<New class="com.atomikos.icatch.jta.UserTransactionImp"/>|?? on oejs.Server@32bb7ed1{STOPPED}[12.0.17,sto=0] at |???|?? in file:////Project/ProjectDir/project-base/etc/jta.xml I understand the reason is the constructor of the Transaction class is having 2 parameter (Scope and Reference) and I guess due to that it is not able to recognise the parameter com.atomikos.icatch.jta.UserTransactionManager, as it is expecting Reference. Here I am not able to understand how I can pass this UserTransactionManager as a Reference object to the Transaction constructor. |
Beta Was this translation helpful? Give feedback.
-
Here's an example, with a mocked up transaction class from the jetty <New id="tx" class="org.eclipse.jetty.plus.jndi.Transaction">
<Arg><Property name="environment" default="ee8"/></Arg>
<Arg>
<New class="org.example.MockUserTransaction" />
</Arg>
</New> |
Beta Was this translation helpful? Give feedback.
-
we have solved this issue with the incorporation of below configuration,
|
Beta Was this translation helpful? Give feedback.
we have solved this issue with the incorporation of below configuration,