cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno René Santos <brunor...@holos.pt>
Subject Re: Migrating to cayenne 3.1
Date Fri, 24 Feb 2012 14:46:25 GMT
That was it :)

I changed the pom.xml's to this:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
 <configuration>
<source>1.6</source>
<target>1.6</target>
 <executable>C:\Program Files\Java\jdk1.6.0_21\bin\javac.exe</executable>
<fork>true</fork>
 </configuration>
</plugin>

I also had to change the source and target from 1.5 to 1.6

Thanx a lot
Bruno

On Fri, Feb 24, 2012 at 2:25 PM, Andrus Adamchik <andrus@objectstyle.org>wrote:

> > I have jdk 1.7.02. Could it be because of that?
>
> yes. you need java 1.6.
>
> On Feb 24, 2012, at 4:54 PM, Bruno René Santos wrote:
>
> > Hi Andrus,
> >
> > I used maven but I got the following errors:
> >
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\access\DataNode.java:[333,10
> > ] error: DataNode.TransactionDataSource is not abstract and does not
> > override abstract method getParentLogger() in CommonDataSource
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\DriverDataSource.java:[
> > 38,7] error: DriverDataSource is not abstract and does not override
> > abstract method getParentLogger() in CommonDataSource
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\dba\oracle\OracleSQLTemplate
> > Action.java:[107,10] error:
> OracleSQLTemplateAction.OracleResultSetWrapper
> > is not abstract and does not override abstract method <T>getObject(Str
> > ing,Class<T>) in ResultSet
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\access\TransactionConnection
> > Decorator.java:[48,0] error: TransactionConnectionDecorator is not
> abstract
> > and does not override abstract method getNetworkTimeout() in Connecti
> > on
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\PoolDataSource.java:[39
> > ,7] error: PoolDataSource is not abstract and does not override abstract
> > method getParentLogger() in CommonDataSource
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\PoolManager.java:[41,7]
> > error: PoolManager is not abstract and does not override abstract method
> > getParentLogger() in CommonDataSource
> > [ERROR]
> >
> \Trabalho\NetbeansProjects\cayenne-svn\framework\cayenne-jdk1.5-unpublished\src\main\java\org\apache\cayenne\conn\ConnectionWrapper.java:
> > [47,7] error: ConnectionWrapper is not abstract and does not override
> > abstract method getNetworkTimeout() in Connection
> >
> > I have jdk 1.7.02. Could it be because of that?
> >
> > Regards
> > Bruno
> >
> > On Fri, Feb 24, 2012 at 11:17 AM, Andrus Adamchik <
> andrus@objectstyle.org>wrote:
> >
> >> No it is not missing, just in a different module:
> >>
> http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/CayenneRuntimeException.java?view=log&pathrev=1196716
> >>
> >> You need to build the entire thing. Please check out these instructions:
> >>
> >> http://cayenne.apache.org/building-cayenne.html
> >>
> >> Cheers,
> >> Andrus
> >>
> >>
> >> On Feb 24, 2012, at 2:03 PM, Bruno René Santos wrote:
> >>
> >>> Hi Andrus,
> >>>
> >>> I have checked out cayenne from the svn and the
> >>> org.apache.cayenne.CayenneRuntimeException is missing.... Is this on
> >>> purpose?
> >>>
> >>> Regards
> >>> Bruno
> >>>
> >>> On Fri, Feb 24, 2012 at 7:16 AM, Andrus Adamchik <
> andrus@objectstyle.org
> >>> wrote:
> >>>
> >>>> There was indeed a change between 3.1M3 and trunk (what will become
M4
> >> at
> >>>> some point) introduced by John:
> >>>>
> >>>>
> >>>>
> >>
> http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/server/DataContextFactory.java?r1=1196716&r2=1196715&pathrev=1196716
> >>>>
> >>>> But either way, it is customizable.
> >>>>
> >>>> Cheers,
> >>>> Andrus
> >>>>
> >>>>
> >>>> On Feb 24, 2012, at 2:03 AM, Bruno René Santos wrote:
> >>>>
> >>>>> Hi John,
> >>>>>
> >>>>>
> >>>>> There is no newInstance() method to override on DataContextFactory...
> >> are
> >>>>> you sure this is the right way?
> >>>>>
> >>>>> Regards
> >>>>> Bruno
> >>>>>
> >>>>> On Thu, Feb 23, 2012 at 6:18 PM, John Huss <johnthuss@gmail.com>
> >> wrote:
> >>>>>
> >>>>>> First you need to subclass the factory:
> >>>>>>
> >>>>>> public class MyContextFactory extends DataContextFactory {
> >>>>>> @Override
> >>>>>> protected DataContext newInstance(DataChannel parent, ObjectStore
> >>>>>> objectStore) {
> >>>>>> return new MyContext(parent, objectStore);
> >>>>>> }
> >>>>>> }
> >>>>>>
> >>>>>> Then, create a custom Dependency Injector module:
> >>>>>>
> >>>>>> import org.apache.cayenne.configuration.ObjectContextFactory;
> >>>>>> import org.apache.cayenne.di.Binder;
> >>>>>> import org.apache.cayenne.di.Module;
> >>>>>>
> >>>>>> public class AppModule implements Module {
> >>>>>> public void configure(Binder binder) {
> >>>>>> binder.bind(ObjectContextFactory.class).toInstance(new
> >>>> MyContextFactory());
> >>>>>> }
> >>>>>> }
> >>>>>>
> >>>>>> Then reference your module when creating the CayenneRuntime:
> >>>>>>
> >>>>>> ServerRuntime localRuntime = new
> >>>>>> ServerRuntime("cayenne-MyDomain.xml", newAppModule());
> >>>>>>
> >>>>>> John
> >>>>>> On Thu, Feb 23, 2012 at 11:28 AM, Bruno René Santos <
> >> brunorene@holos.pt
> >>>>>>> wrote:
> >>>>>>
> >>>>>>> Hello all,
> >>>>>>>
> >>>>>>> I am trying to migrate my web application from 3.0.1 to
3.1M3. My
> >> main
> >>>>>>> problem now is that I usually use a custom DataContext in
my Apps.
> In
> >>>>>> 3.0.1
> >>>>>>> I would use the DataContextFactory (defined on the modeler)
to
> >>>> configure
> >>>>>>> the use of the custom class. How do I do that on 3.1?
> >>>>>>>
> >>>>>>> Regards
> >>>>>>> Bruno
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
> >> Analista
> >>>> |
> >>>>> Programador | Investigador
> >>>>>
> >>>>> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> >>>>> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
> >> Parque
> >>>>> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> >>>>> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >>>>>
> >>>>> This email and any files transmitted with it are confidential and
> >>>> intended
> >>>>> solely for the use of the individual or entity to whom they are
> >>>> addressed.
> >>>>> If you are not the intended recipient or the person responsible
for
> >>>>> delivering the email to the intended recipient, be advised that
you
> >> have
> >>>>> received this email in error and that any use, dissemination,
> >> forwarding,
> >>>>> printing, or copying of this email is strictly prohibited. If you
> have
> >>>>> received this email in error please notify Bruno René Santos by
> >> telephone
> >>>>> on +351 210 438 686
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Bruno René Santos | brunorene@holos.pt | Gestor de Projectos |
> Analista
> >> |
> >>> Programador | Investigador
> >>>
> >>> Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> >>> Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan
> Parque
> >>> Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> >>> Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >>>
> >>> This email and any files transmitted with it are confidential and
> >> intended
> >>> solely for the use of the individual or entity to whom they are
> >> addressed.
> >>> If you are not the intended recipient or the person responsible for
> >>> delivering the email to the intended recipient, be advised that you
> have
> >>> received this email in error and that any use, dissemination,
> forwarding,
> >>> printing, or copying of this email is strictly prohibited. If you have
> >>> received this email in error please notify Bruno René Santos by
> telephone
> >>> on +351 210 438 686
> >>
> >>
> >>
> >
> >
> > --
> > Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista
> |
> > Programador | Investigador
> >
> > Holos - Soluções Avançadas em Tecnologias de Informação S.A.
> > Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
> > Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
> > Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt
> >
> > This email and any files transmitted with it are confidential and
> intended
> > solely for the use of the individual or entity to whom they are
> addressed.
> > If you are not the intended recipient or the person responsible for
> > delivering the email to the intended recipient, be advised that you have
> > received this email in error and that any use, dissemination, forwarding,
> > printing, or copying of this email is strictly prohibited. If you have
> > received this email in error please notify Bruno René Santos by telephone
> > on +351 210 438 686
>
>
>


-- 
Bruno René Santos | brunorene@holos.pt | Gestor de Projectos | Analista |
Programador | Investigador

Holos - Soluções Avançadas em Tecnologias de Informação S.A.
Parque de Ciência e Tecnologia de Almada/Setúbal . Edifício Madan Parque
Rua dos Inventores . Quinta da Torre . 2825 - 182 Caparica . Portugal
Phone: +351 210 438 686 . Fax: +351 210 438 687 . Web: www.holos.pt

This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient or the person responsible for
delivering the email to the intended recipient, be advised that you have
received this email in error and that any use, dissemination, forwarding,
printing, or copying of this email is strictly prohibited. If you have
received this email in error please notify Bruno René Santos by telephone
on +351 210 438 686

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message