You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Stephen Davidson <st...@gmail.com> on 2012/04/11 05:36:15 UTC

changing datasource for daytrader to oracle

Hi All:

I have downloaded Geronimo 3.01 beta  and DayTrader 3.0-beta.  I am using
java 1.7.0_03-b05.

Out of the box, so to speak, I am able to run 'mvn clean install', then
deploy the application using the deploy command given in the README for
daytrader.
Then I create a datasource via the geronimo console for the derby database
and - having already created and populated the database, I am good to go.

Now I want to use oracle.  I have been trying different things over the last
two days and find myself no closer.

Could someone take pity on me and suggest a set of steps that I should be
able to follow in order to switch from using derby to oracle?  Does the
daytrader applciation work with oracle 11g?  I was able to get to the point
of testing a datasource for oracle thin, and it seemed to connect correctly
to my database, but then when I tried to deploy it, nothing.  I think at
that point I saw a classnotfound error in the log for
oracle.jdbc.oracledriver.

If someone can provide a set of steps, I could work through them and try to
determine whether there are actual problems, or if it is just me, and maybe
I could contribute back some useful information.

Thanks,
S 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3901510.html
Sent from the Users mailing list archive at Nabble.com.

Re: changing datasource for daytrader to oracle

Posted by Luciano Salotto <ls...@gmail.com>.
I'd switch to Java 1.6 instead of 1.7  as first solution.

On Wed, Apr 11, 2012 at 12:36 AM, Stephen Davidson <steverdavidson@gmail.com
> wrote:

> Hi All:
>
> I have downloaded Geronimo 3.01 beta  and DayTrader 3.0-beta.  I am using
> java 1.7.0_03-b05.
>
> Out of the box, so to speak, I am able to run 'mvn clean install', then
> deploy the application using the deploy command given in the README for
> daytrader.
> Then I create a datasource via the geronimo console for the derby database
> and - having already created and populated the database, I am good to go.
>
> Now I want to use oracle.  I have been trying different things over the
> last
> two days and find myself no closer.
>
> Could someone take pity on me and suggest a set of steps that I should be
> able to follow in order to switch from using derby to oracle?  Does the
> daytrader applciation work with oracle 11g?  I was able to get to the point
> of testing a datasource for oracle thin, and it seemed to connect correctly
> to my database, but then when I tried to deploy it, nothing.  I think at
> that point I saw a classnotfound error in the log for
> oracle.jdbc.oracledriver.
>
> If someone can provide a set of steps, I could work through them and try to
> determine whether there are actual problems, or if it is just me, and maybe
> I could contribute back some useful information.
>
> Thanks,
> S
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3901510.html
> Sent from the Users mailing list archive at Nabble.com.
>

Re: changing datasource for daytrader to oracle

Posted by Stephen Davidson <st...@gmail.com>.
I was finally able to build.  Here are the details of the change needed and
the last error I was getting.

	error when building oracle datasource plugin.

[ERROR] Failed to execute goal
org.apache.geronimo.buildsupport:car-maven-plugin:3.0-beta-1:package
(default-package) on project daytrader-oracle-datasource: could not package
plugin: Can not load adapter class in classloader
org.apache.geronimo.daytrader.plugins.daytrader-oracle-datasource-DEPLOYMENT
[107]: oracle/jdbc/pool/OracleDataSource: *** Class
'oracle.jdbc.pool.OracleDataSource' was not found. Bundle
org.apache.geronimo.daytrader.plugins.daytrader-oracle-datasource-DEPLOYMENT
[107] does not import package 'oracle.jdbc.pool', nor is the package
exported by any other bundle or available from the system class loader. ***
-> [Help 1]


Resolution was to modify

daytrader-3.0-beta-1/plugins/daytrader-oracle-datasource/pom.xml

<dependency>
  <groupId>org.tranql</groupId>
  <artifactId>tranql-connector-oracle-xa</artifactId>
  <type>rar</type>
  <version>1.3</version>
  <scope>provided</scope>
</dependency>

To:

<dependency>
  <groupId>org.tranql</groupId>
  <artifactId>tranql-connector-oracle-xa</artifactId>
  <type>rar</type>
  <version>1.7</version>
  <scope>provided</scope>
