You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by "Harris, Christopher P" <ch...@baxter.com> on 2012/08/29 19:36:25 UTC

Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Hi.

I've set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat 7.0.26 (base separated from installation).

I've set up a MySQL 5.5 database.  The problem is that I see no tables or data getting populated in just the archiva schema for the "archiva" user.  However, I am seeing tables and data populating the users schema for the "users" user.

I used this script:
create database archiva;

create database users;

use mysql;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO 'archiva'@'localhost' IDENTIFIED BY 'archiva';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO 'users'@'localhost' IDENTIFIED BY 'users';

I can successfully launch the Archiva .war in Tomcat.  Upon my initial launch of Archiva, I was prompted to create the admin.  Once I created the admin, the admin showed up in the jdouser table in the users schema.  The guest user is present as well.

I've attached archiva.log.

I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories default internal and snapshots repositories are getting created within my file system.  That would indicate that Derby is getting used for the repositories, correct?

Here's my archiva.xml from \path\to\tomcat_base_archiva\conf\Catalina\localhost
<Context path="/archiva"
         docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
         reloadable="true"
         antiJARLocking="true"
         antiResourceLocking="true">

         <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war"> -->
  <Resource name="jdbc/users"
            auth="Container"
            type="javax.sql.DataSource"
            username="users"
            password="users"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>

  <Resource name="jdbc/archiva"
            auth="Container"
            type="javax.sql.DataSource"
            username="archiva"
            password="archiva"
            driverClassName="com.mysql.jdbc.Driver"
            url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>

  <Resource name="mail/Session"
            auth="Container"
            type="javax.mail.Session"
            mail.smtp.host="localhost"/>
</Context>

I poked around in the Archiva code on SVN here :
http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
I looked at the jetty config file jetty-env-mysql.xml and noticed that the archiva user is given the password 'sa'.
I noticed that here too:
http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
So, I even tried changing the "archiva" user's password to sa within MySQL and in archiva.xml.

That didn't work.

I've read about a  bug where MySQL db's shouldn't be set to UTF-8, but that bug appears to have affected older Archiva versions.  Both my users and archiva tables are set to UTF-8.

It's odd that the users db is being utilized, but the archiva db is not.

What am I doing wrong?

I'm tempted to try PostgreSQL, but I don't want to open another potential can of worms just yet.


-    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

Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by Olivier Lamy <ol...@apache.org>.
2012/8/30 Harris, Christopher P <ch...@baxter.com>:
> Ah, great!
>
> Thanks, Brett!  I'll check out JackRabbit today.  I'll probably configure its repository.xml to point to one of those 2 databases.  Don't sweat it about the flat file storage mechanism.  I know 1.4 hasn't hit GA/Final/Release status.  I knew that there were some big changes in 1.4, so I figured I'd dive into 1.4 now and deal with any required tinkering instead of setting up an infrastructure that would have to change relatively soon afterward.
Note that will maybe less performant (I don't know exactly how sql
storage is implemented if that's async or not)
If you could give us some feedback that will be great :-)

>
>
> - Chris
>
> -----Original Message-----
> From: Brett Porter [mailto:brett@porterclan.net] On Behalf Of Brett Porter
> Sent: Wednesday, August 29, 2012 7:50 PM
> To: users@archiva.apache.org
> Subject: Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5
>
>
> On 29/08/2012, at 6:30 PM, "Harris, Christopher P" <ch...@baxter.com> wrote:
>
>> Thanks, Brett.
>>
>> Just curious, can you expand on "other options"?  I don't need my hand held in regard to specifics, but I just trying to get a general understanding of what those options are.
>
> We have a lightweight flat file storage mechanism that can be used - it uses less memory, but can query slower in some cases. It would need a bit more work to be production ready.
>
> It is also possible to reconfigure Jackrabbit to use MySQL and Postgres, using it's conventional repository.xml configuration file. That's something we're likely to document more as part of the release.
>
> - Brett
>
> 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

RE: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by "Harris, Christopher P" <ch...@baxter.com>.
Ah, great!

