Menu

Verbose option not active, closing stdin and redirecting stdout and stderr

We experience this issue at the time of running the AEM jar file. Everything is fine or even using a valid command we are unable to start the AEM service then look and follow.

Error:

java -jar aem-sdk-quickstart-author-p4502.jar -debug 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 4014 MB, meets our expectation of 1024 MB +/- 20
Debugging requested on port 30303, forcing fork
Preparing to fork JVM, OS name=Windows 10, isWindows=true
Forking JVM: [C:\Program Files\Java\jdk-11.0.15\bin\java.exe, -agentlib:jdwp=transport=dt_socket,address=30303,server=y,suspend=n, -Xmx1024m, -XX:MaxPermSize=256m, -jar, C:/Users/mohammad_r/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar, -nofork, -pt, CHILD]
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
Listening for transport dt_socket at address: 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 1024 MB, meets our expectation of 1024 MB +/- 20
Setting properties from filename 'C:/Users/jorvee/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar'
Option '-quickstart.server.port' set to '4502' from filename aem-sdk-quickstart-author-p4502.jar
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stderr.log
Forked JVM process exited with exit code 1
Main JVM process exiting
MAIN process: shutdown hook
MAIN process: exiting

Log file stderr

Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 1024 MB, meets our expectation of 1024 MB +/- 20
Setting properties from filename 'C:/Users/mohammad_r/Downloads/aem-sdk/aem-sdk-quickstart-author-p4502.jar'
Option '-quickstart.server.port' set to '4502' from filename aem-sdk-quickstart-author-p4502.jar
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\Users\jorvee\Downloads\aem-sdk\crx-quickstart\logs\stderr.log
ResourceProvider paths=[/gui, /gui/default]
java.io.IOException: Did not find an available server port, tried 4502
at com.adobe.granite.quickstart.base.impl.exec.PortSelector.selectPort(PortSelector.java:74)
at com.adobe.granite.quickstart.base.impl.Quickstart.<init>(Quickstart.java:147)
at com.adobe.granite.quickstart.base.impl.Main.<init>(Main.java:911)
at com.adobe.granite.quickstart.base.impl.Main.main(Main.java:980)
Quickstart: aborting
CHILD process: shutdown hook
CHILD process: exiting

Resolution

Port 4502 is not available and is being consumed by any other service.

java.lang.NoClassDefFoundError

When we import a Java class in a Java project we sometimes face NoClassDefFoundError and that import is not getting resolved. If you are using IntelliJ IDE then you could resolve this issue by going to the following setting option.

Run >> Edit Configurations >> Click on Modify options >> select Include dependencies with "Provided scope" OR "Add dependencies with "Provided" scope to classpath"

How to check the node property type is single value or multi value in aem?

We can check the type of property(whether single or multiple) using the method isMultiple() of Property interface. Below is an example to check the node property "items" is a single value or multiple values and based on that get the value or values for that property in AEM.

 

Property property = node.getProperty("items");
Value[] values = null;
if(property.isMultiple()){
   values = property.getValues();
} else { 
   values[0] = property.getValue();

} 


Hope this helps. Thank you!