Thursday 8 March 2012

Issue: virgo-web-server crashed

Issue 3:

when failed to run the virgo-web-server & see the error log as below

    8080 can be the JMX port too (9875?) if virgo's crashed after it's shut down on 8080.

Solutions:
kills virgo if it's crashed.
  
   #kill -9 `lsof -iTCP:8080 -Fp | perl -p -e "s/p//g"`

 or,

   #ps -A

get the processID for java (e.g:12345)

   #kill -9 12345

Issue: Failed to startup virgo-web-server

Issue 2:

[abc@localhost ~]$ /home/abc/virgo-web-server-2.1.1.RELEASE/bin/startup.sh –clear
 
Error: Could not find or load main class org.eclipse.virgo.osgi.launcher.JavaVersionChecker

Solution:

redownload virgo :P

OSGi bundle template.mf issue - can't use bundles in Virgo.

Issue 1:
:
:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <com.springsource.javax.servlet.jsp.jstl_1.2.0>
             constraint: <Import-Package: com.sun.org.apache.xalan.internal.res; version="0.0.0">
 :
 :

Solution:
Go to the /home/wcs/virgo-web-server-2.1.1.RELEASE/lib directory.
Open the java6-server.profile

 org.xml.sax.ext,\
 org.xml.sax.helpers,\
 com.sun.org.apache.xalan.internal.res,\
 com.sun.org.apache.xml.internal.utils,\
 com.sun.org.apache.xpath.internal,\
 com.sun.org.apache.xpath.internal.jaxp,\
 com.sun.org.apache.xpath.internal.objects

org.osgi.framework.bootdelegation = \
 org.eclipse.virgo.osgi.extensions.*,\
 

Sunday 4 March 2012

Maven

To force dependency redownloads
# mvn package -U

If you get it to compile in mvn, do
#mvn install
else
nuke .../.m2/repository/com/...

To do the maven compile
#mvn clean package -f <.../pom.xml>

Thursday 1 March 2012

set a environment variable in CentOS

Example: set $JAVA_HOME on CentOS

# vi ~/.bash_profile

Add the following line to .bash_profile

export JAVA_HOME=/usr/local/jdk1.7.0_2 (your actual location of the jdk)

log out then log back in.

Enter this command on the terminal to test:

echo $JAVA_HOME