2023-03-08

SVN with eclipse 2022-12 R & 2023-06 R




20230801_pm112144
Rerun all Phase #1, #2 for: Eclipse IDE 2023-06 R Packages

Checkout old project successfully after resolved old SSL issue by removing "TLSv1, TLSv1.1, ".




Check on 20230926_pm023105: 2023-09

Last check on 20230308_am120205: still with version 

Installer 2022‑12 R



Also: https://download.eclipse.org/technology/subversive/4.8/release/latest/



Phase 1 - Installation of the Subversive Plug-In



Ouch, Install Remediation Page...









Phase 2 - Installation of Subversive SVN Connectors











After restart and trying to check out out project from old SVN repo.









resolved by: remove "TLSv1, TLSv1.1"


Reference URL: https://stackoverflow.com/a/71050085

You can set it in JRE inside SoapUI (if you are using it): Remove "TLSv1, TLSv1.1" from "jdk.tls.disabledAlgorithms" property in file ${soapui_home}/jre/conf/securityjava.security.




File Path at: .\Eclipse\eclipse-jee-2022-12-R-win32-x86_64\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.6.v20230204-1729\jre\conf\security\java.security





After removed "TLSv1, TLSv1.1, " from file: java.security

Then restart eclipse








SCM Connector


Attempt #1



scm | Eclipse Plugins, Bundles and Products






Failed:




Attempt #2:




Failed:

An error occurred while collecting items to be installed

session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

No repository found containing: osgi.bundle,com.ibm.icu.base,58.2.0.v20170418-1837

No repository found containing: osgi.bundle,javax.transaction,1.1.1.v201105210645








Attempt #3

subclipse


https://subclipse.github.io/updates/subclipse/4.3.x/







Trust Unsigned:








Found subclipse will have scm connector as printscreen below, although as SVN in dropdown list.



==========



Subversive:


Project physical folder named by SVN url.

Pros:



Cons:
  1. after check out from SVN, u hv to "convert" into maven project by right click on project, then look for Configure > Convert to Maven Project.



Subsclipse:


Project physical folder named by eclipse config during your project initialization.

Pros:
  1. direct check out from repo, with proper config for maven project
  2. Crucial feature for huge project: Show Revision Graph.

Cons:
  1. u can't revert file during commit screen, u hv leave commit window/screen, go back to project explorer, then right click your project, looks for Team > Revert to trigger revert process.






Archive remote info:

Installation Instructions

Here you can find instructions on how to install Subversive using different types of Subversive distributions.

Introduction

The Subversive (SVN) installation consists of installing the Subversive plug-in and a Subversive SVN Connector. The Subversive plug-in is developed as an Eclipse official project with an EPL license and is distributed from the Eclipse website. A Subversive SVN Connector uses a SVN library to communicate with SVN repositories. Currently, there is only the connector which uses the SVNKit library. This library is developed as open-source project, but since its license is not EPL-compatible, the whole connector has to be distributed from an external website.

In order to use Subversive, you have to install the Subversive plug-in and the connector that is compatible with your operating system (OS) and the used SVN version.

Phase 1 - Installation of the Subversive Plug-In

You can install Subversive using its online or archived update site.

Phase 2 - Installation of Subversive SVN Connectors

Once the Subversive plug-in is installed and Eclipse is rebooted, Subversive automatically displays the dialog that shows Subversive SVN Connectors compatible with the installed version of the plug-in. Alternatively, you can install Subversive SVN Connectors from online and archived update sites for connectors.

  • Run Eclipse and select Help > Install New Software... from the main menu.
  • In the Install dialog that appears, press the Add... button and enter the URL of the following update site: https://osspit.org/eclipse/subversive-connectors/.
  • Select the required features to install and follow the standard plug-in installation procedure. Reboot Eclipse after installation is complete.




















2023-01-12

Finding - 2 different ways to get result from API to showing by using Datatables.net

 


Reference URL: https://stackoverflow.com/a/68456824/6462295

As of 2023Feb07_1503 - failed to achieve by method of: data: data

Published on
1/12/23 2:25 PM






My html table:

<table id="listaVideos2" class="display">
        <thead>
        <tr>
            <th>nombre</th>
            <th>descripcion</th>
            <th>codigoYoutube</th>
            <th>bpm</th>
        </tr>
        </thead>
    </table>

My JavaScript:

$.ajax({
        "url": "listado2",
        "type": "GET",
        "datatype": 'json',
        "success": function (data) {
            $('#listaVideos2').DataTable({
                "fixedHeader" : true,
                "paging":   false,
                "info":     true,
                "autoWidth": true,
                "order": [],
                data: data,
                select: true,
                columns: [
                    { "data": "nombre" },
                    { "data": "descripcion" },
                    { "data": "codigoYoutube",
                        "title": "Youtube",
                        "orderable": false
                    },
                    { "data": "bpm" },
                ]
            });
        }
    });

