You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Nikko Gaerlan <ni...@gmail.com> on 2006/11/21 03:12:46 UTC

Moving Jetspeed to another server?

hi list

is it possible to move the whole jetspeed app to a new server?
what are the steps?
I backed up the sql tables..

how about the psml files of registered users?

will jetspeed run if ill only copy all the psml files?


thanks for your support.. ^_^

Re: Jetspeed database properties hsql

Posted by David Sean Taylor <da...@bluesunrise.com>.
Erik van Bloem wrote:
> How did you set up Jetspeed?
> Will a new download of the trunk help or do I have to change database (if so
> how?)?
> 
I built from source, checked out from the head.
Note, I am using the HSQL server, not embedded mode.
(you can run the build in embeddedmode, but the Jetspeed server requires 
  an HSQL server AFAIK)

I just spent a few hours retesting it, and it seems to work fine, with 
one exception. The batched statistics updating on the database fails 
under HSQL. Seems that HSQL doesnt support batched updated, at least not 
the version of the driver Im using. So you will need to modify your 
spring configuration, either:

1. remove statistics.xml from the assembly
2. change statistics.xml to log to a CLF, not a DB


         <!-- logToCLF -->
       	<constructor-arg index='0' 
type="boolean"><value>false</value></constructor-arg>
		
		<!-- logToDatabase -->
       	<constructor-arg  index='1' 
type="boolean"><value>true</value></constructor-arg>


Here are the general steps for getting HSQL running from SOURCE:

1. edit your build.properties:

org.apache.jetspeed.production.database.default.name=hsql
org.apache.jetspeed.production.database.url = 
jdbc:hsqldb:hsql://127.0.0.1:9001
org.apache.jetspeed.production.database.driver = org.hsqldb.jdbcDriver
org.apache.jetspeed.production.database.user = sa
org.apache.jetspeed.production.database.password =
org.apache.jetspeed.production.jdbc.drivers.path=/path-to-driver/hsqldb-1.7.1.jar


2. start up the HSQL server, something like:

java -classpath /path-to-driver/hsqldb-1.7.1.jar org.hsqldb.Server 
-database /tmp/hsql/Production -port 9001 -silent true -trace false


3. run the build

maven allClean allBuild j2:quickStart

that should be it
take a look at your jetspeed.xml in tomcat, it should have something like:

	<Resource name="jdbc/jetspeed" auth="Container"
             factory="org.apache.commons.dbcp.BasicDataSourceFactory"
             type="javax.sql.DataSource" username="sa" password=""
             driverClassName="org.hsqldb.jdbcDriver" 
url="jdbc:hsqldb:hsql://127.0.0.1:9001"
             maxActive="100" maxIdle="30" maxWait="10000"/>




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Jetspeed database properties hsql

Posted by Erik van Bloem <e....@student.utwente.nl>.
How did you set up Jetspeed?
Will a new download of the trunk help or do I have to change database (if so
how?)?

Regards
Erik

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: woensdag 22 november 2006 20:21
To: Jetspeed Users List
Subject: Re: Jetspeed database properties hsql

Bloem, E.J.W. van (Erik, Student CS) wrote:
> Hello list,
>  
> I am new to Jetspeed 2 and I am building it from source (trunk) with maven
1.0.2.
> I notised that defaults (in project.properties) use derby so I added hsql
database properties to the build.properties so that I can run it like the
tutorial. 
> First I start the db but when I do quickstart, I get the following error:
> Is there something wrong with the drivers or url or something else?
>  
Wonder if HSQL support was accidently broken in the move to Derby
I'll get that tested here in a bit

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Jetspeed database properties hsql

Posted by David Sean Taylor <da...@bluesunrise.com>.
Bloem, E.J.W. van (Erik, Student CS) wrote:
> Hello list,
>  
> I am new to Jetspeed 2 and I am building it from source (trunk) with maven 1.0.2.
> I notised that defaults (in project.properties) use derby so I added hsql database properties to the build.properties so that I can run it like the tutorial. 
> First I start the db but when I do quickstart, I get the following error:
> Is there something wrong with the drivers or url or something else?
>  
Wonder if HSQL support was accidently broken in the move to Derby
I'll get that tested here in a bit

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Jetspeed database properties hsql

Posted by "Bloem, E.J.W. van (Erik, Student CS)" <e....@student.utwente.nl>.
Hello list,
 
I am new to Jetspeed 2 and I am building it from source (trunk) with maven 1.0.2.
I notised that defaults (in project.properties) use derby so I added hsql database properties to the build.properties so that I can run it like the tutorial. 
First I start the db but when I do quickstart, I get the following error:
Is there something wrong with the drivers or url or something else?
 
Please help
 
    [sql] [ERROR] Failed to execute: drop table USER_STATISTICS
    [sql] [ERROR] java.sql.SQLException: Table not found: USER_STATISTICS in sta
tement [drop table USER_STATISTICS]
    [sql] 0 of 83 SQL statements executed successfully

j2:_db.create:
j2:_process.all.scripts.in.path:
    [echo] Checking for SQL scripts at path C:jetspeedsource/target/portal-sql/h
sql/schema...
j2:_db.execute:
    [sql] Executing file: C:\jetspeedsource\target\portal-sql\populate-db-defaul
t.sql
    [sql] [ERROR] Failed to execute: INSERT INTO CAPABILITY (CAPABILITY_ID, CAPA
BILITY) VALUES(1,'HTML_3_2')
BUILD FAILED
File...... C:\Documents and Settings\Erik.SEVENSTARS\.maven\cache\maven-jetspeed
2-plugin-2.1-dev\plugin.jelly
Element... sql
Line...... 881
Column.... 44
java.sql.SQLException: Table not found in statement [INSERT INTO CAPABILITY]
Total time: 7 seconds
Finished at: Wed Nov 22 15:56:36 CET 2006
C:\jetspeedsource>
 
 
build.properties:
# required Jetspeed 2 portal configuration property for building from the source
org.apache.jetspeed.project.home             = C:/jetspeedsource
 
