REST API IS NOT WORKING.

71 views
Skip to first unread message

Kanat Mergenbayev

unread,
Jul 21, 2022, 5:05:34 AMJul 21
to iDempiere
Hi. Please help, configuring REST API.

Successfully installed REST API plugin.

Have active status in "felix console"

Now trying to do first POST http://localhost:8080/api/v1/auth request. Getting error

<html>

<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Error 404 Not Found</title>
</head>

<body>
<h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr>
<th>URI:</th>
<td>/api/v1/auth</td>
</tr>
<tr>
<th>STATUS:</th>
<td>404</td>
</tr>
<tr>
<th>MESSAGE:</th>
<td>Not Found</td>
</tr>
<tr>
<th>SERVLET:</th>
<td>default</td>
</tr>
</table>
<hr><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.33.v20201020</a>
<hr />

</body>

</html>
postman.png
osgi.png

Anozi Mada

unread,
Jul 21, 2022, 6:11:55 AMJul 21
to iDempiere
Where do you get the plugin? If you're using from this source, the symbolic name should be com.trekglobal.idempiere.rest.api and the version is 0.1.0
Also you should set the plugin's Start Level to 5.

Regards,
Anozi Mada

Kanat Mergenbayev

unread,
Jul 21, 2022, 7:16:07 AMJul 21
to iDempiere
Thank you. Was my dumb error.

One more question. How can I configure REST API endpoints to work on different port for example 8085 rather than 8080 on which main applications is working. I need this to add AWS ALB health check status so it will not reload main page every N - minutes.

Thank you.

четверг, 21 июля 2022 г. в 16:11:55 UTC+6, anoz...@gmail.com:

Kanat Mergenbayev

unread,
Jul 24, 2022, 3:26:46 AMJul 24
to iDempiere
Trying to compile idempiere-rest in github actions getting error. Please help.

cd $CURRENT_PATH/idempiere-rest

mvn install
mvn verify

Warning: Parameter 'useProjectSettings' is set to true, but preferences file '/home/runner/work/kz.green-cross-eco.application/kz.green-cross-eco.application/idempiere-rest/com.trekglobal.idempiere.rest.api/.settings/org.eclipse.jdt.core.prefs' could not be found!
23334[INFO] Compiling 70 source files to /home/runner/work/kz.green-cross-eco.application/kz.green-cross-eco.application/idempiere-rest/com.trekglobal.idempiere.rest.api/target/classes
23335[INFO] ------------------------------------------------------------------------
23336[INFO] Reactor Summary for com.trekglobal.idempiere.extensions.main 0.1.0-SNAPSHOT:
23337[INFO]
23338[INFO] com.trekglobal.idempiere.rest.api .................. FAILURE [ 3.350 s]
23339[INFO] com.trekglobal.idempiere.extensions.p2 ............. SKIPPED
23340[INFO] com.trekglobal.idempiere.extensions.main ........... SKIPPED
23341[INFO] ------------------------------------------------------------------------
23342[INFO] BUILD FAILURE
23343[INFO] ------------------------------------------------------------------------
23344[INFO] Total time: 10.955 s
23345[INFO] Finished at: 2022-07-24T07:07:50Z
23346[INFO] ------------------------------------------------------------------------
23347Error: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.5.0:compile (default-compile) on project com.trekglobal.idempiere.rest.api: Compilation failure: Compilation failure:
23348Error: /home/runner/work/kz.green-cross-eco.application/kz.green-cross-eco.application/idempiere-rest/com.trekglobal.idempiere.rest.api/src/com/trekglobal/idempiere/rest/api/v1/auth/filter/RequestFilter.java:[48]
23349Error:    import com.auth0.jwt.JWT;
23350Error:     ^^^^^^^^^
23351Error: The import com.auth0 cannot be resolved
23352Error: /home/runner/work/kz.green-cross-eco.application/kz.green-cross-eco.application/idempiere-rest/com.trekglobal.idempiere.rest.api/src/com/trekglobal/idempiere/rest/api/v1/auth/filter/RequestFilter.java:[49]
23353Error:    import com.auth0.jwt.JWTVerifier;
23354Error:     ^^^^^^^^^
23355Error: The import com.auth0 cannot be resolved
23356Error: /home/runner/work/kz.green-cross-eco.application/kz.green-cross-eco.application/idempiere-rest/com.trekglobal.idempiere.rest.api/src/com/trekglobal/idempiere/rest/api/v1/auth/filter/RequestFilter.java:[50]
23357Error:    import com.auth0.jwt.algorithms.Algori

Seems it does not see lib/java-jwt-3.3.0.jar dependency.

четверг, 21 июля 2022 г. в 17:16:07 UTC+6, Kanat Mergenbayev:

Kanat Mergenbayev

unread,
Jul 24, 2022, 4:17:25 AMJul 24
to iDempiere
My dumb error. added ./lib to .gitignore. Removing it from .gitignore solved issue

воскресенье, 24 июля 2022 г. в 13:26:46 UTC+6, Kanat Mergenbayev:
Reply all
Reply to author
Forward
0 new messages