Posts

Avoiding JBoss 6 vulnerability of JMX Console, EJBInvokerServlet and JMXInvokerServlet

Out of the box installation of Jboss will get you a lot of useful utilities to administer your application server as per your need. But, when accessible from the open internet, these utilities will need to be secured so hackers can't exploit these vulnerability by submitting their requests in order to gain access to the server: EJBInvokerServlet and JMXInvokerServlet Shutdown the JBoss application server Remove the /tmp and /work directories Remove the following folders from the JBoss expanded package: Jboss-home/server/default/deploy/http-invoker.sar Jboss-home/server/default/deploy/jmx-console.war Jboss-home/server/default/deploy/jmx-console-activator-jboss-beans.xml Restart the server and the following URLs shouldn't be accessible: http://localhost:8080/invoker/EJBInvokerServlet http://localhost:8080/invoker/JMXInvokerServlet

Configure Reset GitLab credentials from Command Line

If you're receiving the following error message when trying to do git pull from the command line, then possibly trying to reset the credentials in the git config might help: PS C:\Tools\my-builds> git clone http:// / / .git Cloning into ' '... remote: HTTP Basic: Access denied fatal: Authentication failed for 'http:// / / .git' The following command will reset the credentials in git configuration, so you can reenter them: PS C:\Tools\my-builds> git config --system --unset credential.helper PS C:\Tools\my-builds> git clone http:// / / .git Cloning into ' '... Username for 'http:// ': : Password for 'http:// ': ': remote: Counting objects: 1184, done. remote: Compressing objects: 100% (160/160), done. remote: Total 1184 (delta 294), reused 352 (delta 243) Receiving objects: 100% (1184/1184), 496.40 KiB | 970.00 KiB/s, done. Resolving deltas: 100% (840/840), done. PS C:\Tools\my-builds>

Copy a folder into another folder in Linux

$ cp -avr /tmp/source/ /tmp/destination The above command will copy the Folder named "source" into destination folder named "destination" The switches are: - a: Retain attributes - v: Verbose - r: Recursively

Environment variables in Linux

Execute the following command to write into the JAVA_OPTS environment variable: # export JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -XX:MaxPermSize=768m"

Saqib Ali for State Senate: An American Story. A True Blue Democrat.

Check out this video explaining why my friend Saqib Ali is running for the State Senate in Maryland. For more information about his achievements as a Maryland State Delegate and his current efforts in running for the Maryland State Senate, visit his blog .

Another sleek device by Apple - Steve Job's Keynote

I do agree to the fact that Steve Jobs states that Netbooks arn't better at anything, they are slow, they arn't better than any laptop, they are just cheaper. And I don't think any one can make good use of such a machine just thinking of portability in their minds while getting one. Let's see how good does iPad do to achieve this, it does look like a giant IPhone but it has 10 hours battery life, no physical keyboard. Wifi and Bluetooth, but I do wonder why they haven't provided any protection for the screen as one would be carrying this pad around.   An overview by the iPad development team itself. I do feel that this device can become a revolutionary portable computing machine, provided that the features that IPhone had such as fast browsing experience, landscape mode for all applications including games, the tilt sensors and above all the App Store. I can't think of any bounds that this device might have considering the fact that there will be tons...

Type casting problem while unmarshalling XML objects using JAXB

While using JAXB to unmarshall objects from a given XML, a very common problem might occur which is the type casting of the unmarshalled object. For instance, for the following code: JAXBContext jaxbContext = JAXBContext.newInstance("user.jaxb"); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); user.jaxb.Type myType = (user.jaxb.Type) unmarshaller.unmarshal(new File("myXML.xml")); For the above code, the error: Exception in thread "main" java.lang.ClassCastException: javax.xml.bind.JAXBElement cannot be cast to user.jaxb.Type might occur. The type of the object returned by the unmarshaller is JAXBElement and trying to typecast it to your resepective type directly causes the classcastexecption, whereas, if you get the value of the returned JAXBElement object by calling the .getValue( ) method, and then do the type casting on this object to your respective type, the problem is solved,  as follows: user.jaxb.Type myType = (user.jaxb.Type)...