Expand my Community achievements bar.

SOLVED

Local AEM 6.5 instance is not starting up in MacOS

Avatar

Level 1

Hi,

 

I'm trying to install local AEM author instance in MacBook Pro and it's not starting up. There is an error related to crypto bundle. Adding error log below. Can someone please guide me.

 

Java version is 1.8

 

Stderr log:

20.11.2022 13:29:26.102 *ERROR* [FelixStartLevel] ERROR: Bundle '8' Error starting slinginstall:com.adobe.granite.crypto-3.4.16.jar (java.lang.ExceptionInInitializerError)
java.lang.ExceptionInInitializerError
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:479)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:732)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:502)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:485)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:484)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:452)
at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:298)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:629)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:627)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:626)
at com.adobe.granite.crypto.internal.InternalClassLoaderWrapper$JarFileClassLoader.findClass(InternalClassLoaderWrapper.java:175)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.adobe.granite.crypto.internal.Activator.getOrCreateKeyGenerator(Activator.java:145)
at com.adobe.granite.crypto.internal.Activator.start(Activator.java:65)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Unable to make protected boolean java.net.URLStreamHandler.equals(java.net.URL,java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @4009e306
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.<clinit>(URLHandlersStreamHandlerProxy.java:104)
... 25 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected boolean java.net.URLStreamHandler.equals(java.net.URL,java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @4009e306
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:200)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:194)
at org.apache.felix.framework.util.SecureAction.setAccesssible(SecureAction.java:871)
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.<clinit>(URLHandlersStreamHandlerProxy.java:79)
... 25 more
20.11.2022 13:29:26.413 *ERROR* [FelixStartLevel] ERROR: Bundle '18' EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: Could not initialize class org.apache.felix.framework.URLHandlersStreamHandlerProxy)
java.lang.NoClassDefFoundError: Could not initialize class org.apache.felix.framework.URLHandlersStreamHandlerProxy
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:680)
at java.base/java.net.URL.fromURI(URL.java:748)
at java.base/java.net.URI.toURL(URI.java:1139)
at org.apache.sling.installer.core.impl.InternalResource.create(InternalResource.java:87)
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.createResources(OsgiInstallerImpl.java:384)
at org.apache.sling.installer.core.impl.OsgiInstallerImpl.registerResources(OsgiInstallerImpl.java:477)
at org.apache.sling.launchpad.installer.impl.LaunchpadConfigInstaller.install(LaunchpadConfigInstaller.java:207)
at org.apache.sling.launchpad.installer.impl.LaunchpadConfigInstaller.install(LaunchpadConfigInstaller.java:150)
at org.apache.sling.launchpad.installer.impl.ServicesListener.notifyChange(ServicesListener.java:100)
at org.apache.sling.launchpad.installer.impl.ServicesListener$Listener.retainService(ServicesListener.java:182)
at org.apache.sling.launchpad.installer.impl.ServicesListener$Listener.serviceChanged(ServicesListener.java:205)
at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833)
at org.apache.felix.framework.Felix.registerService(Felix.java:3804)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
at org.apache.sling.installer.core.impl.Activator.start(Activator.java:80)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: Unable to make protected boolean java.net.URLStreamHandler.equals(java.net.URL,java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @4009e306 [in thread "FelixStartLevel"]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.<clinit>(URLHandlersStreamHandlerProxy.java:104)
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:479)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:732)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:502)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:485)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:484)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:452)
at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:298)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:629)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:627)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:626)
at com.adobe.granite.crypto.internal.InternalClassLoaderWrapper$JarFileClassLoader.findClass(InternalClassLoaderWrapper.java:175)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.adobe.granite.crypto.internal.Activator.getOrCreateKeyGenerator(Activator.java:145)
at com.adobe.granite.crypto.internal.Activator.start(Activator.java:65)
... 6 more
MAIN process: shutdown hook
MAIN process: exiting
java.lang.reflect.InaccessibleObjectException: Unable to make field private static final java.lang.Object java.net.URL.streamHandlerLock accessible: module java.base does not "opens java.net" to unnamed module @4009e306
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:180)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:174)
at org.apache.felix.framework.util.SecureAction._swapStaticFieldIfNotClass(SecureAction.java:998)
at org.apache.felix.framework.util.SecureAction.swapStaticFieldIfNotClass(SecureAction.java:983)
at org.apache.felix.framework.URLHandlers.unregisterFrameworkListsForContextSearch(URLHandlers.java:346)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.apache.felix.framework.util.SecureAction.invoke(SecureAction.java:893)
at org.apache.felix.framework.URLHandlers.unregisterFrameworkInstance(URLHandlers.java:661)
at org.apache.felix.framework.URLHandlersActivator.stop(URLHandlersActivator.java:75)
at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:5224)
at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2795)
at org.apache.felix.framework.Felix$2.run(Felix.java:1154)
java.lang.reflect.InaccessibleObjectException: Unable to make field private static volatile java.net.ContentHandlerFactory java.net.URLConnection.factory accessible: module java.base does not "opens java.net" to unnamed module @4009e306
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:180)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:174)
at org.apache.felix.framework.util.SecureAction._swapStaticFieldIfNotClass(SecureAction.java:1019)
at org.apache.felix.framework.util.SecureAction.swapStaticFieldIfNotClass(SecureAction.java:983)
at org.apache.felix.framework.URLHandlers.unregisterFrameworkListsForContextSearch(URLHandlers.java:361)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.apache.felix.framework.util.SecureAction.invoke(SecureAction.java:893)
at org.apache.felix.framework.URLHandlers.unregisterFrameworkInstance(URLHandlers.java:661)
at org.apache.felix.framework.URLHandlersActivator.stop(URLHandlersActivator.java:75)
at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix$SystemBundleActivator.stop(Felix.java:5224)
at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:720)
at org.apache.felix.framework.Felix.stopBundle(Felix.java:2795)
at org.apache.felix.framework.Felix$2.run(Felix.java:1154)
Exception in thread "Apache Sling Terminator" Exception in thread "Sling Notifier" java.lang.NoClassDefFoundError: Could not initialize class org.apache.felix.framework.URLHandlersStreamHandlerProxy
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:680)
at java.base/java.net.URL.<init>(URL.java:569)
at java.base/java.net.URL.<init>(URL.java:516)
at org.apache.sling.launchpad.base.shared.Loader.closeLauncherJarFile(Loader.java:397)
at org.apache.sling.launchpad.base.shared.Loader.cleanupVM(Loader.java:150)
at org.apache.sling.launchpad.app.Main.doStop(Main.java:452)
at org.apache.sling.launchpad.app.Main$ShutdownHook.run(Main.java:911)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: Unable to make protected boolean java.net.URLStreamHandler.equals(java.net.URL,java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @4009e306 [in thread "FelixStartLevel"]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.<clinit>(URLHandlersStreamHandlerProxy.java:104)
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:479)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:732)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:502)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:485)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:484)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:452)
at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:298)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:629)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:627)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:626)
at com.adobe.granite.crypto.internal.InternalClassLoaderWrapper$JarFileClassLoader.findClass(InternalClassLoaderWrapper.java:175)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at com.adobe.granite.crypto.internal.Activator.getOrCreateKeyGenerator(Activator.java:145)
at com.adobe.granite.crypto.internal.Activator.start(Activator.java:65)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:698)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2402)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1539)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
... 1 more
java.lang.NoClassDefFoundError: Could not initialize class org.apache.felix.framework.URLHandlersStreamHandlerProxy
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:680)
at java.base/java.net.URL.<init>(URL.java:569)
at java.base/java.net.URL.<init>(URL.java:516)
at org.apache.sling.launchpad.base.shared.Loader.closeLauncherJarFile(Loader.java:397)
at org.apache.sling.launchpad.base.shared.Loader.cleanupVM(Loader.java:150)
at org.apache.sling.launchpad.app.Main.doStop(Main.java:452)
at org.apache.sling.launchpad.app.Main$Notified.stopped(Main.java:936)
at org.apache.sling.launchpad.base.impl.SlingFelix$Notifier.run(SlingFelix.java:180)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: Unable to make protected boolean java.net.URLStreamHandler.equals(java.net.URL,java.net.URL) accessible: module java.base does not "opens java.net" to unnamed module @4009e306 [in thread "FelixStartLevel"]
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.<clinit>(URLHandlersStreamHandlerProxy.java:104)
at org.apache.felix.framework.URLHandlers.createURLStreamHandler(URLHandlers.java:513)
at java.base/java.net.URL.getURLStreamHandler(URL.java:1436)
at java.base/java.net.URL.<init>(URL.java:479)
at java.base/jdk.internal.loader.URLClassPath$JarLoader.<init>(URLClassPath.java:732)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:502)
at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:485)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:484)
at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:452)
at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:298)
at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:629)

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

Mostly using Java 11 should solve your problem. 

brew install cask java11

 

If cask is not installed:

brew install cask

 

Make sure that when you try to run aem jar file next time it must be running through java11. You can setup the alias for java11 in .zshrc file:

 

export JAVA_11_HOME=$(/usr/libexec/java_home -v11)
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)
 
alias java11='export JAVA_HOME=$JAVA_11_HOME'

and then run the commands. I had problems with Java8 too.

 

View solution in original post

2 Replies

Avatar

Community Advisor

Please refer below article to install AEM in local

 https://link.medium.com/i5WJAv0Z6ub

Hope this is helpful!!!

Avatar

Correct answer by
Level 5

Mostly using Java 11 should solve your problem. 

brew install cask java11

 

If cask is not installed:

brew install cask

 

Make sure that when you try to run aem jar file next time it must be running through java11. You can setup the alias for java11 in .zshrc file:

 

export JAVA_11_HOME=$(/usr/libexec/java_home -v11)
export JAVA_8_HOME=$(/usr/libexec/java_home -v1.8)
 
alias java11='export JAVA_HOME=$JAVA_11_HOME'

and then run the commands. I had problems with Java8 too.