WorkLighr 6.0 Deployement on windows 8 issue - windows-8

I am still working to ibm-worklight 6.0 mobile application , it's working fine my local eclipse development server. but i am going to install the the liberty based using WAS server while i deploye the worklight WAR file is not working. am i got the error below that,
Exception thrown by application class
'com.worklight.core.auth.impl.AuthenticationFilter.doFilter:110'
javax.servlet.ServletException: Worklight Project not initialized at
com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
What is exactly problem on my application or server installation

This normally comes if the AuthenticationConfig file is having errors, re-check your authentication config and worklight.properties file. Make sure that while deploying for remote server, you have changed the Servername / URL etc

Related

Apache archiva returns http error 503

I am using apache Archiva v. 2.2.0 under Windows Server 2012 R2, Java version 1.8.0_60 inside VirtualBox. It used to work for quite a long time before Windows autoupdate.
After Windows autoupdate I am getting an error message when going to archiva url: HTTP ERROR: 503 . Problem accessing /. Reason: Service Unavailable, Powered by Jetty://.
The Apache Archiva service is running. No error logs are generated. Restarting or even reinstalling of the service has no impact.
After rolling back of Windows update I restore the normal operation of Archiva, but mysteriously, just once, i.e. stopping and restarting of Archiva will cause the same HTTP ERROR 503.
The log file do not indicate any problem or error cuase.
Thank you for any tips.
I faced a similar issue.
I restarted archiva using ./path/to/archiva/apache-archiva-2.2.0/bin/archiva console
for you, since you are using windows .\bin\archiva.bat console
In my case I've found out that the jetty configuration file jetty.xml in ARCHIVA_BASE\conf got corrupted.
Solution:
Stop archiva service
Replace jetty.xml with either a fresh one or from last known working
backup. A fresh copy of jetty.xml can be downloaded from archiva web
site as an apache-archiva-2.2.0-bin.zip. File location within the
zip file is apache-archiva-2.2.1\conf\jetty.xml
Start archiva service
For me it was complaining about ClassDefNotFound errors, this was because I didn't set my JAVA_HOME properly (on Mac OS). After fixing this, the program worked. Maybe that was your issue.

IBM MobileFirst Server Error When Deploying The Helloworld Application

MobileFirst Console LOG:
[2014-12-17 11:16:49] Environment 'iPhone' was created.
[2014-12-17 11:17:00] Starting build process: application 'HelloWorldApp', environment 'iphone'
[2014-12-17 11:17:13] FWLPL0010W: The current server configuration is set to "localhost". Therefore the MobileFirst build uses the primary IP address of this
computer (192.168.137.1) instead. It is recommended to set the server configuration to use the fully qualified hostname or IP address
of this computer. To configure the setting, in the "Servers" view double-click the MobileFirst Development Server entry and edit the
"Host name" field.
[2014-12-17 11:17:25] Application 'HelloWorldApp' with environment 'iphone' build finished.
[2014-12-17 11:19:38] Starting build process: application 'HelloWorldApp', all environments
[2014-12-17 11:20:03] Application 'HelloWorldApp' with all environments build finished.
[2014-12-17 11:20:03] Deploying application 'HelloWorldApp' with all environments to MobileFirst Server...
[2014-12-17 11:20:07] Failed to deploy application 'HelloWorldApp' to MobileFirst Server: : HTTP 500 - Internal Server Errorr
MobileFirst Development Server Errorlog:
[ERROR ] F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
[ERROR ] F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
F:\Worklight%206.3\Workspace\rough\MobileFirstServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\73\data\cache\com.ibm.ws.app.manager_108\.cache\WEB-INF\lib\ibm_web20_wink_no_abdera_no_jackson-1.1.0.0-20110422.jar (The system cannot find the path specified)
[ERROR ] Uncaught.init.exception.thrown.by.servlet
ManagementServlet
WorklightServices
java.lang.NoClassDefFoundError: Could not initialize class org.apache.wink.common.internal.i18n.Messages
at org.apache.wink.server.internal.DeploymentConfiguration.initAlternateShortcutMap(DeploymentConfiguration.java:386)
at org.apache.wink.server.internal.DeploymentConfiguration.init(DeploymentConfiguration.java:167)
at org.apache.wink.server.internal.servlet.RestServlet.getDeploymentConfiguration(RestServlet.java:202)
at org.apache.wink.server.internal.servlet.RestServlet.createRequestProcessor(RestServlet.java:138)
at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:103)
at javax.servlet.GenericServlet.init(GenericServlet.java:161)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:325)
at [internal classes]
at com.ibm.worklight.admin.common.filter.HSTSFilter.doFilter(HSTSFilter.java:110)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Actually problem is with MobileFirst project class path just replace Java jre 1.8 to jre 1.7 and server started working properly. I think JDK 1.8 caused the problem of "HTTP 500 - Internal Server Error". Please do vote up if you find this thing useful.
Delete MobileFirstServerConfig file which is located in your workspace.And restrat your eclipse.
Then the error won't come.
It works for me
Try to hard code the ip address of the WL server instead of "localhost"
Click on server tab at the bottom of eclipse > Double click on "worklight Development server" > Host Name: "you Lan Ip address" instead of "localhost" and save the changes "Ctrl+s".
-Redeploy again.
The name of the Workspace folder should not contain spaces.
For Eg: Create a folder like "WorkSpace" .
"Work Space" will give you this error.

