IBM Worklight 6.1 - Worklight deployment fails on SUSE Linux using a remote database - suse

I'm trying to deploy a war file to websphere through worklight using suse linux and a remote database.
When I tried to deploy the war file using a remote database(I'm using oracle to test), I'm getting the following error:
GetSQLQueryResult failed with error code java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:711)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:558)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at com.ibm.worklight.install.helper.GetSQLQueryResult.main(GetSQLQueryResult.java:68)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
I can access the remote machine database from the machine where worklight is installed.
Also, if I use the same WAR file on a local database on SUSE Linux, or use a remote database on another OS(Windows for example), the app is deployed correctly.

Something is not right with the question description...
You do not deploy .war files to Worklight
Worklight, in a remote server, is comprised of a Java EE .jar file, deployed to the application server (WAS/Liberty profile, Tomcat)
A .war file, in Worklight, is a Java web app containing server-related artifacts required for running your application (generated by the Studio/CLI tool); you deploy this .war file to the application server where Worklight Server is deployed to
That said,
A connection reset means there is a general network issue and is not related to Worklight itself.
It sounds like a network issue with the specific machine running Suse Linux.
- Check firewall settings, timeout values, blocked ports...

Related

Resolving "WebSphere application server v7 is currently running" message in IBM Installation Manager on Windows 7

I received the message "WebSphere application server v7 is currently running. Please shut it down to continue." while attempting to upgrade my local version of WebSphere Application Server 7 using IBM Installation Manager on Windows 7. The server was not running at the time. The message also persisted after a reboot.
According to this technote, any running Java process can cause this issue. I found a running instance of javaw.exe using Process Manager, closed it, and the installation was able to proceed from there.

How to add mysql drivers to openshift tomcat

I have deployed my war file on openshift tomcat.
As suggested to deploy war file directly we need to remove the src and pom.xml before coping the war file in webapps folder. pre compiled java applications (WAR and EAR files) onto your OpenShift
Now since my application uses mysql driver - when tomcat starts on open shift it throws error of mysql driver classes not found.
How else can I add the mysql driver to openshift tomcat. Putting them in the web-inf/lib directory does not work since the datasources are configured on tomcat context.xml
The data source configuration should not matter for the mysql driver. Before tomcat8 however there are scenarios where you have to deploy the mysql driver in the tomcat/lib (sad but it works). Upgrading to Tomcat8 will get you away from that scenario.

SQL adapter in Worlight?

I am new to IBM Worklight,and i found a way to connect to the MySQL using the SQL adapter.
the configuration as below:
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/worklight_training</url>
<user>Worklight</user>
<password>Worklight</password>
</dataSourceDefinition>
Since the adapter are compile together with the app, just wondering, is it safe? is there a possibility of someone decompiling my apk or ipa to view the adapter connection thus acquire the user and password to my mysql database.
A hacker decompiling your .apk or .ipa file will not find the database username/password there, for the simple reason that the adapter is not compiled "together with the app" and is not part of any artifacts that you install in a device.
An adapter is a server-side entity, not client-side.
The adapter is an object stored in the memory of the running application server.
Adapters are Server side code andare not part of the apk or ipa files.
You can check/confirm this information in Worklight documentation. The details about adapters, under "Developing the server side of a Worklight Application" are at:
http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.dev.doc/devref/c_overview_of_ibm_worklight_adap.html
You can also check the Server Side Development of MobileFirst Platform Getting Started Modules
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/
(MobileFirst Platform is the new name of Worklight)
In worklight, you usually have the application (apk/ipa) communicating with a server side component (the adapters) running in a worklight server. The adapters are used to communicate with backend systems (like a mysql server). There are a few different types of adapters to communicate with different types of backends (like sql, http and SAP)
Please, let us know what documentation/guide caused you the understanding that adapters are part of the client apk/ipa. If that is really stated in any documentation, it is wrong and must be corrected.
Edit:
To connect to a MySQL DB (no matter if it is a standalone MySQL or in XAMP, LAMP or whatever package) you can follow this geting started tutorial
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/server-side-development/sql-adapter-communicating-sql-database/
Also note that, if you are using MobileFirst Studio (previously Worklight Studio) downloaded for free from Developer Works you have a developer version of the WOrklight Server running inside Studio so that you can create and deploy adapters and use it during development as your server. But when you go to production you are required to purchase licenses of Worklight because you don't have the worklight server available for free.
So if you have Studio, you have the server available but only for development purposes.

How to use primefaces on cloudbees glassfish server

We are developing an Java EE webapp on a glassfish 4 server running in the cloubeees cloud. We want to use Primefaces 3.5 . Our app runs perfectly on a local glassfish server after we copied the commons-fileupload.jar into the lib domain/lib folder. When we push the app into the cloud it isnt deployed the log says:
Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
So i think the server misses the fileupload.jar, but we dont have acces to the server administration console or the folder structure. Does anyone here used Primefaces in the cloudbees cloud or knows a other way to fix the problem?
best regards
Peter!

tfs 2012 publish does not work

I am trying to deploy my asp.net mvc application to another server but getting this error:
Error 101 Web deployment task failed. (Could not connect to the remote computer ...
I have installed the Web Management service on the server and it is running?
I have also tried to queue a build in tfs which builds fine on the buildserver however the deployment is not happening:
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:CreatePackageOnPublish=True
/p:MsDeployServiceUrl=https://myserver:8172/msdeploy.axd
/p:MsDeployPublishMethod=WMSVC
/p:UserName=myserver\myadmin
/p:Password=mypassword
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath="Default Web Site/myappname"
You need to install the Web Deploy package from WebPI and ensure that you have ports 443 and 8172 open on your firewall.
Web Deploy Download if you don't PI