Randy,
I double checked my config files and verified the
following:
Verified:
1.
JVM version used by maven - added 'java -version'
command to the 'show.maven.props' goal:
C:\Marina\Harvard\Projects\jakarta-jetspeed-2-MYSQL>maven
show.maven.props
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
show.maven.props:
[echo] maven.home.local = C:/Marina/MyWork/Maven
[echo] maven.repo.local =
C:/Marina/MyWork/Maven/maven_repository
[echo] checking JRE version:
[exec] java version "1.4.2_06"
[exec] Java(TM) 2 Runtime Environment, Standard
Edition (build 1.4.2_06-b03)
[exec] Java HotSpot(TM) Client VM (build
1.4.2_06-b03, mixed mode)
BUILD SUCCESSFUL
Total time: 2 seconds
Finished at: Sun Feb 27 11:54:13 EST 2005
2. 'admin' user has rights to the 'j2' and 'j2test'
tables in MySQL:
logged into MySQL as 'admin', created and dropped test
tables in both 'j2' and 'j2test' DBs:
>>>>>
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 3 to server version:
4.1.7. Type 'help;' or '\h' for help. Type '\c' to
clear the buffer.
mysql> use j2test
Database changed
mysql> create table MyTest( id int );
Query OK, 0 rows affected (0.10 sec)
mysql> drop table MyTest;
Query OK, 0 rows affected (0.00 sec)
mysql> use j2
Database changed
mysql> create table MyTest( id int );
Query OK, 0 rows affected (0.02 sec)
mysql> drop table MyTest;
Query OK, 0 rows affected (0.00 sec)
3. jetspeed.xml
there was no jetspeed.xml in the
=<TOMCAT_HOME>/conf/Catalina/localhost dir
The only jetspeed.xml files in the J2-project-home
directory that I found were:
maven-plugin/target/classes/plugin-resources/jetspeed.xml
portal/src/resources/jetspeed.xml
Should I manually edit one of them and copy into
<TOMCAT_HOME>/conf/Catalina/localhost dir ?
Is not it supposed to be done by the maven 'allBuild'
goal?
4. I checked the MySQL driver jar file itself - it
does have both com.mysql.jdbc.Driver and
org.gjt.mm.mysql.Driver. It is indeed located in the
<TOMCAT_HOME>/shared/lib dir.
Any other setup I could have missed?
Thanks!
Marina
--- [EMAIL PROTECTED] wrote:
> Marina,
>
> I know you probably have most of this down cold, but
> please verify:
>
> - you have a copy of
> mysql-connector-java-3.0.16-ga-bin.jar in
> <TOMCAT_HOME>/shared/lib.
> - that the com.mysql.jdbc.Driver class exists in
> mysql-connector-java-3.0.16-ga-bin.jar.
> - if you are manually copying the jetspeed.war into
> webapps, make sure
> that the jetspeed.xml is edited for your
> configuration and is copied to
> the correct location:
> tomcat5=<TOMCAT_HOME>/conf/Catalina/localhost or
> tomcat4=<TOMCAT_HOME>/webapps.
> - that admin/admin has access to your j2 and j2test
> databases.
> - that your java implementation is being located
> correctly and is a
> current 1.4.2 or 1.5 version... I have never seen
> those "targetting 1.4"
> messages on Linux.
>
> Randy
>
> > Thanks, Randy.
> > Something very strange is going on here...
> > I tried different variations of the
> build.properties
> > file and it comes down to the following two
> scenarios:
> >
> > 1) if I set properties to:
> > org.apache.jetspeed.test.database.url =
> > jdbc:mysql://localhost/j2test
> > org.apache.jetspeed.test.database.driver =
> > com.mysql.jdbc.Driver
> > org.apache.jetspeed.test.database.user = admin
> > org.apache.jetspeed.test.database.password = admin
> >
> >
>
org.apache.jetspeed.test.jdbc.drivers.path=${org.apache.jetspeed.server.shared}/mysql-connector-java-3.0.16-ga-bin.jar
> >
> org.apache.jetspeed.test.database.default.name=mysql
> >
> > org.apache.jetspeed.production.database.url =
> > jdbc:mysql://localhost/j2
> > org.apache.jetspeed.production.database.driver =
> > com.mysql.jdbc.Driver
> > org.apache.jetspeed.production.database.user =
> admin
> > org.apache.jetspeed.production.database.password =
> > admin
> >
> >
>
org.apache.jetspeed.production.jdbc.drivers.path=${org.apache.jetspeed.server.shared}/mysql-connector-java-3.0.16-ga-bin.jar
> >
>
org.apache.jetspeed.production.database.default.name=mysql
> >
> >
> > then I get errors running maven allBuild target::
> > jetspeed2:jar:install:
> > build:start:
> >
> > java:prepare-filesystem:
> > [mkdir] Created dir:
> >
>
C:\Marina\Harvard\Projects\jakarta-jetspeed-2-MYSQL\portlet-api\target\classes
> >
> > java:compile:
> > [echo] Compiling to
> >
>
C:\Marina\Harvard\Projects\jakarta-jetspeed-2-MYSQL\portlet-api/target/classes
> > [echo]
> >
>
==========================================================
> >
> > NOTE: Targetting JVM 1.4, classes
> > will not run on earlier JVMs
> >
> >
>
==========================================================
> >
> > [javac] Compiling 27 source files to
> >
>
C:\Marina\Harvard\Projects\jakarta-jetspeed-2-MYSQL\portlet-api\target\classes
> >
> > BUILD FAILED
> > File......
> >
>
C:\Marina\Harvard\Projects\jakarta-jetspeed-2-MYSQL\maven.xml
> > Element... maven:reactor
> > Line...... 133
> > Column.... 40
> > Unable to obtain goal [java:compile] --
> >
>
C:\Marina\MyWork\Maven\cache\maven-java-plugin-1.5\plugin.jelly:63:48:
> > <ant:javac> Error running javac.exe compiler
> >
> > 2) if I set driver's name to:
> >
>
org.apache.jetspeed.test.jdbc.drivers.path=${org.apache.jetspeed.server.shared}/mysql-connector-java-3.0.16-ga-bin.jar
> >
> org.apache.jetspeed.test.database.default.name=mysql
> >
>
org.apache.jetspeed.test.database.url=jdbc:mysql://localhost/j2test
> >
>
org.apache.jetspeed.test.database.driver=org.gjt.mm.mysql.Driver
> > org.apache.jetspeed.test.database.user=admin
> > org.apache.jetspeed.test.database.password=admin
> >
>
org.apache.jetspeed.production.jdbc.drivers.path=${org.apache.jetspeed.server.shared}/mysql-connector-java-3.0.16-ga-bin.jar
> >
>
org.apache.jetspeed.production.database.default.name=mysql
> >
>
org.apache.jetspeed.production.database.url=jdbc:mysql://localhost/j2
> >
>
org.apache.jetspeed.production.database.driver=org.gjt.mm.mysql.Driver
> > org.apache.jetspeed.production.database.user=admin
> >
>
org.apache.jetspeed.production.database.password=admin
> >
> > then 'maven allBuild' finishes successfully, but:
> > -- no jetspeed.war is created in the Tomcat's
> webapp/
> > directory --> when trying to access J2 from a
> browser
> > - you get 404 error
> > -- no tables are created in the 'j2' DB schema.
> > 'j2test' schema has all tables created and
> populated.
> > -- the jetspeed.war file is created in the J2
> > project's .../portal/target/ directory though. I
> tried
> > copying it manually to the Tomcat's webapp/ dir -
> but
> > when I started tomcat, the following errors were
> > thrown when Tomcat was trying to deploy
> jetspeed.war:
> >
> > Caused by:
> >
>
org.springframework.beans.factory.BeanCreationException:
> > Error creati
> > ng bean with name
> 'java.util.prefs.PreferencesFactory'
> > defined in URL [file:/C:/
> >
>
Marina/Java/tomcat-5.0.30-j2M2-MYSQL/webapps/jetspeed/WEB-INF/assembly/jetspeed-
> > spring.xml]: Initialization of bean failed; nested
> > exception is org.apache.jetsp
> > eed.prefs.PreferencesException: Failed to
> initialize
> > prefs api. org.springframe
> > work.transaction.CannotCreateTransactionException:
> > Could not create OJB transact
> > ion; nested exception is
> > org.apache.ojb.broker.accesslayer.LookupException:
> > SQLE
> > xception thrown while trying to get Connection
> from
> > Datasource (java:comp/env/jdbc/jetspeed)
> > at
> >
>
org.springframework.beans.factory.support.AbstractAutowireCapableBean
> >
>
Factory.createBean(AbstractAutowireCapableBeanFactory.java:300)
> >
> >
> > It hunts me that it must be something very simple
> and
> > very stupid, since nobody else had these problems
> > using MySQL, but I can't find what that is...
> > Any ideas?
> >
> > Thanks!
> > Marina
> >
> >
> >
> >
> > --- [EMAIL PROTECTED] wrote:
> >
> >> Marina,
> >>
> >> These settings have always worked for me, (note
> that
> >> I do not set the
> >> ojb.platform property):
> >>
> >>
> >
>
org.apachejetspeed.test.jdbc.drivers.path=${org.apache.jetspeed.server.shared}/mysql-connector-java-3.0.16.jar
> >>
> org.apache.jetspeed.test.database.default.name=mysql
> >>
> >
>
org.apache.jetspeed.test.database.url=jdbc:mysql://localhost/j2test
> >>
>
=== message truncated ===
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]