Tuesday, August 26, 2014

CLOJUG AUG 2014 - Java SE 8 - Java IoT - Adopt a JSR

Hello all! This is a small update about what we did at the Cali (CLO) Java User Group - CLOJUG during August 2014.

This month we had an extra meeting with students at Universidad Javeriana where we talked about the new features of Java SE 8: Date and Time API, Lambda expressions and Streams API. Most of the students had zero or little experience with Java but they were really interested about these new features. The presentation about Java SE 8 can be downloaded from here (in spanish).

We run our regular meeting on 23-AUG-2014 at Universidad Icesi. This meeting was about Java and IoT. One of our members, +Sandro Hdo. Preciado Castro gave us a really great talk about this topic. We all enjoyed watching him with his electronic "toys" and learning from his experience with Java, Raspberry Pi and other devices.

We also talked about Adopt a JSR, we are about to enter the program and, as a start, we'd like to Adopt JSRs from Java SE 9 such as Money and Currency API (JSR 354) and Units of Measurement API (JSR 363). We'll let you know when we have entered the program and we've started to work on these two APIs.

Here are some pictures of this event:

Stay tuned for our events and if you live in Cali-Colombia, come to our meetings and become a member of our great community! http://www.clojug.org/

see ya!

Saturday, August 23, 2014

Oracle Open World and Java One 2014

Hi All,

It's been a while since my last post, but I've been really busy with my job, my JUG and preparing my presentation for the Oracle Open World and Java One 2014!! Yep, I'm speaking again and I'm really excited to be part of the speakers panel at such important conference. I'll be speaking about ADF Essentials and will be participating in a Java community talk as well. Check out my profile here.

This is the place to be if you are working with Oracle technologies, you can learn from experts and be part of the community. Of course, there are other activities such as:

Duke's Café - Welcome Reception
Oracle Technology Network's Tech Fest - Featuring the amazing Australian electronic band Empire of the Sun
CX Central Fest - Featuring Los Angeles indie electronic pop group Capital Cities.
Oracle Appreciation Event - Featuring Aerosmith and Macklemore & Ryan Lewis.

So if you happend to be at the conference this year don't forget to attend my sessions :-)

See ya!

Thursday, July 3, 2014

CLOJUG - July 2014 - Campus Party Colombia

CLOJUG had the opportunity to participate as a community in Campus Party Colombia (CPCO7), it was a great experience and our members received 50% off on the entrance price. Oracle sent us some t-shirts and people loved that, didn't last 5 minutes :)

Stay tuned for our events and if you live in Cali-Colombia, come to our meetings and become a member of our great community! http://www.clojug.org/

see ya

Wednesday, July 2, 2014

Packt Publishing is celebrating 10 years!

To celebrate this huge milestone, Packt Publishing is offering ALL of its eBooks and Videos at just $10 each for 10 days – this promotion covers every title and you can stock up on as many copies as you like until July 5th.

For more information about Packt and this offer, visit: http://bit.ly/1nWalG3. Remember, the campaign ends on July 5th 2014. 

see ya!

Monday, June 2, 2014

CLOJUG - May 2014: Java 8 λs Hands-On-Lab

Hello all! This is a small update about what we did at the Cali (CLO) Java User Group - CLOJUG during May 2014.

We run our regular meeting on 17-MAY-2014 at Universidad Javeriana, our new sponsor. We followed the JavaOne 2013 Hands on Lab about Lambda expressions in Java 8, but using the latest versions of Java SE 8 and Netbeans 8. Attendees were able to play with the new features by resolving some of the exercises, some of them really finished the HOL! Those who finished most of the exercises received either t-shirts or Pluralsight - Hardcore Dev and IT Training coupons.  

Here are some pictures of this event:

Stay tuned for our events and if you live in Cali-Colombia, come to our meetings and become a member of our great community! http://www.clojug.org/

see ya!

Saturday, May 3, 2014

CLOJUG - March and April 2014: JavaFx and Java 8 Tour

Hello all! This is a small update about what we did at the Cali (CLO) Java User Group - CLOJUG during March and April 2014.

On March, we run our regular meeting on 15-MAR-2014 at Universidad Icesi. We had the opportunity to learn about JavaFx from +Steven Lizarazo who has been speaker at JavaOne Brazil and JavaOne San Francisco. He introduced us to this technology which is useful for building rich client applications using Java. At first we had some issues with the WiFi connection, but at the end it worked.
The hangout can be found at (in spanish): https://www.youtube.com/watch?v=f9SjJz2kVRs

During the same meeting we introduced our attendees to some Java 8 features and they got really excited about what's coming with Java 8. This was a glimpse of what was coming on April at CLOJUG, the Java 8 Tour. Following are some pictures of the event:

