Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • If you've upgraded to DSpace 1.2 from a prior version, ensure that your header JSP includes the following line:
Panelcode

<SCRIPT LANGUAGE="JavaScript" src="<%= request.getContextPath() %>/utils.js"></script>

That needs to be in the <HEAD> element. It's in jsp/layout/header-default.jsp but if you have a locally modified version, your modified copy might not have this line.

...

Many people have run into trouble getting DSpace running on Redhat/Fedora Core Linux, specifically, encountering CLASSPATH errors and relating to 'libgcj'.
The easiest way to resolve this is to remove all the PM-based Java components, and install the original binary packages: Java SDK from Sun, and Ant and Tomcat from Apache.org.
To remove the PM Java stuff, do:

Panelcode

rpm \-e libgcj

This will probably throw up a load of dependency errors. You'll need to remove the packages that depend on libgcj too.
Another useful list from ichardJones RichardJones of packages he had to remove from Fedora Core 2:

Panelcode

libgcj


gcc-java-3.3.3-7


libgcj-devel-3.3.3-7


gettext-0.14.1-2.1


gcc34-java-3.4.0-1


ant-1.5.2-26


tomcat-4.1.27-13

Clive Gould has published a very useful blog explaining how to get DSpace working with a default install of CentOS 5.x, including Apache/Tomcat integration.

...

2. Change the level by changing this line:

Panelcode

log4j.rootCategory=INFO, A1

to this:

Panelcode

log4j.rootCategory=DEBUG, A1

3. Restart Tomcat (or Resin, etc.).

Now you'll find there's a lot more information in dspace/log/dspace.log. You can switch on and off logging for particular DSpace classes. For example, if you just want to know about SQL queries going to the database, you could leave the main level above as INFO, and instead add the following line (then restart Tomcat):

Panelcode

log4j.logger.org.dspace.storage.rdbms.DatabaseManager=DEBUG, A1

More information about DSpace log files is available in the DSpace System Documentation.

...

To view the DSpace log live

Code Block

 ## In Linux, run the following command then reproduce the internal error state
 ## use the pathname prefix appropriate to your DSpace installation
 tail -F /var/logs/dspace.log

 ## and you should see something of the kind

2009-05-18 12:52:45,935 WARN  org.dspace.app.webui.servlet.DSpaceServlet @ name\
@place:session_id=F32DD4066DD475B8841A2A2204961B9A:ip_addr=1.2\
.3.4:database_error:org.postgresql.util.PSQLException: ERROR: duplicate key \
violates unique constraint "metadatafieldregistry_pkey"
org.postgresql.util.PSQLException: ERROR: duplicate key violates unique constra\
int "metadatafieldregistry_pkey"
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryE\
xecutorImpl.java:1525)

...

If you want to use an encoding other than UTF-8 you can edit the file src/org/dspace/storage/rdbms/DatabaseManager.java and modify the next lines

Code Block

  else if ((jdbctype == Types.CLOB && "oracle".equals(dbName)) || jdbctype == Types.VARCHAR)
  {
    // Support CLOBs in place of TEXT columns in Oracle
    row.setColumn(name, results.getString(i));
  }
  /*else if (jdbctype == Types.VARCHAR)
  {
    try
    {
       byte[] bytes = results.getBytes(i);
       if (bytes != null)
       {
           String mystring = new String(results.getBytes(i), "UTF-8");
           row.setColumn(name, mystring);
        }
        else
        {
            row.setColumn(name, results.getString(i));
        }
     }
     catch (UnsupportedEncodingException e)
     {
         // do nothing, UTF-8 is built in!
     }
   }*/

...