I'm getting the below exception when I invoke java.time.LocalDateTime.now() all of a sudden continuously.
The same code was working fine before.
Can somebody please let me know what could be the reason? Thanks in advance.
Exception:
java.lang.NoClassDefFoundError: Could not initialize class java.time.zone.ZoneRulesProvider
at java.time.ZoneRegion.ofId(ZoneRegion.java:120)
at java.time.ZoneId.of(ZoneId.java:411)
at java.time.ZoneId.of(ZoneId.java:359)
at java.time.ZoneId.of(ZoneId.java:315)
at java.util.TimeZone.toZoneId(TimeZone.java:556)
at java.time.ZoneId.systemDefault(ZoneId.java:274)
at java.time.Clock.systemDefaultZone(Clock.java:178)
at java.time.LocalDateTime.now(LocalDateTime.java:180)
at com.bosch.itrams.ccm.dependentmods.TelephonyFixDetection.handleEvent(TelephonyFixDetection.java:112)
at com.prosyst.mbs.impl.services.event.HandlerWrapper.deliverEvent(HandlerWrapper.java:430)
at com.prosyst.mbs.impl.services.event.EventAdminImpl.deliverEvent(EventAdminImpl.java:482)
at com.prosyst.mbs.impl.services.event.ASynchQueue.run(ASynchQueue.java:124)
at com.prosyst.mbs.impl.services.core.threads.tpt.threadpool.ExecutorImpl.run(ExecutorImpl.java:221)
Related
I am using an external jetty version 9.4.35.v20201120. I am getting this error in my Eclipse. Not sure why! Researched a lot but not able to fix it. Can any help here?
Exception in thread "main" java.lang.IllegalStateException: No Method: <Call name="addBefore"><Arg name="addBefore" type="java.lang.String">org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Arg><Arg><Array type="java.lang.String"><Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item></Array></Arg></Call> on class org.eclipse.jetty.webapp.Configuration$ClassList
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:950)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:515)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:945)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:515)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:431)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:364)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.configure(Jetty9LauncherMain.java:85)
at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.configure(AbstractJettyLauncherMain.java:144)
at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:75)
at net.sourceforge.eclipsejetty.starter.jetty9.Jetty9LauncherMain.main(Jetty9LauncherMain.java:42)
Caused by: java.lang.NoSuchMethodException: addBefore
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:987)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.call(XmlConfiguration.java:942)
... 9 more
Many people have asked for help with this error:
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
at
org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
at
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:152)
at
javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
...
But no request I can find ever provides a conclusive answer. Just suggestions to tinker with jars.
I believe that’s because there’s an inconsistency in the structure of Jboss interfaces. Can anyone confirm or correct that?
Here’s my code that throws the above error:
final private Properties env = new Properties() {
{put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
put(Context.PROVIDER_URL, "http-remoting://localhost:9990");
put(Context.SECURITY_PRINCIPAL, "myID");
put(Context.SECURITY_CREDENTIALS, "myPassword");
put("jboss.naming.client.ejb.context", true);
}
};
/****************************************************
* myID & myPassword open the Admin GUI for wildfly *
* on localhost:9990 *
****************************************************/
Context ctx = new InitialContext(this.env);
To determine the required jars I removed all jars from the Build path.
Then I ran my program till all ClassNotFoundException were gone.
First Error
java.lang.ClassNotFoundException:
org.jboss.naming.remote.client.InitialContextFactory]
Added jboss-remote-naming-1.0.7.final.jar to class path
Second Error
java.lang.NoClassDefFoundError:
org/jboss/logging/Logger
Added jboss-logging.jar
Third Error
java.lang.NoClassDefFoundError:
org/xnio/Options
Added xnio-api-3.0.7.ga.jar
Fourth Error
java.lang.NoClassDefFoundError:
org/jboss/remoting3/spi/ConnectionProviderFactory
Added jboss-remoting-3.jar
Fifth Error
java.lang.NoClassDefFoundError:
org/jboss/ejb/client/EJBClientContextIdentifier
Added jboss-ejb-client-1.0.19.final.jar
FINAL AND FATAL ERROR
(Note: All NoClassDefFoundError have been cleared)
java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
Using Eclipse’s Project Explorer I verified:
a. jboss-remoting3.jar has the org.jboss.remoting3.Remoting Class.
b. That Remoting Class has this Method:
public Endpoint createEndpoint (String, Executor, OptionMap)
Note it calls for 3 parameters.
BUT the FINAL FATAL ERROR above calls for
public Endpoint createEndpoint (String, OptionMap)
Note: it calls for 2 parameters. Hence the NoSuchMethodError.
Looking at the top lines in the stack trace, I guess
org.jboss.naming.remote.client.InitialContextFactory.getInitialContext() is trying to call org.jboss.remoting3.Remoting.createEndpoint() using 2 parameters, but org.jboss.remoting3.Remoting only defines createEndpoint() with a 3-paramater signature.
Is that supposed to even be possible?
A jar that says it has the org.jboss.remoting3 package whose Remoting class has a single createEndpoint() method with a 3-parameter signature, and another jar that says it has the org.jboss.remoting3 package whose Remoting class has another createEndpoint() method with a 2-parameter signature?
HELP!
I mean do I need to look through every org.jboss.remoting3 package to find one whose Remoting class has a 2 parameter createEnpoint() method?
Or am I missing something important.
I mean this does explain how many questions have been posted about this error:
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
And explain why there is never a conclusive explanation or solution other than fiddling with jars and build path.
I mean getting an InitialContext from WildFly running on the same PC as the Java program should be a trivial process. But it hasn’t been. Maybe it's because of inconsistencies in the API.
Thanks to Christoph Böhme:
jboss-logging-3.1.4.GA.jar has an org.jboss.remeoting package with a Remoting class that has createEndpoint() with a 0, 2 and 3 parameter signature.
Replacing jboss-remoting-4.0.7.Final.jar with the above jar was all it required to clear the NoSuchMethodError.
Hope that helps others.
Getting Following strange exception
weblogic.jms.commom.JMSException:[JMSClientExceptions:055115]Error deserialising an object
Caused by: java.lang.ClassNotFoundException: com.my.TestClass
To my surprise , this is not happening for all invocation/Transactions. Sometimes deserialisation happens with no issue and sometimes i'm facing this issue.
If its related to class path, then I should be getting this error on constant basis but the case here is quit strange. Any help highly appreciated.
When I invoke method on client side, for distributed reference object, I have this message error:
Exception in thread "main" org.omg.CORBA.BAD_OPERATION:
at org.omg.CORBA.portable.ObjectImpl._get_delegate(ObjectImpl.java:18)
at org.omg.CORBA.portable.ObjectImpl._is_local(ObjectImpl.java:130)
at fr.esiag.commun._ManageDemandStub.createDemand(_ManageDemandStub.java
:28)
at fr.esiag.commun.resource.MyInvocationHandler.invoke(MyInvocationHandl
er.java:29)
at com.sun.proxy.$Proxy0.createDemand(Unknown Source)
at org.TD.TransactionDriver.main(TransactionDriver.java:55)
Can someone tell me what that means ?
BAD_OPERATION expception happens when you try to call a method that dosen't exist in the servant. I think you cast (instead of narrow) the remote object wrong. Maybe it's is relative to your previous question
I am trying to load a ready rapidminer model through netbeans...The whole application seems to be running fine except when i get an error at this line of code:
IOContainer ioResult = process.run();
**ExampleSet resultSet = (ExampleSet) ioResult.getElementAt(0);**
ExampleTable mytable = resultSet.getExampleTable();
The error is this one...
com.rapidminer.Process run
INFO: Process C:\Users\Antonis\.RapidMiner5\repositories\Local Repository\yo.rmp finished successfully after 0 s
**Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.rapidminer.operator.learner.bayes.SimpleDistributionModel cannot be cast to com.rapidminer.example.ExampleSet**
I don't know how to handle this...If you could please help me find a way to make it work...I am trying to fix it and i feel that i am sooo close...!!! thank you in advance for your ideas and time!!!