How to solve it?? I installed Java 7 and this occured when starting tomcat which has my application. I think the problem is based on my application. (
Tomcat 7 run successfully before. I installed java 7 and uninstall java 6 after this installation problem occured)
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/m.apus]]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/m.apus]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
... 7 more
Caused by: java.lang.NoClassDefFoundError: javax/ejb/FinderException
at java.lang.Class.getDeclaredFields0(Native Method)org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
... 21 more
Edit
LifecycleException ocurred before I installed Java 7. I think this exception is not based on that. But I don't know why I encounter this exception.
Use Java EE libraries, there's files needed to support EJB. You've got java.lang.NoClassDefFoundError for the class that is in the library that implements Java EE specification. The file you you need is javax.ejb.jar from version 6 Java EE default reference implementation. Supply Java EE libraries with your Java web applications. Initially Tomcat has not support for EJB.
Tomcat 7 is not a (full) Java EE container. It is "just" a servlet/JSP server.
If you need EJBs, you'll need a full-fledged Java EE server such as Glassfish or JBoss
Related
I have my application deployed on wildfly 15 and drool dependency of version 5.1.1.
After upgrading to JDK 11, I am facing the following issue.
Caused by: java.lang.RuntimeException: wrong class format
at test.ear//org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:260)
at test.ear//org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:204)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:102)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:851)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:1016)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.getExactMethod(BinaryTypeBinding.java:771)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.getExactMethod(SourceTypeBinding.java:840)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.Scope.findExactMethod(Scope.java:893)
at test.ear//org.eclipse.jdt.internal.compiler.lookup.Scope.getImplicitMethod(Scope.java:1952)
at test.ear//org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:400)
at test.ear//org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:314)
at test.ear//org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:314)
at test.ear//org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:186)
at test.ear//org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:447)
at test.ear//org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:189)
at test.ear//org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:406)
at test.ear//org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1131)
at test.ear//org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1219)
at test.ear//org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:528)
at test.ear//org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:759)
at test.ear//org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:464)
at test.ear//org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:351)
at test.ear//org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
at test.ear//org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:389)
at test.ear//org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:56)
at test.ear//org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:74)
at test.ear//org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:677)
at test.ear//org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:640)
at test.ear//org.drools.compiler.PackageBuilder.addPackageFromXml(PackageBuilder.java:307)
at test.ear//org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:467)
at test.ear//org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at test.ear.integration-engine.jar//com.test.generator.xdrl.DroolsXdrlGenerator.xmlToPackage(DroolsXdrlGenerator.java:334)
at test.ear.integration-engine.jar//com.test.generator.xdrl.DroolsXdrlGenerator.buildRule(DroolsXdrlGenerator.java:277)
at test.ear.integration-engine.jar//com.test.generator.xdrl.DroolsXdrlGenerator.generate(DroolsXdrlGenerator.java:210)
at test.ear.integration-engine.jar//com.test.generator.xdrl.DroolsXdrlGenerator.generate(DroolsXdrlGenerator.java:121)
... 67 more
Caused by: org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at test.ear//org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:372)
at test.ear//org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:254)
... 104 more
I am not getting any clue how to approach the issue? Is it like i need to upgrade the version of drool?
Whereas it is working fine in jdk 8.
I am using Java 12, JMeter 5.1.1 on Ubuntu 9.0.4 and bumps into the following exception when trying to send HTTP/2 request:
Response code: Non HTTP response code: java.util.concurrent.ExecutionException
Response message: Non HTTP response message: java.lang.IllegalStateException: No Client ALPNProcessors!
And this stack trace in the response body:
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:68)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:278)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:115)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.IllegalStateException: No Client ALPNProcessors!
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:54)
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
JMeter 5.1.1 comes with jetty-alpn-client-9.4.9.v20180320.jar by default.
I then download the jetty alpn java client library from http://central.maven.org/maven2/org/eclipse/jetty/jetty-alpn-java-client/ and put that into jmeter installed lib/ folder and results in this exception:
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory
at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:68)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:278)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:138)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:115)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/alpn/client/ALPNClientConnectionFactory
at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
... 1 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:436)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 8 more
I switched to Java 11 but get the same error.
Any advice and insight is appreciated.
No Client ALPNProcessors! is a message from the Jetty libraries that handle ALPN.
Because you are running in JDK 12 (and I don't think there is any big difference with JDK 11, so JDK 12 should be fine), you must have the jetty-alpn-java-client jar in the classpath, so that the Jetty libraries will find an implementation of the ALPNProcessor.Client class (via the ServiceLoader mechanism) that, as the error shows, cannot be found.
You don't detail how you are setting up TLS, etc. and I would have expected JMeter to have the jetty-alpn-java-client jar in the classpath already, but evidently there is something wrong in your setup (or in JMeter's).
I would double check how JMeter configures TLS; if it is using the standard JDK implementation, then it must have the jetty-alpn-java-client jar in the classpath.
If JMeter is using other TLS implementations (e.g. Conscrypt), then the Jetty project provides similar libraries (e.g. jetty-alpn-conscrypt-client jar) that similarly should be in the classpath.
JMeter 5 doesn't officially support Java 12
JMeter 5.0 officially requires Java 8 or 9, although later versions may be unofficially compatible. From our internal testing, JMeter will run on Java 11
Also in JMeter group announcement:
JMeter 5.0 is tested on Java 8 to 10, Java 11 should also work.
Notice also Java 12 isn't Long-Term-Support release
Java SE 11 however is an LTS release, and therefore Oracle Customers will receive Oracle Premier Support and periodic update releases, even though Java SE 12 was released
Solution: Download http://central.maven.org/maven2/org/eclipse/jetty/jetty-alpn-java-client/ and put in the installed jmeter lib/ folder. JMeter only comes installed with jetty-alpn-client which is not enough.
I am deploying a WAR file to JBoss EAP 7.2.2. During deployment, I am getting
"Caused by: java.lang.IllegalArgumentException: Unable to load generated mapper class com.amadeus.jcp.services.ttr.display.structured.builder.response.selma.mapper.offer.DisplayTripCartResponseOfferQuotationMapperSelmaGeneratedClass"
which is caused by "Caused by: java.lang.ClassNotFoundException: com.amadeus.jcp.services.ttr.display.structured.builder.response.selma.mapper.offer.DisplayTripCartResponseOfferQuotationMapperSelmaGeneratedClass"
It is a selma generated class and available in a jar inside WEB-INF/lib.
Same WAR file is deploying successfully in JBoss EAP 7.1.
As per class loader hierarchy, it should be identified but not happening.
Anybody have any idea of this issue, please help.
Verified standalone.xml and jboss-deployment-structure.xml. Using same version before and after migration except for name space version upgrade to subsystems.
Using Java 1.8.0_191
I would like to upgrade to JSF 2.3 on an Jboss EAP 7.
I followed this guide:
https://docs.jboss.org/author/display/WFLY10/JSF+Configuration#JSFConfiguration-ConfiguringaJSFapptouseanondefaultJSFimplementation
I splitted the JSF 2.3 jar following this guide:
How to install one jar variant of JSF (javax.faces.jar) on WildFly
However, when I start EAP 7 I get this error:
2017-04-30 12:55:00,280 WARN (JSFDependencyProcessor.java:75) = WFLYJSF0005: Unknown JSF version 'mojarra-2.3.0'. Default version 'mojarra-2.3.0' will be used instead.
2017-04-30 12:55:00,281 ERROR (ServiceControllerImpl.java:1955) = MSC000001: Failed to start service jboss.deployment.unit."monitoring.war".DEPENDENCIES: org.jboss.msc.service.StartException in service jboss.deployment.unit."monitoring.war".DEPENDENCIES: WFLYSRV0153: Failed to process phase DEPENDENCIES of deployment "monitoring.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0014: Default JSF implementation slot 'mojarra-2.3.0' is invalid
at org.jboss.as.jsf.deployment.JSFDependencyProcessor.deploy(JSFDependencyProcessor.java:80)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
Does anybody successfully upgraded EAP 7 to JSF 2.3?
I made a mistake by misreading the place where to put all the needed jars.
For instance, the module javax.faces.api I put in the folder:
EAP_HOME/modules/system/layers/base/javax/faces/api/JSF_IMPL
Instead, it needed to go to:
EAP_HOME/modules/javax/faces/api/JSF_IMPL.
It was specified like this in the guide, but for other modules (Oracle JDBC Driver...) I needed to put stuff directly under the base folder. Apparently, for JSF, this needs to be in the root of the modules folder...
Now it is loaded correctly and, when I use LOG.info(FacesContext.class.getPackage().getImplementationVersion()); it prints 2017-05-02 08:59:47,872 INFO (Web.java:66) = 2.3.0
I keep getting that exception when I run JBoss. I'm in the process of migrating an application from JBoss 4.2.3 to JBoss 5.
First I had to migrate from Spring 2.5 to Spring 3.0.3, then from spring-jpa to spring-orm due to exceptions I was getting and solutions I found on google.
But now I've got that one and I'm not able to solve it. I'm also using Hibernate 3.5.4 Final.
This is the exception:
Caused by: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at org.hibernate.cfg.AnnotationConfiguration.applyHibernateValidatorLegacyConstraintsOnDDL(AnnotationConfiguration.java:443)
... 106 more
There might be a conflict between Hibernate versions, as JBoss 5+ comes bundled with Hibernate. Make sure that you only have one version of Hibernate in your server (check the /lib dir).