# required portal configuration properties          
org.apache.jetspeed.portal.home           = C:/jetspeedsource
org.apache.jetspeed.portal.groupId       = myprojects 
org.apache.jetspeed.portal.artifactId      = myportal 
org.apache.jetspeed.portal.name           = My Test Portal 

# org.apache.jetspeed.portal.currentVersion = 1.0 
# required application server properties
org.apache.jetspeed.server.home                      = C:\Tomcat5.5
org.apache.jetspeed.server.shared                    = ${org.apache.jetspeed.server.home}/shared/lib
org.apache.jetspeed.deploy.war.dir                   = ${org.apache.jetspeed.server.home}/webapps
org.apache.jetspeed.services.autodeployment.user     = j2deployer
org.apache.jetspeed.services.autodeployment.password = xxxxx
org.apache.jetspeed.catalina.version.major           = 5.5
 
org.apache.jetspeed.test.database.url = jdbc:hsqldb:hsql://localhost:9001
org.apache.jetspeed.test.database.driver = org.hsqldb.jdbcDriver
org.apache.jetspeed.test.database.user = sa
org.apache.jetspeed.test.database.password =
org.apache.jetspeed.test.jdbc.drivers.path = C:/Tomcat5.5/shared/lib/hsqldb.jar
org.apache.jetspeed.test.database.default.name=hsql
 
org.apache.jetspeed.production.database.url = jdbc:hsqldb:hsql://localhost:9001
org.apache.jetspeed.production.database.driver = org.hsqldb.jdbcDriver
org.apache.jetspeed.production.database.user = sa
org.apache.jetspeed.production.database.password =
org.apache.jetspeed.production.jdbc.drivers.path = C:/Tomcat5.5/shared/lib/hsqldb.jar
org.apache.jetspeed.production.database.default.name=hsql

________________________________

Van: Nikko Gaerlan [mailto:nikko.gaerlan@GMAIL.COM]
Verzonden: wo 22-11-2006 10:52
Aan: Jetspeed Users List
Onderwerp: Re: Moving Jetspeed to another server?



thank you sir..

how can i redeploy my jetspeed to another tomcat?
do i have to recompile jetspeed2 on that server?
then ill just update the sql tables and psml files?

thanks again...


On 11/22/06, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> Nikko Gaerlan wrote:
> > hi list
> >
> > is it possible to move the whole jetspeed app to a new server?
> > what are the steps?
> > I backed up the sql tables..
> >
> > how about the psml files of registered users?
> >
> > will jetspeed run if ill only copy all the psml files?
> >
> Be careful not to overwrite your PSML files
> You can place the PSML files outside of your web app
> But yes, of course its possible to move to another server
> Just make sure to get the database connection setup correctly
> With Tomcat, that is done by modifying the JNDI data source in Tomcat's
> configuration directory (jetspeed.xml)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Moving Jetspeed to another server?

Posted by David Sean Taylor <da...@bluesunrise.com>.
Nikko Gaerlan wrote:
> thank you sir..
> 
> how can i redeploy my jetspeed to another tomcat?
> do i have to recompile jetspeed2 on that server?
> then ill just update the sql tables and psml files?
> 
> thanks again...
> 

The recommended solution is the Jetspeed Plugin for Maven-1 or Maven-2
If you are starting a new project, we recommend the Maven-2 plugin
This allows you to build your custom portal with Maven, compiling your 
custom configurations and modifications to the portal. It does not 
require compiling any Apache sources.

http://wiki.apache.org/portals/Jetspeed2/Maven2BuildSupport

We have come to learn that building with Maven is not for everyone, even 
with a well-intentioned and full featured Maven plugin. Sometimes I feel 
like I spend more time supporting Maven than anything else.

Our goals with the 2.1 release are to make installation and 
customization possible without building. We are working on tools in 2.1 
to install Jetspeed, populate the database separate from the build, and 
migrate databases from older versions when new releases come out





---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Moving Jetspeed to another server?

Posted by Nikko Gaerlan <ni...@gmail.com>.
thank you sir..

how can i redeploy my jetspeed to another tomcat?
do i have to recompile jetspeed2 on that server?
then ill just update the sql tables and psml files?

thanks again...


On 11/22/06, David Sean Taylor <da...@bluesunrise.com> wrote:
>
> Nikko Gaerlan wrote:
> > hi list
> >
> > is it possible to move the whole jetspeed app to a new server?
> > what are the steps?
> > I backed up the sql tables..
> >
> > how about the psml files of registered users?
> >
> > will jetspeed run if ill only copy all the psml files?
> >
> Be careful not to overwrite your PSML files
> You can place the PSML files outside of your web app
> But yes, of course its possible to move to another server
> Just make sure to get the database connection setup correctly
> With Tomcat, that is done by modifying the JNDI data source in Tomcat's
> configuration directory (jetspeed.xml)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Moving Jetspeed to another server?

Posted by David Sean Taylor <da...@bluesunrise.com>.
Nikko Gaerlan wrote:
> hi list
> 
> is it possible to move the whole jetspeed app to a new server?
> what are the steps?
> I backed up the sql tables..
> 
> how about the psml files of registered users?
> 
> will jetspeed run if ill only copy all the psml files?
> 
Be careful not to overwrite your PSML files
You can place the PSML files outside of your web app
But yes, of course its possible to move to another server
Just make sure to get the database connection setup correctly
With Tomcat, that is done by modifying the JNDI data source in Tomcat's 
configuration directory (jetspeed.xml)

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org