You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Senguttuvan, Gopalakrishnan (CWM-NR)" <go...@rbccm.com> on 2022/03/25 16:13:13 UTC

Migration JDK11 - Tomcat 9 - NoClassDefFoundError: java/sql/Statement

Hi Team,

We are migrating our application from JDK8 to JDK11 (RedHat OpenJDK11).
Modified the JAVA_HOME to JDK11 path.
Currently we are using Tomcat version 9. (It is working fine with JDK8).
Since the JDK11 won't support the JAVA_ENDORSED_DIRS, so I have removed the "-Djava.endorsed.dirs" in catalina.sh.

Once removed endorsed entry, got the below exception while start the application:
java.lang.NoClassDefFoundError: java/sql/Statement
                at java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.close(UTF8Reader.java)
                at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.closeReaders(XMLEntityManager.java:1452)
                at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.cleanup(XML11Configuration.java:803)
                at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:844)
                at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
                at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
                at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
                at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1517)
                at org.apache.catalina.startup.Catalina.parseServerXml(Catalina.java:584)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:675)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:712)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302)
                at org.apache.catalina.startup.Bootstrap.mainStatement(Bootstrap.java:472)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: java/sql/Statement
                at java.base/java.io.PrintWriter.close(PrintWriter.java)
                at org.apache.juli.FileHandler.closeWriter(FileHandler.java:339)
                at org.apache.juli.FileHandler.close(FileHandler.java:327)
                at org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManager.java:397)
                at org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.java:376)
                at org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManager.java:80)


Kindly help us to resolve this issue and let me know if you need any further details.




Regards,
Gopalakrishnan S


______________________________________________________________________ This email is intended only for the use of the individual(s) to whom it is addressed and may be privileged and confidential. Unauthorised use or disclosure is prohibited. If you receive this e-mail in error, please advise immediately and delete the original message. This message may have been altered without your or our knowledge and the sender does not accept any liability for any errors or omissions in the message. Emails are monitored by supervisory personnel in jurisdictions where monitoring is permitted. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. Please see link for RBCCM disclosures. https://www.rbccm.com/rbccm/policies-disclaimers.page

Re: Migration JDK11 - Tomcat 9 - NoClassDefFoundError: java/sql/Statement

Posted by Rob Sargent <rs...@xmission.com>.

On 3/29/22 10:54, Senguttuvan, Gopalakrishnan (CWM-NR) wrote:
> Hi Thomas,
>
> Thanks for the response.
> This issue occurred when I have start the Tomcat server in Linux-QA machine.
>
>
> Regards,
> Gopalakrishnan S
>
>
Double check your runtime environment - something there is out of whack 
I suspect.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Migration JDK11 - Tomcat 9 - NoClassDefFoundError: java/sql/Statement

Posted by "Senguttuvan, Gopalakrishnan (CWM-NR)" <go...@rbccm.com>.
Hi Thomas,

Thanks for the response.
This issue occurred when I have start the Tomcat server in Linux-QA machine.


Regards,
Gopalakrishnan S

-----Original Message-----


From: Thomas Hoffmann (Speed4Trade GmbH) [mailto:Thomas.Hoffmann@speed4trade.com.INVALID] 
Sent: March 26, 22 1:39 AM
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: AW: Migration JDK11 - Tomcat 9 - NoClassDefFoundError: java/sql/Statement

[External]<https://connect.fg.rbc.com/community/techhub/external-email-indicator>

Hello,
does this error show up in IntelliJ ?
Seems like there is a bug in IntelliJ:
https://stackoverflow.com/questions/52981800/getting-noclassfoundexception-java-sql-sqlexception-in-intellij-idea-for-jdk-1

java.sql.statement is shipped with Java 11.

Greetings,
Thomsa

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

