WSO2 EMM GCM not working null Reference exceptions - exception

I am using WSO2 EMM version 1.1.0
After registrering some Android devices all was going well but after
I try to setup GCM with Android , I got some exception in the carbonlog
what can I do ?
TID: [0] [EMM] [2015-02-05 13:32:09,473] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} - org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (gcm#7) {org.jaggeryjs.jaggery.core.manager.WebAppManager}
org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (gcm#7)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
Caused by: org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (gcm#7)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen.gcm_21._c_anonymous_2(gcm:7)
at org.mozilla.javascript.gen.gcm_21.call(gcm)
Caused by: java.lang.NullPointerException
at org.wso2.mobile.gcm.GCMServerBridge.sendDataViaGCM(GCMServerBridge.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)

It is difficult to find the exact issue without the code as its impossible to debug. But you can look over this sample source code that integrates the capabilities of WSO2 EMM with the GCM. Check to see the Manifest file if you are missing some permissions or referencing some variable that has been declared but not been initialized.
Follow this and this article to see is there any cause that matches in your code for having the Null pointer Exception.\
Hope this Helps!!

Related

Getting class is frozen Runtime Exception while invoking webservice call and port-type

We are trying to make a soap webservice call when we are getting the below Runtime exception continously. we are running on AJSC7 platform.
Ecception is coming from "org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create"
iLib: ILIB-MSG-009 Something went wrong in the transformer.
java.lang.RuntimeException: com.att.csi.csi.namespaces.customercareprofile.types._public.commondatamodel.DiscountInfo$JaxbAccessorF_description class is frozen
at ilib.javassist.CtClassType.checkModify(CtClassType.java:309)
at ilib.javassist.CtBehavior.getMethodInfo(CtBehavior.java:111)
at com.att.ilib.transformer.InstrumentMeTransformer.getAnnotation(InstrumentMeTransformer.java:82)
at com.att.ilib.transformer.InstrumentMeTransformer.transform(InstrumentMeTransformer.java:62)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:271)
at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:92)
at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:87)
use isFrozen( ) method to check if it is acutally frozen and deFrost it for further modification. Javassist freezes a class when it is loaded so that further changes will be prohibited.
check out the following links for further reference.
official javassist tuorial for frozen class
samples for deFrost( )

FirebaseRemoteConfigFetchThrottledException ? #AskFirebase

When/where is this "FirebaseRemoteConfigFetchThrottledException" thrown?
Unfortunately we launched our Apps by keeping the RemoteConfig in developer mode. One of our Apps is working fine, but another App is throwing this exception quite often:
com.google.firebase.remoteconfig.FirebaseRemoteConfigFetchThrottledException
at com.google.firebase.remoteconfig.FirebaseRemoteConfig.zza(Unknown Source)
at com.google.firebase.remoteconfig.FirebaseRemoteConfig$1.zza(Unknown Source)
at com.google.firebase.remoteconfig.FirebaseRemoteConfig$1.onResult(Unknown Source)
at com.google.android.gms.internal.zzpt$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzpt$zza.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
It means you're trying to fetch values from the Remote Config service too frequently, and you're getting throttled (either by the client or by the service itself).
If you want to avoid having this happen in the future, I would recommend using a cache expiration time of no less than 2 hours (and, honestly, you're probably fine sticking with the default of 12 hours).

NoSuchMethodError in lxg.a

My users are getting this crash from my app, but I haven't a clue where it is coming from. It is mostly coming from Gingerbread users. The bug report from the Developer Console looks like this:
java.lang.NoSuchMethodError: android.view.ViewParent.requestSendAccessibilityEvent
at lxg.a(Unknown Source)
at lxx.a(Unknown Source)
at kzf.c(Unknown Source)
at lnx.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
The app is here:
https://www.google.ca/webhp?sourceid=chrome-instant&rlz=1C5CHFA_enCA507CA507&ion=1&espv=2&ie=UTF-8#q=trailnav
The app uses in app purchases and the camera. Could it be coming from one of those packages?
android.view.ViewParent.requestSendAccessibilityEvent was added in API 14 (Android 4.0). This crash appears when you try to call the method on a device with a lower API level.
The following code:
at lxg.a(Unknown Source)
at lxx.a(Unknown Source)
at kzf.c(Unknown Source)
Looks like an obfuscated code. So you're either using Proguard to obfuscate your code or you're using an external library which was obfuscated.
If you obfuscated the code with Proguard, then you can decode the obfuscated code as explained here. If you are using some external obfuscated library, then you can either search their documentation to see if they support API levels lower than 14. If they do, then you can send them a bug report.

Why am I getting error while trying to access a portal on Liferay 4.2.1?

I'm trying to cluster Web Session on Liferay 4.2.1. I've followed the specifications in the documentation.
When I try to access the portal I get a :
ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[local.host].[/].[MainServlet]] Servlet.service() for servlet MainServlet threw exception
java.lang.RuntimeException: java.io.NotSerializableException: com.liferay.portal.kernel.servlet.PortletSessionTracker
at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:98)
at com.terracotta.session.SerializedAttributeStore$SerializedAttributeWithCache.<init>(SerializedAttributeStore.java:141)
at com.terracotta.session.SerializedAttributeStore.put(SerializedAttributeStore.java:60)
at com.terracotta.session.SessionData.bindAttribute(SessionData.java:455)
at com.terracotta.session.SessionData.setAttributeReturnOld(SessionData.java:322)
at com.terracotta.session.SessionData.setAttribute(SessionData.java:313)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:581)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.portal.filter.LoginProcessFilter.doFilter(LoginProcessFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.liferay.filters.secure.SecureFilter.doFilter(SecureFilter.java:143)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.portal.filter.ClientHibernateFilter.doFilter(ClientHibernateFilter.java:74)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.tcInvoke(SessionValve55.java:99)
at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(SessionValve55.java:85)
at org.terracotta.session.ModernTomcatSessionValve.invoke(ModernTomcatSessionValve.java:66)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: com.liferay.portal.kernel.servlet.PortletSessionTracker
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at org.terracotta.cache.serialization.DsoSerializationStrategy.serialize(DsoSerializationStrategy.java:61)
at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:96)
... 35 more
Any help is appreciated.
Thank you.
Update: Apparently Liferay 4.2.1 is not supported by Terracotta as it is too old. Suggestions would be to switch to the latest Liferay version(6).