</dependency> 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3909638.html
Sent from the Users mailing list archive at Nabble.com.

Re: changing datasource for daytrader to oracle

Posted by Stephen Davidson <st...@gmail.com>.
attach
http://apache-geronimo.328035.n3.nabble.com/file/n3908511/buildoutput.log
buildoutput.log 

attachment of debug build for Kevan.

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3908511.html
Sent from the Users mailing list archive at Nabble.com.

Re: changing datasource for daytrader to oracle

Posted by David Jencks <da...@yahoo.com>.
Hi Stephen,

I haven't heard of anyone trying to get daytrader on g3  + oracle working, but that doesn't mean much.

I wonder if you have all the ids for the oracle driver lined up.  The maven stack trace looks like it expects

groupId= com.oracle
artifactId=jdbc-driver

but then it's looking for a pom (?) rather than a jar.  You've installed the driver in a different location...
Do you have any idea where the "http://not.a.real.repository" comes from?

hope this helps
david jencks

On Apr 11, 2012, at 12:47 PM, Stephen Davidson wrote:

> I have followed step 3 instructions in the README and placed the ojdbc14.jar
> into the .../repository/oracle/ojdbc14/ojdbc14-10g.jar.
> I then tried to build the oracle plugin using this command.
> 
>        2) a copy of the Oracle JDBC driver and run the following command:
>            mvn install:install-file -Dfile=${path to ojdbc14.jar} \
>                                     -DgroupId=oracle \
>                                     -DartifactId=ojdbc14 \
>                                     -Dversion=10g \
>                                     -Dpackaging=jar
> 
> 
> which seemed to work and created the .jar file in my .m2 directory at that
> path.  
> 
> So then I modified the pom.xml in the plugins directory and added a module
> for oracle, then did 
> mvn clean install from the main  daytrader directory.  
> 
> It failed with this.  
> 
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] DayTrader :: Performance Benchmark Sample :: Java EE 6  SUCCESS
> [3.087s]
> [INFO] Daytrader :: JAVA EE 6 ............................ SUCCESS [1.674s]
> [INFO] DayTrader :: Java EE 6 :: Modules ................. SUCCESS [0.143s]
> [INFO] DayTrader :: Java EE 6 :: Modules - Utils ......... SUCCESS [2.943s]
> [INFO] DayTrader :: Java EE 6 :: Modules - Entities ...... SUCCESS [2.920s]
> [INFO] DayTrader :: Java EE 6 :: Modules - Web ........... SUCCESS [6.923s]
> [INFO] DayTrader :: Java EE 6 :: Assemblies .............. SUCCESS [0.045s]
> [INFO] DayTrader :: Assemblies - Java EE 6 EAR ........... SUCCESS [0.905s]
> [INFO] Daytrader plans ................................... SUCCESS [0.748s]
> [INFO] DayTrader :: Plugins .............................. SUCCESS [1.227s]
> [INFO] Daytrader :: Plugins :: Derby DataSource .......... SUCCESS [26.119s]
> [INFO] Daytrader :: Plugins :: Oracle DataSource ......... FAILURE [0.489s]
> [INFO] Daytrader :: Plugins :: JavaEE JMS Resource ....... SKIPPED
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 52.125s
> [INFO] Finished at: Fri Apr 13 17:47:27 MDT 2012
> [INFO] Final Memory: 60M/144M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project daytrader-oracle-datasource: Could
> not
> resolve dependencies for project
> org.apache.geronimo.daytrader.plugins:daytrade
> r-oracle-datasource:car:3.0-beta-2-SNAPSHOT: Failed to collect dependencies
> for
> [org.tranql:tranql-connector-oracle-xa:rar:1.3 (provided),
> org.apache.geronimo.f
> ramework:geronimo-gbean-deployer:car:3.0-beta-1 (provided),
> org.apache.geronimo.
> configs:j2ee-deployer:car:3.0-beta-1 (provided),
> org.apache.geronimo.configs:con
> nector-deployer-1_6:car:3.0-beta-1 (provided),
> com.oracle:jdbc-driver:jar:10g (c
> ompile)]: Failed to read artifact descriptor for
> com.oracle:jdbc-driver:jar:10g:
> Could not transfer artifact com.oracle:jdbc-driver:pom:10g from/to
> maven.repo.d
> rivers (http://not.a.real.repository): not.a.real.repository: Unknown host
> not.a
> .real.repository -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> swit
> ch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> rea
> d the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
> lutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> 
> [ERROR]   mvn <goals> -rf :daytrader-oracle-datasource
> C:\day30beta>
> 
> Man, I am confused.
> 
> Should this post go to the dev list?  Can I post there as well?  ANyone got
> daytrader working with oracle on geronimo 3 and daytrader 3?
> 
> --
> View this message in context: http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3903655.html
> Sent from the Users mailing list archive at Nabble.com.


Re: changing datasource for daytrader to oracle

Posted by Stephen Davidson <st...@gmail.com>.
I have followed step 3 instructions in the README and placed the ojdbc14.jar
into the .../repository/oracle/ojdbc14/ojdbc14-10g.jar.
I then tried to build the oracle plugin using this command.

        2) a copy of the Oracle JDBC driver and run the following command:
            mvn install:install-file -Dfile=${path to ojdbc14.jar} \
                                     -DgroupId=oracle \
                                     -DartifactId=ojdbc14 \
                                     -Dversion=10g \
                                     -Dpackaging=jar


