/ Forside / Teknologi / Udvikling / Java / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Java
#NavnPoint
molokyle 3688
Klaudi 855
strarup 740
Forvirret 660
gøgeungen 500
Teil 373
Stouenberg 360
vnc 360
pmbruun 341
10  mccracken 320
Java fejl ved kompilering
Fra : Tonny


Dato : 28-04-04 15:18


Hej!

jeg er ikke ekspert med dette, men håber at fejlen skyldes noget java sjov.

Jeg prøver at installere dspace beta 1 - http://www.dspace.org, men får
nedenstående fejl.

Kan I give et hint til hvad der kan være galt, jeg går ud fra at jeg
mangler noget java?

pft.

Tonny
----
RedHat ES 3
j2sdk-1_4_2_04-linux-i586.rpm




[dspace@valde dspace-1_2-beta1-source]$ ant fresh_install
Buildfile: build.xml

compile:
[mkdir] Created dir: /dspace_src/dspace-1_2-beta1-source/build/classes
[javac] Compiling 131 source files to
/dspace_src/dspace-1_2-beta1-source/bu
ild/classes
[javac]
/dspace_src/dspace-1_2-beta1-source/src/org/dspace/app/mediafilter/J
PEGFilter.java:52: error: Class or interface `javax.imageio.ImageIO' not
found i
n import.
[javac] import javax.imageio.ImageIO;
[javac] ^
[javac]
/dspace_src/dspace-1_2-beta1-source/src/org/dspace/app/mediafilter/H
TMLFilter.java:49: error: Class or interface
`javax.swing.text.ChangedCharSetExc
eption' not found in import.
[javac] import javax.swing.text.ChangedCharSetException;
[javac] ^
[javac]
/dspace_src/dspace-1_2-beta1-source/src/org/dspace/app/mediafilter/H
TMLFilter.java:125: error: Type `HTMLEditorKit' not found in the
declaration of
the local variable `kit'.
[javac] HTMLEditorKit kit = new HTMLEditorKit();
[javac] ^
[javac] 3 errors

BUILD FAILED
file:/dspace_src/dspace-1_2-beta1-source/build.xml:109: Compile failed;
see the
compiler error output for details.

Total time: 1 second

 
 
Thorbjoern Ravn Ande~ (28-04-2004)
Kommentar
Fra : Thorbjoern Ravn Ande~


Dato : 28-04-04 15:44

Tonny <nomail@nomail.dk> writes:

> Hej!
>
> jeg er ikke ekspert med dette, men håber at fejlen skyldes noget java sjov.
>
> Jeg prøver at installere dspace beta 1 - http://www.dspace.org, men
> får nedenstående fejl.
>
> Kan I give et hint til hvad der kan være galt, jeg går ud fra at jeg
> mangler noget java?

Du mangler en pakke med javax.imageIO. Hvad siger installationsvejledningen?
--
Thorbjørn Ravn Andersen
http://unixsnedkeren.dk/ravn

Tonny (28-04-2004)
Kommentar
Fra : Tonny


Dato : 28-04-04 18:42

Thorbjoern Ravn Andersen wrote:
> Tonny <nomail@nomail.dk> writes:
>
>
>>Hej!
>>
>>jeg er ikke ekspert med dette, men håber at fejlen skyldes noget java sjov.
>>
>>Jeg prøver at installere dspace beta 1 - http://www.dspace.org, men
>>får nedenstående fejl.
>>
>>Kan I give et hint til hvad der kan være galt, jeg går ud fra at jeg
>>mangler noget java?
>
>
> Du mangler en pakke med javax.imageIO. Hvad siger installationsvejledningen?

Der står ikke noget om javax.imageIO. Kan jeg downloade det eller hur?

Kravene er følgende, som er det jeg har installeret.

