CSJCurrent en:Java 9+ support

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche



ClassNotFoundException: javax.xml.ws.WebServiceException

The Cryptshare Java API version 5.0.1 supports all Java runtime environments version 8 and higher. Due to structural changes to the runtime environments as of version 9, the following error message may occur:

Exception in thread "main" java.lang.NoClassDefFoundError: javax.xml.ws.WebServiceException
	at com.cryptshare.examples.api.ExampleMain.main(ExampleMain.java:39)
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.WebServiceException
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:769)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1070)
	... 1 more

If this error occurs, please add the following two dependencies to your project, e.g. in the pom.xml. Please note that other versions than 2.3.x are not compatible:

<dependency>
	<groupId>javax.xml.ws</groupId>
	<artifactId>jaxws-api</artifactId>
	<version>2.3.1</version>
</dependency>

<dependency>
	<groupId>com.sun.xml.ws</groupId>
	<artifactId>jaxws-rt</artifactId>
	<version>2.3.7</version>
</dependency>

NoClassDefFoundError: com/sun/jna/platform/win32/Win32Exception

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/platform/win32/Win32Exception
	at com.cryptshare.api.DpApiProtectionService.protect(bk:88)
	at com.cryptshare.api.ProtectedFileStore.persist(wi:113)
	at com.cryptshare.api.Client.saveStore(td:839)
	at com.cryptshare.api.Client.ensureClientIdSet(td:104)
	at com.cryptshare.api.Client.<init>(td:63)
	at com.cryptshare.api.Client.<init>(td:97)
	at com.cryptshare.api.Client.<init>(td:68)
	at com.cryptshare.api.Client.<init>(td:174)
	at com.cryptshare.api.Client.<init>(td:137)
	at com.cryptshare.examples.api.ExampleMain.main(ExampleMain.java:39)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.platform.win32.Win32Exception
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 10 more

If this error occurs, please add the following two dependencies to your project, e.g. in the pom.xml:

<dependency>
	<groupId>net.java.dev.jna</groupId>
	<artifactId>jna</artifactId>
	<version>5.12.1</version>
</dependency>
<dependency>
	<groupId>net.java.dev.jna</groupId>
	<artifactId>jna-platform</artifactId>
	<version>5.12.1</version>
</dependency>