The error in matlab:Exception in thread "AWT-EventQueue-0" java.lang.​IllegalArg​umentExcep​tion: Comparison method violates its general contract - matlab

I started receiving an error in matlab, which prevents me to see the command window but does not prevent the code from executing. I attached all the error message below. I do not know why this is happening but I guess it started after I used "save" commands in the editor. I basically load data into the editor and then preprocess the data so that I can use them later, and I save the new data for future computations. Since when I started saving data, this problem has been initiated. Now, I can't stop matlab to produce this error every time I run any code. Can you please help me with this? I really appreciate that, thank you.
Original error:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(Unknown Source) at java.util.TimSort.mergeAt(Unknown Source) at java.util.TimSort.mergeCollapse(Unknown Source) at java.util.TimSort.sort(Unknown Source) at java.util.Arrays.sort(Unknown Source) at java.util.ArrayList.sort(Unknown Source) at java.util.Collections.sort(Unknown Source) at com.mathworks.widgets.grouptable.GroupingTableUtils.sortNonRecursively(GroupingTableUtils.java:296) at com.mathworks.widgets.grouptable.RowListTransactionTarget.finishTransaction(RowListTransactionTarget.java:115) at com.mathworks.widgets.grouptable.GroupingTableTransaction$1.run(GroupingTableTransaction.java:112) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) >>

Related

Cannot change space while agent is moving

I'm totally new to Anylogic (only learned it in 3 days). I have an agent which is moving between 2 nodes of a network. When the Fleet reaches the node, it needs to perform something (flowchart). In the flowchart, there is service where the agent location in the queue follows a path. Then I got the error below.
Exception during discrete event execution:
root.Fleet[0]:
Cannot change the space while agent is moving. Please call stop() method.
java.lang.RuntimeException: root.Fleet[0]:
Cannot change the space while agent is moving. Please call stop() method.
at com.anylogic.engine.Engine.error(Unknown Source)
at com.anylogic.engine.Agent.error(Unknown Source)
at com.anylogic.engine.Utilities.error(Unknown Source)
at com.anylogic.engine.AgentExtensionImpl.error(Unknown Source)
at com.anylogic.engine.gb.setSpace(Unknown Source)
at com.anylogic.engine.ExtAgentWithSpatialMetricsDelegate.setSpace(Unknown Source)
at com.anylogic.engine.Agent.setSpace(Unknown Source)
at com.anylogic.libraries.processmodeling.x.a(Unknown Source)
at com.anylogic.libraries.processmodeling.Wait.e(Unknown Source)
at com.anylogic.libraries.processmodeling.Wait$8.onEnter(Unknown Source)
at com.anylogic.libraries.processmodeling.InputBlock$1.b(Unknown Source)
at com.anylogic.libraries.processmodeling.InPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.InPort.receiveImmediately(Unknown Source)
at com.anylogic.libraries.processmodeling.InputBlock$1.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.b(Unknown Source)
at com.anylogic.libraries.processmodeling.OutPort.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock$2.a(Unknown Source)
at com.anylogic.libraries.processmodeling.OutputBlock$2.action(Unknown Source)
at com.anylogic.libraries.processmodeling.AsynchronousExecutor_xjal$a.execute(Unknown Source)
at com.anylogic.engine.LibraryEventHandler$a.execute(Unknown Source)
at com.anylogic.engine.Engine.h(Unknown Source)
at com.anylogic.engine.Engine.nj(Unknown Source)
at com.anylogic.engine.Engine$a.run(Unknown Source)
I tried agent.setEnvironment(node.getEnvironment()) but it's not working. Can someone tell me what I did wrong ?
Thanks.
Your agents are still moving while they arrive at the Service element. You should make sure they arrive first before changing their location in the service queue.

DocuSign : Getting connection timedout while using the Java program in the Demo site.

I am new to DocuSign.
Started trying with the basic Login authentication in Java. Used the code snippet in the below link.
http://iodocs.docusign.com/APIWalkthrough/getEnvelopeRecipientStatus#java
Getting the below exception.
Exception in thread "main" java.net.ConnectException: Connection timed out: conn
ect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewH
ttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unk
nown Source)
at GetEnvelopeInfo.main(GetEnvelopeInfo.java:56)
Tried to Ping the server address. got the same Request timed out error.
ping demo.docusign.net
Pinging demo.docusign.net.akadns.net [209.46.117.172] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Please help me out on this.
You might need to set the proxy information for your environment. The jvm parameters are http.proxyHost and http.proxyPort. It can be set by using
System.setProperty("http.proxyHost", "yourProxyHostname");

