]
Tristan Tarrant commented on ISPN-5696:
---------------------------------------
This issue has only fixed the maven dependency. You still need to package the
javax.transaction API jar [1] in your deployment (don't worry a full JTA manager is
unnecessary)
[1]
javax.transaction dependency should be compile
----------------------------------------------
Key: ISPN-5696
URL:
https://issues.jboss.org/browse/ISPN-5696
Project: Infinispan
Issue Type: Feature Request
Components: Build process
Affects Versions: 8.0.0.CR1
Reporter: Galder ZamarreƱo
Assignee: Tristan Tarrant
Priority: Blocker
Fix For: 8.0.0.Final
ISPN-5541 made all javax dependencies provided, including javax.transaction. This
dependency though is needed for building transactional configuration, even if you're
using no transactional configurations. E.g. constructing {{new DefaultCacheManager()}}
without that dependency throws:
{code}
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/transaction/TransactionManager
at
org.infinispan.configuration.cache.TransactionConfiguration.<clinit>(TransactionConfiguration.java:30)
at
org.infinispan.configuration.cache.TransactionConfigurationBuilder.<init>(TransactionConfigurationBuilder.java:37)
at
org.infinispan.configuration.cache.ConfigurationBuilder.<init>(ConfigurationBuilder.java:53)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:213)
at
org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:134)
at
org.infinispan.tutorial.simple.functional.InfinispanFunctional.main(InfinispanFunctional.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: javax.transaction.TransactionManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 11 more
{code}
The quick fix is to reinstate not-provided for {{javax.transaction}}. Longer term, this
dependency should not kick in unless you have a transactional cache configuration.