You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Nilo Garcia Silveira <ni...@gmail.com> on 2010/05/07 03:04:06 UTC

Bug on install Apache Archiva on Oracle Database 11g

Hi,

I deployed Apache Archiva 1.3 on Oracle WebLogic 11gR2 using Oracle Database
11g. (I wrote this on my blob: nilogarcia.blogspot.com)
When I logon with admin user and click on Reports, I got the followed error:

2010-03-15 14:49:52,166 [[ACTIVE] ExecuteThread: '2' for queue:
'weblogic.kernel.Default (self-tuning)'] ERROR JPOX.RDBMS  - Error t
hrown executing CREATE TABLE ARCHIVA_REPOSITORY_PROBLEMS
(
    ARCHIVA_REPOSITORY_PROBLEMS_ID NUMBER NOT NULL,
    ARTIFACT_ID VARCHAR2(80) NULL,
    GROUP_ID VARCHAR2(250) NULL,
    MESSAGE VARCHAR2(4096) NOT NULL,
    PROBLEM_ORIGIN VARCHAR2(20) NOT NULL,
    REPO_PATH VARCHAR2(250) NOT NULL,
    REPOSITORY_ID VARCHAR2(50) NOT NULL,
    PROBLEM_TYPE VARCHAR2(50) NOT NULL,
    VERSION VARCHAR2(50) NULL
) : ORA-00910: specified length too long for its datatype

java.sql.
SQLSyntaxErrorException: ORA-00910: specified length too long for its
datatype

         at oracle.jdbc.driver.SQLStateMapping.newSQLException(
SQLStateMapping.java:91)
         at oracle.jdbc.driver.DatabaseError.newSQLException(
DatabaseError.java:133)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(
DatabaseError.java:206)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
        at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
         at oracle.jdbc.driver.T4CStatement.executeForRows(
T4CStatement.java:942)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
OracleStatement.java:1223)
         at oracle.jdbc.driver.OracleStatement.executeInternal(
OracleStatement.java:1775)
         at oracle.jdbc.driver.OracleStatement.execute(
OracleStatement.java:1744)
         at oracle.jdbc.driver.OracleStatementWrapper.execute(
OracleStatementWrapper.java:299)
         at weblogic.jdbc.wrapper.Statement.execute(Statement.java:458)
         at org.jpox.store.rdbms.table.AbstractTable.executeDdlStatement(
AbstractTable.java:614)
         at org.jpox.store.rdbms.table.AbstractTable.
executeDdlStatementList(AbstractTable.java:570)
         at org.jpox.store.rdbms.table.AbstractTable.create(
AbstractTable.java:297)
...

So, to correct this, I run manually the script to create this table but with
column MESSAGE like that (MESSAGE VARCHAR2(4000))

CREATE TABLE ARCHIVA_REPOSITORY_PROBLEMS
 (
    ARCHIVA_REPOSITORY_PROBLEMS_ID NUMBER NOT NULL,
    ARTIFACT_ID VARCHAR2(80) NULL,
    GROUP_ID VARCHAR2(250) NULL,
    MESSAGE VARCHAR2(4000) NOT NULL, -- limit to VARCHAR2 type is 4000, not
4KB (4096 bytes)
    PROBLEM_ORIGIN VARCHAR2(20) NOT NULL,
    REPO_PATH VARCHAR2(250) NOT NULL,
    REPOSITORY_ID VARCHAR2(50) NOT NULL,
    PROBLEM_TYPE VARCHAR2(50) NOT NULL,
    VERSION VARCHAR2(50) NULL
);

I had change the file package.jdo to the Archiva create the tables with
correct database type (I put one column as VARCHAR2(4000) and others two as
CLOB)
So, if you could add this path to next releases I'll be thankfull.


Nilo Garcia Silveira
nilogarcia.blogspot.com

Re: Bug on install Apache Archiva on Oracle Database 11g

Posted by Brett Porter <br...@apache.org>.

On 07/05/2010, at 11:04 AM, Nilo Garcia Silveira wrote:

> 
> I had change the file package.jdo to the Archiva create the tables with
> correct database type (I put one column as VARCHAR2(4000) and others two as
> CLOB)
> So, if you could add this path to next releases I'll be thankfull.

We could patch this in 1.3.1, however it seems short-lived. The next main release (1.4), has removed the need for a database for the Archiva data already (it is still using it for the user data).

Thanks for the clear report, though!

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/