Wuhai’s Weblog

July 28, 2008

Axis2 codegen for eclipse – InvocationTargetException

Filed under: Java — wuhai @ 1:04 pm

Eclipse 3.4 – Axis2 1.4. Downloaded Axis2 eclipse codegen wizard 1.4, but it is not working, getting InvocationTargetException all the time.

Solution: Download it from here:

http://www.javaeye.com/post/560587

axis2_codegen_wizard_130

July 18, 2008

RHEL5 Java 1.4/Java5 switch

Filed under: Java — wuhai @ 4:39 pm

By default, RHEL5 comes with Java 1.4. How to switch to Java5:

Java5 got installed at /usr/local/jdk1.5.0_16. Then do the following:

/usr/sbin/alternatives –install /usr/bin/java java /usr/local/jdk1.5.0_16/bin/java 100

[root@wpprdwf ~]# /usr/sbin/alternatives –config java

There are 2 programs which provide ‘java’.

Selection    Command
———————————————–
*+ 1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2           /usr/local/jdk1.5.0_16/bin/java

Enter to keep the current selection[+], or type selection number: 2
[root@wpprdwf ~]# java -version
java version “1.5.0_16″

March 10, 2008

Maven repository / JAR

Filed under: Java — wuhai @ 6:34 pm

The JAR file ‘oracle-portlet-tags.jar’ can’t be found in maven repository.

The following can be done to work around the above issue:

mvn install:install-file -Dfile=oracle-portlet-tags.jar -DgroupId=oPortal -D
artifactId=oracle-portlet-tags.jar -Dversion=1.0 -Dpackaging=jar

In pom.xml file, add the following entries under ‘dependencies’ tag:

<dependency>
<groupId>oPortal</groupId>
<artifactId>oracle-portlet-tags</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency

Issue solved.

March 6, 2008

Spring + Portlet + HelloWorld

Filed under: Java — wuhai @ 10:41 am

ref: http://www.ibm.com/developerworks/websphere/library/techarticles/0802_patil-pt1/0802_patil-pt1.html

Thanks to the above URL, I finally am able to get my first Hello World Portlet to work, using Eclipse + Spring + OC4J 10.1.3.3 + Portal 10.1.4.

March 3, 2008

eclipse + maven + plug-in

Filed under: Java — wuhai @ 9:23 am

Keeps getting the following message and lots of errors after that in eclipse, and it complains about a missing file settings.xml:

Repository ‘central’ will be blacklisted

It turns out I have to manually create this file at: ‘C:Documents and Settingshxwu.m2′  and put proxy information in it:

<settings xmlns=”http://maven.apache.org/POM/4.0.0″
xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd”>
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>http_proxy_host_name</host>
<port>http_proxy_port_number</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>
<profiles/>
<activeProfiles/>
</settings>

February 16, 2008

svn+ssh/subeclipse/TortoiseSVN

Filed under: Java — wuhai @ 8:20 am

Windows environment variable:Variable name: SVN_SSH
Variable value: C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe

January 25, 2008

Maven

Filed under: Java — wuhai @ 8:27 am
Tags:

Blog at WordPress.com.