IBM MobileFirst 7.1 ,com.microsoft.jdbc.sqlserver.SQLServerDriver not found - ibm-mobilefirst

Have installed mobile first 7.1 ,Have pushed the adapters successfully.But while making adapter call,getting error com.microsoft.jdbc.sqlserver.SQLServerDriver not found In Work light or Project Work space.
After search have tried many option , have added the sqljdbc4.jar file in server/lib folder of project, also added in lib of JDK. Also added the path of sqljdbc4.jar as Class Path in System Variable.
PS- My environment is as follows, IBM MobileFirst 7.1, jdk1.8.0_181, windows 10

Related

How to Fix No MBean found for Worklight project?

I have a problem when deploying my Worklight project on the server . It shows the following Error Message :
FWLSE3041E: No MBean found for Worklight project 'MyProject'. Possibly the Worklight runtime web application for Worklight project 'MyProject' is not running. If it is running, use JConsole to inspect the available MBeans.
and when I tried to preview my application it showed this message :
SRVE0777E: Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:420'
I had the same issue using Worklight 6.2 CLI, but recreating the project did not work.
One issue that I had was that worklight did not build a .war-file properly, so I copied the .war-file from a backup.
Edit: This happens regularly in our project now, and we have no idea why. We fix it by invoking any procedure, which makes it work until you restart the server. Worklight must be building something when invoking a procedure that it does not do when building.
I Solved The problem by creating a new Worklight Project and copied all my files , it works just fine :) I used Worklight 6.1 instead of 6.2
I solved this by fixing a recently created security test in
server/conf/authenticationConfig.xml
The problem was I mispelled the Realm name I previously defined.
I solved this problem by deleting the application from the worklight server and rebuild it.
Delete WorklightServerConfig folder in workspace and rebuild your application.
I was able to fix this in MobileFirst 7.0 (Fka Worklight) by opening the Servers view, Window -> Show View -> Servers. Then expanding the MobileFirst Development Server and right click on the project in question, chose delete.
Once you do that go back to the applications' directory in the "apps" directory and right click -> Run As -> Run On MobileFirst Development Server
This should rebuild and deploy the project on the server.
I solved the problem by using ibm jdk not open jdk. My solution is to make sure the env parameters are correct
export JAVA_HOME = $your_ibm_jdk
export PATH + $your_ibm_jdk/bin:$PATH
run java -version to make sure the setting work

Unable to set up jquery mobile project with worklight 6.1

I am unable to set-up a IBM Worklight project involving jquery-mobile. Here are my environment details:
eclipse Version: Juno Service Release 2 (32-bit version since I am using jre1.6.0_41)
Worklight version: 6.1.0.01
jquery-mobile: 1.3.1
I can create a new worklight project (called MyLab1) and associate jquery-mobile CSS and JS files to it. However the problems are:
The default .html file gets created as index.html (under 'apps->MyLab1->common') while my expectation is it should be MyLab1.html (as per the training material I have from IBM Worklight)
The 'Mobile Navigation' pane is completely blank while my expectation (again as per training material) is I will see a 'page(default)' control there
Whenever I try to create a new control (under 'Mobile Navigation' pane) I get the error 'Mobile Navigation controls cannot be added to the current page. This feature is only enabled for projects which have jQuery Mobile or Dojo mobile available'
I do not see any option (under eclipse menu) to start or stop Worklight sever (that comes with Developer studio version)
I am fairly new to Mobile application development space (just started with IBM worklight set up this week) and given the above issues I believe I may be doing something fundamentally wrong.
Starting Worklight 6.1, it is very much expected for a new application filenames' to be main.js, main.css and index.html.
Additionally, while you can do the adding of jQuery Mobile by yourself, you should instead use the wizard Worklight Studio provides for you.
This way not only will the files you choose be added properly to your project, but the HTML file will be updated accordingly as well (HEAD references, initial jQuery Mobile template in the body element).
The Palette view should then also list the relevant jQuery Mobile widgets you can use in your app.
Please follow the Worklight 6.1 training modules if you intend on using Worklight 6.1.
My impression is that you are reading the Worklight 5.0.x training modules.
To start or stop the Worklight Server, you need to open the Servers view and click either the play or stop buttons.
Use the keyboard shortcut Ctrl+3 and write "server".
Everything works: http://i.stack.imgur.com/K1G8O.png
I found the solution after trying out a few things. It turned out that WL-6.1.x doesn't work well with JRE 6 (32 bit) and eclipse Juno (32 bit) combination. Once I switched to JRE7/Juno-64 bit; things apparently started to work (for now at least).
Thanks Idan for your helpful comments

Building iOS hybrid app does not update worklight.plist or root.plist file

