Monday, February 21, 2022

eclipse: sonarlint: deactivate the @SuppressWarnings warning

 

>PROBLEM


Undesirable warning.





>SOLUTION

Go to menu, Window, Preferences and follow by the image:






>ENV

Eclipse jee-2021-12
Windows 10

Sunday, February 20, 2022

Eclipse: Store preferences has encountered a problem. An internal error occurred during "Store Preferences". The system was not able to find the filepath

 

>PROBLEM


Eclipse returns the following error after altering data on preferences (menu, Windows, Preferences):

  Store preferences has encountered a problem. An internal error occurred during "Store Preferences". The system was not able to find the filepath


>SOLUTION


- Follow the images:








>ENV


Windows 10
Eclipse jee-2021-12


eclipse: sonarlint: restore rule


>PROBLEM

Using Eclipse's sonarlint , a rule was removed and it is wished to be restored. 


>SOLUTION




>ENV

Eclipse



Wednesday, February 16, 2022

JEE, Hibernate, PostgreSQL: Caused by: org.postgresql.util.PSQLException: ERROR: must be owner of table server


 >PROBLEM


Hibernate fails when the application starts throwing the following messages:


Caused by: org.postgresql.util.PSQLException: ERROR: must be owner of table server 2022-02-16 22:18:43 # [restartedMain] # WARN  # o.h.t.s.i.ExceptionHandlerLoggedImpl # method: handleException # GenerationTarget encountered exception accepting command : 

Error executing DDL "alter table public.provider 

       add column provider_details_pk int8" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "

    alter table public.provider 

       add column provider_details_pk int8" via JDBC Statement

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "

    alter table public.server 

       add column provider_pk int8" via JDBC Statement



>SOLUTION


The tables were create via terminal using postgres' admin account that it is now allowed to remote access due to security issues.

Drop the tables that have the owner access issue using the terminal and the admin's account, the same used to create them.

Recreate the tables using another account that has remote access priviledges.


>ENV

Debian 10
PostgreSQL 10
Windows 10


Tuesday, February 8, 2022

Git: Windows: Failed to add the host to the list of known hosts


>PROBLEM

Attempt to a Git operation over remote repository returns the following message:

Could not create directory 'your path here' (No such file or directory).
Failed to add the host to the list of known hosts (/your local path here/known_hosts).

See picture where it points to "issue".






>SOLUTION 

1. Open Git Bash console.




2. Perform the command below to enable read and write;

chmod 776 your local path here/known_hosts






3. Keep the git bash console opened, test running a git command again.
For instance:

git ls-remote


The problem is gone as the figure shows where it points to "solved".




>ENV

Windows 10




[REF]: faq-Failed to add the host to the list of known hosts

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...