Skip to main content

Posts

Showing posts from July, 2015

Solution For Error: " Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000."

Currently I am working on a project where I need to transform Excel sheet data to an XML format in compliance with XSD given by my client. When I am trying to parse the XSD using JAXB I got this error when doing mvn clean install. Error: ""Current configuration of the parser doesn't allow a maxOccurs attribute value to be set greater than the value 5,000." I found many solutions and route cause for this issue. You can find some information on Oracle site the route cause for the issue . It is because of the feature enabled for secure XML processing. This feature was enable in JAXP 1.3 which instructs parsers, transformers to behave in a secure fashion. You can find more information here: https://jaxp.java.net/1.4/JAXP-Compatibility.html#JAXP_security. For me 2 solutions worked out: Solution 1: With code change or implemenetation: //Create SchemaFactory using XSD file SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_UR...

How To Change IPAddress of Linux/Ubuntu ?

Recently I needed to change the existing ipaddress of a linux machine. Since we migrated to our machines in to new cloud servers. Just follow the steps defined below: On terminal window type the following command.            sudo vi /etc/network/interfaces                 or             sudo gedit /etc/network/interfaces

Is It Possible To Define All The Methods In An Abstract Class?

It is possible create an abstract class with all concrete methods. But this class can’t be instantiated. Since it is an abstract class.    We may have situations where we don’t want to instantiate a class which is the base class for all the classes in the system or application. This base class may have lot of methods used for different modules in the application and we do not want to instantiate the object of the base class and want to use only the reference of the class.   An abstract class without any abstract methods should be a rare thing and you should always question your application design if this case arises. Normally you should refactor to use a concrete super class in this scenario.   One specific case where abstract class may justifiably have no abstract methods is where it partially implements an interface, with the intention that its subclasses must complete the interface.

Creating a Docker Group

The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo. For this reason, docker daemon always runs as the root user. To avoid having to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group. Note: The docker group is equivalent to the root user; To create the docker group and add your user: Log into Ubuntu as a user with sudo privileges.

What is Docker? How To Install Docker on Ubuntu 14.04?

  Docker is an open source container based software framework that automates the deployment of applications inside a software contains by providing an additional abstraction layer and automation of operating system level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines. How to Install: Open Ubuntu Terminal Window and login as a root. Follow the below steps.

Are Java Constructors Inherited ? If Not, Why Not?

You cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it's super classes. One of the main reasons is because you probably don't want to override the constructor of super class', which would be possible if they were inherited. By giving the developer the ability to override a super class constructor you would erode the main feature of encapsulation abilities of the java programming language.

How To Install Tomcat on Ubuntu?

Recently, I started working on Ubuntu OS 14.04. I feel Ubuntu is much simpler than what I thought earlier. Lets leave about Ubuntu, I want to blog more about Ubuntu OS afterwards. Here I want to brief about how to install Tomcat webserver on Ubuntu.  Apache Tomcat is an open source webserver where we can deploy java applications. Go to terminal window on Ubuntu and login as a root user. 1. Install Java First: Before installing Tomcat server, it is better to install Java. Run the following command on terminal window to check Java is already installed.              java -version  If it returns "The program 'java' can be found in the following packages:" the Java is not installed on Ubuntu. To install Java, just run the below command. After this we have to add Java to environment variables in .bashrc. We will add both Java and Tomcat after the installation of Tomcat webserver.      ...

How to Install Maven ?

Nowadays its very common for Java developers to use Maven tool for building war or ear file their applications instead of ant tool. Since Maven provides an easiest way of building and managing version of applications and relieves you from build path configurations in your eclipse ide. Of course many people knows how to configure how to download and configure maven in their machines. But I want to post it on my blog for my reference and newbies in java world. Just follow the below steps:  Make sure Java (version 1.5 or 1.6 or 1.7 ) is installed on your machine and "JAVA_HOME" variable is added to environment variable list on windows as shown below image.(Windows start -> My Compuetr-> Right Click on ->Properties ->Advanced System Settings ->System Settings-> Click on "Environment Variables") Download latest version of Maven (apache-maven-3.3.3-bin.zip) from Apache Website: http://maven.apache.org/download.cgi to the directory on you...