Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 176
» Latest member: podesd
» Forum threads: 27
» Forum posts: 44

Full Statistics

Online Users
There are currently 9 online users.
» 0 Member(s) | 9 Guest(s)

Latest Threads
HOWTO: Add certificate fo...
Forum: Java stuff
Last Post: digdas
06-05-2017, 05:08 PM
» Replies: 0
» Views: 9,911
Working with Eclipse
Forum: ATMega/Arduino/Funduino stuff
Last Post: aart
05-30-2016, 05:29 AM
» Replies: 0
» Views: 2,793
Resources on orange pi
Forum: OrangePI
Last Post: aart
12-13-2015, 08:10 PM
» Replies: 0
» Views: 3,189
Orange PI resize SD-card ...
Forum: OrangePI
Last Post: aart
12-01-2015, 07:18 AM
» Replies: 0
» Views: 7,903
DFPlayer Mini
Forum: ATMega/Arduino/Funduino stuff
Last Post: aart
06-06-2015, 04:35 AM
» Replies: 0
» Views: 1,154
Arduino 2.4" TFT Shield
Forum: ATMega/Arduino/Funduino stuff
Last Post: aart
05-22-2015, 05:32 AM
» Replies: 2
» Views: 1,468
HOWTO: Create / use SSL c...
Forum: Webserver info
Last Post: aart
03-07-2015, 06:22 PM
» Replies: 0
» Views: 4,166
Installing new Strato ser...
Forum: Webserver info
Last Post: aart
02-25-2015, 06:47 AM
» Replies: 9
» Views: 5,558
PHP warnings, about files...
Forum: Webserver info
Last Post: aart
12-03-2014, 06:12 AM
» Replies: 0
» Views: 998
Howto: Fix IP address on ...
Forum: Raspberry PI stuff
Last Post: aart
11-09-2014, 11:15 PM
» Replies: 0
» Views: 3,280

 
  HOWTO: Add certificate for sonarlint into a jdk
Posted by: digdas - 06-05-2017, 05:08 PM - Forum: Java stuff - No Replies

1: Find the JDK with which sonarlint is running with

2: Have the certificate (*.cer) file eg. digdascloud.cer

3: Go to the Java security folder:
/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/security

4: add the certificate:
sudo keytool -import -alias mycert -keystore cacerts -file ~/digdascloud.cer

Password for keystore: changeit

Print this item

  HOWTO: map _R and _S table in one class
Posted by: digdas - 08-12-2014, 06:48 PM - Forum: Java stuff - No Replies

Consider the following tables:

Code:
USER_R
  - ID
  - NAME

USER_S
  - ID
  - COUNTRY
  - USER_R_ID

To map these in one class:
Code:
@Entity
@Table(name="USER_R")
@SecondaryTable(name = "USER_S" pkJoinColumns = { @PrimaryKeyJoinColumn(name = "USER_R_ID", referencedColumnName = "id") })
public class User {
private Long id;
private String country;

@Id
@Column(name="ID")
public Long getId() {...}

@Column(name="COUNTRY", table="USER_S")
public String getCountry() { ... }

Print this item

  Hibernate: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
Posted by: digdas - 08-11-2014, 08:27 PM - Forum: Java stuff - No Replies

The query it occurs on:

Code:
from User user where user.hometown=#{searchObject.town};

Mapping:
Code:
public class User {
...
@Column(name="HOMETOWN_ID", columnDefinition="NUMBER")
public Town getHomeTown() {
return homeTown;
}
...
}

The problem is the mapping. The class Town should be mapped with a ManyToOne mapping. So it should be:
Code:
public class User {
...
@ManyToOne
@JoinColumn(name="HOMETOWN_ID", columnDefinition="NUMBER")
public Town getHomeTown() {
return homeTown;
}
...
}

Print this item