> -----Ursprüngliche Nachricht-----
> Von: Senguttuvan, Gopalakrishnan (CWM-NR) 
> <go...@rbccm.com>
> Gesendet: Freitag, 25. März 2022 17:13
> An: users@tomcat.apache.org
> Betreff: Migration JDK11 - Tomcat 9 - NoClassDefFoundError:
> java/sql/Statement
>
> Hi Team,
>
> We are migrating our application from JDK8 to JDK11 (RedHat OpenJDK11).
> Modified the JAVA_HOME to JDK11 path.
> Currently we are using Tomcat version 9. (It is working fine with JDK8).
> Since the JDK11 won't support the JAVA_ENDORSED_DIRS, so I have 
> removed the "-Djava.endorsed.dirs" in catalina.sh.
>
> Once removed endorsed entry, got the below exception while start the
> application:
> java.lang.NoClassDefFoundError: java/sql/Statement
>                 at
> java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.close(U
> TF
> 8Reader.java)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.clos
> eR
> eaders(XMLEntityManager.java:1452)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration
> .cl
> eanup(XML11Configuration.java:803)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration
> .p
> arse(XML11Configuration.java:844)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XM
> L
> Parser.java:141)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.
> par
> se(AbstractSAXParser.java:1216)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAX
> P
> arser.parse(SAXParserImpl.java:635)
>                 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1517)
>                 at
> org.apache.catalina.startup.Catalina.parseServerXml(Catalina.java:584)
>                 at org.apache.catalina.startup.Catalina.load(Catalina.java:675)
>                 at org.apache.catalina.startup.Catalina.load(Catalina.java:712)
>                 at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                 at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeM
> et
> hodAccessorImpl.java:62)
>                 at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
> ega
> tingMethodAccessorImpl.java:43)
>                 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>                 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302)
>                 at
> org.apache.catalina.startup.Bootstrap.mainStatement(Bootstrap.java:472
> ) Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> java/sql/Statement
>                 at java.base/java.io.PrintWriter.close(PrintWriter.java)
>                 at org.apache.juli.FileHandler.closeWriter(FileHandler.java:339)
>                 at org.apache.juli.FileHandler.close(FileHandler.java:327)
>                 at
> org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManag
> er.java:397)
>                 at
> org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.j
> ava:376)
>                 at
> org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManage
> r.java:80)
>
>
> Kindly help us to resolve this issue and let me know if you need any 
> further details.
>
>
>
>
> Regards,
> Gopalakrishnan S
>

______________________________________________________________________ This email is intended only for the use of the individual(s) to whom it is addressed and may be privileged and confidential. Unauthorised use or disclosure is prohibited. If you receive this e-mail in error, please advise immediately and delete the original message. This message may have been altered without your or our knowledge and the sender does not accept any liability for any errors or omissions in the message. Emails are monitored by supervisory personnel in jurisdictions where monitoring is permitted. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. Please see link for RBCCM disclosures. https://www.rbccm.com/rbccm/policies-disclaimers.page


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


AW: Migration JDK11 - Tomcat 9 - NoClassDefFoundError: java/sql/Statement

Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.

> -----Ursprüngliche Nachricht-----
> Von: Senguttuvan, Gopalakrishnan (CWM-NR)
> <go...@rbccm.com>
> Gesendet: Freitag, 25. März 2022 17:13
> An: users@tomcat.apache.org
> Betreff: Migration JDK11 - Tomcat 9 - NoClassDefFoundError:
> java/sql/Statement
> 
> Hi Team,
> 
> We are migrating our application from JDK8 to JDK11 (RedHat OpenJDK11).
> Modified the JAVA_HOME to JDK11 path.
> Currently we are using Tomcat version 9. (It is working fine with JDK8).
> Since the JDK11 won't support the JAVA_ENDORSED_DIRS, so I have
> removed the "-Djava.endorsed.dirs" in catalina.sh.
> 
> Once removed endorsed entry, got the below exception while start the
> application:
> java.lang.NoClassDefFoundError: java/sql/Statement
>                 at
> java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.close(UTF
> 8Reader.java)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.closeR
> eaders(XMLEntityManager.java:1452)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.cl
> eanup(XML11Configuration.java:803)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.p
> arse(XML11Configuration.java:844)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XML
> Parser.java:141)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.par
> se(AbstractSAXParser.java:1216)
>                 at
> java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXP
> arser.parse(SAXParserImpl.java:635)
>                 at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1517)
>                 at
> org.apache.catalina.startup.Catalina.parseServerXml(Catalina.java:584)
>                 at org.apache.catalina.startup.Catalina.load(Catalina.java:675)
>                 at org.apache.catalina.startup.Catalina.load(Catalina.java:712)
>                 at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>                 at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMet
> hodAccessorImpl.java:62)
>                 at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Delega
> tingMethodAccessorImpl.java:43)
>                 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>                 at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:302)
>                 at
> org.apache.catalina.startup.Bootstrap.mainStatement(Bootstrap.java:472)
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> java/sql/Statement
>                 at java.base/java.io.PrintWriter.close(PrintWriter.java)
>                 at org.apache.juli.FileHandler.closeWriter(FileHandler.java:339)
>                 at org.apache.juli.FileHandler.close(FileHandler.java:327)
>                 at
> org.apache.juli.ClassLoaderLogManager.resetLoggers(ClassLoaderLogManag
> er.java:397)
>                 at
> org.apache.juli.ClassLoaderLogManager.shutdown(ClassLoaderLogManager.j
> ava:376)
>                 at
> org.apache.juli.ClassLoaderLogManager$Cleaner.run(ClassLoaderLogManage
> r.java:80)
> 
> 
> Kindly help us to resolve this issue and let me know if you need any further
> details.
> 
> 
> 
> 
> Regards,
> Gopalakrishnan S
> 

Hello,
does this error show up in IntelliJ ?
Seems like there is a bug in IntelliJ:
https://stackoverflow.com/questions/52981800/getting-noclassfoundexception-java-sql-sqlexception-in-intellij-idea-for-jdk-1

java.sql.statement is shipped with Java 11.

Greetings,
Thomsa

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org