APPLICATION_DOES_NOT_EXIST for MobileFirst 8.0 Security Authentication? - java

I am receiving this error when I attempt to authenticate to my Security Check:
errorCode: "APPLICATION_DOES_NOT_EXIST"
errorMsg: "Application doesn't exist"
Here is the error in the server log:
[10/18/16 13:59:32:991 CDT] 00001447 m.mfp.server.registration.internal.rest.RegistrationEndpoint E Failed to process registration request.
com.ibm.mfp.server.security.shared.MFPRESTException: 400; headers=[]; body={ errorCode=APPLICATION_DOES_NOT_EXIST errorMsg=Application doesn't exist}
at com.ibm.mfp.server.security.internal.context.ClientSecurityContextImpl.load(ClientSecurityContextImpl.java:178)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
I used the UserLogin adapter.
I also used the UserLoginChallengeHandler.js to handle logging-in.
The UserLogin adapter appears in the MobileFirst Console:
I am unsure what this error means. Google shows no results for this error.

I don't think this relates to the security check at all...
As mentioned by Norton, the error is just that - the identifier of the application is not present, in its correct form, in the server.
And as mentioned by Vivin, by using the MobileFirst CLI to register the application (instead of doing so manually via the console), you can minimize the chance of registration "failure" (i.e. incorrectly registering the application).
It could be that when registering the application, you incorrectly entered its version number. Perhaps you've used "1.0" instead of "1.0.0.".
So you can check the following:
The version (can be found in the config.xml file)
The application identifier (can also be found in the config.xml file)
Or use the CLI, from the root folder of the Cordova app: mfpdev app register.

Related

UnknownHostException in Grails application using liberty server

I am getting below error in my Liberty message log file when I am trying to use Log4j in my Grails application. When I am run my application as locally, everything is working correctly but when I upload my application on to Liberty Server then I am seeing below error on log file. Please give me suggestion how I can resolve this issue. Thanks
[WARNING ] CWOBJ0210W: The transport type of the remote server on tvma1222.server.xxx.net:4809,tvma1223.server.xxx.net:4809,tvma1224.server.xxx.net:4809 cannot be determined. The following exception occurred while determining the transport type: java.net.UnknownHostException: tvma1224.server.xxx.net
at java.net.InetAddress.getAllByName0(InetAddress.java:1412)
at java.net.InetAddress.getAllByName(InetAddress.java:1316)
at java.net.InetAddress.getAllByName(InetAddress.java:1239)
at java.net.InetAddress.getByName(InetAddress.java:1189)
at com.ibm.ws.objectgrid.naming.DetermineTransport$1.run(DetermineTransport.java:292)
at com.ibm.ws.objectgrid.naming.DetermineTransport$1.run(DetermineTransport.java:288)
at java.security.AccessController.doPrivileged(AccessController.java:452)
at com.ibm.ws.objectgrid.naming.DetermineTransport.probe(DetermineTransport.java:288)
at com.ibm.ws.objectgrid.naming.LocationServiceFactory$1.call(LocationServiceFactory.java:1451)
at com.ibm.ws.objectgrid.naming.LocationServiceFactory$1.call(LocationServiceFactory.java:1447)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
java.net.UnknownHostException: tvma1224.server.xxx.net
Seems pretty clear that the server where the code is running can't lookup tvma1224.server.xxx.net w/ the system resolver. If you can't fix DNS, add an entry to /etc/hosts or the equivalent.

Liferay 7 cannot add or edit page,portlet and sites

I installed Liferay on my server, and i get problem of not being able to add, update the site, page, and portlet. Only in View mode.
Just FYI i'm using:
Liferay 7.0 CE GA6
Linux OS v 3.10.0-693.21.1.el7.x86_64
Architecture : amd64
JAVA 1.8.0
The main page of my liferay only displays the Hello World portlet, and the navigation portlet and the configure page displaying message:
This portlet has been undeployed. Please redeploy it or remove it from
the page.
I have read some literature, saying that my liferay bundle is corrupted.
I already downloaded bundle liferay with wget or drag and drop bundle.zip via FTP. But always get the same result.
Resulting errors in tail -f ../logs/catalina.out :
When starting liferay :
Caused by: java.lang.RuntimeException: org.portletbridge.portlet.GUIDException: error - failure to instantiate GUIDGeneratorjava.net.UnknownHostException: portal: portal: Name or service not known
---
ERROR [localhost-startStop-1][com_liferay_portal_osgi_web_portlet_tracker:97] [com.liferay.portal.osgi.web.portlet.tracker.internal.PortletTracker(22)] The activate method has thrown an exception
java.lang.ExceptionInInitializerError
at org.portletbridge.portlet.PortletBridgePortlet.createViewPortlet(PortletBridgePortlet.java:219)
When access navigation portlet or the configure page:
ERROR [http-nio-8080-exec-6][BaseJSPPortletConfigurationIcon:59] Unable to include JSP /configuration/icon/copy_applications.jsp
ERROR [localhost-startStop-1][com_liferay_portal_osgi_web_portlet_tracker:97] [com.liferay.portal.osgi.web.portlet.tracker.internal.PortletTracker(22)] The activate method has thrown an exception
Caused by: java.lang.NullPointerException
at org.apache.jsp.configuration.icon.copy_005fapplications_jsp._jspService(copy_005fapplications_jsp:410)
Does any one know how to fix this?
I mean, Liferay can work normally as usual, as in the myliferay on localhost.
Thank you for your attention.
We faced this issue as well recently. Because of an unsatisfied reference, not all of GroupPagesPortlet's services started. In our case, there were an entry in the release_ table which state_ was not 0, it was 1. Value 1 means a failed upgrade.
In our case the workaround/solution was to change the value to 0 then restart the server.
In more details:
1) Connected to Gogo shell
2) Ran scr:list
Found:
[ 389] com.liferay.layout.admin.web.internal.portlet.GroupPagesPortlet enabled
[2746] [unsatisfied reference]
3) Running scr:info on the component ID (2746 in the above output), it reported the following unsatisfied references:
UnsatisfiedReference: MDRActionLocalService
Target: null
(no target services)
UnsatisfiedReference: MDRActionService
Target: null
(no target services)
UnsatisfiedReference: MDRRuleGroupInstanceLocalService
Target: null
(no target services)
UnsatisfiedReference: MDRRuleGroupInstanceService
Target: null
(no target services)
4) Ran dm wtf and it reported that com.liferay.mobile.device.rules.service doesn't have a proper release state, or is at the wrong version:
com.liferay.portal.kernel.model.Release (&(release.bundle.symbolic.name=com.liferay.mobile.device.rules.service)(&(release.schema.version>=1.0.0)(!(release.schema.version>=1.1.0)))(|(!(release.state=*))(release.state=0))) is not found in the service registry
So to summarize, com.liferay.mobile.device.rules.service failed to upgrade, which resulted in all of its transitive dependencies failing to start. GroupPagesPortlet happens to be one of those dependencies.

