JcrUtils.getRepository throws ExceptionInIntializerError

margaretywong5

22-02-2019

When I attempt to execute the code snippet in the "How to programmatically access the AEM JCR" article, I get the following exception:

Exception in thread "main" java.lang.ExceptionInInitializerError

  at GetRepository.main(GetRepository.java:15)

Caused by: java.lang.IllegalArgumentException: unknown type: 10

  at javax.jcr.PropertyType.nameFromValue(PropertyType.java:92)

  at org.apache.jackrabbit.commons.JcrUtils.<clinit>(JcrUtils.java:1277)

Any ideas on how to fix this?

Answers (6)

Answers (6)

margaretywong5

22-02-2019

Yes, from a Java App and I do compile using "jackrabbit-jcr-commons-2.19.1.jar" in my classpath. The app compiles fine, it just gives this exception at runtime.