IBM Worklight: AdapterAuthRealmChallengeHandler.submitSuccess() generates invalid http header

in previously correctly working dev. environment with WL 6.1.0.01.20140311-2356 after upgrade to Chrome 37.0.2062.120 there is now the following error when calling submitSuccess during authentication.
CHROME BROWSER LOG:
Uncaught SyntaxError: Failed to execute 'setRequestHeader' on
'XMLHttpRequest':
'{"wl_deviceNoProvisioningRealm":{"ID":{"token":"pg8cd4gnjh1kb0sjko6h1chqr4","app":{"id":"Moje
ČZU","version":"1.0"},"device":{"id":"previewDummyId","os":"previewDummyOS","model":"previewDummyModel","environment":"preview"},"custom":{}}}}'
is not a valid HTTP header field value.
WL SERVER LOG:
SRVE0777E: Exception thrown by application class
'com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource:398'
com.worklight.server.auth.api.WorkLightAuthenticationException at
com.worklight.core.auth.impl.AuthenticationContext.pushCurrentResource(AuthenticationContext.java:398)
at
com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:75)
at
com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:389)
at
com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedure(DataAccessServiceImpl.java:112)
at
com.worklight.gadgets.serving.handler.BackendQueryHandler.getContent(BackendQueryHandler.java:182)
at
com.worklight.gadgets.serving.handler.BackendQueryHandler.doPost(BackendQueryHandler.java:73)
at
com.worklight.gadgets.serving.GadgetAPIServlet.doGetOrPost(GadgetAPIServlet.java:141)
at
com.worklight.gadgets.serving.GadgetAPIServlet.doPost(GadgetAPIServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1240)
at [internal classes] at
com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:191)
at
com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at
com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:195)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
not sure if "Moje ĆZU" latin2 character here not causing the issue?
Previous steps in authentication process looks working fine.
Firefox and Opera are also stuck but with different behavior.
However, when the app is deployed to Android device App still works fine.
This looks like an encoding issue.
When generating an application for the first time, the application id value in application-descriptor.xml is generated from the chosen app name; you can then alter it to anything else you'd like.
Note, though, that when adding a mobile environment the same value is used there as well, so if you are altering the value after already creating a mobile environment (which will have the "native" folder), you need to remove that native folder to have all artifacts re-generated correctly. Or, do a find all/replace and verify everything is working.
Worklight will not auto-replace this value after changing it in application-descriptor.xml.

404 Error in running worklight hybrid application on Enterprise Worklight server

I have created a sample project with an SQL adapter and a hybrid worklight application. The application is a simple login form that accept userid and password and validate them against the value stored in database using the SQL adapter.
Now when I tested this application on the default worklight server installed in eclispe plugin for worklight it is working fine.
But when I install the SQL adapter and worklight application on an enterprise worklight server and testing it, I am getting the following error:
NetworkError: 404 Not Found -
http://[localhost:9080]/apps/services/api/SampleHybrid/common/query
The above error I fetched through Firebug.
SampleHybrid is the name of the worklight hybrid application.
SampleHybridAdapter is the name of the SQL adapter.
The server’s response is:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>CWWKT0018E: The application or context root for this request has not been found: /apps/services/api/SampleHybrid/common/query</p><h‌​r /><address>WebSphere Application Server at 127.0.0.1 port 9080</address></body></html>
You mentioned you have moved to running Worklight on an application server - this requires using a context root. I do not see a context root in the 404 error you have provided.
The request to the server was supposed to look like this: http://[localhost:9080]/yourContext/apps/services/api/SampleHybrid/common/query
Because the context root (in this case, "yourContext") is missing, you get a 404 error, since the application is trying to reach a location that does not exist.
The context root value is set in both application-descriptor.xml and worklight.properties.
yourProject\apps\yourApp\application-descriptor.xml
Change the value of the worklightServerRootURL property to include your context root. It should look like this http://your-host-name-here:port/yourContext
yourProject\apps\server\conf\worklight.properties
Set your context root as the value for the publicWorkLightContext property (also make sure to uncomment it)
After doing the above, you need to re-deploy the .war file to your application server. The .war file can be found in the bin folder of your Worklight project.

Failed to deploy missing security Test

I have successfully gotten the module 41 sample running with eclipse and the local server. Attempting to deploy on my liberty server returns the error.
Failed to deploy application 'PushApplication-all.wlapp'. : application descriptor uses a security test:PushApplication-strong-mobile-securityTest. However, authentication config xml does not contain a security test element with that name.
I am on Worklight 5.0.5 with a successful app running on the server and now trying to add push notifications. I have checked the war file and it does contain the authentication-config.xml with the specified test.
I saw a smilier post a few momths ago but am unable to find whether it got answered
thanks in advance.
From the sound of it, you are trying to deploy your .wlapp to a server that is already running an instance of Worklight, but this instance does not have the required securityTest settings in authenticationConfig.xml
This leads me to believe that you did not replace the .war file you already had deployed in the Liberty-profile application server with the .war file from your Push Notifications project, which contains the up-to-date authenticationConfig.xml