Java 8 Tour
On April we had our Java 8 Tour, where Evangelists and Java Champions are visiting different Java Users Groups around the globe in order to give presentations and hands on labs about Java 8. We had Angela Caicedo on site speaking about the new features of Java 8 and Java embedded. The HOL was called: "Internet-of-Things Hackerspace", where attendees had the opportunity to interact with several Raspberry Pi that Angela brought for the HOL.

Attendees really enjoyed Angela's presentation and were excited about Java Embedded and the Raspberry Pi. Some of them are now participating in the IoT Developer Challenge for a complete trip to JavaOne 2014!

We, at CLOJUG, are very thankful of being the only Java User Group in Colombia that was part of the Java 8 Tour, which shows that we are the most active JUG in Colombia!

Here are some pictures of this event:

Stay tuned for our events and if you live in Cali-Colombia, come to our meetings and become a member of our great community! http://www.clojug.org/

see ya!

Wednesday, March 19, 2014

Packt Publishing reaches 2000 titles milestone

Extra! Extra!

Hello, I want to share with you all the following press release from Packt Publishing which is celebrating its title number 2000! Packt is giving its reader a chance to dive into their comprehensive catalog and Buy One, Get One Free across their entire range of eBooks during 18th-Mar-2014 and will continue until 26th-Mar-2014. The following conditions apply:

  • Unlimited purchases during the offer period
  • Offer is automatically applied at checkout

For more information about Packt, the kind of books they publish and to qualify for the discounts, visit: http://bit.ly/1j26nPN. Remember, the campaign ends on 26th-Mar-2014.

see ya!

Thursday, February 27, 2014

CLOJUG - February 2014: Adopt a JSR + WildFly 8

Hello all! This is a small update about what we did at the Cali (CLO) Java User Group - CLOJUG during February 2014.

We run our regular meeting on 15-FEB-2014 at Universidad del Valle. We had the opportunity to learn about the JCP, JSRs, the Adopt a JSR program, etc. Why they are important to Java developers and to the Java community. We also had the intervention of other JUG leaders from soujava (Brazil), GuadalajaraJUG (Mexico) and LJC (London) who shared with us their experiences with the program and gave us advice about how to start and keep moving Java forward. Special thanks to +Bruno Souza +Guillermo Munoz +Jim Gough
The hangout can be found at: https://plus.google.com/u/0/events/chti5e646pta0i3vaebmf5a6hd8

During the same meeting we celebrated our first birthday, ate cake and had fun sharing stories from the last year. Here are some pictures from the event:

We also had another meeting where +Arun Gupta introduced us to the new WildFly 8 which is Red Hat's Java EE 7 compliant open source application server. The main features are:

  • Lightweight : It starts in about 2 secs, light disk/memory footprint, loads containers on demand
  • Centralized Administration and Management: Starts in standalone or managed domain mode, provides multiple options to manage using CLI, REST, Admin Console, Ruby, PHP, Java, and others
  • Feature rich: Java EE 7 compliant, polyglot, role based access control, highly optimized new web server

As always, Arun's presentation was very informative and attendees were glad to have another JavaEE7 compliant application server and are eager to download and start playing/using WildFly 8. The event can be found at the following link, but it was not created as a "Hangout on Air" so there is no replay, only links to the slides: https://plus.google.com/u/0/events/c11afovo5qj0de1n1evis609gls

Here are some pictures of this event:

Stay tuned for our events and if you live in Cali-Colombia, come to our meetings and become a member of our great community! http://www.clojug.org/

see ya

Monday, February 24, 2014

GlassFish Extension for JDeveloper 12c Go live!

Hi all, I just wanted to share with you that the Glassfish Extension for JDeveloper 12c is available now. As noted in my previous post, this extension is based on the source code provided by Shay Shmeltzer. You can learn more about his GlassFish Extension for JDeveloper 11g in the following post:

The source code for the extension can be found at the Oracle JDeveloper 3rd Party Extensions project at java.net, so you can help to enhance the extension and further develop it.
While the extension is deployed and hosted on Oracle's servers, so you can download it via JDeveloper's menu: help->check for updates, you can follow these steps in order to do a manual installation:
  1. Download the extension here: Glassfish Extension for JDeveloper 12c

  2. Open JDeveloper and go to: Help->check for updates

  3. Select Install From Local File and browse for the file that you downloaded in step 1 (a .zip file)

  4. JDeveloper will show you a summary before installation, press the Finish button and will restart itself to complete the installation

  5. Once the installation is complete, yo can find a new section in the toolbar and inside the Run menu with the Glassfish Extension buttons

  6. Before you can use the extension, you should configure the paths to your Glassfish server installation, you do that in: Tools->Preferences->Glassfish Preferences

