You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Anil Shinde <as...@cisco.com> on 2001/07/13 01:13:27 UTC

Exception encountered during connection to Oracle from jetspeed

Hi,

I am trying to connect to the oracle database from jetspeed, the oracle 
jdbc drivers are in the $TOMCAT_HOME/lib, so they are part of the 
CLASSPATH. I modified the TurbineResources.properties file with the proper 
database parameters as mentioned in the documentation, my modified database 
properties in TurbineResources.properties file looks like this :

#database.default.driver=org.hsql.jdbcDriver
#database.default.url=jdbc:HypersonicSQL:${webapp.dir}/WEB-INF/db/jetspeed
#database.default.username=sa
#database.default.password=

database.default.driver=oracle.jdbc.driver.OracleDriver
database.default.url=jdbc:oracle:thin:@myhost:1521:myinstance
database.default.username=myuser
database.default.password=mypassword

I created the schema using the following sql scripts:

turbine-oracle.sql
default_roles_permissions.sql
populate-oracle.sql

I ran the sql scripts in the order mentioned above, I noticed that when I 
run populate-oracle.sql script it tries to insert a duplicate record for 
the two default users- turbine and admin, so the insert fails becuase of 
unique key constraint on the login_name column field in the turbine_user table.

Anyway I continued with the restart of my tomcat instance, I see the 
following error in my browser when I try to login as admin:

Horrible Exception: java.lang.ExceptionInInitializerError: 
java.lang.NullPointerException
         at 
org.apache.turbine.om.security.peer.TurbineUserPeer.<clinit>(TurbineUserPeer.java)
         at 
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:158)
         at 
org.apache.turbine.services.security.db.DBUserManager.retrieve(DBUserManager.java:246)
         at 
org.apache.turbine.services.security.BaseSecurityService.getAuthenticatedUser(BaseSecurityService.java:313)
         at 
org.apache.turbine.services.security.TurbineSecurity.getAuthenticatedUser(TurbineSecurity.java:199)
         at 
org.apache.turbine.modules.actions.LoginUser.doPerform(LoginUser.java:103)
         at org.apache.turbine.modules.Action.perform(Action.java:87)
         at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
         at 
org.apache.jetspeed.modules.actions.JLoginUser.doPerform(JLoginUser.java:143)
         at org.apache.turbine.modules.Action.perform(Action.java:87)
         at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
         at org.apache.turbine.Turbine.doGet(Turbine.java:393)
         at org.apache.turbine.Turbine.doPost(Turbine.java:537)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at 
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at 
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at 
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)

Does anybody know what could be the reason for this ?

-Anil







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


RE: Exception encountered during connection to Oracle from jetspeed

Posted by David Sean Taylor <da...@bluesunrise.com>.
> database.default.driver=oracle.jdbc.driver.OracleDriver
> database.default.url=jdbc:oracle:thin:@myhost:1521:myinstance
> database.default.username=myuser
> database.default.password=mypassword

Also need this in the TRP:

database.adaptor=DBOracle
database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver

for more details, see the turbine docs:
http://jakarta.apache.org/turbine/howto/oracle-howto.html

> I created the schema using the following sql scripts:
>
> turbine-oracle.sql
> default_roles_permissions.sql
> populate-oracle.sql
>
> I ran the sql scripts in the order mentioned above, I noticed
> that when I
> run populate-oracle.sql script it tries to insert a duplicate
> record for
> the two default users- turbine and admin, so the insert fails
> becuase of
> unique key constraint on the login_name column field in the
> turbine_user table.


You don't need to run default_roles_permissions.sql
This script should be removed from the cvs
Just run these:

turbine-oracle.sql
populate-oracle.sql



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


RE: Exception encountered during connection to Oracle from jetspeed

Posted by David Sean Taylor <da...@bluesunrise.com>.
> database.default.driver=oracle.jdbc.driver.OracleDriver
> database.default.url=jdbc:oracle:thin:@myhost:1521:myinstance
> database.default.username=myuser
> database.default.password=mypassword

Also need this in the TRP:

database.adaptor=DBOracle
database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver

for more details, see the turbine docs:
http://jakarta.apache.org/turbine/howto/oracle-howto.html

> I created the schema using the following sql scripts:
>
> turbine-oracle.sql
> default_roles_permissions.sql
> populate-oracle.sql
>
> I ran the sql scripts in the order mentioned above, I noticed
> that when I
> run populate-oracle.sql script it tries to insert a duplicate
> record for
> the two default users- turbine and admin, so the insert fails
> becuase of
> unique key constraint on the login_name column field in the
> turbine_user table.


You don't need to run default_roles_permissions.sql
This script should be removed from the cvs
Just run these:

turbine-oracle.sql
populate-oracle.sql



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