Dashboard > Community Documentation > Home > FAQ
  Community Documentation Log In | Sign Up   View a printable version of the current page.  
  FAQ
Added by Anand Vaidya, last edited by Anand Vaidya on Aug 26, 2008  (view change)
Labels: 
faq

A collection of various FAQs (Frequently Asked Questions) about GridSphere and associated software. Some were collected when we encountered the problem, some were collected from the mailing list and have been provided here as a form of long term documentation.

Q: Backing up and restoring content

A: Gridsphere stores the content (JCR) in a plain XML file. Click Content->Content Settings. Click Backup to create a new XML file containing all the static pages you have created. The XML file will be stored in $CATALINA_HOME/webapps/gridsphere/WEB-INF/CustomPortal/content/backup/Content/ The filename is of the pattern: PortalContentBackup-2008.02.12-14:10.xml

To restore the content, say, when you are reinstalling gridsphere from scratch, copy the file into exactly same directory as above. Logout and login. Now you can see the file in the Content-ContentSettings. Select the file you wish to import and Click  "Import Content"

The content will be imported but will not be "visible" until Gridsphere or Tomcat is restarted. 

Q: Will updating  between minor versions affect the bundled HSQLDB database?

A: No. "ant deploy" will not overwite the DB

Q: How to turn off debug output from Gridsphere?

A: (By Bharathi)

Edit log4j.properties file to switch on/off Debugging.  For gridsphere you can find the file in a location similar to the following, depending
on the version you are using.
gridsphere-2.28/webapps/gridsphere/WEB-INF/classes/log4j.properties

set the log level to ERROR if it is set to DEBUG,
log4j.rootCategory=ERROR

and remove/comment the line on top if exists(log4j.debug=TRUE)

And similarly you can find the log4j.properties files for each  individual projects  in gridsphere/projects directory.  Once the changes
are made, run ' ant deploy' command, that should update the changes in  tomcat/webapps/gridsphere/WEB-INF/classes/log4j.properties file, if
problem still exists restart the tomcat.

Change the log4j.properties located in WEB-INF/classes/ ,  this line:

# Log all of GS
log4j.logger.org.gridsphere=DEBUG

Your project files should have something similar

Q: Is it necessary to use a JDK/JRE from Sun? Will RedHat provided alternate compiler gcj etc work?

A: No. Apparently, gcj etc do not work at all. I tried installing CentOS5 (same as RHEL5) with the java development packages and compilers provided by RedHat. See the screenshot below:

Getting Gridsphere running on CentOS5, i386 VM:

Note that centos uses gcj and not Sun JDK (non-FLOSS)

yum install tomcat5 tomcat5-admin-webapps tomcat5-jasper hsqldb postgresql-jdbc

At this stage tomcat admin works, but not manager app.

Edit /usr/share/tomcat5/conf/tomcat-users.xml

Gridsphere cannot be compiled with RH provided gcj (javac) and classpath

Errors such as the following are thrown up:

-bash-3.1$ ant compile
Buildfile: build.xml

setenv:
     [echo] Installing for Tomcat 5.x
     [echo] GridSphere Webserver is tomcat
     [echo] GridSphere will be deployed to /usr/share/tomcat5 as the gridsphere web application

compile:
     [echo] Compiling core framework
    [javac] Compiling 514 source files to /home/tomcat5/gridsphere-3.0.8/build/classes
    [javac] ----------
    [javac] 1. WARNING in /home/tomcat5/gridsphere-3.0.8/src/javax/portlet/PortletException.java (at line 16)
    [javac]     public class PortletException extends java.lang.Exception {
    [javac]                  ^^^^^^^^^^^^^^^^
    [javac] The serializable class PortletException does not declare a static final serialVersionUID field of type long
    [javac] ----------
    [javac] ----------
    [javac] 2. WARNING in /home/tomcat5/gridsphere-3.0.8/src/javax/portlet/PortletModeException.java
    [javac]  (at line 15)
    [javac]     public class PortletModeException extends PortletException {
    [javac]                  ^^^^^^^^^^^^^^^^^^^^
    [javac] The serializable class PortletModeException does not declare a static final serialVersionUID field of type long
    [javac] ----------
    [javac] ----------
    [javac] 3. WARNING in /home/tomcat5/gridsphere-3.0.8/src/javax/portlet/PortletSecurityException.java (at line 15)
    [javac]     public class PortletSecurityException extends PortletException {
    [javac]                  ^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The serializable class PortletSecurityException does not declare a static final serialVersionUID field of type long
    [javac] ----------
    [javac] ----------
    [javac] 4. WARNING in /home/tomcat5/gridsphere-3.0.8/src/javax/portlet/ReadOnlyException.java
    [javac]  (at line 14)
    [javac]     public class ReadOnlyException extends PortletException {
    [javac]                  ^^^^^^^^^^^^^^^^^
    [javac] The serializable class ReadOnlyException does not declare a static final serialVersionUID field of type long
    [javac] ----------
    [javac] ----------
    [javac] 5. WARNING in /home/tomcat5/gridsphere-3.0.8/src/javax/portlet/UnavailableException.java (at line 14)
    [javac]     public class UnavailableException extends PortletException {
    [javac]                  ^^^^^^^^^^^^^^^^^^^^

Q: How can I set the default tab that will be selected (and displayed) after the user logins in?

A: You can specify an order attribute in the layout descriptor: http://www.gridsphere.org/gridsphere/docs/ReferenceGuide/ReferenceGuide.html#portlet-layout

Q: WAP Support in Gridsphere:

A: Sadly, I think the WAP additions actually got tossed in the 2.2.X code when a lot of changes were made to the existing layout code. If  you're really interested, maybe you can have a look at the layout.view.* classes and add some doRenderWAP methods-- then you just provide the WAP markup you wish to display.                                             

Q: Migrating data from HSQLDB to Oracle etc

A: I guess you are using the default HSQL db. If you know SQL and have a look at the gridsphere.script file (webapps/gridsphere/WEB-INF/CustomPortal/database  gridsphere.script) generated by HSQL you might get an idea how to insert that into your  favorite DB (it is just plain SQL). Your mileage may vary depending on
the db you are trying to use (like reserved keywords in some cases)   but this should be a doable task.                                    
                                                                     
Q: How to Save and restore info in Gridsphere

A: If you are using the included HSQL all information are contained within the webapps/gridsphere/WEB-INF/CustomPortal directory. Just save that and copy it back later on. Be sure to deploy it at the exact same position otherwise you would have to change the hibernate.properties file to reflect the location (jdbc url) of your database.

Q: How to Get Portlet and User info?
A: PortletRequest request = event.getActionRequest(); // or
getRenderRequest(), this is not only a PortletRequest but also an Action/Render request

Get user info:
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
String name = (String) userInfo.get("user.name");

Q: Is Condor supported?

A: No, Condor is not supported

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.8 Build:#525 Aug 08, 2006) - Bug/feature request - Contact Administrators