Getting java.rmi.RemoteException: EJB Exception Eventhough classpath, XMLs, Beans are correctly defined and deployed

I am having bad time debugging with this problem. I am migrating my codes from Java 1.4 to JDK 6 and Weblogic 8.1.5 to Weblogic 10.3. I have converted the deployment descriptors of EJBs using DDConverver utility of weblogic. Beans consists of stateless session and Entity beans (2.1). Application is made of JSP as front-end and EJBs as middle ware. While logging i am calling one session bean which internally called entity beans and loads the same. I am getting following exception when Session bean calls entity bean. Session call is successful, only the issue is entity call from session bean.
I am using development environment for this. JSPs are stored at
C:\MisasiaAppln10.3_DEV\misasia\autodeploy\misasia
EJBs are deployed at
C:\MisasiaAppln10.3_DEV\misasia\servers\AdminServer\upload
Exception Details:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/misasia/admin/setupmaster/SetupMasterHome
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:222)
at com.misasia.admin.ctrlsession.controlSession_ho24d0_EOImpl_1030_WLStub.login(Unknown Source)
at jsp_servlet.__index._jspService(__index.java:197)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NoClassDefFoundError: com/misasia/admin/setupmaster/SetupMasterHome
at com.misasia.admin.ctrlsession.controlBean.loadSetupMaster(controlBean.java:149)
at com.misasia.admin.ctrlsession.controlBean.login(controlBean.java:119)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:187)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:15)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:30)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:126)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:114)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
at $Proxy60.login(Unknown Source)
at com.misasia.admin.ctrlsession.controlSession_ho24d0_EOImpl.login(controlSession_ho24d0_EOImpl.java:840)
at com.misasia.admin.ctrlsession.controlSession_ho24d0_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:172)
... 18 more
Caused by: java.lang.ClassNotFoundException: com.misasia.admin.setupmaster.SetupMasterHome
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:176)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 44 more
Sample Codes:
Call of Session from JSP (THIS WORKS FINE)
env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
ic = new InitialContext(env);
ctrlHome = (controlHome)ic.lookup("controlSessionEJB");
ctrl = (control)ctrlHome.create();
Call of Entity from Session (THIS FAILS)
Object refsetup = ic.lookup("java:comp/env/ejb/SetupMasterEJB");
// This is the line which gives an error
SetupMasterHome setuph = (SetupMasterHome)PortableRemoteObject.narrow(refsetup, SetupMasterHome.class);
java.lang.NoClassDefFoundError:
com/misasia/admin/setupmaster/SetupMasterHome
means that SetupMasterHome.class is missing in server/module classpath while executing ControlBean's loadSetupMaster method. Adding appropriate jar will solve the problem.