I'm running WL 6.1 (6.1.0.01.20140310-1427) on a macbook air (latest OSX). I have a dojo hybrid application that I'm trying to connect to a remote WL server. When I generate an iOS app and I'm changing the address of the worklight server to a remote server. It does not change the address in the generated iOS code. The steps I follow are:
Open the Build Settings and Deploy Target... On the hybrid app folder.
Select the check box for Build the application to work with a different Worklight server.
Put in the new server information and click OK
Build all environments
After the build is complete, I launch into xcode and look at the worklight.plist and Root.plist files.
At this point they are still referencing my local server. If I edit them to point to the remote server, then my app works. Since these files are regenerated every time you do a build this is not a valid solution.
To verify it is nothing in my app, I created a default dojo hybrid application. Performed the steps I listed above. When I launched into xcode, the Root.plist and worklight.plist still have the default local server information.
So here is the funny thing. I also have a win7 system running the same level of WL developer plugin. I perform the same steps and the worklight.plist file is updated correctly on windows, just not in osx. The only other difference is the win7 version is running jre 1.7_21 where the osx is running 1.7_51. Both are in 64-bit mode.
I believe the real difference between your Mac and Windows machines is step 5, where you "launch into xcode". If by that you mean that you are actually doing Run As > Xcode project, then see below. This option is available only in Mac and not in Windows.
This is the expected behavior in Worklight 6.0.0.x and 6.1.0.x.
If after changing the server address to a remote server (rather than the local development server) and building, and then selecting Run As > Xcode project, this will overwrite the server settings back to the local development server.
Run As > Xcode project does 3 actions:
Build & deploy the app to the local Worklight Development Server
Generate an Xcode project (this in turn overwrites worklight.plist back to use local server settings)
Open the generated Xcode project in Xcode
So if you want to use the app with the remote server settings, then after changing the settings and build the app, either:
Copy the .zip from the your-iphone\package folder
Navigate in the filesystem to the iphone\native folder and double-click the .xcodeproj file to open the it straight in Xcode (like what Run As > Xcode project does)
For future releases of Worklight it is being considered to streamline the behavior so that no matter if you choose, local or remote server settings, Run As > Xcode project will always use the ones you've selected.

IBM Worklight 6.0 - Worklight Starter Dojo example broken?

I've installed Worklight 6 in an instance of Eclipse Juno and I am wanting to migrate working apps into it from Eclipse Helios and Worklight 5. I am running into some strange problems, possibly because of the transition to Dojo 9 or maybe the new directory structure of the resident Dojo files. So I decided to start with the examples. I use Dojo in my apps, so I downloaded the WorklightStarter_DojoMobile eclipse project and imported it. I did the 'build and deploy' step, and also deployed the WorklightStarterAdapter.
I am trying to run the app in the browser simulator and it appears to be busted. I get the 'about' view but no feeds. I ran it with Firebug and the console shows a lot of peculiar errors.
I won't paste in the network links but a lot of files are not found:
WorklightStarter_DojoMobile/apps/services/preview/WorklightStarter_DojoMobile/android/1.0/default/cordova_plugins.json not found
WorklightStarter_DojoMobile/apps/services/preview/WorklightStarter_DojoMobile/android/1.0/default/dojo/core-web-layer.js not found
WorklightStarter_DojoMobile/apps/services/api/WorklightStarter_DojoMobile/android/init unauthorized
/WorklightStarter_DojoMobile/apps/services/preview/WorklightStarter_DojoMobile/android/1.0/default/dojox/mobile/themes/android/android-compat.css
Procedure invocation error. White spaces are required between publicId and systemId. Failed to parse the payload from backend (procedure: HttpRequest) with transformation...
Indeed, the Worklight Starter Dojo Edition is not fully compatible with Worklight 6; instead, you can use the Dojo examples from the training materials.

IBM Worklight 6.0 - Dojo library uses localhost after deploy

I have a Worklight 6.0 project that uses the new Dojo 1.9 libs, I created an external dojo project, like the documentation suggested, then, in the main project properties, under "Dojo toolkit", it references this dojo19 project.
The project works on the local server, then I did "Run As" | "Build for Remote Server...", and entered the correct domain:port and context path, clicked Build, the *.wlapp files were updated. (I've also updated the settings for publicWorkLightHostname / publicWorkLightPort / publicWorkLightProtocol in the "Environment Entries for Web Modules" in the installed war to match the remote server names/port/protocol.)
But, after deploying both war and -all.wlapp file, accessing the app I get JS errors when it tries to refer to the dojo19 library:
The page at
https://<myIP>:9443/<myproject>/apps/services/www/ /mobilewebapp/default/IODMobile.html
ran insecure content from http://localhost:64441/dojo19/<myproject>/IODMobile/mobilewebapp/dojo/nls/core-web-layer_en-us.js.
The dojo19 is the project name in my Worklight developer workspace that I referred to above.
Why is it trying localhost? Seems there's a missing step here in deploying the dojo library project into Worklight.
Where are you trying to preview the application when you get the error message?
See the changes in Dojo in Worklight 6.0
If launching the application in emulator/simulator/device, see Billy Rowe's answer in this question
Partial copy/paste:
Step 1: Verify your application works in the Mobile Browser Simulator
with Provide Library Resources checked. If the Console log is showing
resources being served from the server, then these have to be copied
to your application before deploying to AVD or a device
Step 2: After you think you have all Dojo/resources within your
project, uncheck Provide Library Resources and test it again in MBS.
If it fails in MBS, then something is missing in your application that
is in the library/server. You can check Provide Library Resources and
retest to see if it shows you what that is. Not all resources are
shown, e.g. if there's a missing CSS file.
Also I would suggest to do all of this in the Development environment (that is, in Eclipse) before starting to deploy the .war file and .wlapp file etc... (which, BTW, I hope you're doing based on the new instructions for Worklight 6.0)
In the information center, it will show you how to uncheck the Provide Library Resources in the Console Log.
I think what you're running into is:
1) Something is being served from the Dojo Library/Server
2) A bug in 6.0 that used "localhost" instead of the IP of the host (your machine running eclipse). This is fixed in the 6.0 iFix. With this fix, you can run your app external to Studio and still use the Dojo Library/Server. Without this fix, you must have everything you need within your app.
Can you install the iFix and let us know if that fixed the problem?