Thanks, Brett!  I'll check out JackRabbit today.  I'll probably configure its repository.xml to point to one of those 2 databases.  Don't sweat it about the flat file storage mechanism.  I know 1.4 hasn't hit GA/Final/Release status.  I knew that there were some big changes in 1.4, so I figured I'd dive into 1.4 now and deal with any required tinkering instead of setting up an infrastructure that would have to change relatively soon afterward.


- Chris

-----Original Message-----
From: Brett Porter [mailto:brett@porterclan.net] On Behalf Of Brett Porter
Sent: Wednesday, August 29, 2012 7:50 PM
To: users@archiva.apache.org
Subject: Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5


On 29/08/2012, at 6:30 PM, "Harris, Christopher P" <ch...@baxter.com> wrote:

> Thanks, Brett.
> 
> Just curious, can you expand on "other options"?  I don't need my hand held in regard to specifics, but I just trying to get a general understanding of what those options are.

We have a lightweight flat file storage mechanism that can be used - it uses less memory, but can query slower in some cases. It would need a bit more work to be production ready.

It is also possible to reconfigure Jackrabbit to use MySQL and Postgres, using it's conventional repository.xml configuration file. That's something we're likely to document more as part of the release.

- Brett

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


Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by Brett Porter <br...@apache.org>.
On 29/08/2012, at 6:30 PM, "Harris, Christopher P" <ch...@baxter.com> wrote:

> Thanks, Brett.
> 
> Just curious, can you expand on "other options"?  I don't need my hand held in regard to specifics, but I just trying to get a general understanding of what those options are.

We have a lightweight flat file storage mechanism that can be used - it uses less memory, but can query slower in some cases. It would need a bit more work to be production ready.

It is also possible to reconfigure Jackrabbit to use MySQL and Postgres, using it's conventional repository.xml configuration file. That's something we're likely to document more as part of the release.

- Brett


RE: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by "Harris, Christopher P" <ch...@baxter.com>.
Thanks, Brett.

Just curious, can you expand on "other options"?  I don't need my hand held in regard to specifics, but I just trying to get a general understanding of what those options are.

Derby had its limitations in terms of number of artifacts stored, which I and our organization can easily hit and why I was trying to set up MySQL or PostgreSQL.  Could I still use an external db (I imagine so)?  Should I use an external db compared to JackRabbit?  What's your recommendation?

I'm about to head home for the day, so I'll look into JackRabbit tonight or tomorrow.

 - Chris

-----Original Message-----
From: Brett Porter [mailto:brett@porterclan.net] On Behalf Of Brett Porter
Sent: Wednesday, August 29, 2012 3:13 PM
To: users@archiva.apache.org
Subject: Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Hi Chris,

Archiva 1.4 no longer has an 'archiva' database, as it has switched to using Jackrabbit for storing the artifact metadata (by default, though there are other options). The documentation has been updated, but until 1.4 is final that's not the main version on the site.

Regards,
Brett

On 29/08/2012, at 1:36 PM, "Harris, Christopher P" <ch...@baxter.com> wrote:

> Hi.
>  
> I've set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat 7.0.26 (base separated from installation).
>  
> I've set up a MySQL 5.5 database.  The problem is that I see no tables or data getting populated in just the archiva schema for the "archiva" user.  However, I am seeing tables and data populating the users schema for the "users" user.
>  
> I used this script:
> create database archiva;
>  
> create database users;
>  
> use mysql;
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO 'archiva'@'localhost' IDENTIFIED BY 'archiva';
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO 'users'@'localhost' IDENTIFIED BY 'users';
>  
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial launch of Archiva, I was prompted to create the admin.  Once I created the admin, the admin showed up in the jdouser table in the users schema.  The guest user is present as well.
>  
> I've attached archiva.log.
>  
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories default internal and snapshots repositories are getting created within my file system.  That would indicate that Derby is getting used for the repositories, correct?
>  
> Here's my archiva.xml from \path\to\tomcat_base_archiva\conf\Catalina\localhost
> <Context path="/archiva"
>          docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>          reloadable="true"
>          antiJARLocking="true"
>          antiResourceLocking="true">
>         
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war"> -->
>   <Resource name="jdbc/users"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="users"
>             password="users"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
>  
>   <Resource name="jdbc/archiva"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="archiva"
>             password="archiva"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
>  
>   <Resource name="mail/Session"
>             auth="Container"
>             type="javax.mail.Session"
>             mail.smtp.host="localhost"/>
> </Context>
>  
> I poked around in the Archiva code on SVN here :
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the archiva user is given the password 'sa'.
> I noticed that here too:
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
> So, I even tried changing the "archiva" user's password to sa within MySQL and in archiva.xml.
>  
> That didn't work.
>  
> I've read about a  bug where MySQL db's shouldn't be set to UTF-8, but that bug appears to have affected older Archiva versions.  Both my users and archiva tables are set to UTF-8.
>  
> It's odd that the users db is being utilized, but the archiva db is not.
>  
> What am I doing wrong?
>  
> I'm tempted to try PostgreSQL, but I don't want to open another potential can of worms just yet.
>  
> -    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
> 

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


Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by Brett Porter <br...@apache.org>.
Hi Chris,

