I m getting an error when run on tomcat (NoSuchMethodError) - java

When I have run my codes on tomcat , getting an error like this;
Exception in thread "main" java.lang.NoSuchMethodError: com.sun.istack.logging.Logger.getLogger(Ljava/lang/Class;)Lcom/sun/istack/logging/Logger;
at com.sun.xml.ws.api.config.management.policy.ManagementAssertion.<clinit>(ManagementAssertion.java:87)
at com.sun.xml.ws.server.MonitorBase.createManagedObjectManager(MonitorBase.java:177)
at com.sun.xml.ws.client.Stub.<init>(Stub.java:196)
at com.sun.xml.ws.client.Stub.<init>(Stub.java:174)
at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:81)
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:602)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:344)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:326)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:308)
at javax.xml.ws.Service.getPort(Service.java:92)
at tr.com.ttnet.xmlns.services.ınquirecustomerovitreqabcs.ınquirecustomerovitreqabcs.InquireCustomerOvitReqABCSEp.getInquireCustomerOvitReqABCSPt(InquireCustomerOvitReqABCSEp.java:58)
at com.kafein.test.main(test.java:23)

Related

fabric crashes in intelij

all i did is setup the project and the mod id and that stuff and first time running i get this erorr
Exception in thread "main" org.spongepowered.asm.launch.MixinInitialisationError: Error initialising mixin config modid.mixins.json
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:153)
at org.spongepowered.asm.mixin.Mixins.createConfiguration(Mixins.java:100)
at org.spongepowered.asm.mixin.Mixins.addConfiguration(Mixins.java:87)
at net.fabricmc.loader.launch.common.FabricMixinBootstrap.addConfiguration(FabricMixinBootstrap.java:44)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at net.fabricmc.loader.launch.common.FabricMixinBootstrap.init(FabricMixinBootstrap.java:83)
at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:132)
at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: java.lang.IllegalArgumentException: The specified resource 'modid.mixins.json' was invalid or could not be read
at org.spongepowered.asm.mixin.transformer.MixinConfig.create(MixinConfig.java:1090)
at org.spongepowered.asm.mixin.transformer.Config.create(Config.java:148)
... 8 more
Make sure to change modid.mixins.json in your fabric.mod.json

I'm getting java.lang.NoSuchMethodError while initializing ConcurrentUpdateSolrClient object

I'm getting java.lang.NoSuchMethodError while initializing ConcurrentUpdateSolrClient object by calling
ConcurrentUpdateSolrClient _server = new ConcurrentUpdateSolrClient(url, 10, 4);
Jar files which I'm using are
httpcore-4.4.1.jar
httpclient-4.4.1.jar
The following error logged in console
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.util.VersionInfo.getUserAgent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/String;
at org.apache.http.impl.client.DefaultHttpClient.setDefaultHttpParams(DefaultHttpClient.java:184)
at org.apache.http.impl.client.DefaultHttpClient.createHttpParams(DefaultHttpClient.java:159)
at org.apache.http.impl.client.AbstractHttpClient.getParams(AbstractHttpClient.java:466)
at org.apache.solr.client.solrj.impl.HttpClientUtil.setFollowRedirects(HttpClientUtil.java:290)
at org.apache.solr.client.solrj.impl.HttpClientConfigurer.configure(HttpClientConfigurer.java:58)
at org.apache.solr.client.solrj.impl.HttpClientUtil.configureClient(HttpClientUtil.java:149)
at org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(HttpClientUtil.java:125)
at org.apache.solr.client.solrj.impl.HttpSolrClient.<init>(HttpSolrClient.java:188)
at org.apache.solr.client.solrj.impl.HttpSolrClient.<init>(HttpSolrClient.java:165)
at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.<init>(ConcurrentUpdateSolrClient.java:127)
at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.<init>(ConcurrentUpdateSolrClient.java:119)
at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.<init>(ConcurrentUpdateSolrClient.java:109)
at org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.<init>(ConcurrentUpdateSolrClient.java:102)
at com.etl.extract.ExtractData.<init>(ExtractData.java:34)
at com.etl.base.LaunchExtract.main(LaunchExtract.java:11)
Please let me know if anyone already faced this issue and resolved!
Thanks.

Web-service client on Websphere throws NullPointer on method calling

