Some Trials & a lot of Errors
I tried a bunch of framework and other language and I usually feel overwhelm when its time to do something real with what I've learned. So that why I created this site, to write my progress and help some noob like me that stumble into the sames problems.
Browse: Home / Chris / Page 7

Chris

Chris

How to get 70 Millions with only a 5$ investement!

By Chris on June 22, 2021

There is a 70 M lottery draw this week plus 70 one million prizes, I know this is no powerball, but here in Canada we are pretty excited. Even my wife is like: “We need to buy a ticket”. And she bought one with her father because 35M is still an insane amount of money. […]

Posted in rant | Tagged lottery | Leave a response

How to update an entry in an array in mongodb with java MongoTemplate?

By Chris on June 10, 2021

We had at work a piece of code that was using mongorepository and updating the arrays of the object on a collection instead of using mongodb method directly.The way it was coded had a big issues with concurrency and we were losing update because of it.The problem we had with the way it was updating […]

Posted in java, mongodb, prog, tips | Tagged java, mongodb, MongoRepository, MongoTemplate | 1 Response

Assert an Exception is Thrown in JUnit 4 and 5

By Chris on May 19, 2021

This is old news, but having work with big bank and insurance companies they tend to stick with the old version of java and they’re underlying libraries, I’ve finally been expose to new ways of testing exception with junit. I use to test exception by adding an expected right after the @Test annotation.@Test(expected = NullpointerException) […]

Posted in java | Tagged assertJ, java, junit, junit4, junit5, mokito, testing | Leave a response

Solving LazyInitializationException with sonar rules @Transactional method called from another method doesn’t obtain a transaction

By Chris on May 12, 2021

We recently added a feature that allowed direct modification on our content for some client vs using the same path (queues) that the batched content is using. Our user were really happy with it, but after our team implemented the new feature, we started having some LazyInitializationException. exception for that problem org.hibernate.LazyInitializationException: could not initialize […]

Posted in java | Tagged Exception, hibernate, java, LazyInitializationException | Leave a response

Why does Map.of not allow null keys and values?

By Chris on March 2, 2021

Once upon a time an engineer with years of experience encounter something so basic he doesn’t understand why he didn’t encounter it sooner. This week we had a strange error in our log stating that should have a null values in a map. After some digging in the service where that log was found, it […]

Posted in java | Tagged java, java.util.Map, maps, null | Leave a response

Book Review Autumn 2018

By Chris on January 8, 2019

Perenial Seller: The Art of Making and Marketing Work that Lasts  I’m subscribed to Ryan Holiday newsletter and read is latest work on stoic philosophy (Obstacle if the way, Ego is the Enemy, Daily stoic) and when he usually get a book out I buy it. In his book, Perenial Seller, we study on what […]

Posted in book | Tagged 2018, book | Leave a response

Book review Summer 2018

By Chris on December 22, 2018

No drama discipline A another parenting book, I’ve read 3 of those in 2017 alone it’s from the same author of the Whole brain child. Learning to help your child to use their upstairs brain when they are overwhelm in their downstairs brain (emotion). Connect with your child first before trying to do discipline. See […]

Posted in book | Tagged 2018, book, Da Vinci Code, Love yourself, No drama discipline, Recession Proof Graduate | Leave a response

The 20+ books I’ve read in 2017

By Chris on January 29, 2018

In January 2017 I’ve decided I would read 16 books, my goal is to hit 100 books read before I turn 40. I’ve already read 34 in 2013-2014, 26 in 2015, 12 in 2016, so I’m only 8 shorts of my goal, so I’m going to try to read 12 book this year since I’m […]

Posted in book, Review | Tagged book, List, reviews | Leave a response

SVN moving files lose history

By Chris on October 19, 2014

My coworker was moving files around in our SVN repo and we end up losing the history of the file. It seem it was because of our IDE (eclipse svn at the time), after some searching we manage to find a way to do it by using the svn command rename & move. Doing everything […]

Posted in prog | Tagged source control, svn | Leave a response

List Return a java.lang.UnsupportedOperationException when adding or removing a element

By Chris on October 12, 2014

While trying to remove a element after creating a List from a array using the Array.asList(array[]) method I’ve stumbled on that error. java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:131) at java.util.AbstractList.add(AbstractList.java:91) Then I remember this, list created by the Arrays.asList method are immutable Same goes for empty lists. So instead create a arraylist : List<String> list = new ArrayList<String>(Arrays.asList(split));

Posted in java, prog | Tagged arraylist, java, java.util.List | Leave a response

« PreviousNext »

Tags

2018 2022 app apparment baby book books cleaner date daycare db fantasy draft fantasy sports food foods fridge games gifts grocery hibernate hockey hockey pools ideas inspiration java java.util.List learning List meal plan meal planner motivation mysql oracle productivity retail shopping reviews service social games sql String students The Practice to_date uber wedding

Recent Comments

  • pawan on How to update an entry in an array in mongodb with java MongoTemplate?
  • kevin on Oracle have no Boolean, how to fix this

Calendar

November 2025
MonTueWedThuFriSatSun
 12
3456789
10111213141516
17181920212223
24252627282930
« Dec  

Archives

  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • March 2021
  • February 2021
  • May 2020
  • January 2019

Copyright © 2025 Some Trials & a lot of Errors.

Powered by WordPress and Hybrid.