Archiva 1.4 no longer has an 'archiva' database, as it has switched to using Jackrabbit for storing the artifact metadata (by default, though there are other options). The documentation has been updated, but until 1.4 is final that's not the main version on the site.

Regards,
Brett

On 29/08/2012, at 1:36 PM, "Harris, Christopher P" <ch...@baxter.com> wrote:

> Hi.
>  
> I’ve set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat 7.0.26 (base separated from installation).
>  
> I’ve set up a MySQL 5.5 database.  The problem is that I see no tables or data getting populated in just the archiva schema for the “archiva” user.  However, I am seeing tables and data populating the users schema for the “users” user.
>  
> I used this script:
> create database archiva;
>  
> create database users;
>  
> use mysql;
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO 'archiva'@'localhost' IDENTIFIED BY 'archiva';
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO 'users'@'localhost' IDENTIFIED BY 'users';
>  
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial launch of Archiva, I was prompted to create the admin.  Once I created the admin, the admin showed up in the jdouser table in the users schema.  The guest user is present as well.
>  
> I’ve attached archiva.log.
>  
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories default internal and snapshots repositories are getting created within my file system.  That would indicate that Derby is getting used for the repositories, correct?
>  
> Here’s my archiva.xml from \path\to\tomcat_base_archiva\conf\Catalina\localhost
> <Context path="/archiva"
>          docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>          reloadable="true"
>          antiJARLocking="true"
>          antiResourceLocking="true">
>         
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war"> -->
>   <Resource name="jdbc/users"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="users"
>             password="users"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
>  
>   <Resource name="jdbc/archiva"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="archiva"
>             password="archiva"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
>  
>   <Resource name="mail/Session"
>             auth="Container"
>             type="javax.mail.Session"
>             mail.smtp.host="localhost"/>
> </Context>
>  
> I poked around in the Archiva code on SVN here :
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the archiva user is given the password ‘sa’.
> I noticed that here too:
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
> So, I even tried changing the “archiva” user’s password to sa within MySQL and in archiva.xml.
>  
> That didn’t work.
>  
> I’ve read about a  bug where MySQL db’s shouldn’t be set to UTF-8, but that bug appears to have affected older Archiva versions.  Both my users and archiva tables are set to UTF-8.
>  
> It’s odd that the users db is being utilized, but the archiva db is not.
>  
> What am I doing wrong?
>  
> I’m tempted to try PostgreSQL, but I don’t want to open another potential can of worms just yet.
>  
> -    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
> 


RE: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by "Harris, Christopher P" <ch...@baxter.com>.
Ah, I see.

I did notice Spring-related warnings about jcr mentioned in archiva.log.

Well, Archiva does start, but I can't see any artifacts listed under Browse...even via the junit example from http://archiva.apache.org/docs/1.4-M2/quick-start.html (I know that this is for standalone).

If I try http://localhost:8083/archiva/repository/internal/junit/junit/3.8.1/junit-3.8.1.jar (correct port for this Tomcat instance), I get a 404 error stating "Not a valid request layout, too short."

Chris Harris
Programmer/Analyst
BioLife Plasma Services
Baxter Healthcare Corporation
One Baxter Parkway DF3-1W
Deerfield, Illinois 60015
T 224.948.4739   F 224.948.2885
chris_harris@baxter.com

