Bitbucket Server does not start - After upgrade due to ClassNotFoundException org.apache.catalina.core.JasperListener

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


症状

Bitbucket Server fails to start after an upgrade. The following message is logged in <Bitbucket Server installation directory>/logs/catalina.out:

29-Sep-2014 18:41:13.721 WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start using conf/server.xml: Error at 

The detailed stack you get will likely differ but here is a possibility:

29-Sep-2014 18:41:13.721 WARNING [main] org.apache.catalina.startup.Catalina.load Catalina.start using conf/server.xml: Error at (11, 69) : org.apache.catalina.core.JasperListener
29-Sep-2014 18:41:13.734 SEVERE [main] org.apache.tomcat.util.digester.Digester.startElement Begin event threw exception
 java.lang.ClassNotFoundException: org.apache.catalina.core.JasperListener
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:116)
    at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1184)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1342)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2770)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1457)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:551)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:613)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

 

原因

This is caused because the server.xml is misconfigured. Older releases of Bitbucket Server used to reference this class like that:

<Listener className="org.apache.catalina.core.JasperListener" />

However, newer releases of Bitbucket Server are shipped with different Tomcat releases and this class is no longer recognised.

ソリューション

You must not simply copy over server.xml from an older Bitbucket Server version while upgrading but instead replay your changes (proxy or connector customisations) onto the server.xml that we ship on the current release as indicated on the upgrade guide.

 

Carefully review the differences between your customised version and the default version and re-apply your custom changes manually to prevent overwriting configuration changes between different versions of Bitbucket Server/Tomcat.


Bitbucket Server 5.0

Bitbucket Server 5.0 以降では、Spring Boot で実行されているアプリケーションとして直接 Tomcat コネクタを設定することができません。

通常の server.xml  設定は、<Bitbucket home directory>/shared/bitbucket.properties での設定が必要なプロパティで置き換えられました。

同様に、web.xml. を設定することもできません。


Please read through Migrate server.xml customizations to bitbucket.properties

 

最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.