I am creating a spi to do my otp config
When I deploy it as a jar and call the url auth/realms/{{myream}}/OTPConfig/otp/{{myusername}}
I get
Caused by: java.lang.ClassNotFoundException: org.keycloak.utils.TotpUtils from [Module "deployment.otp-config-spi-1.0-SNAPSHOT.jar" from Service Module Loader]
I then package and deploy as a war which includes the required dependencies and it deploys successfully but the same url fails with 404
My id is public static final String ID = "OTPConfig";
I have also seen the following error
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."keycloak-services-13.0.1.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "keycloak-services-13.0.1.jar"
I need this jar as I am using import org.keycloak.utils.TotpUtils;
It might be that the "error": "HTTP 404 Not Found" is not the actual issue?
Thanks
Go with the JAR instead of WAR and add a dependency to your JAR's META-INF/MANIFEST.MF file like this:
Manifest-Version: 1.0
Dependencies: org.keycloak.keycloak-services
Sealed: true
Related
The structure of EAR is like this
EAR - Contains lmsweb.war and lmsEJB.jar
After deploying , when the application is trying to lookup at the bean, getting error as below
Unable to Get NamingException :javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "lms/lmsEJB/ejb/TestHome!com.lms.ejb.test.TestHome" [Root exception is java.lang.ClassNotFoundException: com.lms.ejb.test.TestHome from [Module "deployment.lms.ear.lmsWeb.war" from Service Module Loader]]
This class is inside the ejb module i.e., "deployment.lms.ear.lmsEJB.jar"
Can someone throw light on how to make the application look into the ejb module to get the class.
Oracle Jdeveloper (Version 11.1.1.6.0) building ADF application that generate PDF file using Apache FOP Library. My Application runs local web server. But when deploy in production server, below NoClassDefFoundError exception is showing and failing to generate PDF file.
Exception output:
<code>
javax.el.ELException: java.lang.NoClassDefFoundError: org/apache/avalon/framework/configuration/ConfigurationException
at com.sun.el.parser.AstValue.invoke(AstValue.java:191)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
...
...
Caused by: java.lang.NoClassDefFoundError: org/apache/avalon/framework/configuration/ConfigurationException
at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:153)
at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:177)
...
...
Caused by: java.lang.ClassNotFoundException: org.apache.avalon.framework.configuration.ConfigurationException
...
...
</code>
A NoClassDefFoundError with a caused by ClassNoFoundException points to a missing library on the server. Have you checked your deployment artifact (the EAR) if it contains all the needed FOP jars?
If all jars are part of the EAR (or better the WAR inside the EAR), you need to tell the Weblogic Server to load the jars from your deployment first before looking into jars already on the server. See https://tompeez.wordpress.com/2015/06/06/pitfalls-when-using-newer-versioned-libraries-than-shipped-with-jdeveloper-or-weblogic-server/ for more info on that.
I have WAR that I am deploying to a WildFly 10.0.0.CR5 server.
When the WAR is packaged, under WEB-INF/wsdl/dir/dir/ there is a WSDL, some XSD files, and an XMLSchema.dtd file. One of the XSDs, called xml.xsd, has the following at the top of the file:
<?xml version='1.0'?>
<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
When I deploy this WAR, it fails to deploy with the following exception:
Failed to start service jboss.deployment.unit."MyWar.war".INSTALL:
org.jboss.msc.service.StartException in service jboss.deployment.unit."MyWar.war".INSTALL:
WFLYSRV0153: Failed to process phase INSTALL of deployment "MyWar.war"
Caused by: java.lang.RuntimeException: JBWS024076: Service
{http://my.co.com/2011}MyService, cannot publish wsdl to:
/jboss/wildfly-10.0.0.CR5/standalone/data/wsdl/MyWar.war/dir/wsdl/MyWsdl.wsdl
Caused by: java.io.FileNotFoundException:
/jboss/wildfly-10.0.0.CR5/XMLSchema.dtd (No such file or directory)
Looking under /jboss/wildfly-10.0.0.CR5/standalone/data/wsdl/MyWar.war/dir/wsdl, I don't see the XMLSchema.dtd file, but it is included in the WAR that I'm trying to deploy in the standalone/deployments folder.
Removing the <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" > line fixes the issue, but I'm looking for a solution where I don't have to do that.
I try to configure FacesTrace in my Project (web dynamic project) in Eclipse and JSF 2.0.
I downloaded facetrace-1.0.1.jar and coppy it in web-inif/lib folder. And on my page index.xhtml I defined:
xmlns:ft="http://primefaces.prime.com.tr/facestrace"
an ad on the end of page I written
Bath I can not deployed project. Does anyone know something about it
supplement of the question:
deploy is failing=Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException:
Source Document: jar:file:/C:/GlassFish4/glassfish4/glassfish/domains/domain1/eclipseApps/MojAutoComplete/WEB-INF/lib/facestrace-1.1.0.jar!/META-INF/faces-config.xml
Cause: Class 'org.primefaces.facestrace.phase.listener.TraceResourcePhaseListener' is missing a runtime dependency: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log;. Please see server.log for more details.
I have a generated jax-ws web service client that runs fine when I run it as a java standalone project. However if I add it to a web application (war) deployed on JBoss 7.1.1 and call the web service it throws the following exception:
Caused by: java.lang.NoClassDefFoundError: com/ctc/wstx/io/DefaultInputResolver
at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:628)
at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:324)
at __redirected.__XMLInputFactory.createXMLStreamReader(__XMLInputFactory.java:139) [jboss-modules.jar:1.1.1.GA]
at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1176)
at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:104)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:795)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1626)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1493)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1401)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:648)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:461)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:364)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:317)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
at $Proxy189.getcodelists(Unknown Source)
Idea what I may be missing?
As the error says, the App server is unable to find the said class file. Is it possible in your standalone app your classpath has the library but JBoss AS 7 is unable to find it.
If you can isolate where this library is, you can either bundle it with your WAR file or create a jboss_module to satisfy the dependency.
Good luck!