I am trying to build my quarkus project but it is giving me below expectation, as I am new to it I am not getting exactly what is the problem. Please help me out, I have tried many thing like excluding but nothing works.
2021-02-22 17:36:59,100 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#registerBeans threw an exception: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at java.base/sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:336)
at java.base/sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:269)
at java.base/java.util.jar.JarVerifier.processEntry(JarVerifier.java:273)
at java.base/java.util.jar.JarVerifier.update(JarVerifier.java:230)
at java.base/java.util.jar.JarFile.initializeVerifier(JarFile.java:759)
at java.base/java.util.jar.JarFile.getInputStream(JarFile.java:840)
at io.quarkus.bootstrap.classloading.JarClassPathElement$1$1$1.apply(JarClassPathElement.java:123)
at io.quarkus.bootstrap.classloading.JarClassPathElement$1$1$1.apply(JarClassPathElement.java:118)
at io.quarkus.bootstrap.classloading.JarClassPathElement.withJarFile(JarClassPathElement.java:161)
at io.quarkus.bootstrap.classloading.JarClassPathElement.access$100(JarClassPathElement.java:35)
at io.quarkus.bootstrap.classloading.JarClassPathElement$1$1.getData(JarClassPathElement.java:118)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResourceAsStream(QuarkusClassLoader.java:332)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.getResourceAsStream(QuarkusClassLoader.java:353)
at io.quarkus.arc.processor.BeanArchives.index(BeanArchives.java:259)
That sounds like you have a signed jar in your dependencies. When this jar is packed in your jar, java cannot verify it. You have to exclude this jar and use it via classpath.
Maybe you also find some useful information in this post: Invalid signature file digest for Manifest main attributes exception while trying to run jar file
Related
Can you please help me with following error I'm facing in WAS9 environment:
In order to resolve the import
org.apache.cxf.binding.soap.SoapHeader
I added the following dependencies in my pom.xml:
cxf-api-2.7.7
cxf-rt-bindings-soap-2.7.7
But when I'm trying to run my application, I'm getting the following error.
Default Executor-thread-7] ([ ]) Controllerclass - org.apache.cxf.bus.extension.ExtensionException
at org.apache.cxf.bus.extension.Extension.load(Extension.java:222)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:199)
at org.apache.cxf.bus.extension.ExtensionManagerImpl.initialize(ExtensionManagerImpl.java:118)
at org.apache.cxf.bus.extension.ExtensionManagerBus.doInitializeInternal(ExtensionManagerBus.java:147)
at org.apache.cxf.bus.CXFBusImpl.initialize(CXFBusImpl.java:191)
at com.ibm.ws.jaxws.bus.LibertyApplicationBusFactory.createBus(LibertyApplicationBusFactory.java:119)
at com.ibm.ws.jaxws.bus.LibertyApplicationBusFactory.createClientScopedBus(LibertyApplicationBusFactory.java:86)
at com.ibm.ws.jaxws.metadata.JaxWsClientMetaData.<init>(JaxWsClientMetaData.java:28)
at com.ibm.ws.jaxws.metadata.JaxWsModuleMetaData.getClientMetaData(JaxWsModuleMetaData.java:123)
at com.ibm.ws.jaxws.support.JaxWsMetaDataManager.getJaxWsClientMetaData(JaxWsMetaDataManager.java:84)
at com.ibm.ws.jaxws.support.JaxWsMetaDataManager.getJaxWsClientMetaData(JaxWsMetaDataManager.java:123)
at com.ibm.ws.jaxws.client.LibertyProviderImpl.createServiceDelegate(LibertyProviderImpl.java:56)
at javax.xml.ws.Service.<init>(Service.java:57)
Caused by: java.lang.InstantiationException:org.apache.cxf.bus.osgi.OSGIBusListener
at java.lang.Class.newInstance(Class.java:427)
at org.apache.cxf.bus.extension.Extension.load(Extension.java:218)
Caused by: java.lang.NoSuchMethodException:org.apache.cxf.bus.osgi.OSGIBusListener.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
The server where your WAS9 has been deployed has different version of the above jar file. You need to have same version of jar files both in your eclipse where you have developed your codes and the server where you are deploying the war or ear.
mavan dependency file pom.xml is used during your project compilation. It might add the jar in your binary under lib folder as well. But WAS9 might considering the one which is in server's CLASSPATH. Hence check your class path and replace that jar with the one which you have mentioned in your pom.xml file. Hope that will fix your issue.
We can eliminate this exception by adding webProfile-7.0 in our server.xml, but how ever this is not working with javaee-7.0 not sure, if one knows about how to handle this in javaee-7.0 please share your approach.
I followed this tutorial to use the streaming-analytic service in Bluemix to interface with message-hub: https://developer.ibm.com/bluemix/2015/10/16/streaming-analytics-message-hub-2/?cm_mc_uid=45284031179414585919178&cm_mc_sid_50200000=1464112496
I am getting an error:
Caused by: org.apache.kafka.common.KafkaException:
javax.security.auth.login.LoginException: unable to find LoginModule
class: com.ibm.messagehub.login.MessageHubLoginModule
Thanks
Regarding the error, it seems that you are missing following class: com.ibm.messagehub.login.MessageHubLoginModule.
Check this step from tutorial:
First add the following jars to the opt/downloaded directory of the
messaging toolkit.
jackson-core-2.5.4.jar
messagehub.login-1.0.0.jar
According to this you can check if messagehub.login-1.0.0.jar is included in your .sab file:
To help application and toolkit developers understand which files are
included in an application bundle file, you can use the spl-app-info
command. For example, the following command lists the toolkits
included in the bundle, and the files within those toolkits that are
included in the bundle.
spl-app-info output/MyApp.sab --files
If it is missing, add it in /lib folder.
Summary: I have a very basic Java 1.8 and Spring 4.0.5 project, I'm using Maven 3.2.3 to manage it. Maven exec cannot seem to see my Spring context, even though it appears to me that it is in the classpath.
My spring context is in
<project root>/src/main/resources/spring/ch2-beans.xml
and I load it using:
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("/spring/ch2-beans.xml");
after a "mvn clean compile" I see
<project root>/target/classes/spring/ch2-beans.xml
and when I run:
mvn -X exec:java -Dexec.mainClass="com.wiley.beginning.spring.ch2.Main"
I see the following debug output which makes me think the classpath is indeed correct:
[DEBUG] Collected project classpath [/Users/me/Documents/workspace/BeginningSpring/chapter2/spring-book-ch2/target/classes]
[DEBUG] Adding to classpath : file:/Users/me/Documents/workspace/BeginningSpring/chapter2/spring-book-ch2/target/classes/
Yet I get the following error:
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/ch2-beans.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/ch2-beans.xml] cannot be opened because it does not exist
Can anyone point me in the direction of sorting this out? What I've posted above is the result of many different attempts to solve this, and I'm stumped by the error when it certainly appears that the file path should be in the classpath, so perhaps this is something that has changed since I last coded (a while ago..). Thanks!
Update..
Thinking that it might be some classpath issue with exec:java I ran the same code inside a unit test, executed within maven. Same error. I've also tried loading the xml file as "classpath:/spring/ch2-beans.xml", did not fix it.
There was a hyphen in the file name of the Spring configuration I was trying to load, and it appears that the classloader won't accept that. Hyphens are illegal in identifier names in Java, apparently this applies also to external resources.
Once I removed the hyphen from the xml file name, it was found.
On a related note, I'm pretty annoyed with the "Beginning Spring" book example which uses these hyphenated names.
I am trying to build a EAR file which contains my EJB modules. The project build works perfectly but when I try to deploy publish and deploy it in server I always get the following exception. Can anyone let me know if this an eclipse IDE issue. Is there any setting to be changed to make this work. All my other team mates were able to get this running but I couldn't.
Error processing annotations: ."
weblogic.application.ModuleException: Exception preparing module: EJBModule(AdvanceSearch.jar)
An error occurred while reading the deployment descriptor. The error was:
Error processing annotations: .
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:447)
at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:188)
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:83)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
Truncated. see log file for complete stacktrace
Caused By: weblogic.application.AnnotationProcessingException: [EJB:015002]Unable to load class services.AdvanceSearchBean in Jar D:\LISModel\AdvanceSearch\build\classes : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'services.AdvanceSearchBean'
at weblogic.ejb.spi.EJBJarUtils.getIdentityAnnotatedClasses(EJBJarUtils.java:129)
at weblogic.ejb.container.deployer.ModuleExtensionContextImpl.getAnnotatedClasses(ModuleExtensionContextImpl.java:64)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptor(EjbDescriptorReaderImpl.java:352)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptor(EjbDescriptorFactory.java:78)
at weblogic.ejb.container.deployer.EJBMetadataHandler.loadDescriptors(EJBMetadataHandler.java:150)
Truncated. see log file for complete stacktrace
It looks like there is a mismatch in class services.AdvanceSearchBean and how this is referenced in the deployment descriptor of module AdvanceSearch.jar. Maybe check consistency of referenced packages.
I having the below code in static method of my main class -
appContext = new ClassPathXmlApplicationContext(new String[] {
"classpath*:/META-INF/spring.xml",
"classpath*:contractbatchupdate-application-context.xml"
});
All the dependencies are specified by Maven. I am trying to run this class in eclipse as a java application and it is throwing the below error. I can see the jar file in the repository that is specified in the path listed in the error.
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/C:/Users/892893/.m2/repository/com/test/contract/Contract-Client/1.0-SNAPSHOT/Contract-Client-1.0-SNAPSHOT.jar!/META-INF/spring.xml]; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider weblogic.xml.jaxp.RegistryDocumentBuilderFactory not found
You might see it in Maven, but the class loader doesn't see it in the CLASSPATH. Believe the exception - check your assumptions. That JAR isn't in the CLASSPATH.
Open up your .classpath file and check if the jar has gotten into your Project . You could also check this in Java-build-path --> Libraries in your eclipse . See your dependency has gotten into the .M2 folder . Check these all out . If the Jar dependency is in the pom and not in your classpath , do a mvn clean eclipse:eclipse, refresh classpath , do a eclipse - project-clean(Build automatically checked) and try .