I am learning android, and developing application without using IDE through ant.
I build applications with ant debug, and deploy them on the emulator with adb.
I have marked app to wait for debugger to attach from developer settings. However when I try to connect jdb to DDMS port, I get
java.io.IOException: shmemBase_attach failed: The system cannot find the file specified
at com.sun.tools.jdi.SharedMemoryTransportService.attach0(Native Method)
at com.sun.tools.jdi.SharedMemoryTransportService.attach(SharedMemoryTransportService.java:90)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
at com.sun.tools.jdi.SharedMemoryAttachingConnector.attach(SharedMemoryAttachingConnector.java:45)
at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:358)
at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168)
at com.sun.tools.example.debug.tty.Env.init(Env.java:64)
at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)
Fatal error:
Unable to attach to target VM.
I tried
jdb -attach 8700
jdb -connect com.sun.jdi.SocketAttach:port=8700
The app on emulator still shows the dialog, waiting for debugger to connect.
Related
I’m trying to develop a Java smart card recently. I have installed NXP JCOP Tools for Eclipse in Eclipse, but it still doesn’t work, and the error is reported as follows
- /term "Remote|localhost:49328"
jcshell: Cannot init/open terminal: Failed to open [localhost:49328]: Connection refused: connect
/card -a a000000003000000 -c com.ibm.jc.CardManager
jcshell: Error code: -8 (Failed (no diagnosis))
jcshell: Command failed: No ATR
Unexpected error; aborting execution
I use latest intellij idea ultimate with wildfly 11 and i develop web application with maven and java 8.
when i run debug i get following error.
Error running 'JBoss 11.0.0.Final': Unable to open debugger port (127.0.0.1:56884): java.net.SocketException "socket closed"
when i run application i get
Error running 'JBoss 11.0.0.Final': Address 127.0.0.1:9990 is already in use
iI did changed the port to 9991 in standalone.xml and got the following error:
Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:8080
Does any one know what am i missing?
When I try to run flight recorder it takes a very long time in loading and then crashes, and throws an exception after a while:
Connection refused to host: 17.226.xx.yyyy; nested exception is:
java.net.ConnectException: Operation timed out (Connection timed out)
java.lang.RuntimeException: Could not connect to [1.8.0_181] Eclipse
(2092). Make sure the JVM is running and that you are using the
correct protocol in the Service URL
(service:jmx:rmi://127.0.0.1/stub/rO0ABXN9AAAAAQAlamF2YXgubWFuYWdlbWVudC5yZW1vdGUucm1pLlJNSVNlcnZlcnhyABdqYXZhLmxhbmcucmVmbGVjdC5Qcm94eeEn2iDMEEPLAgABTAABaHQAJUxqYXZhL2xhbmcvcmVmbGVjdC9JbnZvY2F0aW9uSGFuZGxlcjt4cHNyAC1qYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN0SW52b2NhdGlvbkhhbmRsZXIAAAAAAAAAAgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc4AAtVbmljYXN0UmVmMgAADTE3LjIyNi4yMC4yMjQAAMF44tzu6CRJNeORCVrBAAABZN4+pbCAAQB4).
I have tried running different version of jdks: from java 7 to java 8:
jdk1.7.0_80.jdk
jdk1.8.0_141.jdk
jdk1.8.0_144.jdk
jdk1.8.0_162.jdk
jdk1.8.0_181.jdk
Also, uninstalled eclipse and installed back STS back. Still the issue is there. Looks like issue is somehwhere in jmc not able to connect to eclipse and/or tomcat jvm.
Anyone who has resolved similar issue please help on that. Thanks.
Update: I am able to record flights using command terminal by using
jcmd $pid JFR.start name=MyRecording settings=default duration=60s
jcmd $pid JFR.dump name=MyRecording filename=/tmp/test_TIMESTAMP.jfr
Still I am clueless why it would not run from gui.
I am able to open flight recorder now with a "hack".
To make it work I had to add -Djava.rmi.server.hostname=localhost vm arg in the server configs of my JEE application.
When i want run react-native run-android command i see
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'reactNativeCliTest'.
Could not resolve all dependencies for configuration ':classpath'.
Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.2.3)
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.jar'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.jar'.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection timed out:
connect
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 26.854 secs Could not install the app on the device, read
the error above for details. Make sure you have an Android emulator
running or a device connected and have set up your Android development
environment:
https://facebook.github.io/react-native/docs/getting-started.html
I use genymotion .
thank you ...
RN is trying to download a new version of gradle and get error code 443. This error is related to misconfigured system files in your windows operating system. It's not related to react native and you can search about fix this error in your system.
as an experience, you have to use hotspot shield or strong vpn to download from jcenter in iran!
this link may help you: http://www.wiki-errors.com/err.php?wiki=443
I have added selenium jar files in eclipse mars .When I launched the firefox browser, I'm getting the following error
Exception in thread "main" java.lang.RuntimeException: Unable to find a free port
at org.openqa.selenium.net.PortProber.findFreePort(PortProber.java:67)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:326)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:104)
at Mypackage.Myfirstprogram.main(Myfirstprogram.java:10)
Selenium standalone server uses port no 4444 by default. Make sure that this port is not being used by any other process. Kill any process that was running on that port number or use any other port number for selenium standalone server.