How to fix socket IO Exception in Android 9.0? - socket.io

I am using java.net.Socket for socket communication.I have tried the solution for network-security-config.xml file which allow localhost for socket communication.
My code snippet is below :
Socket socket = new Socket("192.168.1.1", "5000");
And my network-security-config.xml file is below :
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">http://192.168.1.1:5000</domain>
</domain-config>
I have also tried with below snippet
1) Replace <domain includeSubdomains="true">http://192.168.1.1:5000</domain> to <domain includeSubdomains="true">http://localhost:5000</domain>
2) Replace <domain includeSubdomains="true">http://192.168.1.1:5000</domain> to <domain includeSubdomains="true">localhost</domain>
But none of the above solution works. May Be I missed something.
If any one have experience for this problem. Please provide solution.
Thanks for your help.

Related

XOpenDisplay returns NULL with pkexec

I'm developing simple X app, which works fine with sudo, but I can't open display with pkexec (XOpenDisplay returns 0). Any idea?? What am I missing?
Please note I added following policy in /usr/local/share/polkit-1/actions with symlink to /usr/share/polkit-1/actions:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="com.ubuntu.pkexec.app">
<description>Test App</description>
<message>Authentication is required to run Test App</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/local/bin/app</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
</action>
</policyconfig>

OBIEE Webservice for SOA

I am trying to get the web services for SOA to work. I am doing what oracle says, but i am still getting error 500 with the following error:
WatchData: MESSAGE = [ServletContext#1374343816[app:biwssoa module:biservices path:null spec-version:3.1 version:12.1.3]] Root cause of ServletException.
javax.servlet.ServletException: Failed to contact BI Presentation Server due to: Could not access the session service.
at oracle.bi.ws.activeobjects.inspection.BiWsilServlet.doInspectionAction(BiWsilServlet.java:183)
at oracle.bi.ws.activeobjects.inspection.BiWsilServlet.doGet(BiWsilServlet.java:137)
I added wsil.browsing credential and used the weblogic login in the enterprise manager. Didnt work.
Then i tried adding wss_username_token_policy.xml to
/app/oracle/fmw12213/user_projects/domains/bi/config/fmwconfig/biinstances/coreapplication/
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<oracle-webservice-clients>
<webservice-client>
<port-info>
<policy-references>
<policy-reference uri="oracle/log_policy" category="management"/>
<policy-reference uri="oracle/wss_username_token_client_policy" category="security"/>
</policy-references>
</port-info>
</webservice-client>
</oracle-webservice-clients>
And editing my ActionFrameworkConfig.xml in
/app/oracle/fmw12213/user_projects/domains/bi/config/fmwconfig/biconfig/actions/
from this:
<?xml version="1.0" encoding="UTF-8"?>
<obi-action-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="afconfig.xsd">
<aliases/>
<registries/>
<content-types>
<content-type>
<typename>webservices</typename>
<displayname>Web Services and BPEL Processes</displayname>
<actionType>WebServiceActionType</actionType>
</content-type>
<content-type>
<typename>misc</typename>
<displayname>Mixed Services</displayname>
<actionType>URLActionType</actionType>
</content-type>
</content-types>
<accounts/>
<policies/>
</obi-action-config>
to this:
<?xml version="1.0" encoding="UTF-8"?>
<obi-action-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="afconfig.xsd">
<aliases/>
<registries>
<registry>
<id>reg1b</id>
<name>BI EE Web Services for SOA</name>
<content-type>webservices</content-type>
<provider-class>oracle.bi.action.registry.wsil.WSILRegistry</provider-class>
<description/>
<location>
<path>http://localhost:7033/biservices/inspection?wsil</path>
</location>
<service-access>
<account>wsil.browsing</account>
<policy>wss_username_token_policy</policy>
<propagateIdentity>false</propagateIdentity>
</service-access>
</registry>
<regestries>
<content-types>
<content-type>
<typename>webservices</typename>
<displayname>Web Services and BPEL Processes</displayname>
<actionType>WebServiceActionType</actionType>
</content-type>
<content-type>
<typename>misc</typename>
<displayname>Mixed Services</displayname>
<actionType>URLActionType</actionType>
</content-type>
</content-types>
<accounts>
<account>
<name>wsil.browsing</name>
<description>Account for BI WS for SOA</description>
<adminonly>false</adminonly>
<credentialkey>weblogic</credentialkey>
</account>
</accounts>
<policies>
<policy>
<name>wss_username_token_policy</name>
<policyfile>wss_username_token_policy.xml</policyfile>
</policy>
</policies>
</obi-action-config>
Then i restarted bi server using domain_home/bitools/bin/stop.sh and start.sh. But its not working :(
Make sure that you have your biservicesconfig.xml in
/app/oracle/fmw12213/user_projects/domains/bi/config/fmwconfig/biinstances/coreapplication/
points to the same host:port as the file in ActionFrameworkConfig.xml. Also has the ending /analytics-ws/saw.dll
For me, that looked like this:
<server>http://localhost:7033/analytics-ws/saw.dll</server>

Getting Unknown error in charles during inspecting api websocket of an android app

Hey Some Days ago am working with charles nd its working properly but now i am unable to use it, it shows me unknown. I tried with 2 android (android pie) & 1 android emulator (android lollipop including root). I tried with all network security config below:
1) Given on Charles Official website
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
2) From other sources
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
I was using 2nd network security config when its working properly. Is there any solution or alternative method to inspect the responses and websockets inside the app.

