Skip to main content

Posts

Big Data: A Brief Historical Description

The Evolution of Big Data: Understanding its Definition and Applications In recent years, the term "big data" has become a household phrase, describing an overwhelming amount of data that is being generated at an unprecedented rate. However, what does it truly mean to have big data? In this article, we'll delve into the history, characteristics, and applications of big data. The concept of big data dates back to the late 1990s, when experts like Michael Cox, David Ellsworth, John Mashey, and Francis Diebold first began using the term to describe the "information explosion" that was occurring. Since then, our understanding of big data has evolved significantly, with Doug Laney from Gartner's early attempts to define its key parameters. The Three V's of Big Data Laney's work highlighted three critical aspects of big data: volume, variety, and velocity. Volume refers to the sheer amount of data being generated; variety encompasses the diverse types of d...

Catch persistence java.sql.sqlintegrityconstraintviolationexception

Handling SQL Integrity Constraint Violation Exceptions This tutorial will guide you through handling `SQLIntegrityConstraintViolationException` when persisting objects that violate database constraints. Step 1: Catch the EJB Exception Catch a `javax.ejb.EJBException` which wraps the underlying exception. try {     // persistence transactions } catch (Exception e) {     if (e instanceof javax.ejb.EJBException) {         logger.debug("Exception instance of javax.ejb.EjbException");     } } Step 2: Get the Underlying Exception Get the underlying exception from the `EJBException` using `e.getCause()`. try {     // persistence transactions } catch (Exception e) {     if (e instanceof javax.ejb.EJBException) {         logger.debug("Exception instance of javax.ejb.EjbException");         Throwable cause = e.getCause();         if (cause != null) {     ...

Quick Reminder: Golang subfolder import

Here is a tip for importing into your project. First, you import with the folder path but you use the declared package name in the imported class as the anchor to the methods in the imported class. For example, let's say you have your project in the following structure: example    main.go    pwd/       foldering.go To import foldering.go even if the package name declared in foldering.go is different e.g. secondPwd  into main.go main.go package main import (      "example/pwd" ) func main(){     secondPwd.PrintPWD(); } foldering.go package secondPwd import(      "os"      "fmt"      "log" ) //PrintPWD... func PrintPWD() {     dir, err := os.Getwd()      if err != nil {          log.Fatal(err)      }  ...

Fix HTTP error code 513 on Wildfly

The Mysterious Case of TIME_WAIT and IDLE Connections Have you ever encountered a network issue where your server is consistently showing a high number of connections in the TIME_WAIT and IDLE states? This phenomenon can be frustrating, especially when it indicates that the connections are not being closed properly by the server or client. In our investigation, we found that the culprit behind this issue was an HTTP error code 513 being sent to clients from servers. This error code indicates that the server is overloaded and cannot handle more requests. Furthermore, the client was logging a socket close event, which meant it was terminating the connection prematurely. To replicate this issue, we used JMeter and found that the max concurrent connection limit was reached, resulting in an HTTP error code 513. The allowed queue was also full, contributing to the problem. So, what are the consequences of this issue? Performance degradation and resource wastage on both servers and clients ca...

Java Client SSL Setup and Related Errors

Troubleshooting Tips for Effective Configuration Configuring Secure Sockets Layer (SSL) is a crucial step in ensuring the security of your Java client's communication. In this article, we'll walk you through the process of configuring SSL and provide guidance on troubleshooting common errors that may arise during the setup. To troubleshoot issues effectively, follow these steps: - Enable the JVM option -Djavax.net.debug=all - Capture the network traffic dump for faster analysis. Certificate Setup Go to your console and access your <JAVA_HOME>/bin/keytool NB :  The default location for saving the generated files is the user home directory. You can change this by specifying a path. STEP 1: Generate a new key (private key) for a Keystore. This either creates a file called <KEYSTORE_NAME>.keystore or update an existing file if it already exists. The CSR which will be presented to a Certificate Authority (CA) will be generated with this key and alias. <J...

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor /ora-12505 tns listener does not currently know of sid

If you intend to connect with service name XE, edit your listener.ora to look include the XE name. Sample below SID_LIST_LISTENER =   (SID_LIST =   (SID_DESC =       (SID_NAME = XE)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)     )     (SID_DESC =       (SID_NAME = PLSExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )     (SID_DESC =       (SID_NAME = CLRExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )   ) LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))     )   ) ...

Not Able to Start OracleXNTNSListener in Windows Environment

To resolve this issue, Goto your oraclexe directory and navigate to network/ADMIN     e.g oraclexe\app\oracle\product\11.2.0\server\network\ADMIN Open ( listener .ora) in notepad and replace the HOST address with your localhost or current-ip e.g LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))     )   ) DEFAULT_SERVICE_LISTENER = (XE) Open ( tnsnames .ora) with notepad and replace HOST address with your localhost or current-ip address. e.g XE =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST =  localhost )(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = XE)     )   ) Open your command prompt as adminstrator and run  lsnrctl start NB: Yo...

No EJB found with interface of type with Jboss annotation @Management in JavaEE6