UNIX-like OS (Linux, HP/UX etc)
Java 1.4 or later (standard SDK is fine, you don't need J2EE)
Apache Ant 1.5 or later (Java make-like tool)
PostgreSQL 7.3 or later, an open source relational database.
Jakarta Tomcat 4.x/5.x or equivalent, such as Jetty or Caucho Resin.



Thorbjoern Ravn Ande~ (28-04-2004)
Kommentar
Fra : Thorbjoern Ravn Ande~


Dato : 28-04-04 19:03

Tonny <nomail@nomail.dk> writes:

> Der står ikke noget om javax.imageIO. Kan jeg downloade det eller hur?
>
> Kravene er følgende, som er det jeg har installeret.
>
> UNIX-like OS (Linux, HP/UX etc)
> Java 1.4 or later (standard SDK is fine, you don't need J2EE)
> Apache Ant 1.5 or later (Java make-like tool)
> PostgreSQL 7.3 or later, an open source relational database.
> Jakarta Tomcat 4.x/5.x or equivalent, such as Jetty or Caucho Resin.

Det kan iøvrigt være du har kaffe installeret. Hvad siger "java -version"?

--
Thorbjørn Ravn Andersen
http://unixsnedkeren.dk/ravn

Tonny (28-04-2004)
Kommentar
Fra : Tonny


Dato : 28-04-04 19:12

Thorbjoern Ravn Andersen wrote:
> Tonny <nomail@nomail.dk> writes:
>
>
>>Der står ikke noget om javax.imageIO. Kan jeg downloade det eller hur?
>>
>>Kravene er følgende, som er det jeg har installeret.
>>
>>UNIX-like OS (Linux, HP/UX etc)
>>Java 1.4 or later (standard SDK is fine, you don't need J2EE)
>>Apache Ant 1.5 or later (Java make-like tool)
>>PostgreSQL 7.3 or later, an open source relational database.
>>Jakarta Tomcat 4.x/5.x or equivalent, such as Jetty or Caucho Resin.
>
>
> Det kan iøvrigt være du har kaffe installeret. Hvad siger "java -version"?
>

den siger:

[root@valde bin]# ./java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

Thorbjoern Ravn Ande~ (28-04-2004)
Kommentar
Fra : Thorbjoern Ravn Ande~


Dato : 28-04-04 20:35

Tonny <nomail@nomail.dk> writes:

> [root@valde bin]# ./java -version
> java version "1.4.2_04"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

Ant leder i $JAVA_HOME efter javac. Hvad peger den på?

Herudover bør du nok stå i fx /tmp og undlade "./java" og istedet
bruge "java".
--
Thorbjørn Ravn Andersen
http://unixsnedkeren.dk/ravn

Thorbjoern Ravn Ande~ (28-04-2004)
Kommentar
Fra : Thorbjoern Ravn Ande~


Dato : 28-04-04 20:36

Thorbjoern Ravn Andersen <thunderbear@bigfoot.com> writes:

> Tonny <nomail@nomail.dk> writes:
>
> > [root@valde bin]# ./java -version
> > java version "1.4.2_04"
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> > Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
>
> Ant leder i $JAVA_HOME efter javac. Hvad peger den på?
>
> Herudover bør du nok stå i fx /tmp og undlade "./java" og istedet
> bruge "java".

For at afteste om det er den rigtige der kaldes. Naturligvis ikke når
du kører ant.

Det er ret vigtigt at det her er på plads. Hvis det er den forkerte
java, så skal du rette din $PATH.
--
Thorbjørn Ravn Andersen
http://unixsnedkeren.dk/ravn

Tonny (29-04-2004)
Kommentar
Fra : Tonny


Dato : 29-04-04 07:40

Thorbjoern Ravn Andersen wrote:
> Thorbjoern Ravn Andersen <thunderbear@bigfoot.com> writes:
>
>
>>Tonny <nomail@nomail.dk> writes:
>>
>>
>>>[root@valde bin]# ./java -version
>>>java version "1.4.2_04"
>>>Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
>>>Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
>>
>>Ant leder i $JAVA_HOME efter javac. Hvad peger den på?
>>
>>Herudover bør du nok stå i fx /tmp og undlade "./java" og istedet
>>bruge "java".
>
>
> For at afteste om det er den rigtige der kaldes. Naturligvis ikke når
> du kører ant.
>
> Det er ret vigtigt at det her er på plads. Hvis det er den forkerte
> java, så skal du rette din $PATH.

Lidt mere info.

Kan det tænkes at den java pakke jeg har hentet ikke har denne class/fil
og måske skal hente en ældre version?

[dspace@valde dspace-1_2-beta1-source]$ echo $ANT_HOME
/usr/local/ant

[dspace@valde dspace-1_2-beta1-source]$ echo $JAVA_HOME
/usr/java/j2sdk1.4.2_04/bin

[dspace@valde dspace-1_2-beta1-source]$ echo $PATH
/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/

[dspace@valde dspace-1_2-beta1-source]$ java -version
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

Søren Berg Glasius (29-04-2004)
Kommentar
Fra : Søren Berg Glasius


Dato : 29-04-04 07:46

Hej Tonny

>
> [dspace@valde dspace-1_2-beta1-source]$ echo $JAVA_HOME
> /usr/java/j2sdk1.4.2_04/bin

Her har du fejlen. Java home skal pege på
/usr/java/j2sdk1.4.2_04/ - ikke på bin directoriet.

> [dspace@valde dspace-1_2-beta1-source]$ echo $PATH
> /usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/

det er rigtig nok at java/bin skal være i pathen - og jeg mener også at
java/jre/bin skal være der.

MVH
Søren

Tonny (29-04-2004)
Kommentar
Fra : Tonny


Dato : 29-04-04 08:12

Søren Berg Glasius wrote:

> Hej Tonny
>
>>
>> [dspace@valde dspace-1_2-beta1-source]$ echo $JAVA_HOME
>> /usr/java/j2sdk1.4.2_04/bin
>
>
> Her har du fejlen. Java home skal pege på
> /usr/java/j2sdk1.4.2_04/ - ikke på bin directoriet.
>
>> [dspace@valde dspace-1_2-beta1-source]$ echo $PATH
>> /usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/
>
>
>
> det er rigtig nok at java/bin skal være i pathen - og jeg mener også at
> java/jre/bin skal være der.
>
> MVH
> Søren

æv, æv det virker stadigvæk ikke, nu har jeg:

[dspace@valde dspace-1_2-beta1-source]$ echo $JAVA_HOME
/usr/java/j2sdk1.4.2_04/

[dspace@valde dspace-1_2-beta1-source]$ echo $PATH
/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/:/usr/java/j2sdk1.4.2_04:/usr/java/j2sdk1.4.2_04/jre/bin

Mikael Rasmussen (29-04-2004)
Kommentar
Fra : Mikael Rasmussen


Dato : 29-04-04 08:28

Tonny wrote:

>
> æv, æv det virker stadigvæk ikke, nu har jeg:
>

Hej,

Hvad siger.?
unzip -l /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar | grep ImageIO.class

Jeg har en version lige inden og jeg har.
unzip -l /usr/java/j2sdk1.4.2_03/jre/lib/rt.jar | grep ImageIO.class
14432 01-01-80 00:00 javax/imageio/ImageIO.class

Hvis du har det samme kan det være man skal kigge i build.xml og se om ant
laver noget specielt.

Jeg kan se at jdk1.2.2 ikke har en ImageIO klasse så hvis du har en sådan
installeret kan det være at ant rammer den.

Kig også efter "$HOME/.antrc" og /etc/ant.conf de kan overskrive dine
indstillinger og tvinge ant til at bruge en anden jdk end den du har
defineret i $JAVA_HOME og venner.

Mvh.
Mikael.


Tonny (29-04-2004)
Kommentar
Fra : Tonny


Dato : 29-04-04 09:14

Mikael Rasmussen wrote:
> Tonny wrote:
>
>
>>æv, æv det virker stadigvæk ikke, nu har jeg:
>>
>
>
> Hej,
>
> Hvad siger.?
> unzip -l /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar | grep ImageIO.class
>
> Jeg har en version lige inden og jeg har.
> unzip -l /usr/java/j2sdk1.4.2_03/jre/lib/rt.jar | grep ImageIO.class
> 14432 01-01-80 00:00 javax/imageio/ImageIO.class
>
> Hvis du har det samme kan det være man skal kigge i build.xml og se om ant
> laver noget specielt.
>
> Jeg kan se at jdk1.2.2 ikke har en ImageIO klasse så hvis du har en sådan
> installeret kan det være at ant rammer den.
>
> Kig også efter "$HOME/.antrc" og /etc/ant.conf de kan overskrive dine
> indstillinger og tvinge ant til at bruge en anden jdk end den du har
> defineret i $JAVA_HOME og venner.
>
> Mvh.
> Mikael.
>

Det giver samme svar som dig:

[root@valde root]# unzip -l /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar |
grep ImageIO.class
14432 01-01-80 00:00 javax/imageio/ImageIO.class

Nedenstående er build.xml hvis det kan give nogle ideer?

-----------
<?xml version="1.0"?>

<!--
- Copyright (c) 2002, Hewlett-Packard Company and Massachusetts
- Institute of Technology. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- - Neither the name of the Hewlett-Packard Company nor the name of the
- Massachusetts Institute of Technology nor the names of their
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-->

<!--
- DSpace build file
-
- Version: $Revision: 1.34 $
- Date: $Date: 2004/02/19 14:44:08 $
-->

<project name="DSpace" default="compile">

<!-- ============================================================= -->
<!-- Description -->
<!-- ============================================================= -->

<description>
====================== DSpace platform build file ======================

Common usage:

Fresh install, including database setup and registry loading:
% ant fresh_install

Update existing installation, leaving data and configuration intact:
% ant -Dconfig=/installdir/config/dspace.cfg update

========================================================================
</description>

<!-- ============================================================= -->
<!-- Will be using various environment variables -->
<!-- ============================================================= -->

<property environment="env"/>


<!-- ============================================================= -->
<!-- Build parameters that are likely to need tweaking -->
<!-- ============================================================= -->

<!-- Default configuration to use. This may be overridden. -->
<property name="config" value="config/dspace.cfg" />

<!-- Give user a chance to override without editing this file
(and without typing -D each time s/he compiles it) -->
<property file="${user.home}/.dspace.properties" />

<!-- Load the configuration -->
<property file="${config}" />


<!-- ============================================================= -->
<!-- The DSpace class path for building -->
<!-- ============================================================= -->

<!-- We will include the environment CLASSPATH -->
<path id="build.class.path">
<pathelement path="${env.CLASSPATH}"/>
<pathelement path="build/classes"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>


<!-- ============================================================= -->
<!-- Compile the source code and build WARs -->
<!-- ============================================================= -->

<target name="compile"
description="Compile the source code">
<mkdir dir="build/classes"/>
<javac srcdir="src"
destdir="build/classes"
debug="on">
<include name="**/*.java"/>
<classpath refid="build.class.path"/>
</javac>
</target>


<!-- ============================================================= -->
<!-- Build the .war files -->
<!-- ============================================================= -->

<target name="build_wars"
depends="compile"
description="Build the .war files">
<!-- Build DSpace UI .war -->
<copy file="etc/dspace-web.xml"
tofile="build/dspace-web.xml"
preservelastmodified="true"/>
<replace file="build/dspace-web.xml"
token="@@dspace.dir@@"
value="${dspace.dir}" />
<!-- Make sure jsp/local exists -->
<mkdir dir="jsp/local" />
<!-- Copy original JSPs, then copy localised versions on top -->
<mkdir dir="build/jsp" />
<copy todir="build/jsp" preservelastmodified="true">
<fileset dir="jsp">
<exclude name="local/**" />
</fileset>
</copy>
<copy todir="build/jsp" preservelastmodified="true" overwrite="true">
<fileset dir="jsp/local" />
</copy>
<war destfile="build/dspace.war"
webxml="build/dspace-web.xml">
<fileset dir="build/jsp" />
<lib dir="lib">
<exclude name="servlet.jar" />
</lib>
<classes dir="build/classes" />
</war>
<!-- Build DSpace OAI-PMH .war -->
<copy file="etc/oai-web.xml"
tofile="build/oai-web.xml"
preservelastmodified="true"/>
<replace file="build/oai-web.xml"
token="@@dspace.dir@@"
value="${dspace.dir}" />
<war destfile="build/dspace-oai.war"
webxml="build/oai-web.xml">
<lib dir="lib">
<exclude name="servlet.jar" />
</lib>
<classes dir="build/classes" />
</war>
</target>


<!-- ============================================================= -->
<!-- Update an installation (except database) -->
<!-- ============================================================= -->

<target name="update"
depends="install_code,build_wars"
description="Update installed code (without clobbering
data/config)">
<echo>
====================================================================
Updated Web application (.war) files are in the 'build' directory.

* Stop your Web servlet container (Tomcat, Jetty, Resin etc.)

* If you're using Tomcat, you need delete the directories
corresponding to the old .war files. For example, if dspace.war
is installed in CATALINA_HOME/webapps/dspace.war, you should
delete the CATALINA_HOME/webapps/dspace directory. Otherwise,
Tomcat will continue to use the old code in that directory.

* Copy the new dspace.war and dspace-oai.war from the 'build'
directory over the old ones

* Start up your Web servlet container again.
====================================================================
</echo>
</target>


<!-- ============================================================= -->
<!-- Install or update DSpace code (except database) -->
<!-- ============================================================= -->

<target name="install_code"
depends="compile">
<mkdir dir="${dspace.dir}/config" />
<mkdir dir="${assetstore.dir}" />
<mkdir dir="${handle.dir}" />
<mkdir dir="${history.dir}" />
<mkdir dir="${search.dir}" />
<mkdir dir="${log.dir}" />
<mkdir dir="${upload.temp.dir}" />
<mkdir dir="${dspace.dir}/bin"/>
<mkdir dir="${dspace.dir}/lib"/>
<copy todir="${dspace.dir}/bin" preservelastmodified="true">
<fileset dir="bin"/>
</copy>
<exec executable="chmod">
<arg value="-R" />
<arg value="u+x" />
<arg value="${dspace.dir}/bin" />
</exec>
<copy todir="${dspace.dir}/lib" preservelastmodified="true">
<fileset dir="lib" />
</copy>
<jar jarfile="${dspace.dir}/lib/dspace.jar"
basedir="build/classes" />
</target>


<!-- ============================================================= -->
<!-- Fresh install of config files -->
<!-- ============================================================= -->

<!-- Writes the configuration files to ${dspace.dir}/config. It does
*not*
run the install-configs script. The "log4j.build.properties"
file is
copied to ${dspace.dir}/config so there's a simple log4j.properties
file present for the initial run of "install-configs". -->
<target name="init_configs">
<copy todir="${dspace.dir}/config" preservelastmodified="true">
<fileset dir="config"/>
</copy>
<copy file="etc/log4j.build.properties"
tofile="${dspace.dir}/config/log4j.properties"
preservelastmodified="true"/>
</target>


<!-- ============================================================= -->
<!-- Create the database tables -->
<!-- ============================================================= -->

<!-- We execute InitializeDatabase, passing in the simple log4j
properties
- file in etc/ and the DSpace configuration file using system
- properties -->
<target name="setup_database"
depends="compile"
description="Create database tables">
<java classname="org.dspace.storage.rdbms.InitializeDatabase"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg value="etc/database_schema.sql"/>
</java>
</target>


<!-- ============================================================= -->
<!-- Remove the database tables -->
<!-- ============================================================= -->

<!-- We execute InitializeDatabase, passing in the simple log4j
properties
- file in etc/ and the DSpace configuration file using system
- properties -->
<target name="clean_database"
depends="compile"
description="Removes DSpace database tables, destroying data">
<java classname="org.dspace.storage.rdbms.InitializeDatabase"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg value="etc/clean-database.sql"/>
</java>
</target>


<!-- ============================================================= -->
<!-- Load the initial contents of the registries into the database -->
<!-- ============================================================= -->

<!-- Loads bitstream format and Dublin Core type registries -->
<target name="load_registries"
depends="compile"
description="Load initial contents of registries">
<java classname="org.dspace.administer.RegistryLoader"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg value="-bitstream"/>
<arg value="${dspace.dir}/config/registries/bitstream-formats.xml"/>
</java>
<java classname="org.dspace.administer.RegistryLoader"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg value="-dc"/>
<arg value="${dspace.dir}/config/registries/dublin-core-types.xml"/>
</java>
</target>


<!-- ============================================================= -->
<!-- Do a fresh system install -->
<!-- ============================================================= -->

<target name="fresh_install"

depends="install_code,build_wars,init_configs,setup_database,load_registries"
description="Do a fresh install of the system, overwriting
any data">
<java classname="org.dspace.core.ConfigurationManager"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
<arg value="-installTemplates"/>
</java>
<java classname="org.dspace.browse.InitializeBrowse"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
</java>
<java classname="org.dspace.search.DSIndexer"
classpathref="build.class.path"
fork="yes"
failonerror="yes">
<sysproperty key="log4j.configuration"
value="file:etc/log4j.build.properties"/>
<sysproperty key="dspace.configuration" value="${config}"/>
</java>
<echo>
====================================================================
The DSpace code has been installed, and the database initialized.

To complete installation, you should do the following:

* Install the DSpace UI (dspace.war) and OAI-PMH (dspace-oai.war)
Web applications from the 'build' directory in the appropriate
place for your servlet container. e.g. '/opt/tomcat/webapps'

* Make an initial administrator account (an e-person) in DSpace:

${dspace.dir}/bin/create-administrator

* Start up your servlet container (Tomcat etc.)

You should then be able to access your DSpace's 'home page':

${dspace.url}

You should also be able to access the administrator UI:

${dspace.url}/dspace-admin
====================================================================
</echo>
</target>


<!-- ============================================================= -->
<!-- Clean source code -->
<!-- ============================================================= -->

<target name="clean"
description="Remove compiled files - does not affect
installation">
<delete dir="build" />
</target>


<!-- ============================================================= -->
<!-- Create public API javadoc -->
<!-- ============================================================= -->
   
<target name="public_api"
description="Create the DSpace public API documentation with
javadoc">
<mkdir dir="build/public-api" />
<javadoc sourcepath="src"
destdir="build/public-api"
author="true"
version="true"
access="public"
doctitle="DSpace Public API"
windowtitle="DSpace Public API"
bottom="Copyright &#169; 2002 MIT and Hewlett-Packard. All
Rights Reserved."
overview="src/overview.html"
classpathref="build.class.path">
<package name="org.dspace.administer"/>
<package name="org.dspace.authorize"/>
<package name="org.dspace.browse"/>
<package name="org.dspace.content"/>
<package name="org.dspace.core"/>
<package name="org.dspace.eperson"/>
<package name="org.dspace.handle"/>
<package name="org.dspace.history"/>
<package name="org.dspace.search"/>
<package name="org.dspace.storage.bitstore"/>
<package name="org.dspace.storage.rdbms"/>
<package name="org.dspace.workflow"/>
</javadoc>
</target>


<!-- ============================================================= -->
<!-- Create javadoc for everything -->
<!-- ============================================================= -->

<target name="javadoc"
description="Create the DSpace public API documentation with
javadoc">
<mkdir dir="build/javadoc" />
<javadoc destdir="build/javadoc"
author="true"
version="true"
doctitle="DSpace Source Javadoc"
windowtitle="DSpace Source Javadoc"
bottom="Copyright &#169; 2002 MIT and Hewlett-Packard. All
Rights Reserved."
overview="src/overview.html"
classpathref="build.class.path">
<packageset dir="src">
<include name="**" />
</packageset>
</javadoc>
</target>

</project>
----------------

Mikael Rasmussen (29-04-2004)
Kommentar
Fra : Mikael Rasmussen


Dato : 29-04-04 10:20

Tonny wrote:


>
> Det giver samme svar som dig:
>
> [root@valde root]# unzip -l /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar |
> grep ImageIO.class
> 14432 01-01-80 00:00 javax/imageio/ImageIO.class
>
> Nedenstående er build.xml hvis det kan give nogle ideer?
>
> -----------
[snip build.xml]

Hvad med /etc/ant.conf eller ~/.ant.conf?

Jeg kan ikke se noget i build.xml der sætter jdk version, men det kan være
en af de to config filer gør.

Mvh.
Mikael.



Tonny (29-04-2004)
Kommentar
Fra : Tonny


Dato : 29-04-04 10:31

Mikael Rasmussen wrote:

> Tonny wrote:
>
>
>
>>Det giver samme svar som dig:
>>
>>[root@valde root]# unzip -l /usr/java/j2sdk1.4.2_04/jre/lib/rt.jar |
>>grep ImageIO.class
>> 14432 01-01-80 00:00 javax/imageio/ImageIO.class
>>
>>Nedenstående er build.xml hvis det kan give nogle ideer?
>>
>>-----------
>
> [snip build.xml]
>
> Hvad med /etc/ant.conf eller ~/.ant.conf?
>
> Jeg kan ikke se noget i build.xml der sætter jdk version, men det kan være
> en af de to config filer gør.
>
> Mvh.
> Mikael.
>
>

Jeg har nu prøvet at indsætte stien til ANT og JAVA i ant.conf (de var
der ikke) det hjalp heller ikke.

Flere gode råd.........


----------
[dspace@valde dspace]$ less /etc/ant.conf
# /etc/ant.conf

# Options for classic-ant

# ANT_HOME is the directory in which the jarfiles that are required by
# classic-ant are located.
ANT_HOME=/usr/share/ant

# If JAVA_HOME is not defined on your system, or if it is but you wish
# to run classic-ant using a different JVM then you should set
# JAVA_HOME here.
#JAVA_HOME=


------------
[dspace@valde dspace-1_2-beta1-source]$ less /etc/ant.conf
# /etc/ant.conf

# Options for classic-ant

# ANT_HOME is the directory in which the jarfiles that are required by
# classic-ant are located.
ANT_HOME=/usr/local/ant

# If JAVA_HOME is not defined on your system, or if it is but you wish
# to run classic-ant using a different JVM then you should set
# JAVA_HOME here.
JAVA_HOME=/usr/java/j2sdk1.4.2_04/




Thorbjoern Ravn Ande~ (29-04-2004)
Kommentar
Fra : Thorbjoern Ravn Ande~


Dato : 29-04-04 10:30

Tonny <nomail@nomail.dk> writes:

> [dspace@valde dspace-1_2-beta1-source]$ echo $PATH
> /usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/:/usr/java/j2sdk1.4.2_04:/usr/java/j2sdk1.4.2_04/jre/bin

Dine fejl tyder stadig på at det er en tidligere version end 1.4 der
lægger javac til. Jeg mindes stadig at visse releases smider en
"java" i /usr/bin, som er kaffe der ikke er 1.4

Jeg vil foreslå dig at flytte dine java-1.4 indgange op til starten af $PATH.
--
Thorbjørn Ravn Andersen
http://unixsnedkeren.dk/ravn

Tonny (29-04-2004)
Kommentar
Fra : Tonny


Dato : 29-04-04 11:09

Thorbjoern Ravn Andersen wrote:

> Tonny <nomail@nomail.dk> writes:
>
>
>>[dspace@valde dspace-1_2-beta1-source]$ echo $PATH
>>/usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/dspace/bin:/usr/java/j2sdk1.4.2_04/bin/:/usr/java/j2sdk1.4.2_04:/usr/java/j2sdk1.4.2_04/jre/bin
>
>
> Dine fejl tyder stadig på at det er en tidligere version end 1.4 der
> lægger javac til. Jeg mindes stadig at visse releases smider en
> "java" i /usr/bin, som er kaffe der ikke er 1.4
>
> Jeg vil foreslå dig at flytte dine java-1.4 indgange op til starten af $PATH.

Så lykkedes det. Fejlen lå i PATH'en til ant. På en RedHat ES AS3 server
ligger der allerde en ant fil i /usr/bin. Det var denne jeg brugte som
er i version 1.5.2 og den som jeg havde lagt ind i /usr/local/ant var i
version 1.6.1.

Nu spiller det igen.....indtil videre.

Mange tak til jer alle for den hurtige hjælp.

Tonny

Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408914
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste