Hello, that xml file is embedded in catalina.jar, so obviously I have not modified it:
jar:file:/C:/Tomcat/tomcat_home/lib/catalina.jar!/org/apache/catalina/mbeans/mbeans-descriptors.xml It does not prevent Tomcat startup. It only prevents me from finding the NullPointerException in my application startup. But because NullPointerException is always a bug, I was thinking that someone might be interested. You already have the important stack trace lines in this message, and you can easily reproduce the problem by starting Tomcat in debugger and having breakpoint in NullPointerException. -Harri -----Original Message----- From: Christopher Schultz <ch...@christopherschultz.net> Sent: maanantai 14. maaliskuuta 2022 16.36 To: users@tomcat.apache.org Subject: Re: NullPointerException in Tomcat startup while parsing XML configuration file Harri, On 3/14/22 10:23, Harri Pesonen wrote: > Hello, I don't know if this is interesting, but while I started Tomcat > in IDEA debugger, when I had breakpoint set to NullPointerException (so that > it breaks on all of them), then it break here: > > org\apache\tomcat\tomcat-util\8.5.75\tomcat-util-8.5.75.jar!\org\apach > e\tomcat\util\IntrospectionUtils.class > > public static String replaceProperties(String value, Hashtable<Object, > Object> staticProp, IntrospectionUtils.PropertySource[] dynamicProp, > ClassLoader classLoader) { > if (value.indexOf(36) < 0) { > > "value" is null. > > A bit more up in stack trace, it is here: > > org\apache\tomcat\tomcat-util-scan\8.5.75\tomcat-util-scan-8.5.75.jar! > \org\apache\tomcat\util\digester\Digester.class > > public InputSource resolveEntity(String name, String publicId, String > baseURI, String systemId) throws SAXException, IOException { > name = this.replace(name); > > "name" is null. > > One more up: > > java.xml\com\sun\org\apache\xerces\internal\util\EntityResolver2Wrappe > r.java > > String name = null; > if (resourceIdentifier instanceof XMLDTDDescription) { > name = "[dtd]"; > } > else if (resourceIdentifier instanceof XMLEntityDescription) { > name = ((XMLEntityDescription) > resourceIdentifier).getEntityName(); > } > > // When both pubId and sysId are null, the user's entity resolver // > can do nothing about it. We'd better not bother calling it. > // This happens when the resourceIdentifier is a GrammarDescription, > // which describes a schema grammar of some namespace, but without // > any schema location hint. -Sg if (pubId == null && sysId == null) { > return null; > } > > // Resolve using EntityResolver2 > try { > InputSource inputSource = > fEntityResolver.resolveEntity(name, pubId, baseURI, sysId); > > "name" is null. > > It was parsing this: > > jar:file:/C:/Tomcat/tomcat_home/lib/catalina.jar!/org/apache/catalina/ > mbeans/mbeans-descriptors.xml > > So the problem seems to happen in org.apache.xerces XML parser, or in Tomcat. Have you modified the stock mbeans-descriptors.xml file? Does this prevent startup in your environment? If so, please post the full stack trace. If this error is caught and ignored, than there is nothing to do. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org