cancel
Showing results for 
Search instead for 
Did you mean: 

Hyland Java library - No Class found issue

Bill_Miller1
Champ on-the-rise
Champ on-the-rise

I recently (like in this last fall) downloaded the Java Unity API library and I am finally starting to convert my .Net implementation/version over to Java


However I seem to be having some issues, and was wondering what additional documentation could be available to help ensure I have all the necessary dependencies in my class path. Currently getting the below error when running a quick test trying to connect.


Essentially testing this line of code to ensure all is good.

@Testpublic void testAuth() {  Application application = Application.Connect(authProps);  Assert.assertTrue(application.getIsConnected());}


Using java 1.8 with maven, so have the following in my POM to pull in the jars


<dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-types</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Types.jar</systemPath></dependency><dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-unity</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Unity-16.0.2.71.jar</systemPath></dependency>

If any further instructions or readme that might help I'd greatly appreciate, I didn't see anything in the documentation other than class/package information.

Thanks

-------

java.lang.NoClassDefFoundError: org/dom4j/DocumentException


at Hyland.Unity.AuthenticationProperties.getServiceClientToUse(AuthenticationProperties.java:33)

at Hyland.Unity.AuthenticationProperties.verifyServiceClientToUseIsNotNull(AuthenticationProperties.java:280)

at Hyland.Unity.OnBaseAuthenticationProperties.ConnectAndGetDefaultApplicationOption(OnBaseAuthenticationProperties.java:136)

at Hyland.Unity.Application.Connect(Application.java:661)

at org.spectrumhealth.ws.enterprise.onbaseapi.pool.OnbaseConnectionFactoryTest.testAuth(OnbaseConnectionFactoryTest.java:54)

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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)

at org.junit.runners.ParentRunner.run(ParentRunner.java:363)

at org.junit.runner.JUnitCore.run(JUnitCore.java:137)

at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)

at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)

at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)

at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

... 28 more



1 ACCEPTED ANSWER

Bill_Miller1
Champ on-the-rise
Champ on-the-rise

For the time being I've updated my pom with the following:


<dependency>  <groupId>dom4j</groupId>  <artifactId>dom4j</artifactId>  <version>1.6.1</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/dom4j-1.6.1.jar</systemPath></dependency><dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-types</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Types.jar</systemPath></dependency><dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-unity</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Unity-16.0.2.71.jar</systemPath></dependency>


I will eventually need to add the hyland jars to our internal maven repo. Would like to suggest that maybe hyland create/distribute these to a maven repo so we can just reference them in our pom's.

View answer in original post

2 REPLIES 2

Bill_Miller1
Champ on-the-rise
Champ on-the-rise

hmm... I think I just realized my error 🙂 Included in the zip was the missing jar file.

However, a readme at the root of the folder would be helpful.

Bill_Miller1
Champ on-the-rise
Champ on-the-rise

For the time being I've updated my pom with the following:


<dependency>  <groupId>dom4j</groupId>  <artifactId>dom4j</artifactId>  <version>1.6.1</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/dom4j-1.6.1.jar</systemPath></dependency><dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-types</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Types.jar</systemPath></dependency><dependency>  <groupId>com.hyland</groupId>  <artifactId>hyland-unity</artifactId>  <version>1.0</version>  <scope>system</scope>  <systemPath>${project.basedir}/src/main/resources/bin/Hyland.Unity-16.0.2.71.jar</systemPath></dependency>


I will eventually need to add the hyland jars to our internal maven repo. Would like to suggest that maybe hyland create/distribute these to a maven repo so we can just reference them in our pom's.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.