Unable to start development server in debug mode - ibm-mobilefirst

When I'm starting the MobileFirst Server in debug mode, it fails loading with the following error message:
ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options.
Error occurred during initialization of VM
agent library failed to init: jdwp
How Can I solve this?

The MobileFirst Development Server is by default in debug mode... so when you try to start the server using the "debug mode" icon, it fails in doing so because the debug definition cannot be set twice, which is what the error message says.
To start the server in debug mode, simply start it as you would normally do it, by clicking on the "play" button.
After doing so, you can spot the following line: "Listening for transport dt_socket at address: 10777".
This means the server started in debug mode.

Related

Unable to Switch Appium Context

We have different WebView workflows for our App. I'm able to switch context for the Workflows which has contexts NATIVE_APP, WEBVIEW_com.bluebird.mobile and WEBVIEW_Terrace (3 contexts),
And not able to switch context for the workflows which has only two context NATIVE_APP and WEBVIEW_Terrace. While switching the context I get the following error:
Appium error: An unknown server-side error occurred while processing the command.
Original error: An unknown server-side error occurred while processing the command.
Original error: unknown error: Failed to get sockets matching: #weblayer_devtools_remote_.*14722
(make sure the app has its WebView/WebLayer configured for debugging)
(Driver info: chromedriver=105.0.5195.52 (412c95e518836d8a7d97250d62b29c2ae6a26a85-refs/branch-heads/5195#{#853}), platform=Linux 5.16.7-200.fc35.x86_64 x86_64)
When I look on the internet for the error "make sure the app has its WebView/WebLayer configured for debugging", I see solution to set setWebContentsDebuggingEnabled to true and we already set this configuration because some of the workflows are working.
Please let me know what I need to do here? OR what can I ask my DEV team to fix this.

React-Native "Could no connect to development server" in createReactContext()

My Android react-native app is crashing with an ExecutionException.
"Could not connect to development server."
The method that is crashing is ReactInstanceManagerImpl.createReactContext().
But this is not the normal error as this screenshot shows:
Logcat shows me this stacktrace:
Exception in native call from JS
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
Could not connect to development server.
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:860)
at com.facebook.react.ReactInstanceManagerImpl.access$700(ReactInstanceManagerImpl.java:98)
at com.facebook.react.ReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(ReactInstanceManagerImpl.java:194)
...
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException:
at com.facebook.react.common.futures.SimpleSettableFuture.get(SimpleSettableFuture.java:68)
at com.facebook.react.ReactInstanceManagerImpl.createReactContext(ReactInstanceManagerImpl.java:831)
... 9 more
Caused by: java.lang.RuntimeException:
at com.facebook.react.bridge.ReactBridge.loadScriptFromFile(Native Method)
at com.facebook.react.bridge.JSBundleLoader$2.loadScript(JSBundleLoader.java:58)
at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:148)
at com.facebook.react.ReactInstanceManagerImpl$4.call(ReactInstanceManagerImpl.java:851)
...
This suggests that the server has sent the javascript code back to the device and the ReactBridge.loadScriptFromFile() somehow can't handle the bundle.
Points to clarify:
this happens on emulator & device (connected via USB)
this happens on Linux (Mint) & Windows (8.1)
I did run adb reverse tcp:8081 tcp:8081 as per the normal advice
I have run react-native start and the packager/server is running
the device DOES connect to the development server, as this is logged in the packager window
the URL that the device hits does return data, as can be seen if copied into the browser address bar
How is this different from the normal "Could not connect..." message?
Here is a screenshot of what happens when the server is legitimately not running:
The differences include:
no ExecutionException or RuntimeException before the error message
further clarity providing the URL that was called on the server
error comes from DevServerHelper.onFailure()
Logcat shows the stacktrace to be quite different in this normal expected case:
Unable to download JS bundle
com.facebook.react.devsupport.DebugServerException:
Could not connect to development server.
at com.facebook.react.devsupport.DevServerHelper$1.onFailure(DevServerHelper.java:196)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
This seems to have been caused by not having Windows Build Tools correctly installed. This broke the node-gyp commands required by my project.
Following the steps on the node-gyp page got my machine set up correctly.
After a new build I got this error once, and then it disappeared with the project building and running correctly.

Error on starting weblogic server in jdeveloper

