Archive

Archive for September, 2010

Nice Post on Ant

September 24, 2010 Leave a comment

Using SVN with Ant (SVNAnt)

September 24, 2010 Leave a comment

What you will need to get the ANT svn task to work is:

JDK 1.5/1.6 – You can get that here.
ANT – You can get that here.
SVN client – You can get that here. You will need to register for this.
SvnAnt zip file – You can get that here.

Here is what to do:

Install JDK if you haven’t done so already.
Install ANT (simply unzip the ANT zip file into an appropriate place) if you haven’t done so already.
Install SVN Client.
Install SvnAnt (simply unzip the SvnAnt zip file into an appropriate place).

To use the ANT svn task:

build.properties:
# —————————————————————————–
# build.properties
# This file is referenced by the sample build.xml file.
# —————————————————————————–

svnant.version=1.0.0

# —————————————————————————–
# all jar needed
# —————————————————————————–
lib.dir=C:/svnant-1.0.0/lib
svnant.jar=${lib.dir}/svnant.jar
svnClientAdapter.jar=${lib.dir}/svnClientAdapter.jar
svnjavahl.jar=${lib.dir}/svnjavahl.jar

svnant.latest.url=http://subclipse.tigris.org/svn/subclipse/trunk/svnant/
svnant.this.url=http://subclipse.tigris.org/svn/subclipse/tags/svnant/${svnant.version}/

svnant.repository.user=user1
svnant.repository.passwd=”passwordUser1″

build.xml:

You can get detailed documentation on svn ANT task here.

weblogic DeployerException

September 23, 2010 Leave a comment

Weblogic has a cache that doesn’t get cleared when you delete the deployment from the Weblogic Console. This can cause an error like the one below when jars in the project change:

BUILD FAILED
The following error occurred while executing this line:weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Task 5 failed: [Deployer:149026]deploy application projectName on AdminServer

The error goes away after deleting the weblogic’s cache located under

${YOURDOMAIN_HOME}\servers\AdminServer\tmp_WL_user

com.bea.wsrp.faults.AccessDeniedException: Access to […] with identifier […] is denied.

September 1, 2010 Leave a comment

This stacktrace usally appers on the WSRP Consumer application when offer as remote = false on the Producer side portlet. Change the value to true under Porlet Properties to let the error go away.

com.bea.wsrp.faults.AccessDeniedException: Access to [portlet] with identifier [welcome] is denied.
	at com.bea.wsrp.producer.handlers.PortletHandleFilter.doFilter(PortletHandleFilter.java:119)
	at com.bea.wsrp.producer.handlers.AbstractServiceHandler.preprocess(AbstractServiceHandler.java:103)
	at com.bea.wsrp.producer.handlers.AbstractServiceHandler.service(AbstractServiceHandler.java:63)
	at com.bea.wsrp.producer.container.ProducerEndPoint.processNow(ProducerEndPoint.java:333)
	at com.bea.wsrp.producer.wsee.ProducerEntryPoint.handleResponse(ProducerEntryPoint.java:90)
	at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
	at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
	at weblogic.wsee.ws.dispatch.server.ServerDispatcher.callHandleResponse(ServerDispatcher.java:341)
	at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:189)
	at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)

How to Import SSL Certificates

September 1, 2010 Leave a comment

To consume https (secure) webservice, you need to import the Server certificate into Client keystore (either default .keystore or /jre/lib/security/cacerts) . In WebLogic Server/Portal scenario only cacerts works.

Access the https URL from browser and EXPORT the certificate to a location with .cer extension or any other extension. Following links would help in exporting the certificate

Import into the keystore
keytool -import -keystore /home/user/jrockit/jre/lib/security/cacerts -alias myCertAlias -file myCert.cer
To delete Certificate
keytool -delete -keystore /home/user/jrockit/jre/lib/security/cacerts  -alias myCertAlias
To list certificate
keytool -list -keystore /home/user/jrockit/jre/lib/security/cacerts

Note: -keystore is to add it to the custom keystore, not the default one. Omitting this option will add the the cert to the default keystore at User home directory.

 

Keystore

September 1, 2010 Leave a comment