Hibernate – Fetch from database according to language

I have an MVC app which is aimed to be internationalized. I have a table MY_TABLE containing a field word that I would like to translate in several languages. I created the following model:

CREATE TABLE MY_TABLE(     id int PRIMARY KEY,     -- other fields that don't need to be translated ); CREATE TABLE LANGUAGE(     id VARCHAR(4) PRIMARY KEY -- eg en ); CREATE TABLE MY_TABLE_WORD_TRANSLATION(     id int PRIMARY KEY,     language_id VARCHAR(4),     my_table_id int,     word_translation VARCHAR(100),     FOREIGN KEY(language_id) REFERENCES LANGUAGE(id),     FOREIGN KEY(my_table_id) REFERENCES MY_TABLE(id) ); 

Now with Hibernate I created the corresponding classes.

@Entity @Table(name="LANGUAGE") public class Language {     private String id;      public Language(){}     public Language(String id) {         super();         this.id = id;     }     @Id     @Column(nullable=false)     public String getId() {         return id;     }     public void setId(String id) {         this.id = id;     } }   @Entity @Table(name="MY_TABLE") public class MyTable {     private int id;      public MyTable(){}     public MyTable(int id) {         super();         this.id = id;     }     @GeneratedValue     @Id     public int getId() {         return id;     }     public void setId(int id) {         this.id = id;     } }  @Entity @Table(name="MY_TABLE_WORD_TRANSLATION") public class MyTableWordTranslation {     private int id;     private String translation;     private Language language;     private MyTable myTable;      public MyTableWordTranslation() {}     public RegionNameTranslation(int id, String translation, Language language, MyTable myTable) {         super();         this.id = id;         this.translation = translation;         this.language = language;         this.myTable = myTable;     }     @GeneratedValue     @Id     public int getId() {         return id;     }     public void setId(int id) {         this.id = id;     }     @Column(nullable=false)     public String getTranslation() {         return translation;     }     public void setTranslation(String translation) {         this.translation = translation;     }     @ManyToOne     @JoinColumn(name="language_id")     public Language getLanguage() {         return language;     }     public void setLanguage(Language language) {         this.language = language;     }        @ManyToOne     @JoinColumn(name="my_table_id")     public MyTable getMyTable() {         return myTable;     }     public void setMyTable(MyTable myTable) {         this.myTable = myTable;     } } 

So the question is how to map into MyTable the field MyTableWordTranslation in order to get only the translation I need:

  • Is it in the DAO class, in the HQL queries but then, what query should I write? For now I have SELECT mytable FROM MyTable mytable
  • I tried to map with @OneToMany with a @Where filter, but how can I set a parameter in this filter: @Where(clause="language_id = 'en'")? The language is specified into the GET resquest from the client.

Thanks

Hibernate 4 e 5

Ola, developers, estou com uma duvida mortal, estou aprendendo hibernate, com o curso do youtube do descompila, mas é totalmente pratico, e vi que acompanhando ele somente, fico com uma deficiencia teoria(ao menos nesse curso), estou querendo entender como as coisas realmente funcioname no hibernate, nesse curso ele usa a versão 5, a algaworks possui um livro mt bom explicando as nuawaces de tudo referente ao hibernate e jpa, porem eh na versão 4.6, estou confuso, pq nao sei se as mudanças da versão 4, para 5 foram tão signficativas a ponto de tonar invalido, e acompanhar os dois vai me deixar confuso ou aprender coisa defasada, qual o conselho de vcs para isso? a versão 4 para 5 possuem mudanças tão grandes assim?…… segue o link do curso https://www.youtube.com/playlist?list=PLWd_VnthxxLecV572IBOKhJhg-k1HkisY e do livro https://cafe.algaworks.com/livro-jpa-e-hibernate/

Hibernate не сохраняет объект в базе данных

При сохранении объекта в базу данных вылетает исключение

    янв 06, 2019 6:22:02 PM org.hibernate.internal.ExceptionMapperStandardImpl mapManagedFlushFailure     ERROR: HHH000346: Error during managed flush [Row was updated or deleted by another transaction  (or unsaved-value mapping was incorrect) : [model.Account#3]] 

значения hibernate.connection.autocommit установил true

Как в Hibernate создать запрос с параметром?

Всем привет. Изучаю Hibernate, делаю запрос

 Scanner scanner = new Scanner(System.in);     em = emf.createEntityManager();     System.out.println("Write min price");     int minPrice = scanner.nextInt();     System.out.println("Write max price");     int maxPrice = scanner.nextInt();      Query query = em.createQuery(             "select m from Menu m where m.price> :minPrice AND m.price<:maxPrice", Menu.class);     query.setParameter("maxPrice", maxPrice);     query.setParameter("minPrice", minPrice);     List<Menu> menus = query.getResultList();     for (Menu menu: menus){         System.out.println(menu);     } 

В этой строчке программа вылетает. Не могу правильно сделать запрос с параметром – query.setParameter(“maxPrice”, maxPrice);

Если же без параметра в самом запросе прописать данные то все норм.

Query query = em.createQuery(                 "select m from Menu m where m.price>5 AND m.price<15", Menu.class);         //query.setParameter("maxPrice", "maxPrice");        // query.setParameter("minPrice", "minPrice");         List<Menu> menus = query.getResultList();         for (Menu menu: menus){             System.out.println(menu);         } 

` Я так понимаю, что не правильно устанавливаю параметр или прописываю в самом запросе его. В чем проблема?

JAP vs Hibernate Lazy loading

In many places I see @LazyToOne is used along side @ManyToOne despite there is FetchType.Lazy. In some article I found they are equivalent to each other. This makes me confused.

Are these two annotations are identical to each other or not? Can one be replaced completely by the other one? Or one has advantage over another?

//Hibernate @LazyToOne(PROXY)  //JPA @[One|Many]ToOne(fetch=FetchType.LAZY) 

Can’t get hibernate to work on Ubuntu 18.04

I can’t get Hibernate to work on Ubuntu 18.04, I tried following these tutorials and after all the steps below hibernate still acts as a normal reboot.:

Github – gnome-shell-extension-hibernate-status

Askubuntu: Hibernation in 18.04

System:

ASUS N580VD with 16GB of ram and 20GB swap

Partition table:

sda     238,5G   ├─sda1    499M  Windows recovery  ├─sda2    100M  EFI System ├─sda3     16M  Microsoft reserved ├─sda4  117,9G  Microsoft basic data ├─sda5     20G  Linux swap └─sda6    100G  Linux filesystem 

Swap partition UUID:

sudo blkid | grep sda5 /dev/sda5: TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="00008cf7-fb20-9347-0ab1-df0fee190100" 

Content of /etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>  # / was on /dev/sda6 during installation UUID=27ed4a93-0aa1-d401-206c-4a930aa1d401 /               ext4    errors=remount-ro 0       1  # /boot/efi was on /dev/sda2 during installation /dev/sda5       none            swap    sw              0       0 /dev/disk/by-uuid/01D4A10A933D25B0 /mnt/01D4A10A933D25B0 auto nosuid,nodev,nofail,noauto 0 0 /dev/disk/by-uuid/864A-6441 /mnt/864A-6441 auto nosuid,nodev,nofail 0 0  # Entry for Swap (added for hibernate):  UUID=00008cf7-fb20-9347-0ab1-df0fee190100 none  swap    sw              0       0 

Contents of /etc/default/grub:

GRUB_DEFAULT="saved" GRUB_TIMEOUT_STYLE="hidden" GRUB_TIMEOUT="2" GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=00008cf7-fb20-9347-0ab1-df0fee190100" GRUB_CMDLINE_LINUX=""  export GRUB_COLOR_NORMAL="white/black" export GRUB_COLOR_HIGHLIGHT="light-blue/black" GRUB_SAVEDEFAULT="true" 

Contents of /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla:

[Re-enable hibernate by default in upower] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes  [Re-enable hibernate by default in logind] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit ResultActive=yes  [Enable hibernate to be run via cron] Identity=unix-user:* Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions ResultAny=yes 

Content of /etc/initramfs-tools/conf.d/resume:

resume=UUID=00008cf7-fb20-9347-0ab1-df0fee190100 

Did these commands:

sudo update-initramfs -u -k all sudo update-grub 

I also installed gnome-shell-extension-hibernate-status. Any help would really be apreciated!

Relatório PDF Java com Diversas Listas de Objetos com Hibernate – Melhor Caminho

Não tenho muita habilidade com relatórios através de java, estudei algumas ferramentas para encontrar o melhor caminho de para solucionar a dificuldade onde me encontro.

Tenho uma aplicação onde possuo um curriculo com diversas lista de objetos como, Lista de Telefone, List de ExperienciaProfissional, List de ObjetivoProfissional dentre outras. Eu preciso apresentar todas essas informações em um PDF. Até então o principal ferramente que encontrei foi o Jasper, porem eu uso hibernate e para facilitar o preenchimento das listas e a busca no banco, evito usar SQL então o esquema é passar as listas por parâmetro para o relatório jasper, porem encontro dificuldade de como montar no IReport diversas listas para recepcionar os parâmetros, porque os tutorias e artigo que encontrei, são passando apenas uma lista e sub lista e poucos parâmetros específicos, e também me deparo com a dificuldade passar o Relacionamento de entidades dentro da lista, exemplo a Lista de Telefone tem o atributo DDD e preciso apresentar o Numero da Entidade DDD no relatório.

Outra forma simples que pensei é usar uma página xhtml e montar as informações lá, porem a ferramente que encontrei pra fazer isso é a lib do IText, mas na versão muito antiga 2.0.8 onde usava as junto com R8pre2 e me deparei com muitos erros de incompatibilidade.

Minha aplicação usa Maven, estou buscando o caminho mais fácil pra uma solução mais de imediata, usando Hibernate. Desculpe se já existe tópico com perguntas relacionadas a essa, mas estou rodando na internet a semana e não consegui encontrar.

Desde já agradeço.

Ubuntu 18.04LTS hangs on wake from hibernate. Time seems to jump to extremely high value. Swap seems large enough. Help!

I’ve always had issues with my Precision 5530 (16 GB ram, Quadro P2000, Intel 8850H)when hibernating. It runs Ubuntu 18.04 + NVidia 410 drivers (via apt). Never had issues with the graphics drivers. I just reinstalled the system, so it has minimal modifications, but still nothing has changed.

At first, before I modified the swap configuration, there was a swap file of 2 GB. When waking from hibernate only a black screen with a blinking cursor (underscore) would be shown. No response when trying to open TTY terminals.

I realized that the swap file might be too small to hibernate, and from the previous installation there was still a 34 GB swap partition I hadn’t bothered to refuse, so after setting resume= to the UUID in the grub configuration and initramfs-tools, updating grub and ramfs and mounting the partition on startup, I tried again. Now, on wake-up I was displayed by some rather crptic message, and system time seems to jump to extremely high numbers. Still, TTY is unresponsive and I have to force shutdown my system.

I’m a little a wit’s end here. I included one syslog, where the hang occurs before the shutdown at Dec 23 23:00:08. If anyone can shed some light on this I would be very grateful.

Here’s the full log.

Minute or so up to freeze:

Dec 23 22:59:30 lars-Precision-5530 wpa_supplicant[942]: wlp59s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-57 noise=9999 txrate=115600 Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867529] CPU3: Core temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867530] CPU6: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867531] CPU0: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867532] CPU11: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867557] CPU9: Core temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867559] CPU5: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867561] CPU9: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867563] CPU1: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867563] CPU7: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867564] CPU8: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867566] CPU10: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867567] CPU2: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867568] CPU4: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.867573] CPU3: Package temperature above threshold, cpu clock throttled (total events = 1) Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868523] CPU3: Core temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868524] CPU6: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868524] CPU0: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868524] CPU9: Core temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868525] CPU11: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868525] CPU3: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868526] CPU5: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868526] CPU9: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868556] CPU1: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868557] CPU7: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868558] CPU2: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868559] CPU8: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868560] CPU10: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 kernel: [   57.868560] CPU4: Package temperature/speed normal Dec 23 22:59:30 lars-Precision-5530 systemd[1]: Starting Stop ureadahead data collection... Dec 23 22:59:30 lars-Precision-5530 systemd[1]: Started Stop ureadahead data collection. Dec 23 22:59:30 lars-Precision-5530 dhclient[2401]: DHCPACK of 192.168.178.13 from 192.168.178.1 Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9756] dhcp4 (wlp59s0):   address 192.168.178.13 Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9756] dhcp4 (wlp59s0):   plen 24 (255.255.255.0) Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9756] dhcp4 (wlp59s0):   gateway 192.168.178.1 Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9756] dhcp4 (wlp59s0):   lease time 3600 Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9756] dhcp4 (wlp59s0):   nameserver '84.116.46.23' Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9757] dhcp4 (wlp59s0):   nameserver '84.116.46.22' Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9757] dhcp4 (wlp59s0):   domain name 'dynamic.ziggo.nl' Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9757] dhcp4 (wlp59s0): state changed unknown -> bound Dec 23 22:59:30 lars-Precision-5530 avahi-daemon[866]: Joining mDNS multicast group on interface wlp59s0.IPv4 with address 192.168.178.13. Dec 23 22:59:30 lars-Precision-5530 avahi-daemon[866]: New relevant interface wlp59s0.IPv4 for mDNS. Dec 23 22:59:30 lars-Precision-5530 avahi-daemon[866]: Registering new address record for 192.168.178.13 on wlp59s0.IPv4. Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9772] device (wlp59s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') Dec 23 22:59:30 lars-Precision-5530 whoopsie[1344]: [22:59:30] Cannot reach: https://daisy.ubuntu.com Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9776] device (wlp59s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed') Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9778] device (wlp59s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed') Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9779] manager: NetworkManager state is now CONNECTED_LOCAL Dec 23 22:59:30 lars-Precision-5530 dhclient[2401]: bound to 192.168.178.13 -- renewal in 1585 seconds. Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9808] manager: NetworkManager state is now CONNECTED_SITE Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9809] policy: set 'Ziggo25AD4' (wlp59s0) as default for IPv4 routing and DNS Dec 23 22:59:30 lars-Precision-5530 NetworkManager[930]: <info>  [1545602370.9811] device (wlp59s0): Activation: successful, device activated. Dec 23 22:59:30 lars-Precision-5530 nm-dispatcher: req:3 'up' [wlp59s0]: new request (1 scripts) Dec 23 22:59:30 lars-Precision-5530 nm-dispatcher: req:3 'up' [wlp59s0]: start running ordered scripts... Dec 23 22:59:30 lars-Precision-5530 gsd-sharing[1735]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-user-share-webdav.service not loaded. Dec 23 22:59:30 lars-Precision-5530 gsd-sharing[1735]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded. Dec 23 22:59:30 lars-Precision-5530 gsd-sharing[1735]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded. Dec 23 22:59:31 lars-Precision-5530 PackageKit: resolve transaction /147_ccbdcaca from uid 1000 finished with success after 242ms Dec 23 22:59:31 lars-Precision-5530 avahi-daemon[866]: Joining mDNS multicast group on interface wlp59s0.IPv6 with address fe80::e15e:1377:7f0c:b0b1. Dec 23 22:59:31 lars-Precision-5530 avahi-daemon[866]: New relevant interface wlp59s0.IPv6 for mDNS. Dec 23 22:59:31 lars-Precision-5530 avahi-daemon[866]: Registering new address record for fe80::e15e:1377:7f0c:b0b1 on wlp59s0.*. Dec 23 22:59:33 lars-Precision-5530 NetworkManager[930]: <info>  [1545602373.3018] manager: NetworkManager state is now CONNECTED_GLOBAL Dec 23 22:59:33 lars-Precision-5530 nm-dispatcher: req:4 'connectivity-change': new request (1 scripts) Dec 23 22:59:33 lars-Precision-5530 nm-dispatcher: req:4 'connectivity-change': start running ordered scripts... Dec 23 22:59:33 lars-Precision-5530 whoopsie[1344]: [22:59:33] The default IPv4 route is: /org/freedesktop/NetworkManager/ActiveConnection/2 Dec 23 22:59:33 lars-Precision-5530 whoopsie[1344]: [22:59:33] Not a paid data plan: /org/freedesktop/NetworkManager/ActiveConnection/2 Dec 23 22:59:33 lars-Precision-5530 whoopsie[1344]: [22:59:33] Found usable connection: /org/freedesktop/NetworkManager/ActiveConnection/2 Dec 23 22:59:33 lars-Precision-5530 whoopsie[1344]: [22:59:33] online Dec 23 22:59:34 lars-Precision-5530 PackageKit: resolve transaction /148_badccdcc from uid 1000 finished with success after 259ms Dec 23 22:59:45 lars-Precision-5530 boltd[1197]: power: got event for guard '2' (10) Dec 23 22:59:45 lars-Precision-5530 boltd[1197]: power: guard '2' for 'fwupd' deactivated Dec 23 22:59:45 lars-Precision-5530 boltd[1197]: power: shutdown scheduled (T-20.00s) Dec 23 22:59:53 lars-Precision-5530 gnome-software-service.desktop[2492]: Unable to acquire bus name 'org.gnome.Software' Dec 23 22:59:57 lars-Precision-5530 systemd-timesyncd[757]: Synchronized to time server 91.189.91.157:123 (ntp.ubuntu.com). Dec 23 23:00:05 lars-Precision-5530 boltd[1197]: power: setting force_power to OFF Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748031] xhci_hcd 0000:3a:00.0: remove, state 4 Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748036] usb usb4: USB disconnect, device number 1 Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748253] xhci_hcd 0000:3a:00.0: USB bus 4 deregistered Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748294] xhci_hcd 0000:3a:00.0: xHCI host controller not responding, assume dead Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748298] xhci_hcd 0000:3a:00.0: remove, state 4 Dec 23 23:00:07 lars-Precision-5530 upowerd[1112]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb4/4-0:1.0 Dec 23 23:00:07 lars-Precision-5530 upowerd[1112]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb3/3-0:1.0 Dec 23 23:00:07 lars-Precision-5530 upowerd[1112]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb4 Dec 23 23:00:07 lars-Precision-5530 upowerd[1112]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:02.0/0000:3a:00.0/usb3 Dec 23 23:00:07 lars-Precision-5530 boltd[1197]: [c9030000-0070-Precision 15 M5530         ] removed (/sys/devices/pci0000:00/0000:00:1b.0/0000:02:00.0/0000:03:00.0/0000:04:00.0/domain0/0-0) Dec 23 23:00:07 lars-Precision-5530 boltd[1197]: [c9030000-0070-Precision 15 M5530         ] dbus: unexported Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748303] usb usb3: USB disconnect, device number 1 Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748489] xhci_hcd 0000:3a:00.0: Host halt failed, -19 Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748496] xhci_hcd 0000:3a:00.0: Host not accessible, reset failed. Dec 23 23:00:07 lars-Precision-5530 kernel: [   95.748617] xhci_hcd 0000:3a:00.0: USB bus 3 deregistered Dec 23 23:00:08 lars-Precision-5530 boltd[1197]: domain: 'domain0' removed Dec 23 23:00:08 lars-Precision-5530 boltd[1197]: dbus: domain0 unexported: ok Dec 23 23:00:08 lars-Precision-5530 boltd[1197]: domain: 'domain0' removed Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251302] thunderbolt 0000:04:00.0: stopping RX ring 0 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251314] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 12 (0xffffffff -> 0xffffefff) Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251317] thunderbolt 0000:04:00.0: stopping TX ring 0 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251324] thunderbolt 0000:04:00.0: disabling interrupt at register 0x38200 bit 0 (0xffffffff -> 0xfffffffe) Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251326] thunderbolt 0000:04:00.0: control channel stopped Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251358] thunderbolt 0000:04:00.0: freeing RX ring 0 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251363] thunderbolt 0000:04:00.0: freeing TX ring 0 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.251367] thunderbolt 0000:04:00.0: shutdown Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291016] pci_bus 0000:03: Allocating resources Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291061] pcieport 0000:03:01.0: bridge window [io  0x1000-0x0fff] to [bus 05-39] add_size 1000 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291075] pcieport 0000:03:02.0: bridge window [io  0x1000-0x0fff] to [bus 3a] add_size 1000 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291077] pcieport 0000:03:02.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 3a] add_size 200000 add_align 100000 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291091] pcieport 0000:02:00.0: bridge window [io  0x1000-0x0fff] to [bus 03-3a] add_size 2000 Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291094] pcieport 0000:02:00.0: BAR 13: no space for [io  size 0x2000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291094] pcieport 0000:02:00.0: BAR 13: failed to assign [io  size 0x2000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291095] pcieport 0000:02:00.0: BAR 13: no space for [io  size 0x2000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291096] pcieport 0000:02:00.0: BAR 13: failed to assign [io  size 0x2000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291099] pcieport 0000:03:02.0: BAR 15: no space for [mem size 0x00200000 64bit pref] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291100] pcieport 0000:03:02.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291100] pcieport 0000:03:01.0: BAR 13: no space for [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291101] pcieport 0000:03:01.0: BAR 13: failed to assign [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291102] pcieport 0000:03:02.0: BAR 13: no space for [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291102] pcieport 0000:03:02.0: BAR 13: failed to assign [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291104] pcieport 0000:03:02.0: BAR 15: no space for [mem size 0x00200000 64bit pref] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291105] pcieport 0000:03:02.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291105] pcieport 0000:03:02.0: BAR 13: no space for [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291106] pcieport 0000:03:02.0: BAR 13: failed to assign [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291107] pcieport 0000:03:01.0: BAR 13: no space for [io  size 0x1000] Dec 23 23:00:08 lars-Precision-5530 kernel: [   96.291108] pcieport 0000:03:01.0: BAR 13: failed to assign [io  size 0x1000] 

Is it safe to delete Hiberfil.sys if only Fast Startup (no hibernate) is used on Windows 10?

When I attempt to mount my Windows 10 C: drive from macOS (Hackintosh) using Paragon NTFS for Mac, it gives me the following error:

Mounting error

This is because I have setup Fast Startup on Windows 10. IIRC, Fast Startup doesn’t actually hibernate the OS (or files/programs), it just keeps the NT Kernel and a few other components “hibernated” to disk for a faster boot time. Since I don’t want to reboot to Windows every time I need to access my Windows partition from macOS (nor do I want to give up Fast Startup), and since I’m not actually hibernating any program with the OS (but rather “shutting down”), is it safe to “Force Mount” and hence remove the hiberfil.sys “swap” file?