You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Martin Hoeller <ma...@xss.co.at> on 2008/02/18 11:45:41 UTC

Separating the base from the installation not working

Hi!

I'm trying to install archiva 1.0.1 on Linux as a standalone application
as running in JBoss gives various errors.

The archiva admin guide for standalone installation [0] says

| However, the best way to use this installation technique is to separate
| the configuration from the installation to make it easy to upgrade to
| newer versions in the future.

I tried to follow these steps exactly as explained. However, it seems this
does not work at all.

First, there is no 'data'-directory as mentioned in step 2 (I ignored
this for now).

Second, as archiva should now hold it's data in the PLEXUS_BASE
directory, I thought it shouldn't need to write to the installation
directory (PLEXUS_HOME) which seems not to be true. If write access to
the PLEXUS_HOME directory is denied archiva startup fails. So I granted
write permissions to this directory.

Third, the user- and artifact- database seem to be created in the
installation base (PLEXUS_HOME) and not PLEXUS_BASE, as PLEXUS_HOME now
contains new directories data/archiva and data/users with lots of files
in it.

Has anybody successfully tried to perform a separation of installation
and data in archiva 1.0.1?

Any comments are welcome.

tia,	
- martin

[0] http://maven.apache.org/archiva/docs/1.0.1/adminguide/standalone.html
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
first one :)

On 19/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> On 19 Feb 2008, Brett Porter wrote:
>
> > oops - you need to edit plexus.xml too.
>
> Which one, a find -name plexus.xml gives me this:
>
> ./archiva-data/conf/plexus.xml
> ./apache-archiva-1.0.1/conf/plexus.xml
> ./apache-archiva-1.0.1/apps/archiva/conf/plexus.xml
>
> I assume it's either the first or the second one.
>
> > If you could file one bug that captures all the problems with this
> > given document (preferably with a patch ;) it would be much
> > appreciated.
>
> Ok, I'll file one as soon as my archiva is running as it should :)
>
> Many thanks to your Brett!
>
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
On 19 Feb 2008, Martin Hoeller wrote:

> I'll go and file an issue with the updated documentation.

Added information from this thread to issue MRM-701 [0].

hth,
- martin

[0] http://jira.codehaus.org/browse/MRM-701
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
On 19 Feb 2008, Brett Porter wrote:

> ${appserver.base} should work, but if not you can hardcode it

YES! Finally got it working! Many thanks again to you Brett!

I'll go and file an issue with the updated documentation.

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
${appserver.base} should work, but if not you can hardcode it

On 19/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> On 19 Feb 2008, Martin Hoeller wrote:
>
> > On 19 Feb 2008, Brett Porter wrote:
> >
> > > oops - you need to edit plexus.xml too.
> >
> > Which one, a find -name plexus.xml gives me this:
> >
> > ./archiva-data/conf/plexus.xml
> > ./apache-archiva-1.0.1/conf/plexus.xml
> > ./apache-archiva-1.0.1/apps/archiva/conf/plexus.xml
> >
> > I assume it's either the first or the second one.
>
> ./archiva-data/conf/plexus.xml seems to be the right one. There is the
> following that should probably be changed:
>
> ...
>               <property>
>                 <name>url</name>
>                 <value>jdbc:derby:${plexus.home}/data/users/database;create=true</value>
>               </property>
> ...
>               <property>
>                 <name>url</name>
>                 <value>jdbc:derby:${plexus.home}/data/archiva/database;create=true</value>
>               </property>
>
> Changing ${plexus.home} to ${plexus.base} changed the location but not as
> I wanted as plexus.base seems not to be defined. Can I use PLEXUS_BASE
> somehow or do I have to hardcode the path?
>
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
On 19 Feb 2008, Martin Hoeller wrote:

> On 19 Feb 2008, Brett Porter wrote:
> 
> > oops - you need to edit plexus.xml too.
> 
> Which one, a find -name plexus.xml gives me this:
> 
> ./archiva-data/conf/plexus.xml
> ./apache-archiva-1.0.1/conf/plexus.xml
> ./apache-archiva-1.0.1/apps/archiva/conf/plexus.xml
> 
> I assume it's either the first or the second one.

./archiva-data/conf/plexus.xml seems to be the right one. There is the
following that should probably be changed:

...
              <property>
                <name>url</name>
                <value>jdbc:derby:${plexus.home}/data/users/database;create=true</value>
              </property>
...
              <property>
                <name>url</name>
                <value>jdbc:derby:${plexus.home}/data/archiva/database;create=true</value>
              </property>

Changing ${plexus.home} to ${plexus.base} changed the location but not as
I wanted as plexus.base seems not to be defined. Can I use PLEXUS_BASE
somehow or do I have to hardcode the path?

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
On 19 Feb 2008, Brett Porter wrote:

> oops - you need to edit plexus.xml too.

Which one, a find -name plexus.xml gives me this:

./archiva-data/conf/plexus.xml
./apache-archiva-1.0.1/conf/plexus.xml
./apache-archiva-1.0.1/apps/archiva/conf/plexus.xml

I assume it's either the first or the second one.

> If you could file one bug that captures all the problems with this
> given document (preferably with a patch ;) it would be much
> appreciated.

Ok, I'll file one as soon as my archiva is running as it should :)

Many thanks to your Brett!

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
oops - you need to edit plexus.xml too.

If you could file one bug that captures all the problems with this
given document (preferably with a patch ;) it would be much
appreciated.

- Brett

On 19/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> Morning!
>
> On 19 Feb 2008, Brett Porter wrote:
>
> > yeah - the application expands itself so the whole directory
> > (services, apps, bin) need to be writeable even if you use an
> > alternate base. I suspect this is what is needed.
>
> Ok. Maybe this could be mentioned one the installation page somewhere.
> Just make this information available. Should I file an issue?
>
> > It won't be an issue once MRM-688 is finished for a future version :)
>
> Fine :)
>
> So changing permissions again and starting archiva another time it now
> starts up successfully (with the expected exception regarding "Schema
> 'SA' does not exist". But the user databases are still created in the
> installation directory and not in PLEXUS_BASE:
>
> $ ll apache-archiva-1.0.1/data/ archiva-data/data
> apache-archiva-1.0.1/data/:
> total 16
> drwxr-xr-x  4 martin martin 4096 2008-02-19 08:13 .
> drwxrwxr-x 11 martin martin 4096 2008-02-19 08:03 ..
> drwxr-xr-x  3 martin martin 4096 2008-02-19 08:13 archiva
> drwxr-xr-x  3 martin martin 4096 2008-02-19 08:03 users
>
> archiva-data/data:
> total 12
> drwxr-xr-x 3 martin martin 4096 2008-02-19 08:03 .
> drwxr-xr-x 6 martin martin 4096 2008-02-19 08:03 ..
> drwxr-xr-x 4 martin martin 4096 2008-02-19 08:03 repositories
>
> Is this behaviour expected?
>
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
Morning!

On 19 Feb 2008, Brett Porter wrote:

> yeah - the application expands itself so the whole directory
> (services, apps, bin) need to be writeable even if you use an
> alternate base. I suspect this is what is needed.

Ok. Maybe this could be mentioned one the installation page somewhere.
Just make this information available. Should I file an issue?

> It won't be an issue once MRM-688 is finished for a future version :)

Fine :)

