You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by "Jeffrey D. Brekke" <jb...@wi.rr.com> on 2007/03/01 05:20:45 UTC
3.3RC2 Maven2 Plugin usage
I'm having difficulty getting the latest plugin to work. Is there some
way to tell the plugin to generate the non-base classes into
src/main/java or is maven supposed to compile the generated-java
directory for us? If I add <outputDir> to configuration, then the
plugin fails since the report locations are incorrect. Below is my
current plugin config, maybe I have something wrong?
<plugin>
<groupId>org.apache.db.torque</groupId>
<artifactId>torque-maven-plugin</artifactId>
<version>3.3-RC2</version>
<configuration>
<targetDatabase>sybase</targetDatabase>
<targetPackage>our.package</targetPackage>
</configuration>
<executions>
<execution>
<goals>
<phase>install</phase>
<goal>sql</goal>
<goal>om</goal>
</goals>
</execution>
</executions>
</plugin>
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
3.3RC2 and Turbine issues ( was Re: 3.3RC2 Maven2 Plugin usage )
Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Scott,
Yes we had the exact problem and I had wanted to hit the list with it
but hadn't found the the time this week. We got the plugin working in
our torque project, which ultimately is used/integrated with a Turbine
webapp. I quickly sent the email out about the plugin working, but
didn't check that the 3.3-RC2 dep was working correctly with the Turbine
webapp side. ( we are using Turbine 2.3.2 as well ).
We checked the release changes for 3.3RC1 -> 3.3RC2 and it was something
inbetween there, work on the avalon component and database map. We've
had to roll back to RC1 for the time being.
So while I can confirm there is an issue with Turbine & 3.3-RC2, I don't
quite know how to solve it. I saw a few jira issues this week about the
Avalon torque component in RC2 that may be related.
Scott Eade wrote:
> Jeffrey D. Brekke wrote:
>> We've converted our project over to 3.3-RC2 ( which is using the
>> maven2 plugin as well ). All is working good. Thanks again.
> Hi Jeffrey,
>
> I am having a crack at moving a turbine (2.3.2) project over to m2 and
> torque 3.3.rc2 but I am running into a problem whereby after torque
> starts up it is immediately disposed of and hence any queries that are
> executed are greeted with a TorqueException that indicates "Torque is
> not initialized".
>
> Here is the relevant chunk of the start up log:
>
> avalon - added Role org.apache.torque.avalon.Torque with shorthand
> torque for org.apache.torque.avalon.TorqueComponent
> avalon - looking up shorthand torque, returning
> org.apache.torque.avalon.Torque
> avalon - Adding component (org.apache.torque.avalon.Torque =
> org.apache.torque.avalon.TorqueComponent)
> avalon - Attempting to get Handler for role
> [org.apache.torque.avalon.Torque]
> avalon - Handler type =
> org.apache.avalon.excalibur.component.DefaultComponentHandler
> avalon - ComponentHandler initialized for:
> org.apache.torque.avalon.TorqueComponent
> avalon - ComponentFactory creating new instance of
> org.apache.torque.avalon.TorqueComponent.
> avalon - no logger attribute available, using standard logger
> avalon - configure(torque::<no
> value>:@file:/S:/eclipse-workspace/cmes-dev/target/deploy/dev-m2/WEB-INF/conf/componentConfiguration.xml:7:13)
>
> avalon - Config File is
> S:\eclipse-workspace\cmes-dev\target\deploy\dev-m2\WEB-INF/conf/Torque.properties
>
> avalon - initialize()
> dsfactory.AbstractDataSourceFactory - Starting initCPDS
> dsfactory.AbstractDataSourceFactory -
> applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9cf52,
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
> dsfactory.AbstractDataSourceFactory -
> applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@31bcc8,
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
> driver, org.postgresql.Driver)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
> url, jdbc:postgresql://127.0.0.1:5432/cmesdev)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
> user, torque)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
> password, (value not logged))
> dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
> dsfactory.AbstractDataSourceFactory -
> applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1ef45e0,
> org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
> dsfactory.AbstractDataSourceFactory -
> applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@f3770c,
> org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
> maxActive, 10)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
> testOnBorrow, true)
> dsfactory.AbstractDataSourceFactory -
> setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
> validationQuery, SELECT 1)
> avaloncomponent.TurbineAvalonComponentService - Lookup for Component
> org.apache.torque.avalon.Torque successful
> avalon - ComponentFactory decommissioning instance of
> org.apache.torque.avalon.TorqueComponent.
> avalon - dispose()
>
> Did you happen to experience something similar or do you have any advice
> as to where I might look for a solution to this problem.
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: 3.3RC2 Maven2 Plugin usage
Posted by Scott Eade <se...@backstagetech.com.au>.
Jeffrey D. Brekke wrote:
> We've converted our project
> over to 3.3-RC2 ( which is using the maven2 plugin as well ). All is
> working good. Thanks again.
Hi Jeffrey,
I am having a crack at moving a turbine (2.3.2) project over to m2 and
torque 3.3.rc2 but I am running into a problem whereby after torque
starts up it is immediately disposed of and hence any queries that are
executed are greeted with a TorqueException that indicates "Torque is
not initialized".
Here is the relevant chunk of the start up log:
avalon - added Role org.apache.torque.avalon.Torque with shorthand
torque for org.apache.torque.avalon.TorqueComponent
avalon - looking up shorthand torque, returning
org.apache.torque.avalon.Torque
avalon - Adding component (org.apache.torque.avalon.Torque =
org.apache.torque.avalon.TorqueComponent)
avalon - Attempting to get Handler for role
[org.apache.torque.avalon.Torque]
avalon - Handler type =
org.apache.avalon.excalibur.component.DefaultComponentHandler
avalon - ComponentHandler initialized for:
org.apache.torque.avalon.TorqueComponent
avalon - ComponentFactory creating new instance of
org.apache.torque.avalon.TorqueComponent.
avalon - no logger attribute available, using standard logger
avalon - configure(torque::<no
value>:@file:/S:/eclipse-workspace/cmes-dev/target/deploy/dev-m2/WEB-INF/conf/componentConfiguration.xml:7:13)
avalon - Config File is
S:\eclipse-workspace\cmes-dev\target\deploy\dev-m2\WEB-INF/conf/Torque.properties
avalon - initialize()
dsfactory.AbstractDataSourceFactory - Starting initCPDS
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1a9cf52,
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@31bcc8,
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
driver, org.postgresql.Driver)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
url, jdbc:postgresql://127.0.0.1:5432/cmesdev)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
user, torque)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@16a23cf,
password, (value not logged))
dsfactory.SharedPoolDataSourceFactory - Starting initJdbc2Pool
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@1ef45e0,
org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
dsfactory.AbstractDataSourceFactory -
applyConfiguration(org.apache.commons.configuration.SubsetConfiguration@f3770c,
org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
maxActive, 10)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
testOnBorrow, true)
dsfactory.AbstractDataSourceFactory -
setSimpleProperty(org.apache.commons.dbcp.datasources.SharedPoolDataSource@1d47f59,
validationQuery, SELECT 1)
avaloncomponent.TurbineAvalonComponentService - Lookup for Component
org.apache.torque.avalon.Torque successful
avalon - ComponentFactory decommissioning instance of
org.apache.torque.avalon.TorqueComponent.
avalon - dispose()
Did you happen to experience something similar or do you have any advice
as to where I might look for a solution to this problem.
TIA,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: 3.3RC2 Maven2 Plugin usage
Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Thanks Thomas, that answers our questions. We've converted our project
over to 3.3-RC2 ( which is using the maven2 plugin as well ). All is
working good. Thanks again.
Thomas Fischer wrote:
> You are right, the default output directory of the non-base classes is
> src/main/generated-java folder (can be changed by setting outputDir), and
> the default output directory of the non-base classes is target/generated-
> sources/torque (can be changed by setting baseOutputDir). Both of these
> directories are added to the compileSource, so both of the directories
> should be compiled without further action. I am not sure what happens if no
> src/main/java directory is there, of what happens if outputDir is set to
> src/main/java.
> The idea ist to put all stuff under src into scm (i.e. also the stuff in
> src/main/generated-java). These files, once created,should not be
> overwritten by torque under any circumstances. The classes in target should
> not be put into scm and will be overwritten either if the schema is changed
> or if runOnlyOnSchemaChange is false or after running "mvn clean".
>
> I hope this answers your question.
>
> Thomas
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: 3.3RC2 Maven2 Plugin usage
Posted by Thomas Fischer <fi...@seitenbau.net>.
You are right, the default output directory of the non-base classes is
src/main/generated-java folder (can be changed by setting outputDir), and
the default output directory of the non-base classes is target/generated-
sources/torque (can be changed by setting baseOutputDir). Both of these
directories are added to the compileSource, so both of the directories
should be compiled without further action. I am not sure what happens if no
src/main/java directory is there, of what happens if outputDir is set to
src/main/java.
The idea ist to put all stuff under src into scm (i.e. also the stuff in
src/main/generated-java). These files, once created,should not be
overwritten by torque under any circumstances. The classes in target should
not be put into scm and will be overwritten either if the schema is changed
or if runOnlyOnSchemaChange is false or after running "mvn clean".
I hope this answers your question.
Thomas
"Jeffrey D. Brekke" <jb...@wi.rr.com> schrieb am 01.03.2007 16:49:33:
> Non-base sources seem to be generating into src/main/generated-java not
> the src/main/java directory. I guess I had no src/main/java directory
> in my project ( it is a torque only project, and the non-bases were
> going into target before ) and when there is no java dir it fails to
> compile. The generated non-base classes are still left in
> generated-java, but it still compiles/builds ok?
>
> Is it an OK practice then to commit that directory into scm and then
> torque won't overwrite them if they've been altered?
>
> Thomas Fischer wrote:
> > The non-base sources are generated in src/main/java. The base classes
are
> > generated somewhere in the target directory (I cannot remember the
exact
> > place), and are compiled from there.
> > The configuration you have given seems ok. What exactly is your problem
> > with it ?
> >
> > Thomas
> >
> > "Jeffrey D. Brekke" <jb...@wi.rr.com> schrieb am 01.03.2007 05:20:45:
> >
> >> I'm having difficulty getting the latest plugin to work. Is there
some
> >> way to tell the plugin to generate the non-base classes into
> >> src/main/java or is maven supposed to compile the generated-java
> >> directory for us? If I add <outputDir> to configuration, then the
> >> plugin fails since the report locations are incorrect. Below is my
> >> current plugin config, maybe I have something wrong?
> >>
> >> <plugin>
> >> <groupId>org.apache.db.torque</groupId>
> >> <artifactId>torque-maven-plugin</artifactId>
> >> <version>3.3-RC2</version>
> >>
> >> <configuration>
> >> <targetDatabase>sybase</targetDatabase>
> >> <targetPackage>our.package</targetPackage>
> >> </configuration>
> >>
> >> <executions>
> >> <execution>
> >> <goals>
> >> <phase>install</phase>
> >> <goal>sql</goal>
> >> <goal>om</goal>
> >> </goals>
> >> </execution>
> >> </executions>
> >>
> >> </plugin>
>
>
> --
> =====================================================================
> Jeffrey D. Brekke jbrekke@wi.rr.com
> Wisconsin, USA brekke@apache.org
> ekkerbj@yahoo.com
> http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
Re: 3.3RC2 Maven2 Plugin usage
Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Non-base sources seem to be generating into src/main/generated-java not
the src/main/java directory. I guess I had no src/main/java directory
in my project ( it is a torque only project, and the non-bases were
going into target before ) and when there is no java dir it fails to
compile. The generated non-base classes are still left in
generated-java, but it still compiles/builds ok?
Is it an OK practice then to commit that directory into scm and then
torque won't overwrite them if they've been altered?
Thomas Fischer wrote:
> The non-base sources are generated in src/main/java. The base classes are
> generated somewhere in the target directory (I cannot remember the exact
> place), and are compiled from there.
> The configuration you have given seems ok. What exactly is your problem
> with it ?
>
> Thomas
>
> "Jeffrey D. Brekke" <jb...@wi.rr.com> schrieb am 01.03.2007 05:20:45:
>
>> I'm having difficulty getting the latest plugin to work. Is there some
>> way to tell the plugin to generate the non-base classes into
>> src/main/java or is maven supposed to compile the generated-java
>> directory for us? If I add <outputDir> to configuration, then the
>> plugin fails since the report locations are incorrect. Below is my
>> current plugin config, maybe I have something wrong?
>>
>> <plugin>
>> <groupId>org.apache.db.torque</groupId>
>> <artifactId>torque-maven-plugin</artifactId>
>> <version>3.3-RC2</version>
>>
>> <configuration>
>> <targetDatabase>sybase</targetDatabase>
>> <targetPackage>our.package</targetPackage>
>> </configuration>
>>
>> <executions>
>> <execution>
>> <goals>
>> <phase>install</phase>
>> <goal>sql</goal>
>> <goal>om</goal>
>> </goals>
>> </execution>
>> </executions>
>>
>> </plugin>
--
=====================================================================
Jeffrey D. Brekke jbrekke@wi.rr.com
Wisconsin, USA brekke@apache.org
ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
RE: 3.3RC2 Maven2 Plugin usage
Posted by Thomas Fischer <fi...@seitenbau.net>.
The non-base sources are generated in src/main/java. The base classes are
generated somewhere in the target directory (I cannot remember the exact
place), and are compiled from there.
The configuration you have given seems ok. What exactly is your problem
with it ?
Thomas
"Jeffrey D. Brekke" <jb...@wi.rr.com> schrieb am 01.03.2007 05:20:45:
> I'm having difficulty getting the latest plugin to work. Is there some
> way to tell the plugin to generate the non-base classes into
> src/main/java or is maven supposed to compile the generated-java
> directory for us? If I add <outputDir> to configuration, then the
> plugin fails since the report locations are incorrect. Below is my
> current plugin config, maybe I have something wrong?
>
> <plugin>
> <groupId>org.apache.db.torque</groupId>
> <artifactId>torque-maven-plugin</artifactId>
> <version>3.3-RC2</version>
>
> <configuration>
> <targetDatabase>sybase</targetDatabase>
> <targetPackage>our.package</targetPackage>
> </configuration>
>
> <executions>
> <execution>
> <goals>
> <phase>install</phase>
> <goal>sql</goal>
> <goal>om</goal>
> </goals>
> </execution>
> </executions>
>
> </plugin>
>
> --
> =====================================================================
> Jeffrey D. Brekke jbrekke@wi.rr.com
> Wisconsin, USA brekke@apache.org
> ekkerbj@yahoo.com
> http://www.bloglines.com/blog/jbrekke ekkerbj@gmail.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org