“JBoss-specific @Management is not supported with Java EE6-specified @Singleton,” as quoted here: https://developer.jboss.org/thread/164844 . A workaround will be to annotate with @Singleton and @Startup. Also, you could expose your bean through JMX with the snippet below: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();          ObjectName name = new ObjectName("com.example:type=Hello");          Hello mbean = new Hello();          mbs.registerMBean(mbean, name); Read More  

Quartz Scheduler ... Caused by: java.lang.IncompatibleClassChangeError: Found interface org.quartz.JobDetail, but class was expected

Remove              <dependency>             <groupId>quartz</groupId>             <artifactId>quartz</artifactId>             <version>1.6.0</version>             <type>jar</type>         </dependency> and replace with                    <dependency>             <groupId>org.quartz-scheduler</groupId>             <artifactId>quartz</artifactId>             <version>2.2.3</version>         </dependency>

Not generating any bean definitions from... because of underlying class loading error: Type .... from Service Module Loader] not found

This error is common with JBoss module dependencies. I fixed this issue by adding jboss-structure.xml to my src project directory and adding the missing module to the dependencies node. An example of the file's content is below: <?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure>   <deployment>     <dependencies>         <module name="location.missingdependency.jar" services="export" />     </dependencies>   </deployment> </jboss-deployment-structure> Just to mention that this issue was experienced with the EJB jar. For a normal jar/WAR file, a manifest.ft file will do.

Wildfly EJB Remote Client Exceptions.......

Below are exceptions and the solutions I applied while developing a remote client enterprise application. To start with, enable debug for your application server to see the detail and good luck troubleshooting. Exceptions : Starting with  java.lang.ClassNotFoundException: org.hibernate.collection.internal.Persistent......... Solution : I fixed the exception be adding hibernate Entity Manager Dependencies. Exception: Error javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial Solution : Add JBOSS-CLIENT Dependencies to your project Exception : IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling Solution : Confirm that your EJB module have been deployed. Exception : org.jboss.naming.remote.client.initialcontextfactory wildfly     javax.naming.NamingException: WFLYNAM0027: F...

Java EE CDI Annotation Bean name is ambiguous Error

Got this error while deploying one of my applications. After looking around, it appears that the solution to the error I was experiencing was that there was another bean with same identifier. In simple term, verify that you do not have another bean with the same bean identifier/name somewhere in your project. I will suggest that you should change the bean name for a start.

Unable to find the driver com.mysql.jdbc.Driver. Register the driver in the Databases tab

This happened when you tried to create an entity from a database. I am currently using Wildfly 8.1.0, and MySQL 5.1.30 on NetBeans 8.0. To resolve this issue, open the standalone-full.xml of JBOSS. Under the datasources > drivers > driver, make sure the driver name is the same as the datasource > driver. For example, make sure the text highlighted in the following code block is the same: < subsystem xmlns = "urn:jboss:domain:datasources:2.0" > < datasources > < datasource jta = "false" jndi-name = "java:jboss/mysql" pool-name = "mysql" enabled = "true" use-ccm = "false" > < connection-url > jdbc:mysql://localhost:3306/client </ connection-url > < driver-class > com.mysql.jdbc.Driver </ driver-class > < driver > mysql </ driver > </ datasource > < drivers > < dr...

Register MySQL On Wildfly 8(JBOSS SERVER 8)

This is quick trick to register MySQL on Wildfly 8.  Goto  WILDFLY_HOME/modules/system/layers/base/com and create another directories mysql/main Inside the main directory, paste the myql.jar<version>  file inside  and create a "module.xml" file with the follow lines without the code     <?xml version="1.0" encoding="UTF-8"?>         <module xmlns="urn:jboss:module:1.1" name="com.mysql">             <resources>                 <resource-root path="mysql-connector-java-5.1.30-bin.jar"/>             </resources>             <dependencies>                 <module name="javax.api"/>                 <module name="javax.transaction.api"/>           ...

iPhone activation required No Sim Card Installed iPhone 4 after IOS 7 Upgrade Problem Fix

To Bypass the activation required screen after you upgrade to IOS 7.  Note that this process worked for me because I have a SIM card. 1. Power on the iPhone, 2. While the phone is booting and you have the apple logo display,  3. Insert your SIM card. 4. Bypass the wireless connection. 5. Viola. Done. This process works for me. I hope its works for you too. NB: Another way around is to keep clicking try again continuously. 

JSF View Parameter And Java EE 7 XML namespaces

After spending several hours trying to figure out why my old sample codes won't run on Glassfish 4.0 and Java EE 7, I found out that the problem was actually with the new XML schemas for Java. You can find more information about the new XML schemas for Java EE deployment descriptors on Oracle's websit e. You can also find more information about GlassFish Server Documentation on GitHub Pages . I figured out that the problem was actually with the XML Schemas below which I had to update back to the old version. xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"  xmlns:ui="http://xmlns.jcp.org/jsf/facelets"  xmlns:f="http://xmlns.jcp.org/jsf/core" Working Version xmlns="http://www.w3.org/1999/xhtml"  xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"  xmlns:f="http://java.sun.com/jsf/core" I receive a response from this  site , which answered why t...