So changing permissions again and starting archiva another time it now
starts up successfully (with the expected exception regarding "Schema
'SA' does not exist". But the user databases are still created in the
installation directory and not in PLEXUS_BASE:

$ ll apache-archiva-1.0.1/data/ archiva-data/data
apache-archiva-1.0.1/data/:
total 16
drwxr-xr-x  4 martin martin 4096 2008-02-19 08:13 .
drwxrwxr-x 11 martin martin 4096 2008-02-19 08:03 ..
drwxr-xr-x  3 martin martin 4096 2008-02-19 08:13 archiva
drwxr-xr-x  3 martin martin 4096 2008-02-19 08:03 users

archiva-data/data:
total 12
drwxr-xr-x 3 martin martin 4096 2008-02-19 08:03 .
drwxr-xr-x 6 martin martin 4096 2008-02-19 08:03 ..
drwxr-xr-x 4 martin martin 4096 2008-02-19 08:03 repositories

Is this behaviour expected?

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
yeah - the application expands itself so the whole directory
(services, apps, bin) need to be writeable even if you use an
alternate base. I suspect this is what is needed.

It won't be an issue once MRM-688 is finished for a future version :)

Cheers,
Brett

On 19/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> Hi Brett!
>
> Thanks for you help so far.
>
> On 19 Feb 2008, Brett Porter wrote:
>
> > Ah, I see. You shouldn't move the original configuration (specifically
> > the classworlds configuration). I just copy the 3 XML files to the new
> > conf directory.
>
> Ok, so this is an issue in the mentioned documentation which says "Move
> the conf  and data  directories". I'll file a JIRA issue for this as soon
> as I see it confirmed.
>
> > Also, you are write - the PID file is written to the installation
> > (which is probably a bug - we should make sure that is addressed in
> > MRM-688.
>
> Well, even with the PID file writeable and the configuration copied
> instead of moved, it's still throwing exceptions. The stacktrace I get is
> as follows:
>
> $ ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console
> Running Archiva...
> wrapper  | --> Wrapper Started as Console
> wrapper  | Launching a JVM...
> jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
> jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
> jvm 1    |
> jvm 1    | [INFO] Loading on start [role,roleHint]: [org.codehaus.plexus.naming.Naming,dataSources]
> jvm 1    | [INFO] Loading on start [role,roleHint]: [org.codehaus.plexus.contextualizer.Contextualizer,jettyConfiguration]
> jvm 1    | [INFO] Services will be deployed in: '/home/martin/work/archiva/apache-archiva-1.0.1/services'.
> jvm 1    | [INFO] Applications will be deployed in: '/home/martin/work/archiva/apache-archiva-1.0.1/apps'.
> jvm 1    | [INFO] Service Supervisor is deploying plexus-appserver-service-jetty-2.0-alpha-8.
> jvm 1    | [ERROR] Error while deploying service plexus-appserver-service-jetty-2.0-alpha-8.sar.
> jvm 1    | org.codehaus.plexus.appserver.ApplicationServerException: Error executing service deployment id.
> jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:91)
> jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:65)
> jvm 1    |      at org.codehaus.plexus.appserver.lifecycle.phase.ServiceDeploymentPhase$1.onJarDiscovered(ServiceDeploymentPhase.java:45)
> jvm 1    |      at org.codehaus.plexus.appserver.supervisor.DefaultSupervisor.scanDirectory(DefaultSupervisor.java:100)
> jvm 1    |      at org.codehaus.plexus.appserver.supervisor.DefaultSupervisor.scan(DefaultSupervisor.java:73)
> jvm 1    |      at org.codehaus.plexus.appserver.lifecycle.phase.ServiceDeploymentPhase.execute(ServiceDeploymentPhase.java:59)
> jvm 1    |      at org.codehaus.plexus.appserver.DefaultApplicationServer.start(DefaultApplicationServer.java:218)
> jvm 1    |      at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33)
> jvm 1    |      at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128)
> jvm 1    |      at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
> jvm 1    |      at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132)
> jvm 1    |      at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
> jvm 1    |      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147)
> jvm 1    |      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:69)
> jvm 1    |      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:297)
> jvm 1    |      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:291)
> jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.start(PlexusApplicationHost.java:155)
> jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.start(PlexusApplicationHost.java:85)
> jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.main(PlexusApplicationHost.java:289)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:597)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:597)
> jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
> jvm 1    |      at java.lang.Thread.run(Thread.java:619)
> jvm 1    | Caused by: org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException: Error expanding service archive.
> jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ExpandServicePhase.execute(ExpandServicePhase.java:44)
> jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:82)
> jvm 1    |      ... 32 more
> jvm 1    | Caused by: org.codehaus.plexus.appserver.deploy.DeploymentException: Unable to extract /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.sar to /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.
> jvm 1    |      at org.codehaus.plexus.appserver.AppServerObject.expand(AppServerObject.java:32)
> jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ExpandServicePhase.execute(ExpandServicePhase.java:40)
> jvm 1    |      ... 33 more
> jvm 1    | Caused by: java.lang.Exception: Can't extract file /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.sar
> jvm 1    |      at org.codehaus.plexus.util.Expand.extractFile(Expand.java:207)
> jvm 1    |      at org.codehaus.plexus.util.Expand.expandFile(Expand.java:113)
> jvm 1    |      at org.codehaus.plexus.util.Expand.execute(Expand.java:92)
> jvm 1    |      at org.codehaus.plexus.appserver.AppServerObject.expand(AppServerObject.java:28)
> jvm 1    |      ... 34 more
> jvm 1    | Caused by: java.io.FileNotFoundException: /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8/META-INF/MANIFEST.MF (No such file or directory)
> jvm 1    |      at java.io.FileOutputStream.open(Native Method)
> jvm 1    |      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> jvm 1    |      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> jvm 1    |      at org.codehaus.plexus.util.Expand.extractFile(Expand.java:177)
> jvm 1    |      ... 37 more
>
>
> tia
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
Hi Brett!