java.lang.IllegalStateException: Scanner engine is not started. Unable to execute task

i tried an update of the sonarqube Server.
Now i get an error when i'm trying to scan my project with the ant task.
The error is "java.lang.IllegalStateException: Scanner engine is not started. Unable to execute task."
The Ant Task was succesful on my old Server (6.1), on the new one (6.5) it failed. So i tried to downgrade to 6.4, but the error still remains.
So i downgraded to 6.3 and the error disappears.
My question is, does anyone know about this error? And how can i solve it?
This is a misleading error message. I faced this error when I added Authentication to my server i.e. force authentication for every user.
If you have added authentication recently too, then you need to make sure that you are passing the sonar.login property through your scanner.
You may create a "build" user, generate its token and pass it to the sonar job.
This is how a token can be generated.

API backend's app revision 'X' not the same as expected 'Y'

All.
After deployment of my Java application to Google-App-Engine standard environment I face with following backend exception:
Request url :
/_ah/spi/BackendService.getApiConfigs
Exception :
com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backend method (SystemService.java:398)
com.google.api.server.spi.response.BadRequestException: API backend's app revision '397417657720349940' not the same as expected '397211310482055273'
at com.google.api.server.spi.BackendService.getApiConfigs(BackendService.java:92)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:42)
at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:363)
at com.google.api.server.spi.SystemServiceServlet.execute(SystemServiceServlet.java:113)
at com.google.api.server.spi.SystemServiceServlet.doPost(SystemServiceServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
...
As a result I can't use my newly deployed app to migrate traffic to it.
Did any-one face the same problem? How did you solve it?
Thanks in advance.
This problem occurs once you try to upload a version while another version is still not finished updating or you tried to cancel by using Ctrl+C key.
Solution: rollback the conflicting version by going to your app engine sdk bin folder and run the command which will take your snapshot as a parameter
On mac : mac-bin$ ./appcfg.sh rollback patth-to-your-snapshot-in-target-folder
On Windows : win-bin>appcfg.cmd rollback patth-to-your-snapshot-in-target-folder

JAAS login configuration error on Tomcat. Unable to loas JAAS config file

I am trying to implement a simple JAAS module with realm configuration on Tomcat 7. I am trying to implement this based on the following link:
http://www.byteslounge.com/tutorials/jaas-authentication-in-tomcat-example
I have placed jass.config in CATALINA_HOME/conf folder and have added the following code to CATALINA_HOME/bin/catalina.bat file
JAVA_OPTS=$JAVA_OPTS "-Djava.security.auth.login.config==$CATALINA_HOME/conf/jaas.config"
However, once I start Tomcat and attempt to access the protected admin.html page, I get the basic login dialog of the browser (as expected). But while trying to log in, Tomcat reports the following error:
SEVERE: Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
Please help how to make Tomcat find the JAAS config file.
The fact that you're using .bat file suggests you're using Windows where variables get referred to using %VARIABLE% notation instead of $VARIABLE. Try changing the expression to:
set JAVA_OPTS=%JAVA_OPTS% -Djava.security.auth.login.config=%CATALINA_HOME%/conf/jaas.config

Categories