-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org] 
Sent: Wednesday, August 29, 2012 3:12 PM
To: users@archiva.apache.org
Subject: Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Hi,
Version 1.4-M2 doesn't anymore archiva database :-). All has been
moved to jcr (jackrabbit).
Only users are still stored in database (users).
See http://archiva.apache.org/docs/1.4-M2/adminguide/databases.html

The most important: does Archiva works ? :-)

2012/8/29 Harris, Christopher P <ch...@baxter.com>:
> Hi.
>
>
>
> I've set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat
> 7.0.26 (base separated from installation).
>
>
>
> I've set up a MySQL 5.5 database.  The problem is that I see no tables or
> data getting populated in just the archiva schema for the "archiva" user.
> However, I am seeing tables and data populating the users schema for the
> "users" user.
>
>
>
> I used this script:
>
> create database archiva;
>
>
>
> create database users;
>
>
>
> use mysql;
>
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO
> 'archiva'@'localhost' IDENTIFIED BY 'archiva';
>
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO
> 'users'@'localhost' IDENTIFIED BY 'users';
>
>
>
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial
> launch of Archiva, I was prompted to create the admin.  Once I created the
> admin, the admin showed up in the jdouser table in the users schema.  The
> guest user is present as well.
>
>
>
> I've attached archiva.log.
>
>
>
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories
> default internal and snapshots repositories are getting created within my
> file system.  That would indicate that Derby is getting used for the
> repositories, correct?
>
>
>
> Here's my archiva.xml from
> \path\to\tomcat_base_archiva\conf\Catalina\localhost
>
> <Context path="/archiva"
>
>
> docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>
>          reloadable="true"
>
>          antiJARLocking="true"
>
>          antiResourceLocking="true">
>
>
>
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war">
> -->
>
>   <Resource name="jdbc/users"
>
>             auth="Container"
>
>             type="javax.sql.DataSource"
>
>             username="users"
>
>             password="users"
>
>             driverClassName="com.mysql.jdbc.Driver"
>
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
>
>
>
>   <Resource name="jdbc/archiva"
>
>             auth="Container"
>
>             type="javax.sql.DataSource"
>
>             username="archiva"
>
>             password="archiva"
>
>             driverClassName="com.mysql.jdbc.Driver"
>
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
>
>
>
>   <Resource name="mail/Session"
>
>             auth="Container"
>
>             type="javax.mail.Session"
>
>             mail.smtp.host="localhost"/>
>
> </Context>
>
>
>
> I poked around in the Archiva code on SVN here :
>
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
>
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the
> archiva user is given the password 'sa'.
>
> I noticed that here too:
>
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
>
> So, I even tried changing the "archiva" user's password to sa within MySQL
> and in archiva.xml.
>
>
>
> That didn't work.
>
>
>
> I've read about a  bug where MySQL db's shouldn't be set to UTF-8, but that
> bug appears to have affected older Archiva versions.  Both my users and
> archiva tables are set to UTF-8.
>
>
>
> It's odd that the users db is being utilized, but the archiva db is not.
>
>
>
> What am I doing wrong?
>
>
>
> I'm tempted to try PostgreSQL, but I don't want to open another potential
> can of worms just yet.
>
>
>
> -    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


Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by Olivier Lamy <ol...@apache.org>.
Hi,
Version 1.4-M2 doesn't anymore archiva database :-). All has been
moved to jcr (jackrabbit).
Only users are still stored in database (users).
See http://archiva.apache.org/docs/1.4-M2/adminguide/databases.html

The most important: does Archiva works ? :-)

