You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by "Leitch, Oblio" <Ob...@state.vt.us> on 2013/01/10 19:43:12 UTC
RE: assistance getting Archiva standalone to use Postgres
Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org]
Sent: Monday, December 31, 2012 8:23 AM
To: users@archiva.apache.org
Subject: Re: assistance getting Archiva standalone to use Postgres
Oh I missed something.
Have a look at the file conf/wrapper.conf You will see some lines wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
...
Add one with
wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
x will be last x + 1
RE: assistance getting Archiva standalone to use Postgres
Posted by "Leitch, Oblio" <Ob...@state.vt.us>.
Yes! That seems to have worked. Particularly since I had testOnBorrow=true from the default settings from install. I'll keep plugging, but at least it's prompting for a admin user!
Many thanks.
-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org]
Sent: Wednesday, January 23, 2013 4:04 AM
To: users@archiva.apache.org
Subject: Re: assistance getting Archiva standalone to use Postgres
Did you try last suggested workaround from
http://jira.springsource.org/browse/SPR-8870 "If you remove the connection validation from the pool configuration" ?
in $ARCHIVA_BASE/conf/jetty.xml inside <New class="org.apache.tomcat.jdbc.pool.DataSource">
change/add
<Set name="testOnBorrow">false</Set>
<Set name="testOnReturn">false</Set>
2013/1/18 Leitch, Oblio <Ob...@state.vt.us>:
> Ok, I tried that, but I got:
>
> java.lang.NumberFormatException: For input string: "READ_COMMITTED"
>
> So I used the Int value 2 from
> http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql
> .Connection.TRANSACTION_NONE
>
> But, it's still causing the same error:
>
> org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
>
> After more searching, I found that this could be an issue with Spring:
>
> http://jira.springsource.org/browse/SPR-8870
>
> One person seems to think that it's fixed (http://youtrack.jetbrains.com/issue/TW-18517); I've asked for their reference.
>
> Thoughts?
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Friday, January 18, 2013 11:05 AM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> you can try configuring defaultTransactionIsolation attribute for
> jdbc-pool in conf/jetty.xml
>
> <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
> <Arg>jdbc/users</Arg>
> <Arg>
> <New class="org.apache.tomcat.jdbc.pool.DataSource">
> ...
> <Set name="defaultTransactionIsolation">READ_COMMITTED </Set>
> ...
> </New>
> </Arg>
> </New>
> One of the following value:
>
> NONE
> READ_COMMITTED
> READ_UNCOMMITTED
> REPEATABLE_READ
> SERIALIZABLE
>
> Try with READ_COMMITTED
>
> see doc here: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
>
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
Re: assistance getting Archiva standalone to use Postgres
Posted by Olivier Lamy <ol...@apache.org>.
Did you try last suggested workaround from
http://jira.springsource.org/browse/SPR-8870 "If you remove the
connection validation from the pool configuration" ?
in $ARCHIVA_BASE/conf/jetty.xml inside <New
class="org.apache.tomcat.jdbc.pool.DataSource">
change/add
<Set name="testOnBorrow">false</Set>
<Set name="testOnReturn">false</Set>
2013/1/18 Leitch, Oblio <Ob...@state.vt.us>:
> Ok, I tried that, but I got:
>
> java.lang.NumberFormatException: For input string: "READ_COMMITTED"
>
> So I used the Int value 2 from http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_NONE
>
> But, it's still causing the same error:
>
> org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
>
> After more searching, I found that this could be an issue with Spring:
>
> http://jira.springsource.org/browse/SPR-8870
>
> One person seems to think that it's fixed (http://youtrack.jetbrains.com/issue/TW-18517); I've asked for their reference.
>
> Thoughts?
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Friday, January 18, 2013 11:05 AM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> you can try configuring defaultTransactionIsolation attribute for jdbc-pool in conf/jetty.xml
>
> <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
> <Arg>jdbc/users</Arg>
> <Arg>
> <New class="org.apache.tomcat.jdbc.pool.DataSource">
> ...
> <Set name="defaultTransactionIsolation">READ_COMMITTED </Set>
> ...
> </New>
> </Arg>
> </New>
> One of the following value:
>
> NONE
> READ_COMMITTED
> READ_UNCOMMITTED
> REPEATABLE_READ
> SERIALIZABLE
>
> Try with READ_COMMITTED
>
> see doc here: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
>
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
RE: assistance getting Archiva standalone to use Postgres
Posted by "Leitch, Oblio" <Ob...@state.vt.us>.
Ok, I tried that, but I got:
java.lang.NumberFormatException: For input string: "READ_COMMITTED"
So I used the Int value 2 from http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.sql.Connection.TRANSACTION_NONE
But, it's still causing the same error:
org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
After more searching, I found that this could be an issue with Spring:
http://jira.springsource.org/browse/SPR-8870
One person seems to think that it's fixed (http://youtrack.jetbrains.com/issue/TW-18517); I've asked for their reference.
Thoughts?
-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org]
Sent: Friday, January 18, 2013 11:05 AM
To: users@archiva.apache.org
Subject: Re: assistance getting Archiva standalone to use Postgres
you can try configuring defaultTransactionIsolation attribute for jdbc-pool in conf/jetty.xml
<New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>jdbc/users</Arg>
<Arg>
<New class="org.apache.tomcat.jdbc.pool.DataSource">
...
<Set name="defaultTransactionIsolation">READ_COMMITTED </Set>
...
</New>
</Arg>
</New>
One of the following value:
NONE
READ_COMMITTED
READ_UNCOMMITTED
REPEATABLE_READ
SERIALIZABLE
Try with READ_COMMITTED
see doc here: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
Re: assistance getting Archiva standalone to use Postgres
Posted by Olivier Lamy <ol...@apache.org>.
you can try configuring defaultTransactionIsolation attribute for jdbc-pool
in conf/jetty.xml
<New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>jdbc/users</Arg>
<Arg>
<New class="org.apache.tomcat.jdbc.pool.DataSource">
...
<Set name="defaultTransactionIsolation">READ_COMMITTED </Set>
...
</New>
</Arg>
</New>
One of the following value:
NONE
READ_COMMITTED
READ_UNCOMMITTED
REPEATABLE_READ
SERIALIZABLE
Try with READ_COMMITTED
see doc here: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
2013/1/15 Leitch, Oblio <Ob...@state.vt.us>:
> Yep. I installed Firebug so I can see what's going on. I get this message:
>
> Error 500 org.apache.cxf.interceptor.Fault: Unable to get object 'org.apache.archiva.redback.users.jdo.JdoUser', id 'admin', fetch-group 'null' from jdo store.
>
> Which, I think, is more specifically this:
>
> Caused by: javax.jdo.JDODataStoreException: Transaction failed to start
> NestedThrowables:
> org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
> at org.jpox.store.rdbms.RDBMSNonmanagedTransaction.begin(RDBMSNonmanagedTransaction.java:344)
> at org.apache.archiva.redback.components.jdo.PlexusJdoUtils.getObjectById(PlexusJdoUtils.java:238)
> ... 53 more
> Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
> at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:929)
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Friday, January 11, 2013 3:17 PM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> even with admin user ?
> You can use this tool http://squirrel-sql.sourceforge.net to have a look at the database content.
>
> 2013/1/11 Leitch, Oblio <Ob...@state.vt.us>:
>> I'm using the 1.4 js version. I can't see anything in the logs which indicate a problem, and the ui seems to complete just fine, except for login.
>>
>>
>> -----Original Message-----
>> From: Olivier Lamy [mailto:olamy@apache.org]
>> Sent: Thursday, January 10, 2013 3:37 PM
>> To: users@archiva.apache.org
>> Subject: Re: assistance getting Archiva standalone to use Postgres
>>
>> which archiva version are you using ?
>>
>> nothing in logs ? what the ui says ?
>>
>> 2013/1/10 Leitch, Oblio <Ob...@state.vt.us>:
>>> Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
>>>
>>> -----Original Message-----
>>> From: Olivier Lamy [mailto:olamy@apache.org]
>>> Sent: Monday, December 31, 2012 8:23 AM
>>> To: users@archiva.apache.org
>>> Subject: Re: assistance getting Archiva standalone to use Postgres
>>>
>>> Oh I missed something.
>>> Have a look at the file conf/wrapper.conf You will see some lines
>>> wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
>>> ...
>>> Add one with
>>> wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
>>> x will be last x + 1
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
RE: assistance getting Archiva standalone to use Postgres
Posted by "Leitch, Oblio" <Ob...@state.vt.us>.
Yep. I installed Firebug so I can see what's going on. I get this message:
Error 500 org.apache.cxf.interceptor.Fault: Unable to get object 'org.apache.archiva.redback.users.jdo.JdoUser', id 'admin', fetch-group 'null' from jdo store.
Which, I think, is more specifically this:
Caused by: javax.jdo.JDODataStoreException: Transaction failed to start
NestedThrowables:
org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
at org.jpox.store.rdbms.RDBMSNonmanagedTransaction.begin(RDBMSNonmanagedTransaction.java:344)
at org.apache.archiva.redback.components.jdo.PlexusJdoUtils.getObjectById(PlexusJdoUtils.java:238)
... 53 more
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.
at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:929)
-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org]
Sent: Friday, January 11, 2013 3:17 PM
To: users@archiva.apache.org
Subject: Re: assistance getting Archiva standalone to use Postgres
even with admin user ?
You can use this tool http://squirrel-sql.sourceforge.net to have a look at the database content.
2013/1/11 Leitch, Oblio <Ob...@state.vt.us>:
> I'm using the 1.4 js version. I can't see anything in the logs which indicate a problem, and the ui seems to complete just fine, except for login.
>
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Thursday, January 10, 2013 3:37 PM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> which archiva version are you using ?
>
> nothing in logs ? what the ui says ?
>
> 2013/1/10 Leitch, Oblio <Ob...@state.vt.us>:
>> Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
>>
>> -----Original Message-----
>> From: Olivier Lamy [mailto:olamy@apache.org]
>> Sent: Monday, December 31, 2012 8:23 AM
>> To: users@archiva.apache.org
>> Subject: Re: assistance getting Archiva standalone to use Postgres
>>
>> Oh I missed something.
>> Have a look at the file conf/wrapper.conf You will see some lines
>> wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
>> ...
>> Add one with
>> wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
>> x will be last x + 1
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
Re: assistance getting Archiva standalone to use Postgres
Posted by Olivier Lamy <ol...@apache.org>.
even with admin user ?
You can use this tool http://squirrel-sql.sourceforge.net to have a
look at the database content.
2013/1/11 Leitch, Oblio <Ob...@state.vt.us>:
> I'm using the 1.4 js version. I can't see anything in the logs which indicate a problem, and the ui seems to complete just fine, except for login.
>
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Thursday, January 10, 2013 3:37 PM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> which archiva version are you using ?
>
> nothing in logs ? what the ui says ?
>
> 2013/1/10 Leitch, Oblio <Ob...@state.vt.us>:
>> Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
>>
>> -----Original Message-----
>> From: Olivier Lamy [mailto:olamy@apache.org]
>> Sent: Monday, December 31, 2012 8:23 AM
>> To: users@archiva.apache.org
>> Subject: Re: assistance getting Archiva standalone to use Postgres
>>
>> Oh I missed something.
>> Have a look at the file conf/wrapper.conf You will see some lines wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
>> ...
>> Add one with
>> wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
>> x will be last x + 1
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
RE: assistance getting Archiva standalone to use Postgres
Posted by "Leitch, Oblio" <Ob...@state.vt.us>.
I'm using the 1.4 js version. I can't see anything in the logs which indicate a problem, and the ui seems to complete just fine, except for login.
-----Original Message-----
From: Olivier Lamy [mailto:olamy@apache.org]
Sent: Thursday, January 10, 2013 3:37 PM
To: users@archiva.apache.org
Subject: Re: assistance getting Archiva standalone to use Postgres
which archiva version are you using ?
nothing in logs ? what the ui says ?
2013/1/10 Leitch, Oblio <Ob...@state.vt.us>:
> Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Monday, December 31, 2012 8:23 AM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> Oh I missed something.
> Have a look at the file conf/wrapper.conf You will see some lines wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
> ...
> Add one with
> wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
> x will be last x + 1
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy
Re: assistance getting Archiva standalone to use Postgres
Posted by Olivier Lamy <ol...@apache.org>.
which archiva version are you using ?
nothing in logs ? what the ui says ?
2013/1/10 Leitch, Oblio <Ob...@state.vt.us>:
> Ok, this worked for me; it's now running, there are tables in the database, and things look ok. However, I can't seem to login, or register new users, or any of that. What's more, there doesn't seem to be anything in the logs that indicate there are any errors. How do I figure out what's going on?
>
> -----Original Message-----
> From: Olivier Lamy [mailto:olamy@apache.org]
> Sent: Monday, December 31, 2012 8:23 AM
> To: users@archiva.apache.org
> Subject: Re: assistance getting Archiva standalone to use Postgres
>
> Oh I missed something.
> Have a look at the file conf/wrapper.conf You will see some lines wrapper.java.classpath.24=%REPO_DIR%/ant-launcher-1.8.3.jar
> ...
> Add one with
> wrapper.java.classpath.x=%REPO_DIR%/postgresql-9.2-1002.jdbc4.jar
> x will be last x + 1
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy