Issue Details (XML | Word | Printable)

Key: JS1-565
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: David Sean Taylor
Reporter: David Sean Taylor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jetspeed

Postgresql Support for Jetspeed 1.6

Created: 20/Nov/06 09:38 PM   Updated: 15/Feb/07 06:32 PM
Return to search
Component/s: Database
Affects Version/s: 1.6
Fix Version/s: 1.6

Time Tracking:
Not Specified

File Attachments:
  Size
XML File build.xml 2006-11-20 09:39 PM David Sean Taylor 6 kB
File drops.sql 2006-11-20 09:40 PM David Sean Taylor 0.4 kB
File populate-postgres.sql 2006-11-20 09:40 PM David Sean Taylor 3 kB
File turbine-postgres.sql 2006-11-20 09:39 PM David Sean Taylor 5 kB

Resolution Date: 15/Feb/07 06:32 PM


 Description  « Hide
Im attaching SQL scripts for Postgresql
They work for me. Please test
The attached build.xml has three new targets: drops, ddl, populate
You can run something like:

ant drops ddl populate

Place the attached 3 SQL files in src/sql/external directory

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
David Sean Taylor added a comment - 20/Nov/06 09:39 PM
drop this in the root jetspeed source directory, replacing existing build.xml there

David Sean Taylor added a comment - 20/Nov/06 09:39 PM
drop this file in src/sql/external

David Sean Taylor added a comment - 20/Nov/06 09:40 PM
place this file in src/sql/external

David Sean Taylor added a comment - 20/Nov/06 09:40 PM
place this file in src/sql/external

David Sean Taylor added a comment - 20/Nov/06 09:42 PM
Forgot to mention, you will need to edit the build.xml to set the path to your posgresql jdbc driver

Hans Plum added a comment - 08/Dec/06 02:33 PM
Hi David,

I still does not work for me. What I did:

1) clean svn checkout of trunk
2) exchanged build.xml's and adapted path to postgresql jdbc driver
3) moved SQL-files into src/sql/external
4) created postgresql DB with scripts

5) compiled new torque-om's against postgresql (by maven)
6) build jetspeed.war (by maven)
7) added postgres jdbc driver in war
8) corrected /WEB-INF/conf/Torque.properties for postgresl-binding

=> Error when starting the Homepage: message that field password_changed in turbine_user was missing

9) added field password_changed "PASSWORD_CHANGED timestamp"
10) Homepage worked
11) Tried to add new user:

2006-12-08 15:15:46,701 [http-8080-Processor24] WARN CastorPsmlManagerService - PSMLManager: /home/hp/software/jetspeed/jetspeed-trunk/trunk/target/jetspeed-pg2/WEB-INF/p
sml/user/admin/html/de/default.psml not found, returning null document
2006-12-08 15:15:46,733 [http-8080-Processor24] ERROR TurbineUserManagement - Failed to create account 'test'
org.apache.torque.TorqueException: java.sql.SQLException: ERROR: null value in column "user_id" violates not-null constraint
        at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:236)
        at org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.java:903)
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:742)
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:639)
        at org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.doInsert(BaseTurbineUserPeer.java:241)
        at org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.doInsert(BaseTurbineUserPeer.java:214)
        at org.apache.jetspeed.services.security.turbine.TurbineUserManagement.addUser(TurbineUserManagement.java:283)
        at org.apache.jetspeed.services.JetspeedUserManagement.addUser(JetspeedUserManagement.java:95)
        at org.apache.jetspeed.services.JetspeedSecurity.addUser(JetspeedSecurity.java:213)
        at org.apache.jetspeed.modules.actions.portlets.security.UserUpdateAction.doInsert(UserUpdateAction.java:200)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.fireEvent(PortletActionEvent.java:176)
        at org.apache.jetspeed.modules.actions.portlets.PortletActionEvent.executeEvents(PortletActionEvent.java:133)
        at org.apache.jetspeed.modules.actions.portlets.SecureVelocityPortletAction.executeEvents(SecureVelocityPortletAction.java:42)
        at org.apache.jetspeed.modules.actions.portlets.GenericMVCAction.perform(GenericMVCAction.java:115)
        at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
        at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
        at org.apache.turbine.modules.Page.build(Page.java:90)
        at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
        at org.apache.turbine.Turbine.doGet(Turbine.java:563)
        at org.apache.turbine.Turbine.doPost(Turbine.java:658)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)


Seems to be the same problem - could you give me a hint where to look at. Something wrong with the steps, I took.

TIA,
Hans


Hans Plum added a comment - 08/Dec/06 02:36 PM
Some follow up:

I have tested the scripts against Jetspeed 1.6 after adding the password_changed field ... (used the precompiled torque-oms from here [1]). Unfortunately I got the same errors.

Regards,
Hans


[1] - http://www.bluesunrise.com/maven/jetspeed/distributions/torque-om/postgresql/

David Sean Taylor added a comment - 17/Jan/07 11:17 PM
Full support for Postgresql with Add User support
Updated Postgresql scripts
Added a little tester goals for creating and population db (dbdrops, db, dbpop)

Requirements to run:
1. Postgresql version of torque-om jar
2. only tested on Postgresql server 8.1.5
3. only tested on driver postgresql-8.1-407.jdbc3.jar
4. only tested on Jetspeed trunk

see commit list here:
http://svn.apache.org/viewvc?view=rev&revision=497236


David Sean Taylor added a comment - 15/Feb/07 06:32 PM
tested under several different environments