I am printing logs on both sides Client and Server sides, but I cannot see
any error that would help me find out why after Shiro login, the Server side
is not reachable anymore. Please see below the error caught in the Client
side after Shiro login and the Sever is not reachable anymore. It's the
content of <app_name>_main.html mentioned in shiro.ini > shiro.loginUrl

For logging, I'm using the following Loggers:
- For the client side: com.allen_sauer.gwt.log.client.Log 
- For the server side: org.apache.log4j.Logger


A few questions:
1. Would shiro print OTHER messages, aside from the ones that my application
is already printing?
2. If so, do I need to add anything else to the log4j.properties (see
below)?
3. Do I need to add anything else to shiro.ini to make logs visible?



================================
log4j.properties
================================
# Do not inherit appenders from the root logger.
log4j.additivity.default=false

# Set root logger level and attach zero or more appenders.
log4j.rootLogger=DEBUG, file

# Set up the file appender.
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.Name=<application_name>Logger
log4j.appender.file.File=<path-to-log-file>.log
log4j.appender.file.MaxFileSize=2MB
log4j.appender.file.MaxBackupIndex=25
log4j.appender.file.ImmediateFlush=true
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%-6p%d{DATE} - %C{1}.%M:%L -
%m%n

# Default Shiro logging
log4j.logger.org.apache.shiro=DEBUG
#log4j.logger.org.apache.shiro.realm.text.PropertiesRealm=INFO
#log4j.logger.org.apache.shiro.cache.ehcache.EhCache=INFO
#log4j.logger.org.apache.shiro.io=INFO
#log4j.logger.org.apache.shiro.web.servlet=INFO
log4j.logger.org.apache.shiro.util.ThreadContext=INFO




================================
shiro.ini
================================

[main]

# authorization paths
shiro.loginUrl = /<app_name>_main.html

#Sha256 encryption
credentialsMatcher =
org.apache.shiro.authc.credential.Sha256CredentialsMatcher
credentialsMatcher.storedCredentialsHexEncoded = false
credentialsMatcher.hashIterations = 1024

# Oracle DataSource JNDI Remote Connection (Production)
ds = org.apache.shiro.jndi.JndiObjectFactory  
ds.requiredType = javax.sql.DataSource  
ds.resourceName = jdbc/dbConnectionDS

# JDBC Realm Setup
jdbcRealm = <path_to_app>.server.auth.CustomJdbcRealm

jdbcRealm.permissionsLookupEnabled = true
jdbcRealm.dataSource = $ds
jdbcRealm.credentialsMatcher = $credentialsMatcher

### SQL Queries, Modified and System Default
# User Query
jdbcRealm.authenticationQuery = SELECT password, salt FROM <users_table>
WHERE user_id = ?

# User Roles
jdbcRealm.userRolesQuery = SELECT lab_id FROM <users_table> WHERE user_id =
?

# User Permissions
jdbcRealm.permissionsLookupEnabled = false

# Set Security Manager Properties
cookie = org.apache.shiro.web.servlet.SimpleCookie
cookie.name = <session_name>.session
cookie.path = /;
#sessionValidationScheduler =
org.apache.shiro.session.mgt.ExecutorServiceSessionValidationScheduler
#sessionValidationScheduler.interval = 180000
sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO
sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
sessionManager.sessionDAO = $sessionDAO
sessionManager.sessionIdCookie = $cookie
# Session timeout in msec...currently 15 mins
sessionManager.globalSessionTimeout = 900000
#sessionManager.sessionValidationScheduler = $sessionValidationScheduler
securityManager = <path_to_app>.server.auth.UniquePrincipalSecurityManager
securityManager.sessionManager = $sessionManager
cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
securityManager.cacheManager = $cacheManager
securityManager.realms = $jdbcRealm

[users]


[roles]


[urls]

/<app_name>_main.html = authc
/logout = logout
/<app_name>/FileUploadServlet = authc
/<app_name>/FileDownloadServlet = authc
/<app_name>/UserUnloadServlet = authc
/<app_name>/soa_service = authc
/<app_name>/data_update = authc
/<app_name>/data_view = authc
/<app_name>/load_lists = authc
/<app_name>/error_services = authc
/<app_name>/query_db = authc




================================
Error caught on Client side after 
Shiro login and 
Sever not being reachable anymore.
It's the content of <app_name>_main.html mentioned in shiro.ini >
shiro.loginUrl
================================


caught: <html>
  <head>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <link type=&quot;text/css&quot; rel=&quot;stylesheet&quot;
href=&quot;&lt;app_name>_main.css">    
    <title>application_name</title>
    <script type=&quot;text/javascript&quot;
src=&quot;&lt;app_name>/<app_name>.nocache.js"></script>
        <script type=&quot;text/javascript&quot;
src=&quot;&lt;app_name>/UnloadUser.js"></script>    
  </head>
  
  <body>
        
        <div id="main_container"></div>
  

    
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position:absolute;width:0;height:0;border:0"></iframe>
    
    
    <noscript>
      <div>
        Your web browser must have JavaScript enabled
        in order for this application to display correctly.
      </div>
    </noscript>
    


  </body>
  
</html>
 from StaticListsService_Proxy.getLabs
cause: null
StackTrace:
Unknown.Sc(<app_name>-0.js),Unknown.Kd(<app_name>-0.js),Unknown.new
TZ(<app_name>-0.js),Unknown.b3(<app_name>-0.js),Unknown.vj(<app_name>-0.js),Unknown.Jj(<app_name>-0.js),Unknown.eval(<app_name>-0.js),Unknown.ie(<app_name>-0.js),Unknown.le(<app_name>-0.js),Unknown.eval(<app_name>-0.js)




--
Sent from: http://shiro-user.582556.n2.nabble.com/

Reply via email to