cancel
Showing results for 
Search instead for 
Did you mean: 

I have a issue with the AMP configuration

viperboys
Star Contributor
Star Contributor

I have a issue configuring my development environment. I followed these steps. https://docs.alfresco.com/5.1/tasks/alfresco-sdk-tutorials-all-in-one-archetype.html But when I run the run.sh file I have this error.

image

How I can solve it?

2 ACCEPTED ANSWERS

Did you configure a JDK for your project?
I don't really know how to do it in Eclipse but StackOverflow says:

  • Right click your project > properties
  • Select “Java Build Path” on left, then “JRE System Library”, click Edit…
  • Select "Workspace Default JRE"
  • Click "Installed JREs"
  • If you see JRE you want in the list select it (selecting a JDK is OK too)

https://stackoverflow.com/questions/13635563/setting-jdk-in-eclipse

View answer in original post

Seems like you have not set the JAVA_HOME and Not selected JDK Path in eclipse.

First step, set the java home. Follow this URL: https://confluence.atlassian.com/conf59/setting-the-java_home-variable-in-windows-792499849.html

Second step, set the Jdk path in eclipse. By default eclipse takes jre from environment variable. 

Look at this post, to setup eclipse with JDK: https://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx

https://www.youtube.com/watch?v=S5xeXawYgK0

Once, you are done with these steps, close all terminals and close eclipse. Start the eclipse again and try performing the steps documented here: https://docs.alfresco.com/5.2/tasks/sdk-develop-eclipse.html 

I think you need to jump to Step 9 directly since you have already generated the project and imported in eclipse.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

20 REPLIES 20

@abhinavmishra14 

Good morning... 

Having read your valuable contributions. I managed to configure the two steps you told me correctly.

Step1: https://docs.alfresco.com/5.2/concepts/sdk-getting-started.html

Step2: https://docs.alfresco.com/5.2/tasks/sdk-develop-eclipse.html

I am configuring version 5.2. This is my configuration

C:\Users\Edgar>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

C:\Users\Edgar>javac -version
javac 1.8.0_111

C:\Users\Edgar>mvn -version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=1024m; support was removed in 8.0
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\apache-maven-3.6.3\bin\..
Java version: 1.8.0_111, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: es_VE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

I have is only one error when I compile.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project appropia-platform-jar: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project appropia-platform-jar: Compilation failure
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

What can I do to fix it? 

Thank you! 

Hi @abhinavmishra14 

I forgot to tell you that this error is in Eclipse.

Through the Window console I ran the command "mvn clean install" 

At the end everything seems to be going well.

In my browser

image

In my console 

image

After this the Tomcat server is paralyzed.

It means that I have two problems. One in Eclipse and one on the console. Hahaha

I hope you can help me. Thank you very much.

@viperboys  Response to second question---

After you complete setting up java home and eclipse jdk path, you need to use step 9-18 as stated here: https://docs.alfresco.com/5.2/tasks/sdk-develop-eclipse.html

mvn clean install won't load share or alfresco. clean and install goals are for cleaning,validate, compile, test, package, verify and install artifacts. See the goals stated from 13-18 in order to start share and alfresco in eclipse embeded tomcat. 

You can learn more on mvn goals here: https://www.journaldev.com/33659/maven-build-lifecycle-phases-goals

You can also look for maven tutorial, search on google if interested. here is one with good examples: https://www.tutorialspoint.com/maven/index.htm

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Did you configure a JDK for your project?
I don't really know how to do it in Eclipse but StackOverflow says:

  • Right click your project > properties
  • Select “Java Build Path” on left, then “JRE System Library”, click Edit…
  • Select "Workspace Default JRE"
  • Click "Installed JREs"
  • If you see JRE you want in the list select it (selecting a JDK is OK too)

https://stackoverflow.com/questions/13635563/setting-jdk-in-eclipse

Seems like you have not set the JAVA_HOME and Not selected JDK Path in eclipse.

First step, set the java home. Follow this URL: https://confluence.atlassian.com/conf59/setting-the-java_home-variable-in-windows-792499849.html

Second step, set the Jdk path in eclipse. By default eclipse takes jre from environment variable. 

Look at this post, to setup eclipse with JDK: https://www.gamefromscratch.com/post/2011/11/15/Telling-Eclipse-to-use-the-JDK-instead-of-JRE.aspx

https://www.youtube.com/watch?v=S5xeXawYgK0

Once, you are done with these steps, close all terminals and close eclipse. Start the eclipse again and try performing the steps documented here: https://docs.alfresco.com/5.2/tasks/sdk-develop-eclipse.html 

I think you need to jump to Step 9 directly since you have already generated the project and imported in eclipse.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

Hi @abhinavmishra14 

I'm very happy. I finally managed to set up my development environment. This would not be possible without your help. Thank you very much and blessings.

@viperboys  Great news, happy that you are able to setup your dev environment. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

EddieMay
World-Class Innovator
World-Class Innovator

Hi @viperboys,

That's great news - thanks for updating us. Thanks to @abhinavmishra14 & @Jendert for helping out.

Take care, 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

Jendert
Confirmed Champ
Confirmed Champ

Are you running it on WIndows? If so the command is "./run.bat build_start"
Also try running "mvn install -DskipTests" beforehand if you didn't already to build the target- directories

@Jendert 
Thank you very much

This I managed to do. Now I have a problem with Eclipse. Haha