Thanks for you help so far.

On 19 Feb 2008, Brett Porter wrote:

> Ah, I see. You shouldn't move the original configuration (specifically
> the classworlds configuration). I just copy the 3 XML files to the new
> conf directory.

Ok, so this is an issue in the mentioned documentation which says "Move
the conf  and data  directories". I'll file a JIRA issue for this as soon
as I see it confirmed.

> Also, you are write - the PID file is written to the installation
> (which is probably a bug - we should make sure that is addressed in
> MRM-688.

Well, even with the PID file writeable and the configuration copied
instead of moved, it's still throwing exceptions. The stacktrace I get is
as follows:

$ ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console
Running Archiva...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | [INFO] Loading on start [role,roleHint]: [org.codehaus.plexus.naming.Naming,dataSources]
jvm 1    | [INFO] Loading on start [role,roleHint]: [org.codehaus.plexus.contextualizer.Contextualizer,jettyConfiguration]
jvm 1    | [INFO] Services will be deployed in: '/home/martin/work/archiva/apache-archiva-1.0.1/services'.
jvm 1    | [INFO] Applications will be deployed in: '/home/martin/work/archiva/apache-archiva-1.0.1/apps'.
jvm 1    | [INFO] Service Supervisor is deploying plexus-appserver-service-jetty-2.0-alpha-8.
jvm 1    | [ERROR] Error while deploying service plexus-appserver-service-jetty-2.0-alpha-8.sar.
jvm 1    | org.codehaus.plexus.appserver.ApplicationServerException: Error executing service deployment id.
jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:91)
jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:65)
jvm 1    |      at org.codehaus.plexus.appserver.lifecycle.phase.ServiceDeploymentPhase$1.onJarDiscovered(ServiceDeploymentPhase.java:45)
jvm 1    |      at org.codehaus.plexus.appserver.supervisor.DefaultSupervisor.scanDirectory(DefaultSupervisor.java:100)
jvm 1    |      at org.codehaus.plexus.appserver.supervisor.DefaultSupervisor.scan(DefaultSupervisor.java:73)
jvm 1    |      at org.codehaus.plexus.appserver.lifecycle.phase.ServiceDeploymentPhase.execute(ServiceDeploymentPhase.java:59)
jvm 1    |      at org.codehaus.plexus.appserver.DefaultApplicationServer.start(DefaultApplicationServer.java:218)
jvm 1    |      at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33)
jvm 1    |      at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:128)
jvm 1    |      at org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:142)
jvm 1    |      at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:132)
jvm 1    |      at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:90)
jvm 1    |      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:147)
jvm 1    |      at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:69)
jvm 1    |      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:297)
jvm 1    |      at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:291)
jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.start(PlexusApplicationHost.java:155)
jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.start(PlexusApplicationHost.java:85)
jvm 1    |      at org.codehaus.plexus.appserver.PlexusApplicationHost.main(PlexusApplicationHost.java:289)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:597)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:597)
jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1    |      at java.lang.Thread.run(Thread.java:619)
jvm 1    | Caused by: org.codehaus.plexus.appserver.service.deploy.lifecycle.ServiceDeploymentException: Error expanding service archive.
jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ExpandServicePhase.execute(ExpandServicePhase.java:44)
jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.DefaultServiceDeployer.deploy(DefaultServiceDeployer.java:82)
jvm 1    |      ... 32 more
jvm 1    | Caused by: org.codehaus.plexus.appserver.deploy.DeploymentException: Unable to extract /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.sar to /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.
jvm 1    |      at org.codehaus.plexus.appserver.AppServerObject.expand(AppServerObject.java:32)
jvm 1    |      at org.codehaus.plexus.appserver.service.deploy.lifecycle.phase.ExpandServicePhase.execute(ExpandServicePhase.java:40)
jvm 1    |      ... 33 more
jvm 1    | Caused by: java.lang.Exception: Can't extract file /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8.sar
jvm 1    |      at org.codehaus.plexus.util.Expand.extractFile(Expand.java:207)
jvm 1    |      at org.codehaus.plexus.util.Expand.expandFile(Expand.java:113)
jvm 1    |      at org.codehaus.plexus.util.Expand.execute(Expand.java:92)
jvm 1    |      at org.codehaus.plexus.appserver.AppServerObject.expand(AppServerObject.java:28)
jvm 1    |      ... 34 more
jvm 1    | Caused by: java.io.FileNotFoundException: /home/martin/work/archiva/apache-archiva-1.0.1/services/plexus-appserver-service-jetty-2.0-alpha-8/META-INF/MANIFEST.MF (No such file or directory)
jvm 1    |      at java.io.FileOutputStream.open(Native Method)
jvm 1    |      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
jvm 1    |      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
jvm 1    |      at org.codehaus.plexus.util.Expand.extractFile(Expand.java:177)
jvm 1    |      ... 37 more