Remote EJB Call throws a java.lang.ClassNotFoundException

I am getting a following exception in the client, this exception comes very rarely though.
If the class is not found, then this error should come every time, but this error comes very rarely.
We have our swing application deployed on jboss 5.1 server.
We have two main components :
Client- The client code that communicates with the server and renders the Java Swing components.
Server- The server code responsible for sending the screen and event data to the client.
Client communicates with the server using a EJB Container.
Stacktrace :
java.lang.ClassNotFoundException: com.tools.project.server.CustomUtil
at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:179)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:84)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
at $Proxy3.invoke(Unknown Source)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
at $Proxy2.getMessagingBuffer(Unknown Source)
The error will only occur when the server sends an object to the client that references a com.tools.project.server.CustomUtil. Either add com.tools.project.server.CustomUtil to the client class loader or remove the reference from the server response.

Applet not working in Chrome,Firefox but working in IE

I know the subject is similar to some other questions available but none have given satisfactory solution.So here goes the question.I have an applet that works perfectly in IE but doesnt work in Chrome or Firefox.
The trace found in Java console is this:
Java Plug-in 10.25.2.17
Using JRE version 1.7.0_25-b17 Java HotSpot(TM) Client VM
java.security.AccessControlException: access denied ("java.net.SocketPermission" "www.w3.org:80" "connect,resolve")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at com.nwoods.jgo.svg.DefaultDocument.a(Unknown Source)
at com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc(Unknown Source)
at com.bea.dsp.oam.console.metadatabrowser.datalineage.LineageGraphApplet.start(LineageGraphApplet.java:53)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at com.nwoods.jgo.svg.DefaultElement.getAttribute(Unknown Source)
at com.nwoods.jgo.svg.DefaultDocument.buildJGoDoc(Unknown Source)
at com.nwoods.jgo.svg.DefaultDocument.SVGReadDoc(Unknown Source)
at com.bea.dsp.oam.console.metadatabrowser.datalineage.LineageGraphApplet.start(LineageGraphApplet.java:53)
at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The applet tag in the page is like this:
<applet width="100%" code="/LineageGraphApplet.class"archive="/DataLineageApplet.jar" style="border:0px" id="lineageapplet" MAYSCRIPT>
<param name="viewDocumentUrl" value="/generateDocument.do?mode=0"/>
</applet>
What could be the issue and how to resolve it?Similar questions have seen answers like open the port or seeing the applet work using applet viewer in conjugation with a security policy file granting all permissions or signing the jar.But I still was not able to make it work on Firefox?
I had a similar issue once - my applet was also running in IE but not in other browsers. However from the amount of information you have given it is difficult to tell. Do you use authentification (like FormLogin, BasicLogin etc) before one can access the applet? If so you can try the following:
Set (thus disable) the cookie-http-only to false.

NoSuchMethod exception when using scala Regex class... confused

I have a simple Scala project that runs without any problems inside Eclipse, however, when packaged into a .jar I receive this exception when running it:
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: scala.util.matching.Regex.replaceAllIn(Ljava/lang/CharSequence;Lscala/Function1;)Ljava/lang/String;
What is going on here?...
The code line in question, and the full stack are below.
This is the offending line:
"alt=\"[^>]+\">".r.replaceAllIn(inputStr, {_.replace(">", "/>")})
Full stack:
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: scala.util.matching.Regex.replaceAllIn(Ljava/lang/CharSequence;Lscala/Function1;)Ljava/lang/String;
at com.inosat.fuel.FuelStationDgge.fixhtml(FuelStationDgge.scala:40)
at com.inosat.fuel.FuelStationDgge.setDetails(FuelStationDgge.scala:82)
at com.inosat.fuel.DggeParser$$anon$1.propertyChange(DggeParser.scala:49)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at org.jdesktop.beans.AbstractBean.firePropertyChange(AbstractBean.java:302)
at org.jdesktop.http.async.AsyncHttpRequest.setReadyState(AsyncHttpRequest.java:705)
at org.jdesktop.http.async.AsyncHttpRequest.access$600(AsyncHttpRequest.java:79)
at org.jdesktop.http.async.AsyncHttpRequest$AsyncWorker.done(AsyncHttpRequest.java:831)
at javax.swing.SwingWorker$5.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
at sun.swing.AccumulativeRunnable.run(Unknown Source)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Found out what's wrong, Eclipse is using a scala-library.jar from:
C:\eclipse\configuration\org.eclipse.osgi\bundles
and for some reason the jar I copied from Scala's installation folder is not the same.
Fixed by using the same scala-library.jar that Eclipse is using.