We've been using
jaxws-spring
WebSphere 8.5.5.2
for our web-services interactions, and now we get stuck with such "cause" when we call any web-method on the client-side -
ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause appServlet:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:948)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
.....
Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.createSystemException(MethodMarshallerUtils.java:1363)
at org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils.demarshalFaultResponse(MethodMarshallerUtils.java:1089)
at org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedMethodMarshaller.demarshalFaultResponse(DocLitWrappedMethodMarshaller.java:680)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.getFaultResponse(JAXWSProxyHandler.java:626)
....
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:946)
at org.apache.axis2.jaxws.message.databinding.JAXBUtils.getJAXBContext(JAXBUtils.java:445)
at org.apache.axis2.datasource.jaxb.JAXBDSContext.getJAXBContext(JAXBDSContext.java:228)
at org.apache.axis2.datasource.jaxb.JAXBDSContext.getJAXBContext(JAXBDSContext.java:161)
at org.apache.axis2.datasource.jaxb.JAXBDSContext.marshal(JAXBDSContext.java:396)
at org.apache.axis2.jaxws.message.databinding.impl.JAXBBlockImpl._outputFromBO(JAXBBlockImpl.java:189)
at org.apache.axis2.jaxws.message.impl.BlockImpl.outputTo(BlockImpl.java:371)
at org.apache.axis2.jaxws.message.impl.BlockImpl.serialize(BlockImpl.java:295)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:781)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:967)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:207)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:74)
Web-service client initialisation comes out with no any errors -
URL service_endpoint;
service_endpoint = new URL(endpoint);
service = new UDHandlersServiceImpl(service_endpoint, SERVICE_QNAME).getUDHandlersServiceImplPort();
NullPointerException occurs after calling any method of "service". And it doesn't even reach server side - because it doesn't have any logs there. Furthermore - such situation occurs only on the WebSphere - we deployed our client application on the Tomcat (server remained on websphere) and it worked fine. One more thing - SoapUI does not have any problems interacting with server side too.
We tried to switch classLoadings to parentLast for client application - with no success.
Also I can't even find sources for "org.apache.axis2.jaxws.message.databinding.JAXBUtils.getJAXBContext(JAXBUtils.java:445)". I googled it and didn't find this version of JAXBUtils. But even if i did, i think, it wouldnt be useful...
I hope someone can help us with that unobvious problem.
Thanks beforehand.
===== updated======
When we remove jaxb libraries from endorsed dir (or appServer/classes) problem seems to disappear but in case of arising webExceptions(faults) server throws
Caused by: java.lang.ClassCastException: com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible with com.sun.xml.bind.api.JAXBRIContext
at com.sun.xml.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:565)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:237)
and returns no answer to the client.
We've realized that our exceptions didn't contain 3 required methods -
//============required==================
public DocumentValidationException(String message, ErrorsBean errorsBean, Throwable cause) {
super(message, cause);
this.errorsBean = errorsBean;
}
public ErrorsBean getFaultInfo() {
return errorsBean;
}
public DocumentValidationException(String message, ErrorsBean errorsBean) {
super(message);
this.errorsBean = errorsBean;
}
//======================================
so, now it does.
And also we had some wrong target namespaces in it at the #WebFault annotations.
Here is the link with similar problem - https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014076927#77777777-0000-0000-0000-000014083314

Error in Hadoop Example

I am using hadoop1.1.1, while i am trying to execute wordcount example then i am getting eof exception while file in present on specified location.
Exception in thread "main" java.io.IOException: Call to
localhost/127.0.0.1:9100 failed on local exception:
java.io.EOFException
at org.apache.hadoop.ipc.Client.wrapException(Client.java:1144)
at org.apache.hadoop.ipc.Client.call(Client.java:1112)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
at $Proxy1.getProtocolVersion(Unknown Source)
at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:411)
at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:135)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:276)
at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:241)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1411)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1429)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:254)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:123)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:238)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.setInputPaths(FileInputFormat.java:352)
at WordCountDriver.main(WordCountDriver.java:32)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:848)
at org.apache.hadoop.ipc.Client$Connection.run(Client.java:786)
Please help.

Google App add contact error?

In my GAE app there is the following line :
ContactsService myService=new ContactsService("app-name");
It compiled fine, but when run, it cause the following error :
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.Iterators.forArray([Ljava/lang/Object;)Lcom/google/common/collect/UnmodifiableIterator;
at com.google.common.collect.ImmutableSet$ArrayImmutableSet.iterator(ImmutableSet.java:415)
at com.google.common.collect.ImmutableSet$ArrayImmutableSet.iterator(ImmutableSet.java:392)
at com.google.common.collect.ImmutableCollection$Builder.addAll(ImmutableCollection.java:317)
at com.google.common.collect.ImmutableList$Builder.addAll(ImmutableList.java:601)
at com.google.gdata.wireformats.AltFormat.<init>(AltFormat.java:183)
at com.google.gdata.wireformats.AltFormat.<init>(AltFormat.java:42)
at com.google.gdata.wireformats.AltFormat$Builder.build(AltFormat.java:457)
at com.google.gdata.wireformats.AltFormat.<clinit>(AltFormat.java:49)
at com.google.gdata.client.Service.<clinit>(Service.java:558)
at Test.ContactsExample.<init>(ContactsExample.java:102)
I've included guava-r09.jar, so it has the "ImmutableSet", if I don't included guava-r09.jar, it will say :
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableSet
What should I do ?
I found out why : don't need to include google-collect-*.jar, source of error.

Categories