Skip to main content

0. Justification. Defining our scenario

Introduction

One may think about why to create a new blog. The previous blog JSF Dantescas needed a cleaner format. So I have decided to create a better-structured blog.

Our scenario is

  1. Computer: Lenovo Ideapad 310 with 8 GB of RAM, AMD A12 Processor, SSD 120 GB
  2. OS: Ubuntu 16.04.3 (Realtek 8821ae Wifi driver does not work fine as wifi hangs !!)

In order to try to solve this problem I have followed this steps: 
  1. Open a terminal window and verify that the Realtek 8821ae Wifi card is installed in the computer:

      lspci | grep -i net
    

  2. Follow the instructions from elMaxx! in order to install the Realtek driver,:

    1
    2
    3
    4
    5
    sudo apt-get install linux-headers-generic build-essential git 
    git clone http://github.com/lwfinger/rtlwifi_new.git
    cd rtlwifi_new
    make
    sudo make install
    

  3. Now reboot the system and uninstall and reinstall "rtl8821ae"
    1
    2
    sudo modprobe -r rtl8821ae
    sudo modprobe rtl8821ae
    

  4. Problems should have gone.

  5. Maybe you can restart the Network Manager services, but I think it is not necessary

    1
    sudo service network-manager restart
    

  6. But this procedure did not work. I had to buy a well tested 2,4 GHz USB WiFi receiver (TP Link). And the problem has been solved as Ubuntu recognized it when was plugged before booting the system.
Solution: 

1. Download  Drivers form Ole Petter Bang
2. cd rtl8812au-master
3. make
4. sudo make install
5. modprobe 8812au
6. And then you need to restart your PC.

Required software

  1. Java JDK version 8. (As Java 9 is not completely implemented ok in Eclipse).  Follow the steps of  Rahoul K. (In a near future we will try to use JDK 9, but for now java 1.8 is enough)

  2. 1
    2
    3
    4
    5
    6
    7
    8
    #download repository
    sudo add-apt-repository ppa:webupd8team/java
    
    #update reposotory
    sudo apt-get update
    
    #install
    sudo apt install oracle-java8-installer
    
  3. Download Eclipse Oxygen v2 for JEE and extract the compressed file into a folder.
  4. Download Project-Lombok and execute the jar file to install into eclipse installation.
  5. Download Tomcat 9 and extract the compressed file into a folder
  6. In Eclipse select View-Show View-Server and add a new server Tomcat selecting the folder where it has been installed. 
  7. Install Postgres database from EnterpriseDB.

Verify that:

Lombok has been completely installed. Create a class and add annotation @Getter to an attribute of the class( for instance myName) and verify that you can use the method getMyName is recognized.

Comments

Popular posts from this blog

10. JSF How to access my resources files?

Sometimes it is really difficult to access any resources form different Java applications. So let's see some scenarios: 1. Executable jar application in a NO WEB environment. Take into account that this is not a JSF application !!! It is desired to have a property file outside the "jar file" so that we can change properties when needed. For instance, we will place the properties file in the same folder that the "jar file" lies. To access the folder where the jar is, the trick is to access the folder where the compiled classed are placed and scale 3 folders . (Oh! rather strange, if anybody knows a better idea.., he will be welcome). Here is a simple code. The name of the class containing the code is ThisClass, and we have created a Property class that feeds with a file in the same folder that the" jar file" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 /** * Gets the folder where resides the executable...

9. JSF: Solving common problems

1. Target Unreachable, identifier [bean] resolved to null When you reference a bean in a xhtml file with "#{bean.method}" and get this error, you should verify that: The bean implements Serializable . The references (javax.servlet-api.4.0.0, javax.faces.2.3.3,  javax.el.api.3.0.1, org.primefaces.6.1) have been selected in your pom.xml You have created the files bean.xml and faces-config.xml in the webapp/WEB-INF folder You have used the correct annotations from CDI  (javax.inject.Named and javax.enterprise.context.SessionScoped, ...) and not ManagedBean or jsf2.2 scopes. 2. Bean declaring a passivating scope must be passivation capable This error causes server not starting and fills up the console with long chained exceptions. It is very annoying. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 SEVERE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to star...

2. Create a Maven JSF project and a simple login page

Updated on Oct-25-2107 0. Introduction Remember to install previously: Java JDK 8 Eclipse Oxygen Lombok  Apache Tomcat 9 1. Create a Maven Project In the top menu select : File - New - Maven Project Press Next Now fill the next form as follows It is important to select: Group id: org.ximodante.jsf  (or another packet you like) Packaging: war Artifact Id and Name: JSFv02 or any name for the project Press Finish 2. The pom.xml file Eclipse complains about the simple generated file. It seems that a web.xml is required if the packaging is selected to war. The simple generated file is  1 2 3 4 5 6 7 8 9 <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> org.ximodante...