or another way you can use:

$('#listaVideos2').DataTable({
        "fixedHeader" : true,
        "paging":   false,
        "info":     true,
        "autoWidth": true,
        "order": [],
        ajax: {
            url: 'listado2',
            dataSrc: ''
        },
        select: true,
        columns: [
            { "data": "nombre" },
            { "data": "descripcion" },
            { "data": "codigoYoutube",
                "title": "Youtube",
                "orderable": false
            },
            { "data": "bpm" },
        ],
        buttons: [
            { extend: "create", editor: editor },
            { extend: "edit",   editor: editor },
            { extend: "remove", editor: editor }
        ],
        dom: "Bfrtip",
    });

And my Controller: (if your controller is a @RestController I think you wouldn't need the @ResponseBody)

@GetMapping("/listado2")
    @ResponseBody
    public List<Video> apiListadoVideos() {
        return videosServicio.buscarTodosLosVideos();
    }

where my Video class is this simple (I just remove de getters, setters...):

public class Video {
    private Integer id;
    @NotEmpty
    @NotBlank
    private String nombre;
    private String descripcion;
    @NonNull @NotBlank
    private String codigoYoutube;
    private String bpm;
    private Categoria categoria;
    private Tono tono;
    private Modo modo;
}















Finding: CSRF required to be included in both cookie and header

 


Found out need to have CSRF token in cookies + header



C:\Users\billson.bs.chew>curl "http://localhost:9099/sfa/getrefcountry" -X "POST" -H "Cookie: JSESSIONID=ECF471E0BB423ADF808EFC649965D63D; XSRF-TOKEN=8078038f-017c-4adf-9034-71d0a5624020; OAuth_Token_Request_State=45f11140-bc27-4d82-9e06-ac7716150d9b"
{"timestamp":"2023-01-12T05:14:04.958+00:00","status":403,"error":"Forbidden","message":"Forbidden","path":"/sfa/getrefcountry"}
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>curl "http://localhost:9099/sfa/getrefcountry" -X "POST" -H "Cookie: JSESSIONID=ECF471E0BB423ADF808EFC649965D63D; OAuth_Token_Request_State=45f11140-bc27-4d82-9e06-ac7716150d9b" -H "X-XSRF-TOKEN: 8078038f-017c-4adf-9034-71d0a5624020"
{"timestamp":"2023-01-12T05:14:17.134+00:00","status":403,"error":"Forbidden","message":"Forbidden","path":"/sfa/getrefcountry"}
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>
C:\Users\billson.bs.chew>curl "http://localhost:9099/sfa/getrefcountry" -X "POST" -H "Cookie: JSESSIONID=ECF471E0BB423ADF808EFC649965D63D; XSRF-TOKEN=8078038f-017c-4adf-9034-71d0a5624020; OAuth_Token_Request_State=45f11140-bc27-4d82-9e06-ac7716150d9b" -H "X-XSRF-TOKEN: 8078038f-017c-4adf-9034-71d0a5624020"
[{"id":746,"countryName":"......


But will failed after added -H "X-Requested-With: XMLHttpRequest"

curl "http://localhost:9099/sfa/getrefcountry" -X "POST" -H "Cookie: JSESSIONID=72E583341F34F836CE9D1E791BAA8289; XSRF-TOKEN=8078038f-017c-4adf-9034-71d0a5624020; OAuth_Token_Request_State=45f11140-bc27-4d82-9e06-ac7716150d9b" -H "X-XSRF-TOKEN: 8078038f-017c-4adf-9034-71d0a5624020" -H "X-Requested-With: XMLHttpRequest"

maybe required to add the origin header as well.

curl "http://localhost:9099/sfa/getrefcountry" -X "POST" -H "Cookie: JSESSIONID=4174FC81554467718FC1F68CA393A357; XSRF-TOKEN=9c5dd88b-837b-400a-b083-912cc83aaa9f; OAuth_Token_Request_State=45f11140-bc27-4d82-9e06-ac7716150d9b" -H "X-XSRF-TOKEN: 9c5dd88b-837b-400a-b083-912cc83aaa9f" -H "Origin: http://localhost:9099" -H "X-Requested-With: XMLHttpRequest"






















2022-12-13

Solved - ClassNotFoundException: org.springframework.boot.configurationprocessor.json.JSONObject

 
Exception:
java.lang.ClassNotFoundException: org.springframework.boot.configurationprocessor.json.JSONObject



Artifact below won't be included into maven install

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>



replaced

org.springframework.boot.configurationprocessor.json.JSONObject

by

org.json.JSONObject



 

2022-12-07

OAuthRequestAuthenticator : failed to turn code into token

 


I was having:


2022-12-07 09:21:25.077 ERROR 25057 --- [nio-8001-exec-4] o.k.adapters.OAuthRequestAuthenticator   : failed to turn code into token

java.net.ConnectException: Connection timed out (Connection timed out)
        at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_352]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_352]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_352]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_352]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_352]
        at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_352]
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:542) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.keycloak.adapters.SniSSLSocketFactory.connectSocket(SniSSLSocketFactory.java:109) ~[keycloak-adapter-core-4.5.0.Final.jar!/:4.5.0.Final]
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:414) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.3.jar!/:4.5.3]
        at org.keycloak.adapters.ServerRequest.invokeAccessCodeToToken(ServerRequest.java:111) ~[keycloak-adapter-core-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.OAuthRequestAuthenticator.resolveCode(OAuthRequestAuthenticator.java:335) ~[keycloak-adapter-core-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.OAuthRequestAuthenticator.authenticate(OAuthRequestAuthenticator.java:280) ~[keycloak-adapter-core-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.RequestAuthenticator.authenticate(RequestAuthenticator.java:139) ~[keycloak-adapter-core-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.authenticateInternal(AbstractKeycloakAuthenticatorValve.java:203) ~[keycloak-tomcat-core-adapter-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve.authenticate(KeycloakAuthenticatorValve.java:50) [keycloak-tomcat8-adapter-4.5.0.Final.jar!/:4.5.0.Final]
        at org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve.doAuthenticate(KeycloakAuthenticatorValve.java:57) [keycloak-tomcat8-adapter-4.5.0.Final.jar!/:4.5.0.Final]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:556) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.invoke(AbstractKeycloakAuthenticatorValve.java:181) ~[keycloak-tomcat-core-adapter-4.5.0.Final.jar!/:4.5.0.Final]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_352]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_352]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar!/:8.5.11]
        at java.lang.Thread.run(Thread.java:750) [na:1.8.0_352]



Found out that server couldn't curl to keyclock which installed on the same machine by using public domain:

curl https://your.public.keycloak.com

curl: (7) Failed connect to your.public.keycloak.com:443; Connection timed out

 











2022-12-06

how to get mylyn task for eclipse

 



how to get mylyn task for eclipse



https://www.eclipse.org/mylyn/downloads/

Add URL into eclipse: http://download.eclipse.org/mylyn/releases/latest






Tried, outdate, not working.
https://people.cs.vt.edu/~gback/eclipse/configuration/org.eclipse.osgi/bundles/171/1/.cp/Mylyn/FAQ/Installation.html





2022-10-14

SVN with eclipse 2022-09




 



Attempt# 1 - failed:

Name: SVN

Location: http://download.Eclipse.org/technology/subversive/4.0/update-site/


reference URL: https://www.softwaretestinghelp.com/eclipse/configuring-svn-and-eclipse/



Attempt# 2


Last comment in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576745

https://www.eclipse.org/subversive/installation-instructions.php



Looks alright.


resolved by: remove "TLSv1, TLSv1.1"


Reference URL: https://stackoverflow.com/a/71050085

You can set it in JRE inside SoapUI (if you are using it): Remove "TLSv1, TLSv1.1" from "jdk.tls.disabledAlgorithms" property in file ${soapui_home}/jre/conf/securityjava.security.




Path at: .\Eclipse\eclipse-jee-2022-12-R-win32-x86_64\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.6.v20230204-1729\jre\conf\security\java.security








For later versions: 




 

2022-10-13

Resolved - Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible

 


Error:
Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @3d201878



By referring to:
https://stackoverflow.com/a/72616180



Added into <properties> section in pom.xml:

<maven-war-plugin.version>3.3.1</maven-war-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>





Added on 20230823_pm092210:
To resolve:
- Maven Configuration Problem - java.lang.ExceptionInInitializerError
- Unable to make field private final java.util.Comparator








2022-10-09

Reduce hibernate file

 


powercfg /hibernate /type reduced

reduced my hibernate file: C:\hiberfil.sys
from: 6.35 GB
to: 3.17 GB

But will disable your machine to go into hibernate...













2022-10-02

Steps to setup your new android phones and copy almost everything from old phone(android).




  1. Factory Reset / Turn on the new phone. 
  2. Select copy data from old phone.
  3. Answer to your new phone couldn't setup via cable.
  4. Continue copy data wirelessly.
  5. Follow the guide in new phone, to Open Google App in old phone, and continue as per instruction.





2022-09-29

Google Referrals