NewbeeQ: Getting User name from Jetspeed with JSP
Hi all! I've been playing around with the hello.jsp portlet in ver 1.3a2-dev and added a database access to it, work's fine with calls to postgreSQL. Now I'm trying to access the user name from Jetspeed. I want to use the user name to access the postgreSQL database. I've tryed using java.util.Hashtable and get a java.lang.NullPointerException and also org.apache.turbine.om.security.User and Jetspeed does not load that portlet, in both cases I'm using org.apache.turbine.util.RunData. The code for the Hashtable access (in hello.jsp): %@ page import = org.apache.turbine.util.RunData % %@ page import = java.util.Hashtable % % String username = ; try { Hashtable screenData = (Hashtable)request.getAttribute( ScreenDataEditAccount ); username = (String)screenData.get( username ); } catch (Exception e) { out.print(e.toString()); } % Anyone with pointer's or url's for me? TIA! -- sr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A Horrible Exception - NewbeeQ
Yes, I'm using the latest cvs (one week old now). I've had no response so far but I'm looking in to the latest post from Benjamin Madsen, in which he decribes a fix, see Re: Cvs error dated today. I'm not sure this is related to my problems but I'll give it a try and post the results. -- sr -Original Message- From: Vincent Bonamy [mailto:[EMAIL PROTECTED]] Sent: 31. júlí 2001 10:35 To: [EMAIL PROTECTED] Subject: Re: A Horrible Exception - NewbeeQ Hello I have the same pb since some times with the news cvs, I don't see the error, what I could doing : I download cvs, then I build the war, then I put the war into webapps of tomcat, then the auto-deploy seems to be correct, I obtain the jetspeed directory, I erase the jetspeed.war. Sigurður, have you find a solution ? What do you use: news cvs ? I'm on Unix, that is a pb with latest cvs ?? Please Help. vincent. Sigurður Reynisson wrote: Hi all, again! I just noticed that after pressing F5 the Horrible Exception now reads: Horrible Exception: java.lang.ClassCastException: java.lang.String at org.apache.jetspeed.services.rundata.DefaultJetspeedRunData.getProfile (DefaultJetspeedRunData.java:237) at org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform (JetspeedSessionValidator.java:127) snip... Horrible Exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'screens/Error' ...SNIP... - 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]
RE: A Horrible Exception - NewbeeQ
Hi all, again! I just noticed that after pressing F5 the Horrible Exception now reads: Horrible Exception: java.lang.ClassCastException: java.lang.String at org.apache.jetspeed.services.rundata.DefaultJetspeedRunData.getProfile (DefaultJetspeedRunData.java:237) at org.apache.jetspeed.modules.actions.JetspeedSessionValidator.doPerform (JetspeedSessionValidator.java:127) snip... Original post: --- Specs: JBoss 2.4 BETA(Rel_2_4_0_23) w/Embedded Tomcat-3.2.3 Jetspeed Portal Implementation 1.3a2 (builds ok) I'm trying to use Postgresql DB for Jetspeed, I've put the following in my TurbineResources.properties: database.default.driver=org.postgresql.Driver database.default.url=jdbc:postgresql://10.10.10.5:5432/TST database.default.username=dba database.default.password=dba ... database.adaptor=DBPostgres database.adaptor.DBPostgres=org.postgresql.Driver I then run build and start JBoss with the new jetspeed.war and I get from JBoss: [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/jetspeed.war [J2EE Deployer Default] Deploy J2EE application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/jetspeed.war [J2EE Deployer Default] Create application jetspeed.war [J2EE Deployer Default] inflate and install module jetspeed.war [Container factory] Deploying:file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war [Default] Added ClassLoader: org.jboss.web.WebClassLoader@ec10c6 URL:http://tom.zoom.is:8083/WebClassLoader@15470790/ [Container factory] Deployed application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war [J2EE Deployer Default] Starting module jetspeed.war [EmbeddedTomcatSX] deploy, ctxPath=/jetspeed, warUrl=file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war/web1004/ [J2EE Deployer Default] J2EE application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/jetspeed.war is deployed. I then goto my browser's http://tom.zoom.is:8080/jetspeed/index.jsp and get: Horrible Exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'screens/Error' ...SNIP... The full Exception is included in the Horrible Exception.txt file. I also included an updated verion of the turbine-postgres.sql file, this one runs without any errors, at least on my postgresql install ;) I don't even see the index page. Just the Exception. Also, right after the jetspeed deployment message from JBoss, I get: [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/lib/jbosspool- jdbc.rar [RARDeployer] Attempting to deploy RAR at 'file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/lib/jbosspool-jdbc.rar' [RARDeployer] Loading Minerva Resource Adapter for JDBC 1/2 drivers [RARDeployer] Required license terms present. See deployment descriptor. [MinervaDS] Not setting config property 'Driver' [MinervaDS] Not setting config property 'Password' [MinervaDS] Not setting config property 'UserName' [MinervaDS] Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter' to JNDI name 'java:/MinervaDS' [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/lib/jms-ra.rar [RARDeployer] Attempting to deploy RAR at 'file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/lib/jms-ra.rar' [JmsXA] Using default value 'java:DefaultJMSProvider' for config property 'JmsProviderAdapterJNDI' [JmsXA] FINE: Setting LogWriter: org.jboss.logging.LogWriter@1ed0d0c6 [JmsXA] Bound connection factory for resource adapter 'JMS Adapter' to JNDI name 'java:/JmsXA' Is this in any way related to my troubles? Esp. the message about not setting config property for Driver, Password and Username. I am using the CD example in JBoss with PostgreSQL and it works fine. Any ideas and/or help welcome - TIA! -- Sigurdur Reynisson [EMAIL PROTECTED] ps. pls forgive me if this is a common one (I did check the mailing list and came up with nothing) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A Horrible Exception - NewbeeQ
Hi all! Specs: JBoss 2.4 BETA(Rel_2_4_0_23) w/Embedded Tomcat-3.2.3 Jetspeed Portal Implementation 1.3a2 (builds ok) I'm trying to use Postgresql DB for Jetspeed, I've put the following in my TurbineResources.properties: database.default.driver=org.postgresql.Driver database.default.url=jdbc:postgresql://10.10.10.5:5432/TST database.default.username=dba database.default.password=dba ... database.adaptor=DBPostgres database.adaptor.DBPostgres=org.hsql.jdbcDriver I then run build and start JBoss with the new jetspeed.war and I get from JBoss: [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/jetspeed.war [J2EE Deployer Default] Deploy J2EE application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/jetspeed.war [J2EE Deployer Default] Create application jetspeed.war [J2EE Deployer Default] inflate and install module jetspeed.war [Container factory] Deploying:file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war [Default] Added ClassLoader: org.jboss.web.WebClassLoader@ec10c6 URL:http://tom.zoom.is:8083/WebClassLoader@15470790/ [Container factory] Deployed application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war [J2EE Deployer Default] Starting module jetspeed.war [EmbeddedTomcatSX] deploy, ctxPath=/jetspeed, warUrl=file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/tmp/deploy/Default/jetspeed.war/web1004/ [J2EE Deployer Default] J2EE application: file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/jetspeed.war is deployed. I then goto my browser's http://tom.zoom.is:8080/jetspeed/index.jsp and get: Horrible Exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'screens/Error' ...SNIP... The full Exception is included in the Horrible Exception.txt file. I also included an updated verion of the turbine-postgres.sql file, this one runs without any errors, at least on my postgresql install ;) I don't even see the index page. Just the Exception. Also, right after the jetspeed deployment message from JBoss, I get: [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/lib/jbosspool- jdbc.rar [RARDeployer] Attempting to deploy RAR at 'file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/lib/jbosspool-jdbc.rar' [RARDeployer] Loading Minerva Resource Adapter for JDBC 1/2 drivers [RARDeployer] Required license terms present. See deployment descriptor. [MinervaDS] Not setting config property 'Driver' [MinervaDS] Not setting config property 'Password' [MinervaDS] Not setting config property 'UserName' [MinervaDS] Bound connection factory for resource adapter 'Minerva JDBC LocalTransaction ResourceAdapter' to JNDI name 'java:/MinervaDS' [AutoDeployer] Auto deploy of file:/usr/java/JBoss-2.4.0_Tomcat-3.2.3/jboss/deploy/lib/jms-ra.rar [RARDeployer] Attempting to deploy RAR at 'file:/usr/java/JBoss-2.4.0_Tomcat- 3.2.3/jboss/deploy/lib/jms-ra.rar' [JmsXA] Using default value 'java:DefaultJMSProvider' for config property 'JmsProviderAdapterJNDI' [JmsXA] FINE: Setting LogWriter: org.jboss.logging.LogWriter@1ed0d0c6 [JmsXA] Bound connection factory for resource adapter 'JMS Adapter' to JNDI name 'java:/JmsXA' Is this in any way related to my troubles? Esp. the message about not setting config property for Driver, Password and Username. I am using the CD example in JBoss with PostgreSQL and it works fine. Any ideas and/or help welcome - TIA! -- Sigurdur Reynisson [EMAIL PROTECTED] ps. pls forgive me if this is a common one (I did check the mailing list and came up with nothing) Horrible Exception: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'screens/Error' at org.apache.velocity.exception.VelocityException.init(VelocityException.java) at org.apache.velocity.exception.ResourceNotFoundException.init(ResourceNotFoundException.java) at org.apache.velocity.runtime.resource.ResourceManager.getResource(ResourceManager.java) at org.apache.velocity.runtime.Runtime.getTemplate(Runtime.java) at org.apache.velocity.app.Velocity.mergeTemplate(Velocity.java) rethrown as org.apache.turbine.util.TurbineException: Error rendering Velocity template: screens/Error: Unable to find resource 'screens/Error' at org.apache.turbine.util.TurbineException.init(TurbineException.java:177) at org.apache.turbine.services.velocity.TurbineVelocityService.renderingError(TurbineVelocityService.java:392) rethrown as org.apache.turbine.util.TurbineException: Error rendering Velocity template: screens/Error: Error rendering Velocity template: screens/Error: Unable to find resource