Menu

How to start AEM in debug mode? Adobe Experience Manager start guide

There are multiple approaches to start or tune Adobe Experience Manager (AEM) instance in debug mode. we will cover few of them in this tutorial.

  1. We could start AEM using the command prompt by using the below command line.
  2.  java -jar aem63-author-p4502.jar -debug <port#>
  3. Another way to start or tune AEM instance in debug mode is, we could update the start.bat file and start AEM by clicking on the start.bat file in crx-quickstart folder. To do so we have to do the following.
  • First we need to update the start file; go to \crx-quickstart\bin\start.bat and append this command "-debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<port#>" with line 25, default JVM options.
  • Save the file
  •  Now double click on the start.bat file to start your AEM instance.
After changes, your start.bat file will look like following.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@echo off
:: This script configures the start information for this server.
::
:: The following variables may be used to override the defaults.
:: For one-time overrides the variable can be set as part of the command-line; e.g.,
::
::     SET CQ_PORT=1234 & ./start.bat
::
setlocal

::* TCP port used for stop and status scripts
if not defined CQ_PORT set CQ_PORT=4502

::* hostname of the interface that this server should listen to
:: if not defined CQ_HOST set CQ_HOST=

::* runmode(s)
::* will not be used if repository is already present
if not defined CQ_RUNMODE set CQ_RUNMODE=author

::* name of the jarfile
:: if not defined CQ_JARFILE set CQ_JARFILE=

::* default JVM options
if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx2048m -XX:MaxPermSize=512M -Djava.awt.headless=true -debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=30303

::* ------------------------------------------------------------------------------
::* authentication
::* ------------------------------------------------------------------------------
::* when using oak (crx3) authentication must be configured using the
::* Apache Felix JAAS Configuration Factory service via the Web Console
::* see http://jackrabbit.apache.org/oak/docs/security/authentication/externalloginmodule.html

::* use jaas.config (legacy: only used for crx2 persistence)
:: if not defined CQ_USE_JAAS set CQ_USE_JAAS=true

::* config for jaas (legacy: only used for crx2 persistence)
if not defined CQ_JAAS_CONFIG set CQ_JAAS_CONFIG=etc\jaas.config

::* ------------------------------------------------------------------------------
::* persistence mode
::* ------------------------------------------------------------------------------
::* the persistence mode can not be switched for an existing repository
set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3tar
:: set CQ_RUNMODE=%CQ_RUNMODE%,crx3,crx3mongo

::* settings for mongo db
:: if not defined CQ_MONGO_HOST set CQ_MONGO_HOST=127.0.0.1
:: if not defined CQ_MONGO_PORT set CQ_MONGO_PORT=27017
:: if not defined CQ_MONGO_DB   set CQ_MONGO_DB=aem6

::* ------------------------------------------------------------------------------
::* do not configure below this point
::* ------------------------------------------------------------------------------

chdir /D %~dp0
cd ..
if exist conf\controlport del conf\controlport
if not defined CQ_JARFILE     for %%X in (app\*.jar) do set CQ_JARFILE=%%X
for %%* in (.) do set CurrDirName=%%~n*
cd ..

set START_OPTS=start -c %CurrDirName% -i launchpad
if defined CQ_PORT            set START_OPTS=%START_OPTS% -p %CQ_PORT%
if defined CQ_RUNMODE         set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dsling.run.modes=%CQ_RUNMODE%
if defined CQ_HOST            set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dorg.apache.felix.http.host=%CQ_HOST%
if defined CQ_HOST            set START_OPTS=%START_OPTS% -a %CQ_HOST%
if defined CQ_MONGO_HOST      set START_OPTS=%START_OPTS% -Doak.mongo.host=%CQ_MONGO_HOST%
if defined CQ_MONGO_PORT      set START_OPTS=%START_OPTS% -Doak.mongo.port=%CQ_MONGO_PORT%
if defined CQ_MONGO_DB        set START_OPTS=%START_OPTS% -Doak.mongo.db=%CQ_MONGO_DB%
if defined CQ_USE_JAAS        set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Djava.security.auth.login.config=%CQ_JAAS_CONFIG%
set START_OPTS=%START_OPTS% -Dsling.properties=conf/sling.properties

if exist newTaskList.txt del newTaskList.txt
if exist oldTaskList.txt del oldTaskList.txt
tasklist /FI "IMAGENAME eq java.exe" /NH > oldTaskList.txt
start "CQ" cmd.exe /C java %CQ_JVM_OPTS% -jar %CurrDirName%\%CQ_JARFILE% %START_OPTS%

:: removing the delay until CQ-4202186 is solved
:: timeout /T 1 /NOBREAK >nul

tasklist /FI "IMAGENAME eq java.exe" /NH > newTaskList.txt
java -cp %~dp0 GetProcessID oldTaskList.txt newTaskList.txt java.exe > %CurrDirName%\conf\cq.pid
if exist newTaskList.txt del newTaskList.txt
if exist oldTaskList.txt del oldTaskList.txt

