$
$ PS1="myPrompt> "
myPrompt>
myPrompt>
Thursday, January 22, 2009
Change Prompt
Posted by
techgeek168
at
8:39 AM
0
comments
Labels: UnixBashVi
Calulation in bash
bash$
bash$ echo "1.5 * 2" | bc -l
3.0
bash$ echo "1/3" | bc -l
.33333333333333333333
bash$
bash$ echo "scale=3; 10/3" | bc
3.333
Posted by
techgeek168
at
8:38 AM
0
comments
Labels: UnixBashVi
Finding Files with keywords
% grep "yourString" * | awk '{ if($1!=filename){ filename=$1; print $filename}}' 10000CSCO.txt: <xsl:with-param name="vars" select="yourString"/> 10000ELMR.txt: <xsl:with-param name="vars" select="yourString"/> 10000GLSW.txt: <xsl:with-param name="vars" select="yourString"/> 10000IN04.txt: <xsl:with-param name="vars" select="yourString"/> 10000ISAG.txt: <xsl:with-param name="vars" select="yourString"/> 10000KNG1.txt: <xsl:with-param name="vars" select="yourString"/> 10000KNGT.txt: <xsl:with-param name="vars" select="yourString"/> 10000NETF.txt: <xsl:with-param name="vars" select="yourString"/> 10000NGMK.txt: <xsl:with-param name="vars" select="yourString"/> 10000REPI.txt: <xsl:with-param name="vars" select="yourString"/> 10000SATL.txt: <xsl:with-param name="vars" select="yourString"/> 10000SMRT.txt: <xsl:with-param name="vars" select="yourString"/> 10000VINM.txt: <xsl:with-param name="vars" select="yourString"/> %
Posted by
techgeek168
at
8:31 AM
0
comments
Labels: CygwinAwkCronSed
Wednesday, January 21, 2009
Force XDoclet to rebuild web.xml and jboss-web.xml
Add the following code to eclipse_project_root/xdoclet-build.xml, after XDoclet setup in Eclipse:
<target name="_xdoclet_generation_" depends="ForceRebuild,N65540,N67036"/>
<target name="ForceRebuild" description="Force XDoclet to rebuild web.xml and jboss-web.xml">
<delete file="WEB-INF/web.xml"/>
<delete file="WEB-INF/jboss-web.xml"/>
</target>
"Run XDoclet" in Eclipse does not overwrite WEB-INF/web.xml and WEB-INF/jboss-web.xml. Therefore, you'll have to remove them before running XDoclet.
Posted by
techgeek168
at
4:02 PM
0
comments
Change home directory in Cygwin
Put the new home directory in /etc/passwd file.
i.e. Change the following line from:
$ more /etc/passwd
userID:unused_by_nt/2000/xp:57827:10513:LastName, FirstName,DomanName\userID,S-1-5-21-1123561945-1708537768-1801674531-47827: /OldHome/userID:/bin/bash
to:
$ more /etc/passwd
userID:unused_by_nt/2000/xp:57827:10513:LastName, FirstName,DomanName\userID,S-1-5-21-1123561945-1708537768-1801674531-47827: /NewHome/userID:/bin/bash
Posted by
techgeek168
at
2:35 PM
0
comments
Labels: CygwinAwkCronSed
found in jboss-web.xml but not in web.xml
Solution:
This is the reason why you have to remove web.xml and jboss-web.xml before you run XDoclet in Eclipse.
The web.xml and jboss-web.xml are stored under WEB-INF directory.
========================================================
2009-01-21 12:50:49,855 WARN [org.jboss.web.tomcat.tc5.Tomcat5] Failed to parse descriptors for war(file:/C:/cygwin/usr/local/jboss/server/default/tmp/deploy/tmp64661smsj.ear-contents/smsjWeb.war/)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/DailyKDSession found in jboss-web.xml but not in web.xml)
at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:651)
at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:289)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:696)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:713)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:631)
Posted by
techgeek168
at
12:01 PM
0
comments
Caught Remote Exception - javax.naming.NameNotFoundException: ejb not bound
Solution: Make sure the following XDoclet settings in Eclipse :
1. ejbdoclet.entitypk.pattern={0}PK
2. ejbdoclet.localhomeinterface.pattern={0}LocalHome
3. ejbdoclet.localinterface.pattern={0}Local
4. ejbdoclet.utilobject.pattern={0}Util
5. ejbdoclet.valueobject.pattern={0}Value
Before you re-run XDoclet in Eclipse, remove web.xml and jboss-web.xml under WFB-INF directory.
============================================
2009-01-21 10:16:16,459 ERROR [smsj.server.SMSActionProperty] Caught Remote Exception from WatchListSessionHome or WatchListSession objectejb not bound
2009-01-21 10:16:16,459 INFO [STDOUT] javax.naming.NameNotFoundException: ejb not bound
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:490)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.server.NamingServer.getBinding(NamingServer.java:498)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.server.NamingServer.getObject(NamingServer.java:504)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:248)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.server.NamingServer.lookup(NamingServer.java:251)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:644)
2009-01-21 10:16:16,459 INFO [STDOUT] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
2009-01-21 10:16:16,459 INFO [STDOUT] at javax.naming.InitialContext.lookup(InitialContext.java:347)
2009-01-21 10:16:16,459 INFO [STDOUT] at smsj.ejb.interfaces.WatchListSessionUtil.lookupHome(WatchListSessionUtil.java:17)
2009-01-21 10:16:16,459 INFO [STDOUT] at smsj.ejb.interfaces.WatchListSessionUtil.getHome(WatchListSessionUtil.java:36)
2009-01-21 10:16:16,459 INFO [STDOUT] at smsj.server.SMSActionProperty.reloadQuoteFiles(SMSActionProperty.java:170)
2009-01-21 10:16:16,459 INFO [STDOUT] at smsj.server.SMSServerConsole.setQuoteFiles(SMSServerConsole.java:219)
2009-01-21 10:16:16,459 INFO [STDOUT] at smsj.server.SMSServerConsole.run(SMSServerConsole.java:95)
Posted by
techgeek168
at
10:00 AM
0
comments