You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Nikolas Everett <ni...@gmail.com> on 2008/05/03 03:12:28 UTC

Compiling

I'm interested in hacking on OpenJPA a little.  I downloaded the nightly
snapshot, but it doesn't compile on a fresh install of maven:

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java:[47,7]
org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract and does
not override abstract method
createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java:[31,7]
org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not abstract and
does not override abstract method
getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
in java.sql.DatabaseMetaData

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java:[37,7]
org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract and does not
override abstract method isPoolable() in java.sql.Statement

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java:[51,7]
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not abstract and
does not override abstract method setNClob(int,java.io.Reader) in
java.sql.PreparedStatement

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java:[50,7]
org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract and does not
override abstract method updateNClob(java.lang.String,java.io.Reader) in
java.sql.ResultSet

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java:[35,7]
org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract and does
not override abstract method isWrapperFor(java.lang.Class<?>) in
java.sql.Wrapper

/home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java:[49,7]
org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not abstract and
does not override abstract method setNClob(java.lang.String,java.io.Reader)
in java.sql.CallableStatement

What can I do to get a compiling version?

Re: Compiling

Posted by Nikolas Everett <ni...@gmail.com>.
So, I've spent a few hours digging into adding support for INSERT RETURNING,
and I give up.  Here is why:

   1. The architecture used to generate SQL is all over the place.
   Sometimes SQL is generated in DBDictionary classes.  Sometimes it is
   generated in RowImpl and who knows where else.  This makes it very hard to
   customize generated SQL based on DB features.
   2. The same is true for processing the results of generated SQL.  Why
   isn't this all in the same place so its overridable on a DB by DB level?
   3. Public variables
   4. Protected variables
   5. Lack of generics in 1.5 projects (openjpa-persistence-jdbc)
   6. StringBuffer in non-threaded areas of 1.5 projects
   (openjpa-persistence-jdbc)
   7. A lot of strings seem to be regenerated over and over again.  I
   could be wrong, given 1.
   8. Lots of magic strings.  I expected this when generating SQL, but
   when throwing exceptions? throw new
   SQLException(_loc.get("update-failed-no-failed-obj",
   String.valueOf(count[i]), _batchedSql).getMessage());

Are there plans to fix any of this?


On Sat, May 3, 2008 at 12:50 PM, Nikolas Everett <ni...@gmail.com> wrote:

> From http://www.postgresql.org/docs/8.3/static/sql-insert.html -
> The optional RETURNING clause causes INSERT to compute and return value(s)
> based on each row actually inserted. This is primarily useful for obtaining
> values that were supplied by defaults, such as a serial sequence number.
> However, any expression using the table's columns is allowed. The syntax of
> the RETURNING list is identical to that of the output list of SELECT.
>
> That should prevent the need for the SELECT CURVAL('seq') query after
> inserting a row.  It saves you one SQL statement per insert.  Technically
> its also useful for other things, but thats the biggest thing I can think
> of.
>
>
> On Sat, May 3, 2008 at 10:49 AM, Patrick Linskey <pl...@gmail.com>
> wrote:
>
> > Hi,
> >
> > Inserts are handled by ClassMappings and their FieldMappings and
> > associated strategies.
> >
> > What does INSERT RETURNING do? Can you describe how you want to utilize
> > it from OpenJPA?
> >
> > -Patrick
> >
> >
> > On May 3, 2008, at 4:59 AM, Nikolas Everett wrote:
> >
> >  I'm pretty much lost in the source code.  I'm looking for the piece
> > > who's
> > > job it is to run inserts.  I'm specifically wondering whether it would
> > > be
> > > possible for OpenJPA to take advantage of Postgres's INSERT RETURNING
> > > clauses.
> > >
> > > On Fri, May 2, 2008 at 9:38 PM, Nikolas Everett <ni...@gmail.com>
> > > wrote:
> > >
> > >  I guess I should have read more closely.  OpenJPA only compiles on
> > > > java
> > > > 1.5, not 1.6.  That is funky.
> > > >
> > > > Sorry to bother the list.
> > > >
> > > >
> > > > On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com>
> > > > wrote:
> > > >
> > > >  I'm interested in hacking on OpenJPA a little.  I downloaded the
> > > > > nightly
> > > > > snapshot, but it doesn't compile on a fresh install of maven:
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java:[47,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract
> > > > > and does
> > > > > not override abstract method
> > > > > createStruct(java.lang.String,java.lang.Object[]) in
> > > > > java.sql.Connection
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java:[31,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not
> > > > > abstract and
> > > > > does not override abstract method
> > > > >
> > > > > getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
> > > > > in java.sql.DatabaseMetaData
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java:[37,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract
> > > > > and does not
> > > > > override abstract method isPoolable() in java.sql.Statement
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java:[51,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not
> > > > > abstract and
> > > > > does not override abstract method setNClob(int,java.io.Reader) in
> > > > > java.sql.PreparedStatement
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java:[50,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract
> > > > > and does not
> > > > > override abstract method
> > > > > updateNClob(java.lang.String,java.io.Reader) in
> > > > > java.sql.ResultSet
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java:[35,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract
> > > > > and does
> > > > > not override abstract method isWrapperFor(java.lang.Class<?>) in
> > > > > java.sql.Wrapper
> > > > >
> > > > >
> > > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java:[49,7]
> > > > > org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not
> > > > > abstract and
> > > > > does not override abstract method
> > > > > setNClob(java.lang.String,java.io.Reader)
> > > > > in java.sql.CallableStatement
> > > > >
> > > > > What can I do to get a compiling version?
> > > > >
> > > > >
> > > > >
> > > >
> > --
> > Patrick Linskey
> > 202 669 5907
> >
> >
>

Re: Compiling

Posted by Nikolas Everett <ni...@gmail.com>.
>From http://www.postgresql.org/docs/8.3/static/sql-insert.html -
The optional RETURNING clause causes INSERT to compute and return value(s)
based on each row actually inserted. This is primarily useful for obtaining
values that were supplied by defaults, such as a serial sequence number.
However, any expression using the table's columns is allowed. The syntax of
the RETURNING list is identical to that of the output list of SELECT.

That should prevent the need for the SELECT CURVAL('seq') query after
inserting a row.  It saves you one SQL statement per insert.  Technically
its also useful for other things, but thats the biggest thing I can think
of.

On Sat, May 3, 2008 at 10:49 AM, Patrick Linskey <pl...@gmail.com> wrote:

> Hi,
>
> Inserts are handled by ClassMappings and their FieldMappings and
> associated strategies.
>
> What does INSERT RETURNING do? Can you describe how you want to utilize it
> from OpenJPA?
>
> -Patrick
>
>
> On May 3, 2008, at 4:59 AM, Nikolas Everett wrote:
>
>  I'm pretty much lost in the source code.  I'm looking for the piece who's
> > job it is to run inserts.  I'm specifically wondering whether it would
> > be
> > possible for OpenJPA to take advantage of Postgres's INSERT RETURNING
> > clauses.
> >
> > On Fri, May 2, 2008 at 9:38 PM, Nikolas Everett <ni...@gmail.com>
> > wrote:
> >
> >  I guess I should have read more closely.  OpenJPA only compiles on java
> > > 1.5, not 1.6.  That is funky.
> > >
> > > Sorry to bother the list.
> > >
> > >
> > > On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com>
> > > wrote:
> > >
> > >  I'm interested in hacking on OpenJPA a little.  I downloaded the
> > > > nightly
> > > > snapshot, but it doesn't compile on a fresh install of maven:
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java:[47,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract and
> > > > does
> > > > not override abstract method
> > > > createStruct(java.lang.String,java.lang.Object[]) in
> > > > java.sql.Connection
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java:[31,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not
> > > > abstract and
> > > > does not override abstract method
> > > >
> > > > getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
> > > > in java.sql.DatabaseMetaData
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java:[37,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract and
> > > > does not
> > > > override abstract method isPoolable() in java.sql.Statement
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java:[51,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not
> > > > abstract and
> > > > does not override abstract method setNClob(int,java.io.Reader) in
> > > > java.sql.PreparedStatement
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java:[50,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract and
> > > > does not
> > > > override abstract method
> > > > updateNClob(java.lang.String,java.io.Reader) in
> > > > java.sql.ResultSet
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java:[35,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract and
> > > > does
> > > > not override abstract method isWrapperFor(java.lang.Class<?>) in
> > > > java.sql.Wrapper
> > > >
> > > >
> > > > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java:[49,7]
> > > > org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not
> > > > abstract and
> > > > does not override abstract method
> > > > setNClob(java.lang.String,java.io.Reader)
> > > > in java.sql.CallableStatement
> > > >
> > > > What can I do to get a compiling version?
> > > >
> > > >
> > > >
> > >
> --
> Patrick Linskey
> 202 669 5907
>
>

Re: Compiling

Posted by Patrick Linskey <pl...@gmail.com>.
Hi,

Inserts are handled by ClassMappings and their FieldMappings and  
associated strategies.

What does INSERT RETURNING do? Can you describe how you want to  
utilize it from OpenJPA?

-Patrick

On May 3, 2008, at 4:59 AM, Nikolas Everett wrote:

> I'm pretty much lost in the source code.  I'm looking for the piece  
> who's
> job it is to run inserts.  I'm specifically wondering whether it  
> would be
> possible for OpenJPA to take advantage of Postgres's INSERT RETURNING
> clauses.
>
> On Fri, May 2, 2008 at 9:38 PM, Nikolas Everett <ni...@gmail.com>  
> wrote:
>
>> I guess I should have read more closely.  OpenJPA only compiles on  
>> java
>> 1.5, not 1.6.  That is funky.
>>
>> Sorry to bother the list.
>>
>>
>> On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com>  
>> wrote:
>>
>>> I'm interested in hacking on OpenJPA a little.  I downloaded the  
>>> nightly
>>> snapshot, but it doesn't compile on a fresh install of maven:
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingConnection.java:[47,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract  
>>> and does
>>> not override abstract method
>>> createStruct(java.lang.String,java.lang.Object[]) in  
>>> java.sql.Connection
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingDatabaseMetaData.java:[31,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not  
>>> abstract and
>>> does not override abstract method
>>> getFunctionColumns 
>>> (java 
>>> .lang.String,java.lang.String,java.lang.String,java.lang.String)
>>> in java.sql.DatabaseMetaData
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingStatement.java:[37,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract  
>>> and does not
>>> override abstract method isPoolable() in java.sql.Statement
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingPreparedStatement.java:[51,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not  
>>> abstract and
>>> does not override abstract method setNClob(int,java.io.Reader) in
>>> java.sql.PreparedStatement
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingResultSet.java:[50,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract  
>>> and does not
>>> override abstract method  
>>> updateNClob(java.lang.String,java.io.Reader) in
>>> java.sql.ResultSet
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingDataSource.java:[35,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract  
>>> and does
>>> not override abstract method isWrapperFor(java.lang.Class<?>) in
>>> java.sql.Wrapper
>>>
>>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>>> jdbc/DelegatingCallableStatement.java:[49,7]
>>> org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not  
>>> abstract and
>>> does not override abstract method  
>>> setNClob(java.lang.String,java.io.Reader)
>>> in java.sql.CallableStatement
>>>
>>> What can I do to get a compiling version?
>>>
>>>
>>

-- 
Patrick Linskey
202 669 5907


Re: Compiling

Posted by Nikolas Everett <ni...@gmail.com>.
I'm pretty much lost in the source code.  I'm looking for the piece who's
job it is to run inserts.  I'm specifically wondering whether it would be
possible for OpenJPA to take advantage of Postgres's INSERT RETURNING
clauses.

On Fri, May 2, 2008 at 9:38 PM, Nikolas Everett <ni...@gmail.com> wrote:

> I guess I should have read more closely.  OpenJPA only compiles on java
> 1.5, not 1.6.  That is funky.
>
> Sorry to bother the list.
>
>
> On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com> wrote:
>
> > I'm interested in hacking on OpenJPA a little.  I downloaded the nightly
> > snapshot, but it doesn't compile on a fresh install of maven:
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java:[47,7]
> > org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract and does
> > not override abstract method
> > createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java:[31,7]
> > org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not abstract and
> > does not override abstract method
> > getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
> > in java.sql.DatabaseMetaData
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java:[37,7]
> > org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract and does not
> > override abstract method isPoolable() in java.sql.Statement
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java:[51,7]
> > org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not abstract and
> > does not override abstract method setNClob(int,java.io.Reader) in
> > java.sql.PreparedStatement
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java:[50,7]
> > org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract and does not
> > override abstract method updateNClob(java.lang.String,java.io.Reader) in
> > java.sql.ResultSet
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java:[35,7]
> > org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract and does
> > not override abstract method isWrapperFor(java.lang.Class<?>) in
> > java.sql.Wrapper
> >
> > /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java:[49,7]
> > org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not abstract and
> > does not override abstract method setNClob(java.lang.String,java.io.Reader)
> > in java.sql.CallableStatement
> >
> > What can I do to get a compiling version?
> >
> >
>

Re: Compiling

Posted by Patrick Linskey <pl...@gmail.com>.
Yeah, that's because OpenJPA's JDBC wrappers don't have the Java 6  
methods in them. If we added them, OpenJPA would not be able to  
compile on Java 5...

Note that you can use the JAVA_VERSION env variable to tell mvn to try  
to use Java 5:

     $ JAVA_VERSION=1.5 mvn test

-Patrick

On May 2, 2008, at 6:38 PM, Nikolas Everett wrote:

> I guess I should have read more closely.  OpenJPA only compiles on  
> java 1.5,
> not 1.6.  That is funky.
>
> Sorry to bother the list.
>
> On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com>  
> wrote:
>
>> I'm interested in hacking on OpenJPA a little.  I downloaded the  
>> nightly
>> snapshot, but it doesn't compile on a fresh install of maven:
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingConnection.java:[47,7]
>> org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract  
>> and does
>> not override abstract method
>> createStruct(java.lang.String,java.lang.Object[]) in  
>> java.sql.Connection
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingDatabaseMetaData.java:[31,7]
>> org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not  
>> abstract and
>> does not override abstract method
>> getFunctionColumns 
>> (java.lang.String,java.lang.String,java.lang.String,java.lang.String)
>> in java.sql.DatabaseMetaData
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingStatement.java:[37,7]
>> org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract and  
>> does not
>> override abstract method isPoolable() in java.sql.Statement
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingPreparedStatement.java:[51,7]
>> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not  
>> abstract and
>> does not override abstract method setNClob(int,java.io.Reader) in
>> java.sql.PreparedStatement
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingResultSet.java:[50,7]
>> org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract and  
>> does not
>> override abstract method  
>> updateNClob(java.lang.String,java.io.Reader) in
>> java.sql.ResultSet
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingDataSource.java:[35,7]
>> org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract  
>> and does
>> not override abstract method isWrapperFor(java.lang.Class<?>) in
>> java.sql.Wrapper
>>
>> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0- 
>> SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/ 
>> jdbc/DelegatingCallableStatement.java:[49,7]
>> org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not  
>> abstract and
>> does not override abstract method  
>> setNClob(java.lang.String,java.io.Reader)
>> in java.sql.CallableStatement
>>
>> What can I do to get a compiling version?
>>
>>

-- 
Patrick Linskey
202 669 5907


Re: Compiling

Posted by Nikolas Everett <ni...@gmail.com>.
I guess I should have read more closely.  OpenJPA only compiles on java 1.5,
not 1.6.  That is funky.

Sorry to bother the list.

On Fri, May 2, 2008 at 9:12 PM, Nikolas Everett <ni...@gmail.com> wrote:

> I'm interested in hacking on OpenJPA a little.  I downloaded the nightly
> snapshot, but it doesn't compile on a fresh install of maven:
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingConnection.java:[47,7]
> org.apache.openjpa.lib.jdbc.DelegatingConnection is not abstract and does
> not override abstract method
> createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDatabaseMetaData.java:[31,7]
> org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData is not abstract and
> does not override abstract method
> getFunctionColumns(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
> in java.sql.DatabaseMetaData
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingStatement.java:[37,7]
> org.apache.openjpa.lib.jdbc.DelegatingStatement is not abstract and does not
> override abstract method isPoolable() in java.sql.Statement
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingPreparedStatement.java:[51,7]
> org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement is not abstract and
> does not override abstract method setNClob(int,java.io.Reader) in
> java.sql.PreparedStatement
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingResultSet.java:[50,7]
> org.apache.openjpa.lib.jdbc.DelegatingResultSet is not abstract and does not
> override abstract method updateNClob(java.lang.String,java.io.Reader) in
> java.sql.ResultSet
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingDataSource.java:[35,7]
> org.apache.openjpa.lib.jdbc.DelegatingDataSource is not abstract and does
> not override abstract method isWrapperFor(java.lang.Class<?>) in
> java.sql.Wrapper
>
> /home/nik/Documents/Programming/OpenJPA/apache-openjpa-1.1.0-SNAPSHOT-source/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/DelegatingCallableStatement.java:[49,7]
> org.apache.openjpa.lib.jdbc.DelegatingCallableStatement is not abstract and
> does not override abstract method setNClob(java.lang.String,java.io.Reader)
> in java.sql.CallableStatement
>
> What can I do to get a compiling version?
>
>