tia
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
Ah, I see. You shouldn't move the original configuration (specifically
the classworlds configuration). I just copy the 3 XML files to the new
conf directory.

Also, you are write - the PID file is written to the installation
(which is probably a bug - we should make sure that is addressed in
MRM-688.

Thanks!

Cheers,
Brett

On 19/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> On 19 Feb 2008, Brett Porter wrote:
>
> > The doc could well be a bit wrong in step 2 - please file a bug for that :)
>
> Ok, done that: http://jira.codehaus.org/browse/MRM-701
>
> > I do use it successfully with the following script to start it though:
> >
> > #!/bin/sh
> > version=1.0.1
> > PLEXUS_BASE=$HOME/Library/Application\ Support/Archiva
> > /Applications/Archiva/apache-archiva-$version/bin/macosx-universal-32/run.sh
> > $@
>
> That's what I'd expect to work, but unfortunately it doesn't :-(
> (I suppose the "$@" should be on one line with the run.sh line)
>
> > Maybe you were missing an export of PLEXUS_BASE before starting? (the
> > above doesn't need it since it's all on one line, the env vars are
> > passed to the second run script).
>
> No, I did export PLEXUS_BASE and also tried it in a script like yours. No
> success.
>
> Here are exactly the steps i performed:
>
> 1) tar xzvf ~/downloads/apache-archiva-1.0.1-bin.tar.gz
> 2) mkdir -p archiva-data/logs
>    (NOTE: when I do not create the 'logs' directory archiva throws an
>    exception)
> 3) mv apache-archiva-1.0.1/conf archiva-data/
> 4) chmod ugo-w -R apache-archiva-1.0.1/
> 5) ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console
>
> The result is:
>   Running Archiva...
>   wrapper  | ERROR: Could not write pid file ./archiva.pid: Permission denied
>
> It tries to write the PID-File to bin/linux-x86-32/, not './'. If I allow
> for writing there by doing
>
> 6) chmod a+w apache-archiva-1.0.1/bin/linux-x86-32/
> 7) ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console
>
> The result is another exception:
> Running Archiva...
> wrapper  | --> Wrapper Started as Console
> wrapper  | Launching a JVM...
> jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
> jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
> jvm 1    |
> jvm 1    | java.io.FileNotFoundException: [...]/apache-archiva-1.0.1/conf/classworlds.conf (No such file or directory)
> jvm 1    |      at java.io.FileInputStream.open(Native Method)
> jvm 1    |      at java.io.FileInputStream.<init>(FileInputStream.java:106)
> jvm 1    |      at java.io.FileInputStream.<init>(FileInputStream.java:66)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:385)
> jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:585)
> jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
> jvm 1    |      at java.lang.Thread.run(Thread.java:595)
> wrapper  | <-- Wrapper Stopped
>
> BTW, I'm running on Debian GNU/Linux, with java version 1.5.0_12.
>
> Anyone knows whats the problem here?
>
> - martin
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: Separating the base from the installation not working

Posted by Martin Hoeller <ma...@xss.co.at>.
On 19 Feb 2008, Brett Porter wrote:

> The doc could well be a bit wrong in step 2 - please file a bug for that :)

Ok, done that: http://jira.codehaus.org/browse/MRM-701