2012/8/29 Harris, Christopher P <ch...@baxter.com>:
> Hi.
>
>
>
> I’ve set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat
> 7.0.26 (base separated from installation).
>
>
>
> I’ve set up a MySQL 5.5 database.  The problem is that I see no tables or
> data getting populated in just the archiva schema for the “archiva” user.
> However, I am seeing tables and data populating the users schema for the
> “users” user.
>
>
>
> I used this script:
>
> create database archiva;
>
>
>
> create database users;
>
>
>
> use mysql;
>
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO
> 'archiva'@'localhost' IDENTIFIED BY 'archiva';
>
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO
> 'users'@'localhost' IDENTIFIED BY 'users';
>
>
>
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial
> launch of Archiva, I was prompted to create the admin.  Once I created the
> admin, the admin showed up in the jdouser table in the users schema.  The
> guest user is present as well.
>
>
>
> I’ve attached archiva.log.
>
>
>
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories
> default internal and snapshots repositories are getting created within my
> file system.  That would indicate that Derby is getting used for the
> repositories, correct?
>
>
>
> Here’s my archiva.xml from
> \path\to\tomcat_base_archiva\conf\Catalina\localhost
>
> <Context path="/archiva"
>
>
> docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>
>          reloadable="true"
>
>          antiJARLocking="true"
>
>          antiResourceLocking="true">
>
>
>
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war">
> -->
>
>   <Resource name="jdbc/users"
>
>             auth="Container"
>
>             type="javax.sql.DataSource"
>
>             username="users"
>
>             password="users"
>
>             driverClassName="com.mysql.jdbc.Driver"
>
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
>
>
>
>   <Resource name="jdbc/archiva"
>
>             auth="Container"
>
>             type="javax.sql.DataSource"
>
>             username="archiva"
>
>             password="archiva"
>
>             driverClassName="com.mysql.jdbc.Driver"
>
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
>
>
>
>   <Resource name="mail/Session"
>
>             auth="Container"
>
>             type="javax.mail.Session"
>
>             mail.smtp.host="localhost"/>
>
> </Context>
>
>
>
> I poked around in the Archiva code on SVN here :
>
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
>
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the
> archiva user is given the password ‘sa’.
>
> I noticed that here too:
>
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
>
> So, I even tried changing the “archiva” user’s password to sa within MySQL
> and in archiva.xml.
>
>
>
> That didn’t work.
>
>
>
> I’ve read about a  bug where MySQL db’s shouldn’t be set to UTF-8, but that
> bug appears to have affected older Archiva versions.  Both my users and
> archiva tables are set to UTF-8.
>
>
>
> It’s odd that the users db is being utilized, but the archiva db is not.
>
>
>
> What am I doing wrong?
>
>
>
> I’m tempted to try PostgreSQL, but I don’t want to open another potential
> can of worms just yet.
>
>
>
> -    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

RE: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by "Harris, Christopher P" <ch...@baxter.com>.
Thanks, Eric.

 - Chris


-----Original Message-----
From: Eric Barboni [mailto:Eric.Barboni@irit.fr] 
Sent: Wednesday, August 29, 2012 2:10 PM
To: users@archiva.apache.org
Subject: Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

 
Hi Chris

AFAIK 1.4-M1 drop "archiva" database see http://jira.codehaus.org/browse/MRM-1025 in favor of more reliable API and workflow.
So IMHO you are doing nothing wrong.

Regards

Eric


Le Mercredi 29 Août 2012 19:36 CEST, "Harris, Christopher P" <ch...@baxter.com> a écrit: 
 
> Hi.
> 
> I've set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat 7.0.26 (base separated from installation).
> 
> I've set up a MySQL 5.5 database.  The problem is that I see no tables or data getting populated in just the archiva schema for the "archiva" user.  However, I am seeing tables and data populating the users schema for the "users" user.
> 
> I used this script:
> create database archiva;
> 
> create database users;
> 
> use mysql;
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO 'archiva'@'localhost' IDENTIFIED BY 'archiva';
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO 'users'@'localhost' IDENTIFIED BY 'users';
> 
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial launch of Archiva, I was prompted to create the admin.  Once I created the admin, the admin showed up in the jdouser table in the users schema.  The guest user is present as well.
> 
> I've attached archiva.log.
> 
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories default internal and snapshots repositories are getting created within my file system.  That would indicate that Derby is getting used for the repositories, correct?
> 
> Here's my archiva.xml from \path\to\tomcat_base_archiva\conf\Catalina\localhost
> <Context path="/archiva"
>          docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>          reloadable="true"
>          antiJARLocking="true"
>          antiResourceLocking="true">
> 
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war"> -->
>   <Resource name="jdbc/users"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="users"
>             password="users"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
> 
>   <Resource name="jdbc/archiva"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="archiva"
>             password="archiva"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
> 
>   <Resource name="mail/Session"
>             auth="Container"
>             type="javax.mail.Session"
>             mail.smtp.host="localhost"/>
> </Context>
> 
> I poked around in the Archiva code on SVN here :
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the archiva user is given the password 'sa'.
> I noticed that here too:
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
> So, I even tried changing the "archiva" user's password to sa within MySQL and in archiva.xml.
> 
> That didn't work.
> 
> I've read about a  bug where MySQL db's shouldn't be set to UTF-8, but that bug appears to have affected older Archiva versions.  Both my users and archiva tables are set to UTF-8.
> 
> It's odd that the users db is being utilized, but the archiva db is not.
> 
> What am I doing wrong?
> 
> I'm tempted to try PostgreSQL, but I don't want to open another potential can of worms just yet.
> 
> 
> -    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
 
 
 
 
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

