[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-801) Strange exceptions when accessing a restricted page without being logged in
by Stephan Bublava (JIRA)
Strange exceptions when accessing a restricted page without being logged in
---------------------------------------------------------------------------
Key: JBSEAM-801
URL: http://jira.jboss.com/jira/browse/JBSEAM-801
Project: JBoss Seam
Issue Type: Bug
Components: Security
Affects Versions: 1.1.6.GA
Reporter: Stephan Bublava
Priority: Minor
When trying to access a restricted page without being logged in, Seam logs two strange exceptions and then redirects to the login page:
09:34:06,604 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
09:34:08,997 INFO [Pages] reading pages.xml
09:34:09,255 ERROR [SeamPhaseListener] uncaught exception
org.jboss.seam.security.NotLoggedInException: Error evaluating expression [#{s:hasPermission('/fee/*', 'render', null)}] - User not logged in
at org.jboss.seam.security.Identity.checkRestriction(Identity.java:169)
at org.jboss.seam.pages.Page.enter(Page.java:186)
at org.jboss.seam.core.Pages.enterPage(Pages.java:239)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:242)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:193)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:57)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:218)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
...
09:34:09,270 INFO [Exceptions] reading exception mappings from /WEB-INF/pages.xml
09:34:09,323 WARN [Interpolator] exception interpolating string: Error evaluating expression [#{s:hasPermission('/fee/*', 'render', null)}] - User not logged in
javax.faces.el.ReferenceSyntaxException: javax.el.ELException: Expression uses functions, but no FunctionMapper was provided
at com.sun.faces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:498)
at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:114)
at org.jboss.seam.core.Expressions$1.getFacesValueBinding(Expressions.java:71)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:53)
at org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.java:88)
at org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:67)
at org.jboss.seam.core.FacesMessages.createFacesMessage(FacesMessages.java:318)
at org.jboss.seam.core.FacesMessages$2.run(FacesMessages.java:222)
at org.jboss.seam.core.FacesMessages.runTasks(FacesMessages.java:132)
at org.jboss.seam.core.FacesMessages.afterPhase(FacesMessages.java:142)
at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:109)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:278)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
...
NotLoggedInException is declared in pages.xml:
<exception class="org.jboss.seam.security.NotLoggedInException">
<end-conversation />
<redirect view-id="/login.html" />
</exception>
I'm using Facelets 1.1.11 and JSF 1.2_03 (in case it makes a difference).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-538) Add the ability to regenerate the datasource
by gregorypierce (JIRA)
Add the ability to regenerate the datasource
--------------------------------------------
Key: JBSEAM-538
URL: http://jira.jboss.com/jira/browse/JBSEAM-538
Project: JBoss Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 1.1.0.CR1
Reporter: gregorypierce
Allows you to swap datasources from the current datasource to a new datasource. Why? Because many times I will develop using HSQL and then later want to move to another datasource. Note: You will also have to add overwrite="true" to the various copy tasks or else they won't overwrite the existing datasource files.
<target name="new-datasource">
<!-- define the datasource -->
<condition property="database.type.default" value="${database.type}">
<isset property="database.type"/>
</condition>
<property name="database.type.default" value="hsql"/>
<input addproperty="database.type.new"
message="What kind of database are you using? [${database.type.default}] "
validargs="hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb"
defaultvalue="${database.type.default}"/>
<!-- if the database type did not change, default to the previous values -->
<condition property="hibernate.dialect.default" value="${hibernate.dialect}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<condition property="hibernate.connection.url.default" value="${hibernate.connection.url}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="${hibernate.connection.driver_class}">
<equals arg1="${database.type}" arg2="${database.type.new}"/>
</condition>
<!-- otherwise default to the defaults for the database type -->
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.HSQLDialect">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.MySQLDialect">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.OracleDialect">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.PostgreSQLDialect">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SQLServerDialect">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.DB2Dialect">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.dialect.default" value="org.hibernate.dialect.SybaseDialect">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="org.hsqldb.jdbcDriver">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.mysql.jdbc.Driver">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="oracle.jdbc.driver.OracleDriver">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="org.postgresql.Driver">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.edb.Driver">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="COM.ibm.db2.jdbc.app.DB2Driver">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.connection.driver_class.default" value="com.sybase.jdbc2.jdbc.SybDriver">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:hsqldb:.">
<equals arg1="${database.type.new}" arg2="hsql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:mysql:///test">
<equals arg1="${database.type.new}" arg2="mysql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:oracle:thin:@localhost:1521:test">
<equals arg1="${database.type.new}" arg2="oracle"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:postgresql:template1">
<equals arg1="${database.type.new}" arg2="postgres"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:edb://localhost:5444/edb">
<equals arg1="${database.type.new}" arg2="enterprisedb"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:sqlserver://localhost">
<equals arg1="${database.type.new}" arg2="mssql"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:db2:test">
<equals arg1="${database.type.new}" arg2="db2"/>
</condition>
<condition property="hibernate.connection.url.default" value="jdbc:sybase:Tds:localhost:5000/test">
<equals arg1="${database.type.new}" arg2="sybase"/>
</condition>
<!-- finally, default them to HSQL -->
<property name="hibernate.dialect.default" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.connection.driver_class.default" value="org.hsqldb.jdbcDriver"/>
<property name="hibernate.connection.url.default" value="jdbc:hsqldb:."/>
<input addproperty="hibernate.dialect.new"
message="Enter the Hibernate dialect for your database [${hibernate.dialect.default}]"
defaultvalue="${hibernate.dialect.default}"/>
<property name="driver.jar" value="hsqldb.jar"/>
<input addproperty="driver.jar.new"
message="Enter the filesystem path to the JDBC driver jar [${driver.jar}]"
defaultvalue="${seamgen.home}/lib/${driver.jar}"/>
<input addproperty="hibernate.connection.driver_class.new"
message="Enter JDBC driver class for your database [${hibernate.connection.driver_class.default}]"
defaultvalue="${hibernate.connection.driver_class.default}"/>
<input addproperty="hibernate.connection.url.new"
message="Enter the JDBC URL for your database [${hibernate.connection.url.default}]"
defaultvalue="${hibernate.connection.url.default}"/>
<property name="hibernate.connection.username" value="sa"/>
<input addproperty="hibernate.connection.username.new"
message="Enter database username [${hibernate.connection.username}]"
defaultvalue="${hibernate.connection.username}"/>
<property name="hibernate.connection.password" value=""/>
<input addproperty="hibernate.connection.password.new"
message="Enter database password [${hibernate.connection.password}]"
defaultvalue="${hibernate.connection.password}"/>
<property name="database.exists" value="n"/>
<input addproperty="database.exists.new"
message="Are you working with tables that already exist in the database? [${database.exists}] "
validargs="y,n,"
defaultvalue="${database.exists}"/>
<propertyfile file="${user.dir}/project.properties">
<entry key="basepackage.name" value="${basepackage.name}" />
<entry key="project.name" value="${project.name}"/>
<entry key="project.home" value="${project.home}" />
<!-- package names -->
<entry key="action.package" value="${action.package}"/>
<entry key="model.package" value="${model.package}"/>
<entry key="test.package" value="${test.package}"/>
<!-- project database information -->
<entry key="database.type" value="${database.type.new}"/>
<entry key="database.exists" value="${database.exists.new}"/>
<entry key="hibernate.dialect" value="${hibernate.dialect.new}"/>
<entry key="hibernate.connection.driver_class" value="${hibernate.connection.driver_class.new}"/>
<entry key="hibernate.connection.url" value="${hibernate.connection.url.new}"/>
<entry key="hibernate.connection.username" value="${hibernate.connection.username.new}"/>
<entry key="hibernate.connection.password" value="${hibernate.connection.password.new}"/>
<entry key="driver.jar" value="${driver.jar.new}"/>
<entry key="eclipse.wtp" value="${eclipse.wtp.new}"/>
</propertyfile>
<property file="${user.dir}/project.properties" />
<property file="${seam.home}/seam.properties" />
<property file="${user.dir}/${project.name}/project.properties" />
<condition property="wtp">
<equals arg1="${eclipse.wtp}" arg2="y"/>
</condition>
<antcall target="file-copy" />
<echo message="Your project has been created." />
<echo message="Add the project from inside Eclipse (or type 'seam explode') and go to http://localhost:8080/${project.name}"/>
</target>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months