java

Compile Time Weaving of spring aspects in Intellij Idea

To enable compile time weaving of the spring aspects (spring-aspects.jar) in Intellij IDEA (I am using 7.0.3 - but I assume this to be similar for other versions):

  1. Install and enable the AspectJ plugin (http://intellij.expertsystems.se/aspectj.html) - it was available in the plugin manager lists by default
  2. Under Settings > AspectJ Weaver, search for aspects - add the spring-aspects jar and enable weaving
  3. In the build menu - make sure AspectJ weaving is enabled

Deploying jars to third party maven repository via WebDAV

Normally you deploy to a third party repository with a command similar to:

mvn deploy:deploy-file -Dfile=/path/to/file -DrepositoryId=repositoryId
-Durl=wagon:protocol://path/to/repo -DgroupId=groupId -DartifactId=artifactId
-Dversion=version -Dpackaging=packageType

But - to deploy via webdav needs a snapshot wagon.

Technorati Tags:

Adding self-signed https certificates to java keystore

There are several reasons you may need to add a self-signed https ssl certificate to your local java keystore.

For me - its so that maven can access DAV shares for repository deployment.

Illegal type in constant pool

After adding

CATALINA_OPTS=-javaagent:/path/to/aspectweaver-1.5.3.jar

tomcat started failing - giving an "Illegal type in constant pool" about log4j.

spring-ldap and NoClassDefFoundError com.sun.jndi.ldap.ctl.ResponseControlFactory

When using spring-ldap - if you get a NoClassDefFoundError for com.sun.jndi.ldap.ctl.ResponseControlFactory then you need the ldap booster pack (currently 1.0).

Spring AOP and maven dependencies (<aop:spring-configured/>)

Or - why does it say my spring context xml is invalid on <aop:spring-configured/>

Switching between java JDK's on debian

I use the java-package make-jpkg to install java JVM's. I have mostly used sun's JVM's up to now.

I wanted to easily switch between them (which the alternatives mechanism handles well) but also to keep the relevant JAVA_HOME in sync (for things that still need this in the environment).

Technorati Tags:

libapache-mod-jk under sarge

Sarge installation. Apache is 1.3.x (packaged). JBoss is 3.2.7 with tomcat.

Aim: ajp13 working

For each (or at least several) virtual host under apache we have an equivalent webapp running under jboss. We'd like to use apache as the front end server.

So - here's an example app URL:

http://hostname:8080/app/

This should be accessable under

http://hostname/app/

mod_rewrite will be used to handle

http://hostname/ -> http://hostname/app/

since some things are apache only (awstats etc).

First - get libapache-mod-jk installed

apt-get install libapache-mod-jk

JBoss install/startup

JBoss 3.2.x install/startup scripts.

Assumes jdk 1.4.x installed in JAVA_HOME and that the "default" server config from jboss will be used

  1. Unpack jboss distribution in JBOSS_HOME
  2. Create user jboss with home dir the same as JBOSS_HOME
  3. Install jboss users .bashrc
  4. Install jboss rc.d init file
  5. Add rc.d init file to rc?.d directories as needed
  6. touch the file $JBOSS_HOME/jboss.console and then give ownership to the jboss user
  7. Technorati Tags:

Displaying classpath in ant

Something I always forget Smiling

Given

<path id="class.path">

use


<property name="cp" refid="class.path"/>
<echo message="Classpath is ${cp}"/>

Technorati Tags:
Syndicate content
worried