Once you have done with the above changes and started your aem in debug mode then you have to configure debugger in your IDE (Eclipse or IntelliJ). To configure the debugger with your local AEM instance please follow this article. Remote debugger in eclipse

Principal Component Analysis (PCA)

Principal Component Analysis (PCA) is a widely-used statistical technique in data science and machine learning for dimensionality reduction. It simplifies large datasets while retaining the most critical information. By transforming the data into a new set of variables called principal components, PCA helps uncover hidden patterns, reduce noise, and optimize computational efficiency for tasks like visualization, clustering, and classification.

Why Use PCA?

Modern datasets often have a high number of dimensions(features). High-dimensional data can be:

  • Redundant: Many features might be correlated, adding unnecessary complexity.
  • Noisy: Irrelevant or noisy features can obscure the signal in data.
  • Difficult to visualize: Beyond three dimensions, visualizing data becomes challenging.

PCA addresses these issues by:

  • Reducing redundancy.
  • Compressing datasets while preserving essential patterns.
  • Making data more manageable for analysis or machine learning.

Applications of PCA

  1. Data Visualization: Principal Component Analysis(PCA) reduces high-dimensional data to 2D or 3D, enabling visualization of complex datasets.
  2. Preprocessing for Machine Learning: Reduces overfitting by eliminating irrelevant features and speeds up training for models on high-dimensional data.
  3. Image Compression: PCA compresses images by representing them with fewer components.
  4. Noise Reduction: Principal Component Analysis(PCA) filters out noise by removing components with low variance.

Advantages of PCA

  1. Simplifies datasets without significant loss of information.
  2. Helps in visualizing high-dimensional data.
  3. Reduces computation time for downstream tasks.
  4. Minimizes the risk of overfitting in machine learning models.

Limitations of PCA

  1. Linearity: Principal Component Analysis (PCA) assumes linear relationships between features and may not perform well with non-linear data.
  2. Interpretability: Principal components are combinations of original features, making them harder to interpret.
  3. Scale Sensitivity: Principal Component Analysis(PCA) is sensitive to feature scaling and requires careful preprocessing.
  4. Loss of Information: If too few components are retained, important information may be lost.

The 2024 USA Presidential Election | Donald Trump will be next president of USA

The 2024 United States presidential election was a highly anticipated and closely contested event, featuring prominent candidates and significant political agendas. Here’s a comprehensive look at the key aspects of the election, including the candidates, the results, and their campaign agendas.

Presidential Candidates

Donald Trump (Republican Party)
Running Mate: JD Vance
Background: Former President Donald Trump aimed to reclaim the White House, becoming only the second president in U.S. history to win two non-consecutive terms. Despite facing multiple legal challenges and controversies, Trump maintained a strong base of support.


Kamala Harris (Democratic Party)
Running Mate: Tim Walz
Background: Vice President Kamala Harris, endorsed by President Joe Biden after he withdrew from the race, sought to become the first Black woman and first Asian American president. Harris’s campaign focused on continuing and expanding many of Biden’s policies.


Jill Stein (Green Party)
Running Mate: Various running mates
Background: Jill Stein, the Green Party nominee, focused on environmental issues and social justice, continuing her advocacy from previous election cycles.


Chase Oliver (Libertarian Party)
Running Mate: Mike ter Maat
Background: Chase Oliver, a candidate known for his libertarian views, emphasized individual freedoms and limited government intervention.

Election Results

Donald Trump emerged victorious in the 2024 presidential election, securing a total of 292 electoral votes compared to Kamala Harris’s 224 electoral votes. The popular vote also reflected a close race, with Trump receiving 51.0% of the vote and Harris garnering 47.6%.

Campaign Agendas

Donald Trump’s Agenda:

Government Overhaul: Trump promised significant changes to federal government structures, aiming to reduce bureaucracy and increase efficiency.
Social Safety Nets: He proposed cuts to social safety net programs, arguing for a more self-reliant citizenry.
Retribution Against Opponents: Trump vowed to pursue legal actions against political adversaries, including appointing a special prosecutor to investigate the Biden family.

Kamala Harris’s Agenda:

Economic Support: Harris focused on providing tax credits to middle-class and lower-income families, aiming to reduce economic inequality.
Healthcare: She advocated for lowering drug costs and eliminating so-called junk fees, though she moved away from her previous support for a single-payer health insurance system.
Environmental Policies: Harris emphasized the need for sustainable energy solutions and continued efforts to combat climate change.

Jill Stein’s Agenda:

Environmental Justice: Stein’s campaign centered on aggressive climate action, including transitioning to renewable energy sources and addressing environmental racism.
Social Equity: She advocated for comprehensive social reforms, including universal healthcare and free higher education.

Chase Oliver’s Agenda:

Individual Liberties: Oliver’s platform focused on protecting personal freedoms, reducing government surveillance, and promoting free-market principles.
Criminal Justice Reform: He called for significant changes to the criminal justice system, including ending the war on drugs and reducing incarceration rates.

The 2024 election highlighted the deep political divisions in the United States, with each candidate presenting distinct visions for the country’s future. As Donald Trump prepares to take office once again, the nation watches closely to see how his policies will unfold and impact the American landscape.