Hi Chris,

this looks to me like a Java 11 issue due to the removal of packages by the
Java itself.
With version 9, multiple packages were marked deprecated, and removed with
11.
The javax.xml.bind stuff is one of them, you need to add a dependency
manually.

https://crunchify.com/java-11-and-javax-xml-bind-jaxbcontext/

https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception

Hope this helps!

Ben

On Fri, May 7, 2021 at 8:23 AM Christopher Dodunski (Tapestry) <
chrisfromtapes...@christopher.net.nz> wrote:

> Hi team,
>
> I have moved to upgrade a Tapestry webapp from version 5.4.3 to version
> 5.6.4, after first checking the page below for known compatibility
> issues.
>
>
> https://cwiki.apache.org/confluence/display/TAPESTRY/Supported+Environments+and+Versions
>
> Reportedly, Tapestry 5.6.4 is compatible with...
>
>      Java 8-14 (my app was compiled on Oracle 1.8.0, deployed on OpenJDK
> 13.0.1)
>
>      Hibernate 5.1.0.Final (I updated the POM accordingly)
>
> However, when I deploy to Tomcat the app fails to launch (error output
> below).
>
> In case it matters, this app also has these dependencies...
>
>          <!-- Hibernate c3p0 connection pool -->
>          <dependency>
>              <groupId>org.hibernate</groupId>
>              <artifactId>hibernate-c3p0</artifactId>
>              <version>${hibernate-release-version}</version>
>          </dependency>
>
>          <!-- Include the Log4j implementation for the SLF4J logging
> framework -->
>          <dependency>
>              <groupId>org.slf4j</groupId>
>              <artifactId>slf4j-log4j12</artifactId>
>              <version>1.7.30</version>
>          </dependency>
>
> I'd appreciate it if someone could shine some light on what is
> presumably a compatibility issue.
>
> 07-05-2021 17:46:25 ERROR Registry:208 - Error invoking constructor
> public
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List):
>
> javax/xml/bind/JAXBException
> 07-05-2021 17:46:25 ERROR Registry:209 - Operations trace:
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 1] Invoking startup method
> com.optomus.harbour.dal.DataModule.initialize().
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 2] Instantiating service
> HibernateSessionManager implementation via
> org.apache.tapestry5.hibernate.modules.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource,
>
> PerthreadManag
> er) (at HibernateCoreModule.java:96)
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 3] Constructing service
> implementation via
> org.apache.tapestry5.hibernate.modules.HibernateCoreModule.buildHibernateSessionManager(HibernateSessionSource,
>
> PerthreadManager) (at HibernateCoreModu
> le.java:96)
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 4] Realizing service
> HibernateSessionSource
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 5] Instantiating service
> HibernateSessionSource implementation via
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(Logger,
> List) (at HibernateSessionSourceImpl.java:36) via or
> g.apache.tapestry5.hibernate.modules.HibernateCoreModule.bind(ServiceBinder)
>
> (at HibernateCoreModule.java:43)
> 07-05-2021 17:46:25 ERROR Registry:218 - [ 6] Invoking constructor
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(Logger,
> List) (at HibernateSessionSourceImpl.java:36) via
> org.apache.tapestry5.hibernate.modules.Hibern
> ateCoreModule.bind(ServiceBinder) (at HibernateCoreModule.java:43) (for
> service 'HibernateSessionSource')
> 07-05-2021 17:46:25 ERROR HibernateSessionSource:65 - Construction of
> service HibernateSessionSource failed: Error invoking constructor public
>
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.
> List): javax/xml/bind/JAXBException
> org.apache.tapestry5.ioc.internal.OperationException: Error invoking
> constructor public
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List):
>
> javax/xml/bind/JAXBException
>          at
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:186)
>          at
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90)
>          at
>
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
> ...
> Caused by: java.lang.RuntimeException: Error invoking constructor public
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List):
>
> javax/xml/bind/JAXBException
>          at
>
> org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:59)
> ...
> Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
>          at
>
> org.hibernate.boot.spi.XmlMappingBinderAccess.<init>(XmlMappingBinderAccess.java:43)
> ...
> Caused by: java.lang.ClassNotFoundException:
> javax.xml.bind.JAXBException
>          at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
> ...
> 07-05-2021 17:46:25 ERROR HibernateSessionSource:65 - Construction of
> service HibernateSessionSource failed: Error invoking constructor public
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List):
>
> javax/xml/bind/JAXBException
> java.lang.RuntimeException: Error invoking constructor public
> org.apache.tapestry5.internal.hibernate.HibernateSessionSourceImpl(org.slf4j.Logger,java.util.List):
>
> javax/xml/bind/JAXBException
>          at
>
> org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:59)
> ...
> Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
>          at
>
> org.hibernate.boot.spi.XmlMappingBinderAccess.<init>(XmlMappingBinderAccess.java:43)
> ...
> Caused by: java.lang.ClassNotFoundException:
> javax.xml.bind.JAXBException
>          at
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
>
> Regards,
>
> Chris.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to