问:
ADFC-10001: cannot instantiate class view.Addition
I am new to ADF, I am doing adding of two numbers. Created two files:

AdditionNumbers.jspx

Addition

When I run the Application, am getting below error:

Root cause of ServletException.

```oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'view.Addition'
    at oracle.adfinternal.controller.util.Utils.createAndLogFacesException(Utils.java:184)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:192)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'view.Addition'
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:276)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:186)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.UnsupportedClassVersionError: view/Addition : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:186)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
 SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101017 MACHINE = BNGW8-MJOGAR TXID =  CONTEXTID = 7a896e0ea900a80f:-4f901b37:15aec18d3a5:-8000-0000000000000024 TIMESTAMP = 1490019933124
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,246 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,247 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,249 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,248 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,245 during the configured idle timeout of 5 secs>
<DiagnosticsDataExtractorImpl> <createADR`enter code here`Incident> incident 2 created with problem key "DFW-99998 [java.lang.UnsupportedClassVersionError][oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance][AddingTwoNumbers]"
```

答:
i think you may have done the binding of method made in impl class in page defination of jsf page.

can you say more specifically what you have used exactly including taskflows and backing bean. post your code here.

ContentLicense: CC BY-SA 4.0

Body:
I am new to ADF, I am doing adding of two numbers. Created two files:

AdditionNumbers.jspx

Addition

When I run the Application, am getting below error:

Root cause of ServletException.

oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'view.Addition'
    at oracle.adfinternal.controller.util.Utils.createAndLogFacesException(Utils.java:184)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:192)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'view.Addition'
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:276)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:186)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.UnsupportedClassVersionError: view/Addition : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:186)
    at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:873)
    at oracle.adfinternal.controller.application.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:111)
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
    at com.sun.el.parser.AstIdentifier.getValue(Unknown Source)
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getUncachedReadOnly(EditableValueRenderer.java:502)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:409)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.isReadOnly(LabeledInputRenderer.java:294)
    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.getClientComponentType(LabeledInputRenderer.java:86)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1300)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:422)
    at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2788)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:438)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1341)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1432)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:358)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:840)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:979)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:408)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:237)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    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:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
 SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101017 MACHINE = BNGW8-MJOGAR TXID =  CONTEXTID = 7a896e0ea900a80f:-4f901b37:15aec18d3a5:-8000-0000000000000024 TIMESTAMP = 1490019933124
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,246 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,247 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,249 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,248 during the configured idle timeout of 5 secs>
<20 Mar, 2017 7:55:35 PM IST> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 127.0.0.1:59,245 during the configured idle timeout of 5 secs>
<DiagnosticsDataExtractorImpl> <createADR`enter code here`Incident> incident 2 created with problem key "DFW-99998 [java.lang.UnsupportedClassVersionError][oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance][AddingTwoNumbers]"


来源: stackexchange

问:
No such module 'EVReflection'
New to XCode & iOS dev. Got "No such module 'EVReflection'" trying to import and use EVReflection. I have inited and installed pods. Here is my "pod install" output:

```<code>Analyzing dependencies
Downloading dependencies
Using EVReflection (4.8.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
</code>```

Here is my PodFile:

```<code>platform :ios, '9.0'

target 'myproject' do
  use_frameworks!
  pod "EVReflection"

  target 'myprojectTests' do
    inherit! :search_paths
  end

  target 'myprojectUITests' do
    inherit! :search_paths
  end

end
</code>```

答:
Once you installed your Pods, close xCode. Then open it back using the following command line:

$ open App.xcworkspace

Clean your project then build project and it will work as expected. Finally, you can access it properties

ContentLicense: CC BY-SA 3.0

Title: No such module 'EVReflection'

Body:
New to XCode & iOS dev. Got "No such module 'EVReflection'" trying to import and use EVReflection. I have inited and installed pods. Here is my "pod install" output:

Analyzing dependencies
Downloading dependencies
Using EVReflection (4.8.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

Here is my PodFile:

platform :ios, '9.0'

target 'myproject' do
  use_frameworks!
  pod "EVReflection"

  target 'myprojectTests' do
    inherit! :search_paths
  end

  target 'myprojectUITests' do
    inherit! :search_paths
  end

end


问:
"The ConnectionString property is invalid." when I know it is valid
I have an ASP.NET MVC application where the database is on an IBM i-Series server. I have the application development close to completion when I started to get a The ConnectionString property is invalid. error popping up:

only at log on

after the first successful log on after rebuilding

anyone logged on can still work normally

Also, note that this problem only shows up for one project in my solution. The other project uses the exact same connection string and doesn't have this problem (copied and pasted to be 100% sure). I am in active development on these projects, but have not touched the connections strings nor worked with the AccountController and related model classes after getting the login working.

I am using Visual Studio 2008 and .NET version 3.5.

Connection String:

```<code><connectionStrings>
    <add name="IbmIConnectionString" connectionString="DataSource=192.168.50.200;DefaultCollection=QMFILES;Naming=sql;UserID=XXX;Password=XXXX;"/>
</connectionStrings>
</code>```

Account Controller Logon method:

```<code>    [HttpPost]
    public ActionResult LogOn(LogOnModel model, string returnUrl)
    {
        string fullName = String.Empty;
        string employeeId = String.Empty;

        if (ModelState.IsValid)
        {
            if (MembershipService.ValidateUser(model.UserName, model.Password))
            {
                FormsService.SignIn(model.UserName, model.RememberMe);
                EmployeeLoginModel elm = new EmployeeLoginModel();
                elm.GetUserInfo(model.UserName, model.Password, out fullName, out employeeId);
                // Update the AuthCookie to include the last 4 digits of the SSN.
                string userDataString = String.Format("{0}|{1}|{2}", model.Password, fullName.Trim(), employeeId.Trim());
                HttpCookie authCookie = FormsAuthentication.GetAuthCookie(model.UserName, model.RememberMe);
                FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
                FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(ticket.Version, ticket.Name, ticket.IssueDate, ticket.Expiration, ticket.IsPersistent, userDataString);
                authCookie.Value = FormsAuthentication.Encrypt(newTicket);
                Response.Cookies.Add(authCookie);

                if (!String.IsNullOrEmpty(returnUrl))
                {
                    return Redirect(returnUrl);
                }
                else
                {
                    return RedirectToAction("Index", "Home");
                }
            }
            else
            {
                ModelState.AddModelError("", "The user name or password provided is incorrect.");
            }
        }

        // If we got this far, something failed, redisplay form
        return View(model);
    }
</code>```

Employee Login Model:

```<code>public class EmployeeLoginModel
{
    public string UserName { set; get; }
    public string Password { set; get; }

    private iDB2Connection conn;

    /// <summary>
    /// Initializes a new instance of the <see cref="EmployeeLoginModel"/> class.
    /// </summary>
    public EmployeeLoginModel()
    {
        conn = new iDB2Connection(ConfigurationManager.ConnectionStrings["IbmIConnectionString"].ConnectionString);
    }

    /// <summary>
    /// Determines whether [is valid user] [the specified username].
    /// </summary>
    /// <param name="username">The username.</param>
    /// <param name="password">The password.</param>
    /// <returns>
    ///     <c>true</c> if [is valid user] [the specified username]; otherwise, <c>false</c>.
    /// </returns>
    public bool IsValidUser(string username, string password)
    {
        int count = 0;

        // Get the data from the iSeries
        using (conn)
        {
            string sqlStatement = "SELECT COUNT(XXXXX) FROM XXXXX WHERE UPPER(XXXXXX) = @1 AND XXXXXX = @2";

            iDB2Command cmd = new iDB2Command(sqlStatement, conn);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@1", username.ToUpper());
            cmd.Parameters.Add("@2", password);
            conn.Open();
            count = (Int32)cmd.ExecuteScalar();
            conn.Close();
        }

        return ((count == 0) ? false : true);
    }
</code>```

答:
After posting this, I had a theory. I was switching between browsers getting things setup for a demo. I changed my method to:

```<code>    public bool IsValidUser(string username, string password)
    {
        int count = 0;

        // Get the data from the iSeries
        using (iDB2Connection conn = new iDB2Connection(ConfigurationManager.ConnectionStrings["IbmIConnectionString"].ConnectionString))
        {
            string sqlStatement = "SELECT COUNT(XXXXXX) FROM XXXXXX WHERE UPPER(XXXXXX) = @1 AND XXXXXX = @2";

            iDB2Command cmd = new iDB2Command(sqlStatement, conn);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@1", username.ToUpper());
            cmd.Parameters.Add("@2", password);
            conn.Open();
            count = (Int32)cmd.ExecuteScalar();
            conn.Close();
        }

        return ((count == 0) ? false : true);
    }
</code>```

It seems to be working now. I wonder if that was the problem.

ContentLicense: CC BY-SA 2.5

Body:
I have an ASP.NET MVC application where the database is on an IBM i-Series server. I have the application development close to completion when I started to get a The ConnectionString property is invalid. error popping up:

only at log on

after the first successful log on after rebuilding

anyone logged on can still work normally

Also, note that this problem only shows up for one project in my solution. The other project uses the exact same connection string and doesn't have this problem (copied and pasted to be 100% sure). I am in active development on these projects, but have not touched the connections strings nor worked with the AccountController and related model classes after getting the login working.

I am using Visual Studio 2008 and .NET version 3.5.

Connection String:

<connectionStrings>
    <add name="IbmIConnectionString" connectionString="DataSource=192.168.50.200;DefaultCollection=QMFILES;Naming=sql;UserID=XXX;Password=XXXX;"/>
</connectionStrings>

Account Controller Logon method:

    [HttpPost]
    public ActionResult LogOn(LogOnModel model, string returnUrl)
    {
        string fullName = String.Empty;
        string employeeId = String.Empty;

        if (ModelState.IsValid)
        {
            if (MembershipService.ValidateUser(model.UserName, model.Password))
            {
                FormsService.SignIn(model.UserName, model.RememberMe);
                EmployeeLoginModel elm = new EmployeeLoginModel();
                elm.GetUserInfo(model.UserName, model.Password, out fullName, out employeeId);
                // Update the AuthCookie to include the last 4 digits of the SSN.
                string userDataString = String.Format("{0}|{1}|{2}", model.Password, fullName.Trim(), employeeId.Trim());
                HttpCookie authCookie = FormsAuthentication.GetAuthCookie(model.UserName, model.RememberMe);
                FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
                FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(ticket.Version, ticket.Name, ticket.IssueDate, ticket.Expiration, ticket.IsPersistent, userDataString);
                authCookie.Value = FormsAuthentication.Encrypt(newTicket);
                Response.Cookies.Add(authCookie);

                if (!String.IsNullOrEmpty(returnUrl))
                {
                    return Redirect(returnUrl);
                }
                else
                {
                    return RedirectToAction("Index", "Home");
                }
            }
            else
            {
                ModelState.AddModelError("", "The user name or password provided is incorrect.");
            }
        }

        // If we got this far, something failed, redisplay form
        return View(model);
    }

Employee Login Model:

public class EmployeeLoginModel
{
    public string UserName { set; get; }
    public string Password { set; get; }

    private iDB2Connection conn;

    ///
    /// Initializes a new instance of the <see cref="EmployeeLoginModel"/> class.
    ///
    public EmployeeLoginModel()
    {
        conn = new iDB2Connection(ConfigurationManager.ConnectionStrings["IbmIConnectionString"].ConnectionString);
    }

    ///
    /// Determines whether [is valid user] [the specified username].
    ///
    /// <param name="username">The username.</param>
    /// <param name="password">The password.</param>
    /// <returns>
    ///     <c>true</c> if [is valid user] [the specified username]; otherwise, <c>false</c>.
    /// </returns>
    public bool IsValidUser(string username, string password)
    {
        int count = 0;

        // Get the data from the iSeries
        using (conn)
        {
            string sqlStatement = "SELECT COUNT(XXXXX) FROM XXXXX WHERE UPPER(XXXXXX) = @1 AND XXXXXX = @2";

            iDB2Command cmd = new iDB2Command(sqlStatement, conn);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@1", username.ToUpper());
            cmd.Parameters.Add("@2", password);
            conn.Open();
            count = (Int32)cmd.ExecuteScalar();
            conn.Close();
        }

        return ((count == 0) ? false : true);
    }

Body:
After posting this, I had a theory. I was switching between browsers getting things setup for a demo. I changed my method to:

    public bool IsValidUser(string username, string password)
    {
        int count = 0;

        // Get the data from the iSeries
        using (iDB2Connection conn = new iDB2Connection(ConfigurationManager.ConnectionStrings["IbmIConnectionString"].ConnectionString))
        {
            string sqlStatement = "SELECT COUNT(XXXXXX) FROM XXXXXX WHERE UPPER(XXXXXX) = @1 AND XXXXXX = @2";

            iDB2Command cmd = new iDB2Command(sqlStatement, conn);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.Add("@1", username.ToUpper());
            cmd.Parameters.Add("@2", password);
            conn.Open();
            count = (Int32)cmd.ExecuteScalar();
            conn.Close();
        }

        return ((count == 0) ? false : true);
    }

It seems to be working now. I wonder if that was the problem.


问:
Flexicious HTML DataGrid hide row based on column value
I have recently started working with HTML tree grid and was able to figure out how to hide different column based on visibility. My question to the developer is there a way by which I can hide a row in grid based on specific column value?

For example if there is a column called quantity if the value in this column is 0 then i need to hide all the rows in which quantity is 0

答: There are a number of different ways - you can use an external filter function: Here is an example : http://www.htmltreegrid.com/demo/prod_jq_treegrid.html?example=External%20Filter </p>


问:
MPMoviePlayer in iOS 9
i have made a function in iOS 8 to play a movie in the background and now when i want to use it in iOS 9 it gives me a warning and says that it best not to use MPMoviePlayer and instead use AVPlayer. but i don't know anything about AVPlayer. how can i convert this to a proper function without warning that uses AVPlayer instead of MPMoviePlayer?
heres the func :</p>

```<code>func playVideo() ->Bool {

    let path = NSBundle.mainBundle().pathForResource("video", ofType:"mov")
    //take path of video

    let url = NSURL.fileURLWithPath(path!)

    moviePlayer = MPMoviePlayerController(contentURL: url)
    //asigning video to moviePlayer

    if let player = moviePlayer {
        player.view.frame = self.view.bounds
        //setting the video size to the view size

        player.controlStyle = MPMovieControlStyle.None
        //Hiding the Player controls

        player.prepareToPlay()
        //Playing the video

        player.repeatMode = .One
        //Repeating the video

        player.scalingMode = .AspectFill
        //setting the aspect ratio of the player

        self.view.addSubview(player.view)
        self.view.addSubview(blurView)
        self.view.sendSubviewToBack(blurView)
        self.view.sendSubviewToBack(player.view)

        //adding the player view to viewcontroller
        return true

    }
    return false
}
</code>```

答:
import UIKit
import MediaPlayer
class videoView:UIViewController {</p>

```<code>var videoPlayer:MPMoviePlayerController!
override func viewDidLoad() {
     super.viewDidLoad()

let videoString:String = Bundle.main.path(forResource: "here you can place your video name", ofType:".mp4")!
        let videoURL = NSURL.init(fileURLWithPath: videoString)
        videoPlayer = MPMoviePlayerController(contentURL: videoURL as URL!)
        videoPlayer.view.frame = CGRect(x: 0, y: 0, width: videoView.frame.size.width, height: videoView.frame.size.height)
        videoView.addSubview(videoPlayer.view)
        videoPlayer.prepareToPlay()
        videoPlayer.shouldAutoplay = false
        videoPlayer.isFullscreen = false
        videoPlayer.controlStyle = MPMovieControlStyle.embedded
       }
       }
</code>```

Title: MPMoviePlayer in iOS 9

Body:
i have made a function in iOS 8 to play a movie in the background and now when i want to use it in iOS 9 it gives me a warning and says that it best not to use MPMoviePlayer and instead use AVPlayer. but i don't know anything about AVPlayer. how can i convert this to a proper function without warning that uses AVPlayer instead of MPMoviePlayer?
heres the func :

func playVideo() ->Bool {

    let path = NSBundle.mainBundle().pathForResource("video", ofType:"mov")
    //take path of video

    let url = NSURL.fileURLWithPath(path!)

    moviePlayer = MPMoviePlayerController(contentURL: url)
    //asigning video to moviePlayer

    if let player = moviePlayer {
        player.view.frame = self.view.bounds
        //setting the video size to the view size

        player.controlStyle = MPMovieControlStyle.None
        //Hiding the Player controls

        player.prepareToPlay()
        //Playing the video

        player.repeatMode = .One
        //Repeating the video

        player.scalingMode = .AspectFill
        //setting the aspect ratio of the player

        self.view.addSubview(player.view)
        self.view.addSubview(blurView)
        self.view.sendSubviewToBack(blurView)
        self.view.sendSubviewToBack(player.view)

        //adding the player view to viewcontroller
        return true

    }
    return false
}

Body:
import UIKit
import MediaPlayer
class videoView:UIViewController {

var videoPlayer:MPMoviePlayerController!
override func viewDidLoad() {
     super.viewDidLoad()

let videoString:String = Bundle.main.path(forResource: "here you can place your video name", ofType:".mp4")!
        let videoURL = NSURL.init(fileURLWithPath: videoString)
        videoPlayer = MPMoviePlayerController(contentURL: videoURL as URL!)
        videoPlayer.view.frame = CGRect(x: 0, y: 0, width: videoView.frame.size.width, height: videoView.frame.size.height)
        videoView.addSubview(videoPlayer.view)
        videoPlayer.prepareToPlay()
        videoPlayer.shouldAutoplay = false
        videoPlayer.isFullscreen = false
        videoPlayer.controlStyle = MPMovieControlStyle.embedded
       }
       }


问:
Accessing django project outside LAN systems
I want to configure Django project such that I can access the data from outside world(from any computer or mobile which is connected to internet).
  But not connected on LAN or same WiFi network.
    Can someone help with the steps.

Regards
Neha

答: I'm assuming you want to deploy your project to the Internet? In that case, you might want to consider a hosting provider like Heroku, Amazon Web Services, DigitalOcean or another Virtual Private Server (VPS) hosting provider.</p>


问:
unable to ping/send http requests to RHEL tomcat server on Azure
Note - I am fully aware that there are lot of similar issues posted before, but I tried NSG settings, psping but nothing seem to work

All, I brought up a RHEL7.3 server on Azure and installed JDK1.8 and Tomcat8. After starting Tomcat, I tried an http request from my browser:

http://XX.yy.zz.abc:8080/ but I was unable to get the index page

I also created an inbound security rule to allow HTTP and also allow IP range from our company.

Even worse is, when I tried pinging to this IP from my desktop computer, I am unable to ping the same - it is timing out.

Please note that in the past, I've been able to bring up servers and be able to connect from desktops without any issues - in a similar azure-companynetwork setup.

Am I missing anything here?

答:
According to your description, you had better check as the following ways:

1.Please ensure you could access your web by using 127.0.0.1:8080 on your VM.

2.Check your service listening.

```<code>netstat -ant|grep 8080
</code>```

Please ensure 8080 is listening on tcp not tcp6.

3.Open firewall port on RHEL.

```<code>sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
</code>```

More information about RHEL firewall please refer to this link.

4.Open port on Azure NSG.

NSG could be associated with NIC and subnet, you should check all of them.

Body:
According to your description, you had better check as the following ways:

1.Please ensure you could access your web by using 127.0.0.1:8080 on your VM.

2.Check your service listening.

netstat -ant|grep 8080

Please ensure 8080 is listening on tcp not tcp6.

3.Open firewall port on RHEL.

sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

More information about RHEL firewall please refer to this link.

4.Open port on Azure NSG.

NSG could be associated with NIC and subnet, you should check all of them.


问:
failing on unknown properties w/notification
If I disable failure on unknown properties:

new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)

is there a way to be notified when an unknown property is encountered? So that I can output a log message?

答:
The DeserializationProblemHandler class seems to do what you want.

It allows you to implement this method to handle unknown properties:

```<code>boolean handleUnknownProperty(DeserializationContext ctxt,
        JsonParser jp, JsonDeserializer<?> deserializer,
        Object beanOrClass, String propertyName)
</code>```

According to the documentation:

Method called when a JSON Map ("Object") entry with an unrecognized
  name is encountered.

You can register your custom handler on your DeserializationConfig object using the DeserializationConfig.withHandler(DeserializationProblemHandler h) method.

Body:
The DeserializationProblemHandler class seems to do what you want.

It allows you to implement this method to handle unknown properties:

boolean handleUnknownProperty(DeserializationContext ctxt,
        JsonParser jp, JsonDeserializer<?> deserializer,
        Object beanOrClass, String propertyName)

According to the documentation:

Method called when a JSON Map ("Object") entry with an unrecognized
  name is encountered.

You can register your custom handler on your DeserializationConfig object using the DeserializationConfig.withHandler(DeserializationProblemHandler h) method.


问:
Java Spark: Non-blocking routes / callbacks with CompletableFutures
I have to make calls to long running methods in a Spark API implementation. These methods return CompletableFutures, so I'd like to free up the current Thread by triggering Spark to answer the client request in a callback.
As far as I can tell this is not possible with Spark, but I'd like to make sure I am not overlooking anything.
To illustrate the question, see the small code sample below. </p>

```<code>import spark.Spark;
import java.util.concurrent.CompletableFuture;

public class HelloSpark {

    public static void main(String[] args) {
        Spark.get("/what_i_have_to_do", (req, res) -> {
            CompletableFuture<String> f = callToSlowWorker();
            return f.get();
        });

        Spark.get("/what_i_would_like_to_do", (req, res) -> {
            CompletableFuture<String> f = callToSlowWorker();
            f.whenComplete((answer, throwable) -> {
                if(throwable != null){
                    // send error to requesting client
                    res.status(500);
                    res.body(throwable.getMessage());
                } else {
                    // send answer to requesting client
                    res.body(answer);
                }
                // trigger spark to return the response to the client
                // ...?!?
            });
            return null; // obviously not what I want, just to make this sample code compile
        });
    }

    static CompletableFuture<String> callToSlowWorker(){
        return CompletableFuture.supplyAsync(() -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ignored) {
            }
            return "Hello World";
        });
    }
}
</code>```

答: SparkJava is currently blocking only, thus what you've described is not possible. There is an open enhancement request to add support for a non blocking API. </p>

Body:
I have to make calls to long running methods in a Spark API implementation. These methods return CompletableFutures, so I'd like to free up the current Thread by triggering Spark to answer the client request in a callback.
As far as I can tell this is not possible with Spark, but I'd like to make sure I am not overlooking anything.
To illustrate the question, see the small code sample below.

import spark.Spark;
import java.util.concurrent.CompletableFuture;

public class HelloSpark {

    public static void main(String[] args) {
        Spark.get("/what_i_have_to_do", (req, res) -> {
            CompletableFuture<String> f = callToSlowWorker();
            return f.get();
        });

        Spark.get("/what_i_would_like_to_do", (req, res) -> {
            CompletableFuture<String> f = callToSlowWorker();
            f.whenComplete((answer, throwable) -> {
                if(throwable != null){
                    // send error to requesting client
                    res.status(500);
                    res.body(throwable.getMessage());
                } else {
                    // send answer to requesting client
                    res.body(answer);
                }
                // trigger spark to return the response to the client
                // ...?!?
            });
            return null; // obviously not what I want, just to make this sample code compile
        });
    }

    static CompletableFuture<String> callToSlowWorker(){
        return CompletableFuture.supplyAsync(() -> {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ignored) {
            }
            return "Hello World";
        });
    }
}


问:
Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I'm making a web application using WEB API 2.
Previously, my project ran fine without any errors. Errors only came after I had updated my nuget packages to the lastest version.

Currently, when I start my web application, it throws me an error:

This is the command where exception is thrown (in Startup.cs)

```<code>GlobalConfiguration.Configure(ApiRouteConfig.Register);
</code>```

I've tried reinstalling WEB API 5.2.3 again and again but no luck. The error kept happening.

Here is my packages.config

```<code><?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Autofac" version="4.4.0" targetFramework="net461" />
  <package id="Autofac.Mvc5" version="4.0.1" targetFramework="net461" />
  <package id="Autofac.SignalR2" version="4.0.0" targetFramework="net46" />
  <package id="Autofac.WebApi2" version="4.0.1" targetFramework="net461" />
  <package id="EntityFramework" version="6.1.3" targetFramework="net46" />
  <package id="JWT" version="1.3.4" targetFramework="net461" />
  <package id="log4net" version="2.0.8" targetFramework="net461" />
  <package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.SignalR.Core" version="2.2.1" targetFramework="net46" />
  <package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.1" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net46" />
  <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.3" targetFramework="net461" />
  <package id="Microsoft.IdentityModel.Logging" version="1.1.3" targetFramework="net461" />
  <package id="Microsoft.IdentityModel.Tokens" version="5.1.3" targetFramework="net461" />
  <package id="Microsoft.Net.Compilers" version="2.0.1" targetFramework="net461" developmentDependency="true" />
  <package id="Microsoft.Owin" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Security.Jwt" version="3.0.1" targetFramework="net461" />
  <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net461" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
  <package id="Modernizr" version="2.8.3" targetFramework="net46" />
  <package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" />
  <package id="Nustache" version="1.16.0.4" targetFramework="net461" />
  <package id="Owin" version="1.0" targetFramework="net46" />
  <package id="ToolKit-DataAnnotations" version="1.0.4" targetFramework="net461" />
</packages>
</code>```

I've search for many solutions on internet but didn't work for me. I don't know what is going on with my project. It cost me one day with nothing.

My development environment:

Visual Studio 2015 Community Update 3

Net Framework 4.6.1

Can anyone help me please ?

Thank you.

答:
This has occured because some assembly still references System.Net.Http version 4.0.0.0 while you have upgraded it and version 4.0.0.0 no longer exist.

Things you can try:

Search for System.Net.Http.dll in your project folder. It will usually be in packages. Right click on dll > Properties > Goto Details tab > Find Product Version there.

Open App.config, add the following code. assemblyBinding should come under configuration > runtime. Replace current_version with the version you found in the previous step.

```<code><configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Net.Http"
                              publicKeyToken="b03f5f7f11d50a3a"
                              culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0"
                             newVersion="current_version"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>
</code>```

This will redirect any call to version 4.0.0.0 to the current_version dll at runtime.

Body:
I'm making a web application using WEB API 2.
Previously, my project ran fine without any errors. Errors only came after I had updated my nuget packages to the lastest version.

Currently, when I start my web application, it throws me an error:

This is the command where exception is thrown (in Startup.cs)

GlobalConfiguration.Configure(ApiRouteConfig.Register);

I've tried reinstalling WEB API 5.2.3 again and again but no luck. The error kept happening.

Here is my packages.config

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Autofac" version="4.4.0" targetFramework="net461" />
  <package id="Autofac.Mvc5" version="4.0.1" targetFramework="net461" />
  <package id="Autofac.SignalR2" version="4.0.0" targetFramework="net46" />
  <package id="Autofac.WebApi2" version="4.0.1" targetFramework="net461" />
  <package id="EntityFramework" version="6.1.3" targetFramework="net46" />
  <package id="JWT" version="1.3.4" targetFramework="net461" />
  <package id="log4net" version="2.0.8" targetFramework="net461" />
  <package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.SignalR.Core" version="2.2.1" targetFramework="net46" />
  <package id="Microsoft.AspNet.SignalR.SystemWeb" version="2.2.1" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebApi.Cors" version="5.2.3" targetFramework="net46" />
  <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net461" />
  <package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net46" />
  <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.3" targetFramework="net461" />
  <package id="Microsoft.IdentityModel.Logging" version="1.1.3" targetFramework="net461" />
  <package id="Microsoft.IdentityModel.Tokens" version="5.1.3" targetFramework="net461" />
  <package id="Microsoft.Net.Compilers" version="2.0.1" targetFramework="net461" developmentDependency="true" />
  <package id="Microsoft.Owin" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Cors" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net46" />
  <package id="Microsoft.Owin.Security.Jwt" version="3.0.1" targetFramework="net461" />
  <package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net461" />
  <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
  <package id="Modernizr" version="2.8.3" targetFramework="net46" />
  <package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" />
  <package id="Nustache" version="1.16.0.4" targetFramework="net461" />
  <package id="Owin" version="1.0" targetFramework="net46" />
  <package id="ToolKit-DataAnnotations" version="1.0.4" targetFramework="net461" />
</packages>

I've search for many solutions on internet but didn't work for me. I don't know what is going on with my project. It cost me one day with nothing.

My development environment:

Visual Studio 2015 Community Update 3

Net Framework 4.6.1

Can anyone help me please ?

Thank you.

Body:
This has occured because some assembly still references System.Net.Http version 4.0.0.0 while you have upgraded it and version 4.0.0.0 no longer exist.

Things you can try:

Search for System.Net.Http.dll in your project folder. It will usually be in packages. Right click on dll > Properties > Goto Details tab > Find Product Version there.

Open App.config, add the following code. assemblyBinding should come under configuration > runtime. Replace current_version with the version you found in the previous step.

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <dependentAssembly>
            <assemblyIdentity name="System.Net.Http"
                              publicKeyToken="b03f5f7f11d50a3a"
                              culture="neutral" />
            <bindingRedirect oldVersion="4.0.0.0"
                             newVersion="current_version"/>
         </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

This will redirect any call to version 4.0.0.0 to the current_version dll at runtime.


问:
Angular Material 2 Input style (single element/page)
Is it possible to change the style (text color, placeholder color, underline color, etc) for a single Input element? I can style the remainder according to a global style, but what if you want to set the theme specifically on a single page or for a single control? What is the best practice for this?

For example, how do I style this block so that the placeholder, text and accent colors are all custom?

```<code><md-input-container>
  <input mdInput placeholder="Email address">
</md-input-container>
</code>```

答:
You can define a custom theme for each material component and you should be able to override your base theme for the component in question like so:

```<code>@import '~/@angular/material/input/input-theme'
.custom-input {
  @include mat-input-theme($custom-input-theme)
}
</code>```

Then just add the class to the <md-input-container>.

Also, if you are defining the custom class in a component's stylesheet, make sure the encapsulation is set to none:

```<code>@Component({
  ...
  encapsulation: ViewEncapsulation.None
})
</code>```

Body:
Is it possible to change the style (text color, placeholder color, underline color, etc) for a single Input element? I can style the remainder according to a global style, but what if you want to set the theme specifically on a single page or for a single control? What is the best practice for this?

For example, how do I style this block so that the placeholder, text and accent colors are all custom?

<md-input-container>
  <input mdInput placeholder="Email address">
</md-input-container>

Body:
You can define a custom theme for each material component and you should be able to override your base theme for the component in question like so:

@import '~/@angular/material/input/input-theme'
.custom-input {
  @include mat-input-theme($custom-input-theme)
}

Then just add the class to the <md-input-container>.

Also, if you are defining the custom class in a component's stylesheet, make sure the encapsulation is set to none:

@Component({
  ...
  encapsulation: ViewEncapsulation.None
})


问:
Go time.Parse() getting “month out of range” error
I'm new to Go and I was parsing a nginx time format string. You can check my code here:

package main

import (
 "time"
 "log"
 "fmt"
)

func main(){
 //nginx time format
 nginx_time :="03/Apr/2017:08:29:05 +0800"
 t,err:=time.Parse("02/Jan/2016:15:04:05 MST",nginx_time)

 if err != nil {
  log.Fatal(err)
 }

 fmt.Println(t.Format("2006-01-02 15:04:05"))
}```
</div>
</div>
</p>

<p>I received the following error:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>GOROOT=/usr/local/go
GOPATH=/usr/local/share/go:/Users/sinopex/goroot:/Users/sinopex/goroot
/usr/local/go/bin/go build -o "/private/var/folders/5b/yf1f_9lj06bfvqvcq2h9myph0000gn/T/Build 1.go and rungo" /Users/sinopex/goroot/src/github.com/sinopex/golang/example/test/1.go
"/private/var/folders/5b/yf1f_9lj06bfvqvcq2h9myph0000gn/T/Build 1.go and rungo"
2017/04/03 12:17:12 parsing time "03/Apr/2017:08:29:05 +0800": month out of range
http://stackoverflow.com/questions/ask#
Process finished with exit code 1</code>```

Any ideas on what I am doing incorrectly?

Thank you.

答:
Your parsing format does not match the reference format and the input format in 2 places:

The year in the reference format should be 2006

The timezone offset is to be specified by numbers, not by timezone name: -0700

So:

```<code>t, err := time.Parse("02/Jan/2006:15:04:05 -0700", nginx_time)
</code>```

play.golang: https://play.golang.org/p/enJY0VBt3a

Body:
I'm new to Go and I was parsing a nginx time format string. You can check my code here:

package main

import (
 "time"
 "log"
 "fmt"
)

func main(){
 //nginx time format
 nginx_time :="03/Apr/2017:08:29:05 +0800"
 t,err:=time.Parse("02/Jan/2016:15:04:05 MST",nginx_time)

 if err != nil {
  log.Fatal(err)
 }

 fmt.Println(t.Format("2006-01-02 15:04:05"))
}

I received the following error:

GOROOT=/usr/local/go
GOPATH=/usr/local/share/go:/Users/sinopex/goroot:/Users/sinopex/goroot
/usr/local/go/bin/go build -o "/private/var/folders/5b/yf1f_9lj06bfvqvcq2h9myph0000gn/T/Build 1.go and rungo" /Users/sinopex/goroot/src/github.com/sinopex/golang/example/test/1.go
"/private/var/folders/5b/yf1f_9lj06bfvqvcq2h9myph0000gn/T/Build 1.go and rungo"
2017/04/03 12:17:12 parsing time "03/Apr/2017:08:29:05 +0800": month out of range
http://stackoverflow.com/questions/ask#
Process finished with exit code 1

Any ideas on what I am doing incorrectly?

Thank you.

Body:
Your parsing format does not match the reference format and the input format in 2 places:

The year in the reference format should be 2006

The timezone offset is to be specified by numbers, not by timezone name: -0700

So:

t, err := time.Parse("02/Jan/2006:15:04:05 -0700", nginx_time)

play.golang: https://play.golang.org/p/enJY0VBt3a


问:
Unity3D update score error
I am following a tutorial by Charger Games on youtube it's about street racer android game and I am seeing this error on the Unity3D's console it says
 NullReferenceException: Object reference not set to an instance of an object UIManager.scoreUpdate ()

This is the code that has line that caused the error

```<code>public Text scoreText;
int score;

void Start () {
    score = 0;
    InvokeRepeating("scoreUpdate", 1.0f, 0.5f);
}
void Update () {
    scoreText.text = "Score: " + score; //this is the line. If I erase this the error will disappear
    }
void scoreUpdate () {
    if (gameOver == false) {
        score += 1;
        }
    }
</code>```

If I remove it, the error will disappear. It's not causing malfunctions or anything, I am just curious cos I am willing to learn. Please help me guys

答:
The famous null reference exception error occur when you try to access an object/refrence who is not initialized properly. Like Unity docs stated

A NullReferenceException happens when you try to access a reference
  variable that isn’t referencing any object. If a reference variable
  isn’t referencing an object, then it’ll be treated as null. The
  run-time will tell you that you are trying to access an object, when
  the variable is null by issuing a NullReferenceException.(more)

Now particularly in your question, you are trying to access scoreText object which is not assigned properly. Make sure that you have assigned scoreText in inspector where your script is attached.

Title: Unity3D update score error

Body:
I am following a tutorial by Charger Games on youtube it's about street racer android game and I am seeing this error on the Unity3D's console it says
 NullReferenceException: Object reference not set to an instance of an object UIManager.scoreUpdate ()

This is the code that has line that caused the error

public Text scoreText;
int score;

void Start () {
    score = 0;
    InvokeRepeating("scoreUpdate", 1.0f, 0.5f);
}
void Update () {
    scoreText.text = "Score: " + score; //this is the line. If I erase this the error will disappear
    }
void scoreUpdate () {
    if (gameOver == false) {
        score += 1;
        }
    }

If I remove it, the error will disappear. It's not causing malfunctions or anything, I am just curious cos I am willing to learn. Please help me guys