Re: using MySQL with J2 - setup problem

2005-02-26 Thread watler
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
/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=/conf/Catalina/localhost or
tomcat4=/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:
>  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.AbstractAutowire

Re: using MySQL with J2 - setup problem

2005-02-26 Thread Marina
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:
 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
>
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.jets

Re: Importing Jetspeed settings into database

2005-02-26 Thread Sven Richter
Hello,
I'm using Jetspeed 1.5 (src), maven 1.0.2. I used maven and generated an  
application with "maven jetspeed:genapp", as you're supposed to (I guess).  
And in that application the problem accures.

Thank you very much,
Sven Richter
Am Thu, 24 Feb 2005 15:49:48 -0800 schrieb David Sean Taylor  
<[EMAIL PROTECTED]>:

Sven Richter wrote:
Hello,
 I so far made all the changes to Torque.properties.merge   
JetspeedResources.properties.merge and project.properties and created  
all  tables in MySQL, as described on the Jetspeed homepage. The next  
step is  (according to the website) to import the file-based settings  
to the  database with "maven import". Unfurtunately I get the error  
message that  the goal import does not exist.
 Could you please help me with this problem?

What version are you using?
The import goal is clearly there in the cvs head and 1.5 im pretty sure

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: SQLException thrown while trying to get Connection from Datasource

2005-02-26 Thread superman
I just solved a similar problem using xp instead of win2k and it turned out to 
be a bad jetspeed.xml file located at %tomcat%/conf/Catalina/localhost for 
tomcat 5.5.  There is an example of an appropriate jetspeed.xml file in 
%jetspeed%/portal/src/resources/jetspeed-tomcat-5.5.xml.

However, there are other issues with running jetspeed2 with tomcat 5.5.  See 
link below.
http://issues.apache.org/jira/browse/JS2-187


Hope this helps.

Chris

On Saturday 26 February 2005 09:10 am, reda bendiar wrote:
> Hello,
>
> the maven allClean allBuild and quickStart were done without errors.
> But when i start tomcat jetspeed throws errors
>
>
> My environment:
> Win2000
> Tomcat 5.5
> Java 1.5_01
> JetSpeed from CVS ( 2.0-M2-dev )
>
>
> here is what i find in jetspeed.log :
> ...
> ERROR org.apache.jetspeed.engine.AbstractEngine -
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'java.util.prefs.PreferencesFactory' defined
> in URL
> [file:/D:/app_servers/tomcat5.5/webapps/jetspeed/WEB-INF/assembly/jetspeed-
>spring.xml]: Initialization of bean failed; nested exception is
> org.apache.jetspeed.prefs.PreferencesException: Failed to initialize
> prefs api. 
> org.springframework.transaction.CannotCreateTransactionException: Could not
> create OJB transaction; nested exception is
> org.apache.ojb.broker.accesslayer.LookupException: SQLException thrown
> while trying to get Connection from Datasource
> (java:comp/env/jdbc/jetspeed)
>
>
> I tried HSQLDB and mysql but got the same problem. Anybody has an idea ?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SQLException thrown while trying to get Connection from Datasource

2005-02-26 Thread reda bendiar
Hello,

the maven allClean allBuild and quickStart were done without errors.
But when i start tomcat jetspeed throws errors


My environment:
Win2000
Tomcat 5.5
Java 1.5_01
JetSpeed from CVS ( 2.0-M2-dev )


here is what i find in jetspeed.log : 
...
ERROR org.apache.jetspeed.engine.AbstractEngine -
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'java.util.prefs.PreferencesFactory' defined
in URL 
[file:/D:/app_servers/tomcat5.5/webapps/jetspeed/WEB-INF/assembly/jetspeed-spring.xml]:
Initialization of bean failed; nested exception is
org.apache.jetspeed.prefs.PreferencesException: Failed to initialize
prefs api.  org.springframework.transaction.CannotCreateTransactionException:
Could not create OJB transaction; nested exception is
org.apache.ojb.broker.accesslayer.LookupException: SQLException thrown
while trying to get Connection from Datasource
(java:comp/env/jdbc/jetspeed)


I tried HSQLDB and mysql but got the same problem. Anybody has an idea ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



NoClassDefFoundError

2005-02-26 Thread Martin Dulisch
Hello,
I am trying to run the current CVS jetspeed 2 version. I am executing 
the steps in the getting started document. When I try to open the portal 
in the browser an error occurs. The tomcat logs contain the following 
exception.

My environment:
Mac OS 10.3.7
Tomcat 5.0.28
Java 1.4.2_05
Has someone running jetspeed 2 on Mac OS?
Thanks for help,
Martin
-
2005-02-25 11:35:08 StandardContext[/jetspeed]Marking servlet jetspeed 
as unavailable
2005-02-25 11:35:08 StandardContext[/jetspeed]Servlet /jetspeed threw 
load() exception
javax.servlet.ServletException: Error instantiating servlet class 
org.apache.jetspeed.engine.JetspeedServlet
	at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:996)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
	at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
...

- Root Cause -
java.lang.NoClassDefFoundError: 
org/apache/jetspeed/exception/JetspeedException
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
	at java.lang.Class.getConstructor0(Class.java:1930)
	at java.lang.Class.newInstance0(Class.java:278)
	at java.lang.Class.newInstance(Class.java:261)
	at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:987)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]