O.K.  I have an update on the situation.  The 
archiva-webapp-js-1.4-M3-SNAPSHOT.war will download artifacts from the Central 
Repo if I just install it within CATALINA_HOME.  I can find the artifacts via 
"Browse" too.  I removed my CATALINA_BASE Windows Environment variable.  I've 
also tried this with and without PostgreSQL in the mix.  I'm having no issues.  
Btw, PostgreSQL used as the Persistence Manager, FileSystem, and DataStore as 
well as the users database, is fast.  I'm not yet sure if it's asynchronous 
though.

This new interface is very nice!

Now, back to the problem at hand:  I'd like to use Archiva in a Tomcat 
instance/base separated from the installation for easy upgrades of Tomcat & 
Archiva and also scalability.

It seems that there's an issue when I install the .war into a separated Tomcat 
Base. For my Tomcat base, I set up a Windows Environment variable named 
CATALINA_BASE_ARCHIVA, which points to my Tomcat 7 base where the Archiva .war 
is installed.  I then set up CATALINA_OPTS with a value of 
-Dappserver.home=%CATALINA_HOME% -Dappserver.base=%CATALINA_BASE_ARCHIVA%.

With this setup, Archiva is launched from CATALINA_BASE_ARCHIVA.  The data/jcr 
directory and other associated Jackrabbit directories are created within this 
base.  The logs are also output to this base.

This presents 2 scenarios:
1.) I goofed up something with my config...something subtle I'm not seeing.
2.) I didn't goof up my config, but Archiva is somehow still trying to browse 
for artifacts and deposit artifacts obtained from Central as though the .war is 
still present in CATALINA_HOME and no CATALINA_BASE exists.

I'm hoping it's #1 :-P

 - Chris


-----Original Message-----
From: Olivier Lamy [mailto:ol...@apache.org] 
Sent: Thursday, September 06, 2012 3:06 AM
To: users@archiva.apache.org
Subject: Re: Cannot upload or browse for artifacts

Hi,
I think you hit a windauze issue fixed in trunk here.
Can you try with a SNAPSHOT build to see if the fix is ok for you.
Feel free to download here:
https://builds.apache.org/view/A-F/view/Archiva/job/archiva-all-maven-3.x-jdk-1.6/
Note the -js artifacts are webapp with new ui (I hope you will love that :-) )