> I do use it successfully with the following script to start it though:
> 
> #!/bin/sh
> version=1.0.1
> PLEXUS_BASE=$HOME/Library/Application\ Support/Archiva
> /Applications/Archiva/apache-archiva-$version/bin/macosx-universal-32/run.sh
> $@

That's what I'd expect to work, but unfortunately it doesn't :-(
(I suppose the "$@" should be on one line with the run.sh line)

> Maybe you were missing an export of PLEXUS_BASE before starting? (the
> above doesn't need it since it's all on one line, the env vars are
> passed to the second run script).

No, I did export PLEXUS_BASE and also tried it in a script like yours. No
success.

Here are exactly the steps i performed:

1) tar xzvf ~/downloads/apache-archiva-1.0.1-bin.tar.gz
2) mkdir -p archiva-data/logs
   (NOTE: when I do not create the 'logs' directory archiva throws an
   exception)
3) mv apache-archiva-1.0.1/conf archiva-data/
4) chmod ugo-w -R apache-archiva-1.0.1/
5) ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console

The result is:
  Running Archiva...
  wrapper  | ERROR: Could not write pid file ./archiva.pid: Permission denied

It tries to write the PID-File to bin/linux-x86-32/, not './'. If I allow
for writing there by doing

6) chmod a+w apache-archiva-1.0.1/bin/linux-x86-32/
7) ./apache-archiva-1.0.1/bin/linux-x86-32/run.sh console

The result is another exception:
Running Archiva...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | java.io.FileNotFoundException: [...]/apache-archiva-1.0.1/conf/classworlds.conf (No such file or directory)
jvm 1    |      at java.io.FileInputStream.open(Native Method)
jvm 1    |      at java.io.FileInputStream.<init>(FileInputStream.java:106)
jvm 1    |      at java.io.FileInputStream.<init>(FileInputStream.java:66)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:385)
jvm 1    |      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
jvm 1    |      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:585)
jvm 1    |      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1    |      at java.lang.Thread.run(Thread.java:595)
wrapper  | <-- Wrapper Stopped

BTW, I'm running on Debian GNU/Linux, with java version 1.5.0_12.

Anyone knows whats the problem here?

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Separating the base from the installation not working

Posted by Brett Porter <br...@gmail.com>.
The doc could well be a bit wrong in step 2 - please file a bug for that :)

I do use it successfully with the following script to start it though:

#!/bin/sh
version=1.0.1
PLEXUS_BASE=$HOME/Library/Application\ Support/Archiva
/Applications/Archiva/apache-archiva-$version/bin/macosx-universal-32/run.sh
$@

No modifications to the installation are needed.

Maybe you were missing an export of PLEXUS_BASE before starting? (the
above doesn't need it since it's all on one line, the env vars are
passed to the second run script).

Cheers,
Brett

On 18/02/2008, Martin Hoeller <ma...@xss.co.at> wrote:
> Hi!
>
> I'm trying to install archiva 1.0.1 on Linux as a standalone application
> as running in JBoss gives various errors.
>
> The archiva admin guide for standalone installation [0] says
>
> | However, the best way to use this installation technique is to separate
> | the configuration from the installation to make it easy to upgrade to
> | newer versions in the future.
>
> I tried to follow these steps exactly as explained. However, it seems this
> does not work at all.
>
> First, there is no 'data'-directory as mentioned in step 2 (I ignored
> this for now).
>
> Second, as archiva should now hold it's data in the PLEXUS_BASE
> directory, I thought it shouldn't need to write to the installation
> directory (PLEXUS_HOME) which seems not to be true. If write access to
> the PLEXUS_HOME directory is denied archiva startup fails. So I granted
> write permissions to this directory.
>
> Third, the user- and artifact- database seem to be created in the
> installation base (PLEXUS_HOME) and not PLEXUS_BASE, as PLEXUS_HOME now
> contains new directories data/archiva and data/users with lots of files
> in it.
>
> Has anybody successfully tried to perform a separation of installation
> and data in archiva 1.0.1?
>
> Any comments are welcome.
>
> tia,
> - martin
>
> [0] http://maven.apache.org/archiva/docs/1.0.1/adminguide/standalone.html
> --
> Martin Höller                   | martin.hoeller@xss.co.at
> *x Software + Systeme           | http://www.xss.co.at/
> Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
> A-1100 Vienna, Austria          | Fax: +43-1-6060114-71
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/