Re: Cannot get Archiva to create tables in 'archiva' database in MySQL 5.5

Posted by Eric Barboni <Er...@irit.fr>.
 
Hi Chris

AFAIK 1.4-M1 drop "archiva" database see http://jira.codehaus.org/browse/MRM-1025 in favor of more reliable API and workflow.
So IMHO you are doing nothing wrong.

Regards

Eric


Le Mercredi 29 Août 2012 19:36 CEST, "Harris, Christopher P" <ch...@baxter.com> a écrit: 
 
> Hi.
> 
> I've set up Archiva apache-archiva-1.4-M2.war on Windows XP using Tomcat 7.0.26 (base separated from installation).
> 
> I've set up a MySQL 5.5 database.  The problem is that I see no tables or data getting populated in just the archiva schema for the "archiva" user.  However, I am seeing tables and data populating the users schema for the "users" user.
> 
> I used this script:
> create database archiva;
> 
> create database users;
> 
> use mysql;
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON archiva.* TO 'archiva'@'localhost' IDENTIFIED BY 'archiva';
> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON users.* TO 'users'@'localhost' IDENTIFIED BY 'users';
> 
> I can successfully launch the Archiva .war in Tomcat.  Upon my initial launch of Archiva, I was prompted to create the admin.  Once I created the admin, the admin showed up in the jdouser table in the users schema.  The guest user is present as well.
> 
> I've attached archiva.log.
> 
> I see that the \path\to\tomcat_base_archiva\data\repositories\*  directories default internal and snapshots repositories are getting created within my file system.  That would indicate that Derby is getting used for the repositories, correct?
> 
> Here's my archiva.xml from \path\to\tomcat_base_archiva\conf\Catalina\localhost
> <Context path="/archiva"
>          docBase="C:/apache/tomcat_base_archiva/archiva/apache-archiva-1.4-M2.war"
>          reloadable="true"
>          antiJARLocking="true"
>          antiResourceLocking="true">
> 
>          <!-- docBase="${catalina.home}/archiva/apache-archiva-1.4-M2.war"> -->
>   <Resource name="jdbc/users"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="users"
>             password="users"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/users?autoReconnect=true"/>
> 
>   <Resource name="jdbc/archiva"
>             auth="Container"
>             type="javax.sql.DataSource"
>             username="archiva"
>             password="archiva"
>             driverClassName="com.mysql.jdbc.Driver"
>             url="jdbc:mysql://localhost:3306/archiva?autoReconnect=true"/>
> 
>   <Resource name="mail/Session"
>             auth="Container"
>             type="javax.mail.Session"
>             mail.smtp.host="localhost"/>
> </Context>
> 
> I poked around in the Archiva code on SVN here :
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/
> I looked at the jetty config file jetty-env-mysql.xml and noticed that the archiva user is given the password 'sa'.
> I noticed that here too:
> http://svn.apache.org/viewvc/archiva/tags/archiva-1.4-M2/archiva-modules/archiva-web/archiva-webapp/src/sql/mysql/drop_archiva_tables.sql?view=markup
> So, I even tried changing the "archiva" user's password to sa within MySQL and in archiva.xml.
> 
> That didn't work.
> 
> I've read about a  bug where MySQL db's shouldn't be set to UTF-8, but that bug appears to have affected older Archiva versions.  Both my users and archiva tables are set to UTF-8.
> 
> It's odd that the users db is being utilized, but the archiva db is not.
> 
> What am I doing wrong?
> 
> I'm tempted to try PostgreSQL, but I don't want to open another potential can of worms just yet.
> 
> 
> -    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