OHDSI Home | Forums | Wiki | Github

Java error with cpt4.jar from athena

just joined the forum so all of this is very new to me but not being a java guy i am reaching out to the community on this one

java -jar cpt4.jar 5
Exception in thread “main” java.lang.IllegalAccessError: superclass access check failed: class com.sun.xml.ws.util.xml.XmlUtil$1 (in unnamed module @0x747ddf94) cannot access class com.sun.org.apache.xml.internal.resolver.CatalogManager (in module java.xml) because module java.xml does not export com.sun.org.apache.xml.internal.resolver to unnamed module @0x747ddf94

thanks
ed

@ebierly: Is this resolved for you?

When I try to run cpt4.jar in the Athena download I get the following error.

Error: Unable to initialize main class org.odhsi.utils.cpt.Application
Caused by: java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceException

Here is my java version information:

openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
1 Like

@Christian_Reich: I also ran into this same issue. It seems that the particular libraries used by cpt4.jar require Java10 or under as distributed by Oracle. According to the interwebs… (a) Java 11 removed the support for java.xml.bind – which defines the Java Architecture for XML Binding (JAXB) API, and (b) Java10 is no longer supported, so it is now removed from Oracle’s distribution servers. It seems that Oracle has also changed their licensing and download locations which has pretty much shutdown any normal way of getting and updating their version of Java. I’m not even remotely familiar with the Java ecosystem, so I’m unable to help in this particular case. It might be possible to manually install Java 8…

$ java -jar cpt4.jar 5
Error: Unable to initialize main class org.odhsi.utils.cpt.Application                                                                            
Caused by: java.lang.NoClassDefFoundError: javax/xml/ws/WebServiceException                                                                       

Here is my information as well,

$ lsb_release -a                            
No LSB modules are available.                                           
Distributor ID: Ubuntu                                                  
Description:    Ubuntu 18.04.2 LTS                                      
Release:        18.04                                                   
Codename:       bionic                                                  
$ java --version
openjdk 11.0.3 2019-04-16                                               
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)     
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)

So, I’ve worked around it by making the description be a function of the CPT code and the type. It’s ugly as sin, but it works for my purposes… for now.

t