which seemed to work and created the .jar file in my .m2 directory at that
path.  

So then I modified the pom.xml in the plugins directory and added a module
for oracle, then did 
mvn clean install from the main  daytrader directory.  

It failed with this.  

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DayTrader :: Performance Benchmark Sample :: Java EE 6  SUCCESS
[3.087s]
[INFO] Daytrader :: JAVA EE 6 ............................ SUCCESS [1.674s]
[INFO] DayTrader :: Java EE 6 :: Modules ................. SUCCESS [0.143s]
[INFO] DayTrader :: Java EE 6 :: Modules - Utils ......... SUCCESS [2.943s]
[INFO] DayTrader :: Java EE 6 :: Modules - Entities ...... SUCCESS [2.920s]
[INFO] DayTrader :: Java EE 6 :: Modules - Web ........... SUCCESS [6.923s]
[INFO] DayTrader :: Java EE 6 :: Assemblies .............. SUCCESS [0.045s]
[INFO] DayTrader :: Assemblies - Java EE 6 EAR ........... SUCCESS [0.905s]
[INFO] Daytrader plans ................................... SUCCESS [0.748s]
[INFO] DayTrader :: Plugins .............................. SUCCESS [1.227s]
[INFO] Daytrader :: Plugins :: Derby DataSource .......... SUCCESS [26.119s]
[INFO] Daytrader :: Plugins :: Oracle DataSource ......... FAILURE [0.489s]
[INFO] Daytrader :: Plugins :: JavaEE JMS Resource ....... SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 52.125s
[INFO] Finished at: Fri Apr 13 17:47:27 MDT 2012
[INFO] Final Memory: 60M/144M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal on project daytrader-oracle-datasource: Could
not
 resolve dependencies for project
org.apache.geronimo.daytrader.plugins:daytrade
r-oracle-datasource:car:3.0-beta-2-SNAPSHOT: Failed to collect dependencies
for
[org.tranql:tranql-connector-oracle-xa:rar:1.3 (provided),
org.apache.geronimo.f
ramework:geronimo-gbean-deployer:car:3.0-beta-1 (provided),
org.apache.geronimo.
configs:j2ee-deployer:car:3.0-beta-1 (provided),
org.apache.geronimo.configs:con
nector-deployer-1_6:car:3.0-beta-1 (provided),
com.oracle:jdbc-driver:jar:10g (c
ompile)]: Failed to read artifact descriptor for
com.oracle:jdbc-driver:jar:10g:
 Could not transfer artifact com.oracle:jdbc-driver:pom:10g from/to
maven.repo.d
rivers (http://not.a.real.repository): not.a.real.repository: Unknown host
not.a
.real.repository -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
rea
d the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command

[ERROR]   mvn <goals> -rf :daytrader-oracle-datasource
C:\day30beta>

Man, I am confused.

Should this post go to the dev list?  Can I post there as well?  ANyone got
daytrader working with oracle on geronimo 3 and daytrader 3?

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/changing-datasource-for-daytrader-to-oracle-tp3901510p3903655.html
Sent from the Users mailing list archive at Nabble.com.