That's it, now you can control your GlassFish server from inside JDeveloper 12c.

see ya!

Tuesday, February 11, 2014

ADF Entity Track Change History Attributes and MySQL Database

Hello all.
Oracle ADF can be used with other databases vendors rather than Oracle, however some out-of-the-box functionalities may not work properly and you'll find yourself looking for workarounds to make them work. Today, we are going to see how we can use the Track Change History properties (CreatedBy, CreatedOn, ModifiedBy, ModifiedOn) of a Business Components Entity when using MySQL.

What you need
JDeveloper 12c
MySQL 5.6.4 or higher

Before we start, you need to know the following:
  • In MySQL 5.5 and higher, InnoDB is the default storage engine. The benefits of this are: ACID Transactions, Referential Integrity, and Crash Recovery.
  • Previous versions of MySQL do NOT store fractional seconds (milliseconds) into columns of any temporal data type. More info on this, here.
  • From version 5.6.4, MySQL stores fractional seconds (milliseconds) into columns of any temporal data type. More info in this, here.
  • You can define how many milliseconds to store from 0 to 6.

To start, execute the following script in MySQL database:

CREATE  TABLE `Player` (
  `name` VARCHAR(150) NOT NULL ,
  `age` INT NOT NULL ,
  `created_by` VARCHAR(50) NULL ,
  `created_on` DATETIME(3) NULL ,
  `modified_by` VARCHAR(50) NULL ,
  `modified_on` DATETIME(3) NULL ,
  PRIMARY KEY (`idPlayer`) )

You can see that we are creating a table with an autoincrement primary key. We have seen before, a workaround about having autoincrement columns in MySQL to work with ADF, but we are not using it in this post. 

Also, notice that we are defining that the DATETIME columns will have 3 milliseconds. Once you have executed the script, go to File->New->Business Components From Tables and follow the wizard to create an Entity of the table Player, a default ViewObject and an Application Module. Remember to configure the SQL Platform as SQL92 and Data Type Map as Java:

JDeveloper will map the DATETIME columns as Timestamp fields in the Entity, which is fine since we want to store milliseconds:

Configure each history attribute as one of: Created On, Created By, Modified On, Modified By and notice that when you configure an attribute as a Track Change History Attribute, JDeveloper will select default values for other properties:

Once all the Track Change History Attributes are set, you can run the Application Module in order to test the functionality. However, you may find the following error when trying to commit to the database:

Current time is not available from SQL statement "select sysdate from dual".: Unknown column 'sysdate' in 'field list'...

This is happening because the Application Module tries to get the current date from the database using Oracle's statement: "select sysdate from dual", which is not valid in MySQL. In order to change that, go to your Application Module and edit the LOCAL configuration:

A pop up opens, go to the Properties section and look for a property called: jbo.sql92.DbTimeQuery

We need to change the value of that property to something that works on MySQL. There are many DATE related functions in MySQL, here we are going to use NOW(). So, change the value of the jbo.sql92.DbTimeQuery to:

select NOW() from dual

Click OK button and save your changes.

CAUTION: At the time of this writing, JDeveloper is using mysql-connector-java-commercial-5.1.22-bin.jar as the default MySQL library. However, when I tried the above configuration using that library, it didn't work because no milliseconds information were being stored into the database. The solution is to update the MySQL driver. You can find the official MySQL connector drivers at: http://dev.mysql.com/downloads/connector/j/

If you don't update the MySQL driver, you may experience the following error when trying to modify a row (this is the so called Phantom Error):

The following picture was taken when using the default MySQL library, notice that there is no milliseconds information saved into the database:

And here is the picture after using the latest MySQL connector, notice the milliseconds information:

When you have downloaded the new version of the driver, you have to remove the default MySQL library from your project and add the new jar. Go to your project Properties:

Run the Application Module again, create or modify rows and this time it should work.

That's it, with the above configuration you are now ready to use the Track Change History functionality when using MySQL database.

see ya!


MySQL 5.6 Reference Manual :: 12.7. Date and Time Functions. MySQL [online].
Available on Internet: http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html
[accessed on February 09 2014].

MySQL 5.6 Reference Manual :: 11.3.6. Fractional Seconds in Time Values. MySQL [online].
Available on Internet: http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
[accessed on February 09 2013].

MySQL 5.6 Reference Manual :: InnoDB as the Default MySQL Storage Engine. MySQL [online].
Available on Internet: https://dev.mysql.com/doc/refman/5.6/en/innodb-default-se.html
[accessed on February 09 2013].