Webpshere server is not gettin started after adding MDB configuration to ejb-jar xml

I have added MDB configuration to the ejb-jar.xml and ibm-ejb-jar-bnd.xmi files and then restart fails with throwing the below error,if i revert my changes it started working fine.
Error Message: Caused by: java.lang.IllegalStateException: Parent Translator (EnterpriseBeansTranslator(entity|session|message-driven,841888302)) did not find a Child Translator for "message-driven-destination".
Could you please help me to understand the root cause of the issue. Below is the MDB configuration added.Please help me if the issue is due to xsd??
<ejb-jar id="ejb-jar_1" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<enterprise-beans>
<message-driven id="MessageDriven_TestJMSMDBL">
<description>Message Driven Bean for JMS Listener TestJMSMDBL</description>
<ejb-name>TestJMSMDBL</ejb-name>
<ejb-class>com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination id="MessageDrivenDestination_TestJMSMDBL">
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<env-entry-name>PRListener</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>TestJMSMDBL</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>UseCMT</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<ejb-local-ref id="EJBLocalRef_TestJMSMDBL_EngineBMTLocal">
<description/>
<ejb-ref-name>ejb/EngineBMTLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home>
<local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local>
<ejb-link>EngineBMT</ejb-link>
</ejb-local-ref>
<ejb-local-ref id="EJBLocalRef_TestJMSMDBL_EngineCMTLocal">
<description/>
<ejb-ref-name>ejb/EngineCMTLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home>
<local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local>
<ejb-link>EngineCMT</ejb-link>
</ejb-local-ref>
</message-driven>
</enterprise-beans>
Your MDB definition is not correct. You should have something like below. It should be <message-destination-type> not <message-driven-destination>.
<message-driven id="MyMDB">
<ejb-name>MyMDB</ejb-name>
<ejb-class>ejbs.MyMDBBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
</message-driven>
Here is the sample binding file. But you can remove binding for message driven from file and then install it using console. You will be able to define mapping there. Afterwards you can export application from the console and you may then extract correct binding file from there.
<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejb="ejb.xmi" xmlns:ejbbnd="ejbbnd.xmi" xmi:id="EJBJarBinding_1409479703640">
<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
<ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding" xmi:id="MessageDrivenBeanBinding_1409479703640" activationSpecJndiName="myActiveSpec" destinationJndiName="eis/as1">
<enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MyMDB"/>
</ejbBindings>
</ejbbnd:EJBJarBinding>

LIQUIBASE: How to install liquibase. I'm having an error with the batch file I created

here is the error saying liquibase is not recognized as an internal/external
command in cmd
http://animobile.info/upload/1/error.bmp
lb_update.bat code1:
#echo off call Liquibase --changeLogFile=update.xml
update.xml coode:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.Liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.Liquibase.org/xml/ns/dbchangelog/1.9 http://www.Liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<include file="v000/master.xml" />
</databaseChangeLog>
master.xml code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.Liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.Liquibase.org/xml/ns/dbchangelog/1.9 http://www.Liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<preConditions>
<!-- These changes should only be run against a schema with major version 0 -->
<sqlCheck expectedResult="0">
SELECT NVL(MAX(id),0)
FROM databasechangelog
WHERE author='MajorVersion '
</sqlCheck>
</preConditions >
<include file="v000/2009-10-15-73.xml" />
</databaseChangeLog>
The expected result when the lb_update.bat is executed, a confirmation message will appear saying: Migration successful.
How can i fix this please help! Thank you!
Since you have not mentioned the full path of Liquibase.bat file, it will be searched in the current directory which is D:\Projects\lbdemo\trunk in your case. Looks like Liquibase.bat file doesn't exist at the Location D:\Projects\lbdemo\trunk.

Resources