Dealing with the following error on Archiva 2.0.0 Standalone :
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleManager': Invocation of init method failed; nested exception is java.util.NoSuchElementException
I had to take a decision to resolve this problem, In my case in a brief look into the log file makes me figure out new Apache Archiva version is built on Spring Framework 4.0 and JQuery,
Requirements:
- JDK 1.6+
- Apache Archiva 2.0.0 WAR
- Apache Archiva 2.0.0 Standalone
- Apache Tomcat 7.0.52
Installing Apache Archiva Apache Tomcat
1. You can following a tutorial (http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos), if you have a more complex doubt of installing apache tomcat on Oracle Linux 5.
Do not forget add variables inside classpath because is needed for Apache Archiva 2.0.0 WAR.
export CATALINA_OPTS="-Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME" (for UNIX)
OR
set CATALINA_OPTS="-Dappserver.home=%CATALINA_HOME% -Dappserver.base=%CATALINA_HOME%" (for Windows)
1. Create a folder inside tomcat instalation like this:
/root/programs/apache-tomcat-7.0.52/archiva
this folder is where you should paste archiva war file.
2. Create a file called archiva.xml inside your apache tomcat on
/root/programs/apache-tomcat-7.0.52/conf/Catalina/localhost
<?xml version='1.0' encoding='utf-8'?>
<Context path="/archiva"
docBase="/root/programs/apache-tomcat-7.0.52/archiva/apache-archiva-2.0.0.war">
<Resource name="jdbc/users" auth="Container" type="javax.sql.DataSource"
username="sa"
password=""
driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
url="jdbc:derby:/path/to/database/users;create=true" />
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"
mail.smtp.host="localhost"/>
</Context>
Please take a look inside the file, you will have to change docBase according to your configuration.
A pretty windows like this should be printed when you start your apache tomcat console:
You only have to click Start Button.
Best Regards,
No comments:
Post a Comment