Search More About Above Topic Here

Custom Search

How To Solve "Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4"

Links to this post
I was trying to solve this error in my Ubuntu. Since I need to build Hue /Spark Application and when run the "make apps" or "mvn --version" command on terminal, I was getting "

Error: Could not find or load main class org.codehaus.classworlds.Launcher while building Maven 3.0.4
This error ate all my day almost. Finally found a solution on one website. Just you need to uninstall old maven versions or existing maven. and

sudo apt-get purge maven maven2 maven3
sudo apt-add-repository ppa:andrei-pozolotin/maven3
sudo apt-get update
sudo apt-get install maven3
 Thanks a lot to those guys for a great help.

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

Links to this post
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 infor 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_URI);
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING,false);
Schema schema = factory.newSchema(xsdSource);


Solution 2:

How To Change IPAddress of Linux/Ubuntu ?

Links to this post
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?

Links to this post
  • 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

Links to this post
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.
Custom Search
Related Posts with Thumbnails