8 Replies Latest reply on Sep 13, 2007 7:34 AM by Burr Sutter

    Can't login to jBPM console

    Bruno Unna Newbie

      I'm sorry if this is a foolish question, but I'm desperated.

      I think I've successfully installed JBossESB 4.2GA, but I'm unable to login to the jBPM console.

      The URL [http://localhost:8080/jbpm-console/] takes me to the usual console login screen, but none of the user/password combinations (manager/manager, user/user, etc.) do work.

      Before trying to login, the JBoss AS console shows:

      13:35:17,789 ERROR [STDERR] Sep 12, 2007 1:35:17 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/home/bruno/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25366jbpm-console-exp.war/WEB-INF/lib/jbpm4jsf.jar!/META-INF/tfl-compat.taglib.xml
      13:35:17,848 ERROR [STDERR] Sep 12, 2007 1:35:17 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/home/bruno/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25366jbpm-console-exp.war/WEB-INF/lib/gravel.jar!/META-INF/gravel-data.taglib.xml
      13:35:17,868 ERROR [STDERR] Sep 12, 2007 1:35:17 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/home/bruno/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25366jbpm-console-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
      13:35:17,891 ERROR [STDERR] Sep 12, 2007 1:35:17 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/home/bruno/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25366jbpm-console-exp.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
      13:35:17,910 ERROR [STDERR] Sep 12, 2007 1:35:17 PM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
      INFO: Added Library from: jar:file:/home/bruno/jboss-4.2.1.GA/server/default/tmp/deploy/tmp25366jbpm-console-exp.war/WEB-INF/lib/gravel.jar!/META-INF/gravel-compat.taglib.xml
      


      And some other lines of the like. I haven't put much attentions to those, tough...

      At the moment I try to login, the JBoss AS console shows this:

      13:40:50,346 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
      java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
       at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
       at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
       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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
       at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
       at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
       at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
       at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:603)
       at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:537)
       at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
       at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
       at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      


      and the browser shows:

      Error
      Login failed. Invalid user name or password.


      The Quickstart samples bpm_orchestration1 and bpm_orchestration2 seem to work all right (except for the fact that the second one didn't print the message '[SchemaExport] schema export complete' to the console).

      During execution of the bpm_orchestrationX samples, I used the HSQL Database Manager to see the jBPM's Hypersonic database, and I saw the creation of records for the process definitions, for the process instances, and so on. But the tables JBPM_ID_USER, JBPM_ID_GROUP and JBPM_ID_MEMBERSHIP are always empty.

      Using the same DB tool I inserted records to table JBPM_ID_USER, as indicated in jBPM's User Guide. To no avail, at all.

      The file called 'hibernate.cfg.xml' in directory 'jbpm.esb' contains the following lines, clearly uncommented:

      <mapping resource="org/jbpm/identity/User.hbm.xml"/>
      <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
      <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
      


      My environment:

      bruno@golden:~$ uname -a
      Linux golden 2.6.20-16-generic #2 SMP Fri Aug 31 00:55:27 UTC 2007 i686 GNU/Linux
      bruno@golden:~$ java -version
      java version "1.5.0_11"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
      


      Any help will be *greatly* appreciated.

        • 1. Re: Can't login to jBPM console
          Bruno Unna Newbie

          Oops, I forgot to indicate the versions I'm using of the software!

          * I am using JBoss AS 4.2.1.GA, but tried with 4.2.0.GA as well, making no difference.

          * I'm using JBossESB 4.2GA.

          Once again, thanks in advance for any help. Best regards.

          • 2. Re: Can't login to jBPM console
            Kevin Conner Master

            I think this may be related to the following task

            http://jira.jboss.com/jira/browse/JBESB-972

            • 3. Re: Can't login to jBPM console
              Bruno Unna Newbie

              Given the task's description, I would agree, but I'm not sure what I'm supposed to do with the two files given as attachments in the issue.

              I tried copying them into directory ${JBOSS_AS}/server/default/data (replacing the previous ones), generating no change.

              I tried changing file ${JBOSS_AS}/server/default/deploy/jbpm.esb from

              <property name="hibernate.hbm2ddl.auto">create</property>
              


              to

              <property name="hibernate.hbm2ddl.auto">update</property>
              


              in order to avoid the recreation of the data base. But it looks like I'm out of luck.

              I tried using the HSQL Database Manager for the interpretation of the lines in file jbpmDB.script, but I wasn't able to do so. Besides, at this point I believe the problem in general is less related to the DB's contents than it is related to the application's configuration. Of course, I'm not sure of that...

              Ideas? TIA.

              • 4. Re: Can't login to jBPM console
                Burr Sutter Master

                There is at least one more trick (I can't remember the Jira number now). Make sure the jbpm-console.war file you have in the jbpm.esb folder does NOT include the jbpm jars (2 of them) yet again. Open that war and delete them.

                This also causes a regeneration of the database.


                • 5. Re: Can't login to jBPM console
                  Bruno Unna Newbie

                  Thanks for the prompt answers. However, the problem still persists.

                  After deleting WEB-INF/lib/jbpm-jpdl.jar and WEB-INF/lib/jbpm-identity.jar from file jbpm-console.war (in directory ${JBOSSESB_DIR}/lib/jbpm.esb), I performed an "ant deploy" in directory ${JBOSSESB_DIR}/install. I revised the resulting file ${JBOSSAS_DIR}/server/default/deploy/jbpm.esb/jbpm-console.war and I'm sure it doesn't contain the jbpm-*.jar files.

                  Now, as I start up JBoss AS, I get this (new) error:

                  17:54:36,291 ERROR [[/jbpm-console]] Servlet /jbpm-console threw load() exception
                  java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
                   at java.lang.Class.getDeclaredConstructors0(Native Method)
                   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
                   at java.lang.Class.getConstructor0(Class.java:2671)
                   at java.lang.Class.newInstance0(Class.java:321)
                   at java.lang.Class.newInstance(Class.java:303)
                   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1104)
                   at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
                   at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4069)
                   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4373)
                   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
                   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
                   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                   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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
                   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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                   at org.jboss.web.WebModule.startModule(WebModule.java:83)
                   at org.jboss.web.WebModule.startService(WebModule.java:61)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy46.start(Unknown Source)
                   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                   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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                   at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                   at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
                   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy47.start(Unknown Source)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                   at java.lang.reflect.Method.invoke(Method.java:585)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy4.start(Unknown Source)
                   at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                   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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy5.deploy(Unknown Source)
                   at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                   at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                   at org.jboss.Main.boot(Main.java:200)
                   at org.jboss.Main$1.run(Main.java:508)
                   at java.lang.Thread.run(Thread.java:595)
                  


                  Nonetheless, the jbpm console still appears in the browser, and behaves just the same as it did before. Even after I added the required records to table JBPM_ID_USER.

                  I find it worth noting the exception thrown by the application when I try to login:

                  18:00:26,106 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
                  java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
                   at org.jboss.security.auth.spi.Util.loadProperties(Util.java:315)
                   at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
                   at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
                   at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
                   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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:756)
                   at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
                   at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
                   at java.security.AccessController.doPrivileged(Native Method)
                   at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
                   at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
                   at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:603)
                   ...
                  


                  It looks, IMHO, as if jBPM is not trying to use the identity mechanism provided by means of the DB tables, but otherwise. What do you think?

                  Once again, thank you and best regards.

                  • 6. Re: Can't login to jBPM console
                    Burr Sutter Master

                    Yes. I get the classnotfoundexception for the FileUpload thing as well. I'm not sure how to correct that at this time.

                    However, the other problem is related to the required update to the login-config.xml in server\default\conf:

                    <application-policy name = "jbpm">
                     <authentication>
                     <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
                     flag="required">
                     <module-option name="dsJndiName">java:/JbpmDS</module-option>
                     <module-option name="principalsQuery">
                     SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
                     </module-option>
                     <module-option name="rolesQuery">
                     SELECT g.NAME_ ,'Roles'
                     FROM JBPM_ID_USER u,
                     JBPM_ID_MEMBERSHIP m,
                     JBPM_ID_GROUP g
                     WHERE g.TYPE_='security-role'
                     AND m.GROUP_ = g.ID_
                     AND m.USER_ = u.ID_
                     AND u.NAME_=?
                     </module-option>
                     </login-module>
                     </authentication>
                     </application-policy>
                    


                    This was documented in the Jira tasks related to all of this.

                    http://jira.jboss.com/jira/browse/JBESB-735
                    http://jira.jboss.com/jira/browse/JBESB-890
                    http://jira.jboss.com/jira/browse/JBESB-972



                    • 7. Re: Can't login to jBPM console
                      Bruno Unna Newbie

                      Well, it works! Thank you very much for all your help.

                      A couple of observations, however:

                      First: when I shutdown JBossAS, I get this lines in the console:

                      12:08:53,705 INFO [Server] Runtime shutdown hook called, forceHalt: true
                      12:08:53,705 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
                      12:08:53,708 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
                      12:08:53,708 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
                      12:08:53,708 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
                      12:08:53,721 INFO [Update] Unbinding JNDI name: topic/org.jboss.soa.esb.transformation.Update
                      12:08:53,748 INFO [TomcatDeployer] undeploy, ctxPath=/jbpm-console, warUrl=.../tmp/deploy/tmp28022jbpm-console-exp.war/
                      12:08:53,814 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JbpmDS' from JNDI name 'java:JbpmDS'
                      12:08:54,014 INFO [HypersonicDatabase] Database standalone closed clean
                      12:08:54,375 INFO [JDBCDataStore] Generated token 'authToken:5576B0D0-61E1-11DC-B0D0-8426B02244C7' for user: 'jbossesb/JBoss ESB User'
                      12:08:54,424 INFO [DeleteBindingFunction] Publisher 'jbossesb' deleted BindingTemplate with key: C7E03340-61E0-11DC-B340-A1D2F387868C
                      12:08:54,543 INFO [JDBCDataStore] Generated token 'authToken:558E7E90-61E1-11DC-BE90-D070D74FF63C' for user: 'jbossesb/JBoss ESB User'
                      12:08:54,551 INFO [DeleteBindingFunction] Publisher 'jbossesb' deleted BindingTemplate with key: C7C7F050-61E0-11DC-B050-AEA3BE34588F
                      12:08:54,559 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JBossESBDS' from JNDI name 'java:JBossESBDS'
                      12:08:54,699 INFO [STDOUT] [Server@199f9eb]: Initiating shutdown sequence...
                      12:08:54,700 INFO [HypersonicDatabase] Database remote closed clean
                      12:08:54,703 INFO [DataCollectorQueue] Unbinding JNDI name: queue/DataCollectorQueue
                      12:08:54,707 INFO [DeadMessageQueue] Unbinding JNDI name: queue/DeadMessageQueue
                      12:08:54,758 INFO [TomcatDeployer] undeploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                      12:08:54,800 INFO [TomcatDeployer] undeploy, ctxPath=/contract, warUrl=.../tmp/deploy/tmp28003contract-exp.war/
                      12:08:54,802 INFO [STDOUT] [Server@199f9eb]: Shutdown sequence completed in 103 ms.
                      12:08:54,802 INFO [STDOUT] [Server@199f9eb]: 2007-09-13 12:08:54.802 SHUTDOWN : System.exit() was not called
                      12:08:54,808 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' from JNDI name 'java:JmsXA'
                      12:08:54,820 INFO [testTopic] Unbinding JNDI name: topic/testTopic
                      12:08:54,831 INFO [securedTopic] Unbinding JNDI name: topic/securedTopic
                      12:08:54,833 INFO [testDurableTopic] Unbinding JNDI name: topic/testDurableTopic
                      12:08:54,837 INFO [testQueue] Unbinding JNDI name: queue/testQueue
                      12:08:54,839 INFO [A] Unbinding JNDI name: queue/A
                      12:08:54,842 INFO [B] Unbinding JNDI name: queue/B
                      12:08:54,844 INFO [C] Unbinding JNDI name: queue/C
                      12:08:54,846 INFO [D] Unbinding JNDI name: queue/D
                      12:08:54,849 INFO [ex] Unbinding JNDI name: queue/ex
                      12:08:54,858 INFO [DLQ] Unbinding JNDI name: queue/DLQ
                      12:08:54,863 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' from JNDI name 'java:DefaultDS'
                      12:08:56,014 INFO [HypersonicDatabase] Database standalone closed clean
                      12:08:56,037 INFO [JuddiRMIService] Unbinding juddi services
                      12:08:56,040 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
                      12:08:56,040 ERROR [JDBCExceptionReporter] You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
                      12:08:56,041 ERROR [JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
                      org.hibernate.exception.GenericJDBCException: Cannot open connection
                       at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
                       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
                       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
                       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
                       at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
                       at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
                       at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
                       at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
                       at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
                       at org.jbpm.persistence.db.DbPersistenceService.beginTransaction(DbPersistenceService.java:131)
                       at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:123)
                       at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354)
                       at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
                       at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
                       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
                      Caused by: org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
                       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
                       at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
                       at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
                       ... 10 more
                      Caused by: javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.
                       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:387)
                       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
                       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                       ... 12 more
                      12:08:56,046 INFO [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=juddiDB' from JNDI name 'java:juddiDB'
                      12:08:56,073 INFO [MailService] Mail service 'java:/Mail' removed from JNDI
                      12:08:56,083 INFO [TomcatDeployer] undeploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
                      12:08:56,272 INFO [Http11Protocol] Pausing Coyote HTTP/1.1 on http-127.0.0.1-8080
                      12:08:56,272 INFO [AjpProtocol] Pausing Coyote AJP/1.3 on ajp-127.0.0.1-8009
                      12:08:57,274 INFO [StandardService] Stopping service jboss.web
                      12:08:57,302 INFO [Http11Protocol] Stopping Coyote HTTP/1.1 on http-127.0.0.1-8080
                      12:08:57,304 INFO [AjpProtocol] Stopping Coyote AJP/1.3 on ajp-127.0.0.1-8009
                      12:08:57,307 INFO [TomcatDeployer] undeploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
                      12:08:57,309 INFO [TomcatDeployer] undeploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
                      12:08:57,311 INFO [TomcatDeployer] undeploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp27951jbossws-context-exp.war/
                      12:08:57,315 INFO [TomcatDeployer] undeploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
                      12:08:57,586 INFO [HypersonicDatabase] Database standalone closed clean
                      12:08:58,091 INFO [TransactionManagerService] Stopping recovery manager
                      12:08:58,270 INFO [Server] Shutdown complete
                      Shutdown complete
                      Halting VM
                      


                      Where the errors at 12:08:56,040 and at 12:08:56,041 are new. Of course, by this moment I'm supposed to have done everything I must do, but anyway... I don't feel comfortable with errors.

                      Second: I lose the records in the identity tables, no matter what I do. Every time I start up JBossAS I must run these queries using the HSQL DB Manager:

                      insert into jbpm_id_user (id_, class_, name_, email_, password_) values (1, 'U', 'user', 'user@sample.domain', 'user');
                      insert into jbpm_id_user (id_, class_, name_, email_, password_) values (2, 'U', 'manager', 'manager@sample.domain', 'manager');
                      insert into jbpm_id_user (id_, class_, name_, email_, password_) values (3, 'U', 'admin', 'admin@sample.domain', 'admin');
                      insert into jbpm_id_user (id_, class_, name_, email_, password_) values (4, 'U', 'shipper', 'shipper@sample.domain', 'shipper');
                      insert into jbpm_id_group (id_, class_, name_, type_) values (1, 'G', 'sales', 'organisation');
                      insert into jbpm_id_group (id_, class_, name_, type_) values (2, 'G', 'admin', 'security-role');
                      insert into jbpm_id_group (id_, class_, name_, type_) values (3, 'G', 'user', 'security-role');
                      insert into jbpm_id_group (id_, class_, name_, type_) values (4, 'G', 'hr', 'organisation');
                      insert into jbpm_id_group (id_, class_, name_, type_) values (5, 'G', 'manager', 'security-role');
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (1, 'M', 2, 4);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (2, 'M', 3, 4);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (3, 'M', 4, 4);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (4, 'M', 4, 3);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (5, 'M', 1, 3);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (6, 'M', 2, 3);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (7, 'M', 3, 3);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (8, 'M', 3, 2);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (9, 'M', 2, 2);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (10, 'M', 2, 5);
                      insert into jbpm_id_membership (id_, class_, role_, user_, group_) values (11, 'M', 'boss', 2, 1);
                      insert into jbpm_id_membership (id_, class_, user_, group_) values (12, 'M', 1, 1);
                      


                      It is worth mentioning, by the way, that these are significantly more than those listed in the jBPM user's guide (groups and memberships are included).

                      As mentioned above I changed file ${JBOSS_HOME}/server/default/deploy/jbpm.esb/hibernate.cfg.xml to make it include this line:

                      <property name="hibernate.hbm2ddl.auto">validate</property>
                      


                      But it made no difference at all.

                      Certainly the criticality of these issues is far less than before, but knowing how to deal with them will undoubtedly give me a much greater insight.

                      Once again, thank you for your help.

                      • 8. Re: Can't login to jBPM console
                        Burr Sutter Master

                        I added these Jiras for the exceptions (I've seen them before):
                        http://jira.jboss.com/jira/browse/JBESB-1035
                        http://jira.jboss.com/jira/browse/JBESB-1037

                        When we finish off the proper integration of the jBPM Admin Console into the ESB then this should all be addressed.

                        Concerning your new/current issue of losing the identity tables, I don't have that problem and I think I followed all of the notes that I've put in the various jiras around this topic.
                        http://jira.jboss.com/jira/browse/JBESB-735
                        But if you search for Jira's posted by me "Burr Sutter" with "jbpm" in the topic you'll see there is/was a lot of back and forth on this item. It has been a little tricky to track down and resolve.