Can anyone please help me to resolve this error?
Below is the weblogic server log...
I'm using Jdk 7, and Java Developer for ADF
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
--Weblogic server log-------
*** Using HTTP port 7101 ***
*** Using SSL port 7102 ***
C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
.
.
JAVA Memory arguments: -Xms256m -Xmx512m
.
WLS Start Mode=Development
.
CLASSPATH=C:\Oracle\Middleware\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle\Middl
eware\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\Middleware\p
atch_jdev1112\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\jdk1.7.0_67
\lib\tools.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar;C:\Oracle\Middleware\wls
erver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\modules\features\weblogic.server.modules_10.3
.5.0.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\webservices.jar;C:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1/lib/ant-all.jar;C:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-
0b2/lib/ant-
contrib.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\Middleware
\wlserver_10.3\common\derby\lib\derbyclient.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\xqrl.jar
.
PATH=C:\Oracle\Middleware\patch_wls1035\profiles\default\native;C:\Oracle\Middleware\patch_jdev1112\p
rofiles\default\native;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32;C:\Oracle\Middleware\w
lserver_10.3\server\bin;C:\Oracle\Middleware\modules\org.apache.ant_1.7.1\bin;C:\PROGRA~1\Java\jdk1.7
.0_67\jre\bin;C:\PROGRA~1\Java\jdk1.7.0_67\bin;E:\DB\app\oracle\product\11.2.0\server\bin;;c:\Program
Files\RSA SecurID Token Common;C:\Program Files\Intel\iCLS
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell
\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program
Files\Java\jdk1.7.0_67\bin;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\hostname:port\console *
***************************************************
starting weblogic with Java version:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Starting WLS with line:
C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit -Xms256m -Xmx512m -Dweblogic.Name=DefaultServer
-Djava.security.policy=C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.policy -
Djavax.net.ssl.trustStore=C:\Users\inatar\AppData\Local\Temp\trustStore8547229804589400188.jks -
Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -
Dplatform.home=C:\Oracle\Middleware\wlserver_10.3 -
Dwls.home=C:\Oracle\Middleware\wlserver_10.3\server -
Dweblogic.home=C:\Oracle\Middleware\wlserver_10.3\server -Djps.app.credential.overwrite.allowed=true
-Dcommon.components.home=C:\Oracle\Middleware\oracle_common -Djrf.version=11.1.1 -
Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -
Ddomain.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain -
Djrockit.optfile=C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -
Doracle.server.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\servers\DefaultServer -
Doracle.domain.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig -
Digf.arisidbeans.carmlloc=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\carml -
Digf.arisidstack.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDom
ain\config\fmwconfig\arisidprovider -
Doracle.security.jps.config=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defa
ultDomain\config\fmwconfig\jps-config.xml -
Doracle.deployed.app.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Default
Domain\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -
Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware\oracle_common\modules\oracle.ossoiap_11.1.1,C:
\Oracle\Middleware\oracle_common\modules\oracle.oamprovider_11.1.1 -
Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -
Dwsm.repository.path=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDoma
in\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= - Dwlw.testConsole= -
Dwlw.logErrorsToConsole= -
Dweblogic.ext.dirs=C:\Oracle\Middleware\patch_wls1035\profiles\default\sysext_manifest_classpath;C:\O
racle\Middleware\patch_jdev1112\profiles\default\sysext_manifest_classpath weblogic.Server
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
Unrecognized option: -jrockit Process exited. is the critical error. -jrockit is not an option available to the standard java jdk.
e.g. C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit is the issue
Your JAVA_VENDOR is being set incorrectly in your setDomainEnv.cmd or startWebLogic.cmd script. It's being set to Oracle but should be set to Sun. You either need to figure out how that environment variable is being set incorrectly or manually fix one of the two .cmd files.
My last post was bad!
Here is the unwrapped set of lines I added:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
THIS ISSUE IS RESOLVED FOR ME. I JUST WANTED TO POST THE SOLUTION SOMEWHERE...
I was working through exercise 1 on the NoSQL intro: http://www.oracle.com/technetwork/topics/bigdata/articles/intro-to-oracle-nosql-db-hol-1937059.pdf
I tried to deploy the Movieplex application to JDeveloper's internal weblogic server but kept getting hit with a -jrockit VM not found. This was difficult for me to get fixed because: 1 - I am not a heavy java programmer, and 2 - I apparently do not read very well. As for point 1, JRockit is an optimized special JAVA VM that some folks use. You can look that up oon line I guess, but it looks like we do not need it for this tutorial. As for point 2, I spent hours (I ashamedly admit) trying to figure out what .sh scripts were being run to start the Weblogic server running. I did all sorts of find commands, hunted through the binaries and folders underneath the Middleware folders. In the end, all I has to do was read the output log carefully, the script for me is: /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/DefaultDomain/bin/startWebLogic.sh.
I edited the script REPLACING line 129 with below:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
NOTE: there is another shell script that may be involved, /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/Default/init-info/Domain

Server Worklight Development Server failed to start

I have install latest version of IBM Worklight on Marketplace of eclipse juno. I have create a new project and then run my project Run As > Run on Worklight Development Server. then i have face an error on the server. Please Help me.
Thanks
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
objc[42627]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
/Users/apple/Downloads/eclipse 2/plugins/com.worklight.studio.plugin_6.2.0.00-20140904-1709/liberty/wlp/bin/server: line 710: 42627 Abort trap: 6 "${JAVA_CMD}" "$#"
Your Log says Address Already in use. Restart your eclipse. Make sure process is killed.
Either your eclipse did not exit gracefully or some other application is using the port.
If some application is using the port go to server view of eclipse, expand "worklight development server" and change port in "server.xml" file. Hope that helps
According to your error message it is clearly saying that address already in use , this means the port number id using java.exe in background process.so this time if you stop server also this will not release.For this please do the following.
1.Download TCPView from http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx for windows.
2.Install TcpView , after that you will find the port number say 10080.Right click on port number and end process.Now Clean the project and run the server.
Hope this helps.

Cargo start up error

I am running 'mvn clean install -Dmaven.test.skip=true' command for a web application. but it gives following error. I set the catalina home as an environment variable. i am using maven 3.1.1 version. Please help me
FATAL ERROR in native method: JDWP No transports i
nitialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Addres
s already in use
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:star
t (start-container) on project RCMigrationWebApp: Execution start-container of g
oal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start failed: Failed to start t
he Tomcat 7.x container. Deployable [http://localhost:8080/cargocpc/index.html]
failed to finish deploying within the timeout period [120000]. The Deployable st
ate is thus unknown. -> [Help 1]
Probably you have to kill any process running at 8080, looks like the port is already in use..
ERROR: transport error 202: bind failed: Address already in use
Port in use. Run netstat -bv if you are using Windows. You will get to know which process is holding up the port. With your stackTrace, it looks very obvious.
Let me know if it helps.