NoClassDefFoundError when Parsing Custom Bean

Answered

I am currently running the following version:

IntelliJ IDEA 2018.3 EAP (Ultimate Edition)
Build #IU-183.3283.2, built on October 1, 2018
IntelliJ IDEA EAP User
Expiration date: October 31, 2018
JRE: 1.8.0_152-release-1343-b3 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

When I try to parse the jaxrs custom bean in my Spring applicationContext.xml it throws an error dialog showing:

java.lang.NoClassDefFoundError: java/sql/SQLException
 at org.springframework.core.Constants.<init>(Constants.java:67)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.<clinit>(XmlBeanDefinitionReader.java:102)


My namespace declarations are:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">


0
5 comments

Hello Chris,

Don't you use JDK 9/10 to build/run project? Is it possible to provide sample project example for investigation?

 

0

I've tried this on both JDK 9 & 10 with the same results.  I have a minimal project that shows the problem for me, but I don't see how to attach it here.

  (*Chris*)

0

Chris,

Please use https://uploads.services.jetbrains.com/ or FTP: ftp://ftp.intellij.net/.uploads/ (anonymous login, .uploads directory has no permissions to list/download files, only for upload).

 

0

Ok, I just uploaded testbed.zip.  Let me know if you need any other information.

  (*Chris*)

0

Chris,

Thanks! As a workaround you could use 1.8 JDK. I reported issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-200195

0

Please sign in to leave a comment.