jBPM Login Failed: Not Authorized: All of the pre-defined users dont work - drools

I am trying to use the Business-Central/Workbench module. Followed the instructions as provided in the [Getting Started][1] of jBPM. I tried with all the pre-defined logins. Nothing works.
It throws
I also tried to look into the application-roles.properties and application-users.properties files. Both seems to be empty (only comments).
The error is something like:
ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /business-central/rest/controller/server/sample-server: java.lang.NoClassDefFoundError: java/security/acl/Group
...
...
...
Caused by: java.lang.ClassNotFoundException: java.security.acl.Group from [Module "org.picketbox" from local module loader #2c07545f (finder: local module finder #e57b96d (roots: /Users/abcd/EclipseProjects/Drools_Workbench/jbpm-server-7.43.1.Final-dist/modules,/Users/abcd/EclipseProjects/Drools_Workbench/jbpm-server-7.43.1.Final-dist/modules/system/layers/base))]

Finally figured out the issue. It is:
java.lang.NoClassDefFoundError: java/security/acl/Group
This pointed to an incompatible JDK. I downgraded from JDK14 to JDK11.

Related

Why is the geoserver server status via web administration interface not displayed correctly/accessible?

I'm using geoserver-2.20.3.war together with Apache Tomcat/9.0.36 on Linux. Everything works as it should but if i try to access the server status via the web administration interface i only get Error messages. I can't really figure out the problem and how to fix it.
`HTTP Status 500 – Internal Server Error
Type Exception Report
Message Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
Beschreibung The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.InternalError: java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.NullPointerException
java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
...
I tried to find a similar issue but unfortunately did not stumble over something really helpful.
I found a solution! The problem were missing fonts. After following these very helpful steps by Andreas Ahlenstorf and installing the font-package dejavu-fonts on linux everything works fine.

WFLYNAM0027 : ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory

Enviornment- wildfly-9.0.2.Final, EJB 3.0
Following error occurred while trying to connect Test.java class(deployed as module at wildfly-9.0.2.Final#machine-A) to EJB whilch is deployed on jboss at machine-B(291.861.301.732).
17:02:46,666 ERROR [stderr] (default task-1) javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.ear.test.war:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.test.ear.test.war:main" from Service Module Loader]]
17:02:46,667 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:118)
17:02:46,667 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)
17:02:46,670 ERROR [stderr] (default task-1) at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
17:02:46,670 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:89)
17:02:46,670 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:43)
17:02:46,687 ERROR [stderr] (default task-1) Caused by: java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.test.ear.test.war:main" from Service Module Loader]
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
Test.java class is present in testclient.jar & testclient.jar has been deplyed as a module using command
module add --name=testclient --resources=/Downloads/lib/test/client/testclient.jar --dependencies=javax.api
Test.java class
package com.testmodule.pojo;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
public class Test {
public void getDbConnection(){
try{
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,"remote://291.861.301.732:4447");
jndiProps.put(Context.SECURITY_PRINCIPAL, "testuser");
jndiProps.put(Context.SECURITY_CREDENTIALS, "testpassword");
jndiProps.put("jboss.naming.client.ejb.context", true);
Context context = new InitialContext(jndiProps);
}
catch(Exception e){e.printStackTrace();}
}}
why this error has been occurred, For visiblity of 'org.jboss.naming.remote.client.InitialContextFactory' to testclient.jar, should i have to add more dependencies(currently only javax.api) while deploying testclient.jar as a module? or any other issue which is causing error? Class 'org.jboss.naming.remote.client.InitialContextFactory' is also present in $WILDFLY_HOME/bin/client/jboss-client.jar
Note - 291.861.301.732 is the remote system ip, on which ejb is deployed at jboss. ,This ejb is invoking from Test.java(remote client) using JNDI.
There is no jnp in wildfly-9.0.2.Final(which was in JBOSS 5.x), so i replaced property "org.jnp.interfaces.NamingContextFactory" to value org.jboss.naming.remote.client.InitialContextFactory". why still error is occurred?
Following has been added after receving comment 'Try putting jboss-client.jar in the runtime path, as part of WEB-INF/lib maybe' by 'Sampada Wagde'
I am not able to understand, In this scenarion test.jsp (present in test.ear-->test.war-->test.jsp) file is calling function getDbConnection of Test.java file. Test.java file is present in testclient.jar and this testclient.jar has been deployed as a module.
As per your suggestion, when i put 'jboss-client.jar' in test.ear-->test.war-->WEB-INF-->lib, problem was solved, now while accessing
application 'org.jboss.naming.remote.client.InitialContextFactory' ClassNotFound exception was not occurred...But my problem is that there are multiple war's files(Eg..test.war,test1.war,test2.war) and each war file is accessing Test.java file(present in testclient.jar), so i have to put 'jboss-client.jar' file in WEB-INF/lib of each war archive. which will be very complex for me, is there any other approach available? and secondly how this problem is solved by putting 'jboss-client.jar' into WEB-INF/lib direcory as 'org.jboss.naming.remote.client.InitialContextFactory' is present in testclient.jar(Not in test.ear-->test.war).
Following has been added after receving reply 'jboss-client.jar is required by the server at runtime...' by 'Sampada Wagde'
I also tried following steps
1. By putting 'jboss-deployment-structure.xml' in test.ear-->META-INF-->jboss-deployment-structure.xml
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<module name="testclient" export="true" />
<module name="jboss-client" export="true" />
</dependencies>
</deployment>
Deploying module name as
module add --name=jboss-client --resources=/Downloads/wildfly-9.0.2.Final/bin/client/jboss-client.jar
but still the following error occurred.
14:14:34,376 WARN [org.jboss.modules] (default task-1) Failed to define class org.jboss.naming.remote.client.InitialContextFactory in Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:269)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:77)
at org.jboss.modules.Module.loadModuleClass(Module.java:560)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
Caused by: java.lang.NoClassDefFoundError: javax/naming/spi/InitialContextFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
Caused by: java.lang.ClassNotFoundException: javax.naming.spi.InitialContextFactory from [Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
14:14:34,391 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /test/test.jsp: javax.servlet.ServletException: java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:777)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
Caused by: java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:269)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:77)
at org.jboss.modules.Module.loadModuleClass(Module.java:560)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
Caused by: java.lang.NoClassDefFoundError: javax/naming/spi/InitialContextFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
Caused by: java.lang.ClassNotFoundException: javax.naming.spi.InitialContextFactory from [Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
jboss-client.jar is required by the server at runtime. There are several ways of providing jars to a JBoss server -
include jars in MANIFEST.MF (this is generally used for your own application jars)
include jars in WEB-INF/lib - if the jar is specific to the given web project or WAR
include jars in a module class loader and provide it to the web project via jboss-deploymet-structure.xml . This is done when there are multiple WARS and some of them (not all) need the jars.
include jars in a module class loader and provide it to the server via global modules in standalone.xml . This is done when the jars are being referenced by all applications deployed on the server.
For details on modules in JBoss, please refer to this link -
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
As to your question on how putting the jboss-client.jar in a WAR instead of testclient.jar is resolving the issue, the answer is the same - this is how class loading works.
You need to make your own module depend on a module that contains not only the jboss-client jar, but also all the dependencies of jboss-client, this might just be other modules or possibly other jars too. The first class it's moaning about being missing is javax/naming/spi/InitialContextFactory so edit the module.xml for the jboss-client module to depend on javax.api

WSConfig adding BouncyCastleProvider fails

I'm seeing the following log statement if i turn the loglevel to debug:
|DEBUG|service thread 1-15|ws.security.WSSConfig||The provider FirstProvider was added at position: 3
|DEBUG|service thread 1-15|security.util.Loader||org.bouncycastle.jce.provider.BouncyCastleProvider from [Module "org.jboss.as.webservices.server.integration:main" ...
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:252)
at org.apache.ws.security.util.Loader.loadClass(Loader.java:245)
at org.apache.ws.security.WSSConfig.addJceProvider(WSSConfig.java:868)
at org.apache.ws.security.WSSConfig$5.run(WSSConfig.java:446)
at org.apache.ws.security.WSSConfig$5.run(WSSConfig.java:443)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.ws.security.WSSConfig.init(WSSConfig.java:443)
at org.jboss.wsf.stack.cxf.config.CXFStackConfig.<init>(CXFStackConfigFactory.java:61)
at org.jboss.wsf.stack.cxf.config.CXFStackConfigFactory.getStackConfig(CXFStackConfigFactory.java:45)
at org.jboss.ws.common.management.AbstractServerConfig.create(AbstractServerConfig.java:272)
at org.jboss.as.webservices.config.ServerConfigImpl.create(ServerConfigImpl.java:62)
at org.jboss.as.webservices.service.ServerConfigService.start(ServerConfigService.java:72)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
|DEBUG|service thread 1-15|ws.security.WSSConfig||The provider SecondProvider was added at position: 8
This happens because of the WSS4J library. I am wondering if i need to take any action. If i understand it correctly 2 providers have been added but adding the bouncycastle fails. I know that i could add the bc libs to jboss or jre but is this really necessary? The fact that it is "only" a debug statement makes me also wonder if it is necessary. Maybe somebody knows what this actually means and can help me.
WSS4J attempts to install the BouncyCastle provider if it is available, and logs that DEBUG level error if it is not (this behaviour will change in the next major release). There is nothing to worry about if you don't require BouncyCastle to be installed.

Error when starting JBoss

Get the below error when starting the JBoss. Tried reuploading the jars, wars and the modules. Wasn't of much help.
Starting jboss-as: Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.10)
at __redirected.__JAXPRedirected.initAll(__JAXPRedirected.java:87)
at org.jboss.modules.Module$1.run(Module.java:85)
at org.jboss.modules.Module$1.run(Module.java:72)
at java.security.AccessController.doPrivileged(libgcj.so.10)
at org.jboss.modules.Module.<clinit>(Module.java:72)
at java.lang.Class.initializeClass(libgcj.so.10)
at org.jboss.modules.Main.main(Main.java:255)
Caused by: java.lang.IllegalArgumentException: Problem configuring DatatypeFactory
at __redirected.__DatatypeFactory.<clinit>(__DatatypeFactory.java:70)
at java.lang.Class.initializeClass(libgcj.so.10)
...7 more
Caused by: javax.xml.datatype.DatatypeConfigurationException: java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
at javax.xml.datatype.DatatypeFactory.newInstance(libgcj.so.10)
at __redirected.__DatatypeFactory.<clinit>(__DatatypeFactory.java:62)
...8 more
Caused by: java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
at java.lang.Class.forName(libgcj.so.10)
at javax.xml.datatype.DatatypeFactory.newInstance(libgcj.so.10)
...9 more
I solved the above issue by updating Java. I was using java 1.5 I updated to java 1.7.xx. I am not getting the Error any more, also my application works fine.
I am curious to know what causes this issue, If anyone could answer this it will be helpful

JBoss Application Server 7.0.1 deploy with unexpected error

Please help i cant get this to deploy. i've searched for it but no answer found as JBOSS AS7 is new. im trying to deploy war file into remote server.
SEVERE [org.springframework.web.context.ContextLoader] (MSC service thread 1-9) Context initialization failed: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/jboss/virtual/VirtualFileVisitor
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) [spring-beans-3.0.2.RELEASE.jar:]
Caused by: java.lang.NoClassDefFoundError: org/jboss/virtual/VirtualFileVisitor
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:348) [spring-core-3.0.2.RELEASE.jar:]
Caused by: java.lang.ClassNotFoundException: org.jboss.virtual.VirtualFileVisitor from [Module "deployment.ProTurism.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
almost same error oer here. few seconds later
00:51:19,379 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ProTurism]] (MSC service thread 1-9) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/jboss/virtual/VirtualFileVisitor
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) [spring-beans-3.0.2.RELEASE.jar:]
Caused by: java.lang.NoClassDefFoundError: org/jboss/virtual/VirtualFileVisitor
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:348) [spring-core-3.0.2.RELEASE.jar:]
Caused by: java.lang.ClassNotFoundException: org.jboss.virtual.VirtualFileVisitor from [Module "deployment.ProTurism.war:main" from Service Module Loader]
I don't know much about Spring really, but maybe I can at least point you in a direction that would help. This blog post is a little old, but probably still relevant. There is also some information in the documentation.
I know I've see some stuff written about Spring on JBoss AS7 on community.jboss.org too. You might want to poke around there and see what you can't find.