2012/9/6 Harris, Christopher P <chris_har...@baxter.com>:
> Hi,
>
> I recently posted to this list.  The title was "Cannot get Archiva to create 
> tables in 'archiva' database in MySQL 5.5"
>
> Continuing from where I left off in that thread...
>
> I looked up the Apache Jackrabbit site, documentation, Wiki, and API.  I 
> think I have a fairly decent understanding of what's going on.  I've provided 
> Archiva a repository.xml file.  After some reading and tinkering, I also 
> decided to ditch MySQL 5.5.  I saw too many warnings/bugs about it and BLOB's 
> during my investigations.  I'm now using PostgreSQL 9.1.  I'm seeing 
> Archiva/Jackrabbit populate my PostgreSQL schema's tables with data.
>
> My problem is that I cannot get artifacts to populate the Workspace/DataStore 
> (DataStore since it's a BLOB).  I've tried the junit test on your "Quick 
> Start" page:
> http://localhost:8083/archiva/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar
>     (My Tomcat instance's port is 8083).  I'm doing all the following as 
> Archiva's "admin".
>
> I get this error message:
> HTTP Status 404 - Not a valid request path layout, too short.
> ________________________________
> type Status report
> message Not a valid request path layout, too short.
> description The requested resource (Not a valid request path layout, too 
> short.) is not available.
> This works for the Standalone version of Archiva.  I've never gotten this to 
> work for the .war version.
>
> If I try to manually upload an artifact via "Upload Artifact", I get this 
> error message:
> HTTP Status 500 -
> ________________________________
> type Exception report
> message
> description The server encountered an internal error () that prevented it 
> from fulfilling this request.
> exception
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         java.lang.String.substring(String.java:1958)
>         
> org.apache.archiva.web.action.UploadAction.doUpload(UploadAction.java:311)
>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         java.lang.reflect.Method.invoke(Method.java:601)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
>         
> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:314)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
>         
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.archiva.web.interceptor.ConfigurationInterceptor.intercept(ConfigurationInterceptor.java:51)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:100)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.codehaus.plexus.redback.struts2.interceptor.PolicyEnforcementInterceptor.intercept(PolicyEnforcementInterceptor.java:165)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.codehaus.plexus.redback.struts2.interceptor.SecureActionInterceptor.intercept(SecureActionInterceptor.java:190)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor.intercept(ParameterFilterInterceptor.java:136)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
>         
> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:314)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.codehaus.plexus.redback.struts2.interceptor.AutoLoginInterceptor.intercept(AutoLoginInterceptor.java:173)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.codehaus.plexus.redback.struts2.interceptor.ForceAdminUserInterceptor.intercept(ForceAdminUserInterceptor.java:114)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
>         
> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
>         
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>         
> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>         
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
>         
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>         
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
>         
> com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
>         
> com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
>         
> org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
>         
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
>         
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>
> What's odd is that I don't see this error in the Tomcat logs or archiva.log.
>
> I supplied values to all the fields with red asterisks (Group Id, Artifact 
> Id, Version, Packaging, Artifact File and even POM File).  I'm trying to 
> upload it to the default internal repo.  The values for the artifact are 
> correct.  It's an Oracle 10g artifact I use all over the place in my Maven 
> projects.
>
> Still, "Browse" displays no artifacts.
>
> I've tried various combinations of FileSystem instead of DbFileSystem, 
> FileDataStore instead of DbDataStore, etc.  Still, no luck.  Archiva starts 
> up with no errors (unless I specify the 2 DTD's as 2.4).
>
> Here's my repository.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE Repository
>           PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
>           "http://jackrabbit.apache.org/dtd/repository-2.0.dtd";>
>
> <Repository>
>     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>        <param name="driver" value="org.postgresql.Driver"/>
>        <param name="url" value="jdbc:postgresql://localhost:5433/filesystem"/>
>        <param name="schema" value="postgresql"/>
>        <param name="user" value="users"/>
>        <param name="password" value="users"/>
>        <param name="schemaObjectPrefix" value="rep_"/>
>    </FileSystem>
>
>     <Security appName="Jackrabbit">
>       <SecurityManager 
> class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" 
> workspaceName="security"/>
>       <AccessManager 
> class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager"/>
>       <LoginModule 
> class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule"/>
>     </Security>
>
>     <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
>
>     <Workspace name="${wsp.name}">
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>              <param name="driver" value="org.postgresql.Driver"/>
>              <param name="url" 
> value="jdbc:postgresql://localhost:5433/filesystem"/>
>              <param name="schema" value="postgresql"/>
>              <param name="user" value="users"/>
>              <param name="password" value="users"/>
>              <param name="schemaObjectPrefix" value="rep_${wsp.name}_"/>
>          </FileSystem>
>         <PersistenceManager 
> class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>             <param name="driver" value="org.postgresql.Driver"/>
>             <param name="url" 
> value="jdbc:postgresql://localhost:5433/workspaces"/>
>             <param name="schema" value="postgresql"/>
>             <param name="user" value="users"/>
>             <param name="password" value="users"/>
>             <param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/>
>         </PersistenceManager>
>         <SearchIndex 
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>             <param name="path" value="${wsp.home}/index"/>
>         </SearchIndex>
>     </Workspace>
>
>     <Versioning rootPath="${rep.home}/version">
>         <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
>              <param name="driver" value="org.postgresql.Driver"/>
>              <param name="url" 
> value="jdbc:postgresql://localhost:5433/filesystem"/>
>              <param name="schema" value="postgresql"/>
>              <param name="user" value="users"/>
>              <param name="password" value="users"/>
>              <param name="schemaObjectPrefix" value="rep_version_"/>
>          </FileSystem>
>
>         <PersistenceManager 
> class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
>             <param name="driver" value="org.postgresql.Driver"/>
>             <param name="url" 
> value="jdbc:postgresql://localhost:5433/workspaces"/>
>             <param name="schema" value="postgresql"/>
>             <param name="user" value="users"/>
>             <param name="password" value="users"/>
>             <param name="schemaObjectPrefix" value="version_"/>
>         </PersistenceManager>
>     </Versioning>
>
>     <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>         <param name="path" value="${rep.home}/repository/index"/>
>     </SearchIndex>
>
>     <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
>         <param name="url" value="jdbc:postgresql://localhost:5433/datastore"/>
>         <param name="user" value="users"/>
>         <param name="password" value="users"/>
>         <param name="databaseType" value="postgresql"/>
>         <param name="driver" value="org.postgresql.Driver"/>
>         <param name="minRecordLength" value="1024"/>
>         <param name="maxConnections" value="3"/>
>         <param name="copyWhenReading" value="true"/>
>         <param name="tablePrefix" value=""/>
>         <param name="schemaObjectPrefix" value=""/>
>     </DataStore>
> </Repository>
>
> Am I doing something wrong?  I feel like I'm so close to getting Archiva to 
> work.  It's got to be something silly on my part or a bug...dunno.
>
>
> -    Chris
> The information transmitted is intended only for the person(s)or entity to 
> which it is addressed and may contain confidential and/or legally privileged 
> material. Delivery of this message to any person other than the intended 
> recipient(s) is not intended in any way to waive privilege or 
> confidentiality. Any review, retransmission, dissemination or other use of , 
> or taking of any action in reliance upon, this information by entities other 
> than the intended recipient is prohibited. If you receive this in error, 
> please contact the sender and delete the material from any computer.
>
> For Translation:
>
> http://www.baxter.com/email_disclaimer



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
The information transmitted is intended only for the person(s)or entity to 
which it is addressed and may contain confidential and/or legally privileged 
material. Delivery of this message to any person other than the intended 
recipient(s) is not intended in any way to waive privilege or confidentiality. 
Any review, retransmission, dissemination or other use of , or taking of any 
action in reliance upon, this information by entities other than the intended 
recipient is prohibited. If you receive this in error, please contact the 
sender and delete the material from any computer.

For Translation:

http://www.baxter.com/email_disclaimer

Reply via email to