Codedrop™ Weblog

Drop’n some code and other tech tidbits…
  • Home
  • Google Shared
  • About Me
  • Reference Links
Rss feed Subscribe

Entries for the ‘Java’ Category

Use Java to disable certificate validation in an HTTPS Connection

Dec.22, 2011 in Java Comments Off

By default, accessing an HTTPS URL using the URL class results in an exception if the server’s certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all [...]

Tags: Java

OpenSSL Certificate Formats / Conversion

Sep.15, 2009 in Java, Security Comments Off

This past week has left me having to learn much more about https certificates then I ever thought I would care to know…   Here’s a synopsis of some of the highlights of my learnings as pulled from various resources on the web. OpenSSL supports several certificate formats. Certificates are based on the DSA signature algorithm [...]

Tags: certificate, SSL

Create a default ‘usage’ target for your ANT project builds

Aug.14, 2009 in Build Automation, Java Comments Off

I keep coming across instances of ant build files where developers have hard coded a usage target that outputs target actions.  This is not required and should be avoided as it is often not maintained.  Instead, properly maintain the description attribute of each target and use a default target as below:   <project name=”foo” basedir=”.” default=”usage”> [...]

MaxPermSize and how it relates to the overall heap

Jul.16, 2009 in Java, Programming Comments Off

Grails application throwing OutOfMemory error and PermGen space was exceeeded errors… Looks like grails applications require a fairly large permgen space… Here’s a useful  article on how to address this. Tweet This Post

Tags: Java, Memory

Returning raw XML string from Oracle XDB within Groovy / Grails

Jul.13, 2009 in Databases, Java, Oracle Comments Off

Here’s a quick solution for trying to extract the raw xml string from an Oracle XDB database when working with Grails. After an initial attempt to hardcode a hibernate query to return the raw sql using .getStringVal() as follows: SELECT x.id, x.xmlData xmldata.getStringVal(), lines.* FROM xml_requests x XMLTable(‘declare default element namespace “http://www.foo.com/fooservice”; for $i in [...]

Tags: Grails, Groovy, Oracle, XMLDB

Tips for dealing with javac OutOfMemoryError

Jun.12, 2009 in Java, Programming Comments Off

When javac is compiling a large number of java source files, it may fail with java.lang.OutOfMemoryError: The system is out of resources.Consult the following stack trace for details.java.lang.OutOfMemoryError: Java heap space It’s no different than OutOfMemoryError in other java applications. When you run javac in Sun JDK, it’s invoking com.sun.tools.javac.main.Main located in %JAVA_HOME%\lib\tools.jar. If you [...]

Tags: Java, Memory

Changing Header Class (CSS) in JSF Datatables

May.05, 2008 in JSF, Java Comments Off

Something I have always found annoying about JSF datatables is the limitation to only apply one header class style to the entire table. This is un-functional for datatables that would display monetary amount or other data that is typically right aligned whereas descriptive columns are left aligned. The table doesn’t look very nice if the [...]

Tags: CSS, JSF

Intercepting JUnit Assertion Error

May.03, 2007 in Java Comments Off

There have been times where I’ve had the need to perform some custom code when a JUnit test failure occurs. A simple way to handle this would be to catch Throwable do you logic and then re-throw the exception. Not the most elegant of solutions.. but works nonetheless. Heres an example using the selenium rc [...]

Logging (Log4J/Jakarta Commons) Config

Jun.30, 2005 in Java, Programming Comments Off

The Jakarta Commons Logging package is an ultra-thin bridge between different logging libraries. Components may use the Commons Logging API to remove compile-time and run-time dependencies on any particular logging package, and contributors may write Log implementations for the library of their choice. Levels To Use The six logging levels provided by the commons logging [...]

  
  • Tag Cloud

    Blackberry Capistrano certificate Configuration CSS DNS-323 DOS Dreamhost EMS Fedora firebug GMail Google Grails Groovy ie Java jQuery JSF Linux Mac Mac OSX MacPorts Memory Migrations Oracle PERL Rails Ruby Safari SOAP WebService Spring SSL Tibco Time Machine toolbar Trac UI video sony m2ts vlc VMWare Windows XMLDB

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • Blogroll

    • A List Apart
    • Anassina
    • Just Be Kuz
    • Mashable
    • Poker Dreams Online
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Calendar

    February 2012
    M T W T F S S
    « Jan    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  
  • Tags

    Blackberry Capistrano certificate Configuration CSS DNS-323 DOS Dreamhost EMS Fedora firebug GMail Google Grails Groovy ie Java jQuery JSF Linux Mac Mac OSX MacPorts Memory Migrations Oracle PERL Rails Ruby Safari SOAP WebService Spring SSL Tibco Time Machine toolbar Trac UI video sony m2ts vlc VMWare Windows XMLDB
  • Categories

    • Databases (5)
      • Oracle (4)
    • Dreamhost (1)
    • General (26)
    • Google (1)
    • Mobile (1)
    • OS (19)
      • Linux (13)
      • Mac OSX (5)
      • Windows (2)
    • Programming (28)
      • Build Automation (4)
      • Grails (1)
      • Java (9)
      • JBoss (1)
      • jQuery (1)
      • JSF (1)
      • MySQL (1)
      • PERL (1)
      • Rails (4)
      • Ruby (3)
    • Security (1)
    • Spring (1)
    • Tibco (4)
  • Recent Posts

    • from your old 8mm video to TinyUDF to mp4
    • Use Java to disable certificate validation in an HTTPS Connection
    • Enable ssh on your D-LINK DNS-323
    • Crontab Reference
    • How to address TIBCO (Send HTTP Request) SSL Certificate Problems


Green Web Hosting! This site hosted by DreamHost.

© 2007 Codedrop™ Weblog - SafiTech Theme

Full RSS - Comments RSS

Twitter links powered by Tweet This v1.8.1, a WordPress plugin for Twitter.