gwt java.lang.ExceptionInInitializerError - exception

I'm working on a GWT app, and keep getting the error shown below.
I followed the GWT tutorial regarding naming conventions for servlet classes, and followed the Service / Async / ServiceImpl structure.
I also tried adding the -XX:-UseSplitVerifier VM argument to fix a previous problem. any ideas on what's going on?
SEVERE: javax.servlet.ServletContext log: Exception while dispatching incoming RPC
call
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
com.google.appengine.tools.development.agent.runtime.Runtime.newInstance_
(Runtime.java:127)
at com.google.appengine.tools.development.agent.runtime.Runtime.newInstance
(Runtime.java:135)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate
(ServerSerializationStreamReader.java:914)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize
(ServerSerializationStreamReader.java:556)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject
(AbstractSerializationStreamReader.java:119)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.
readValue(ServerSerializationStreamReader.java:138)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue
(ServerSerializationStreamReader.java:385)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:303)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:206)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost
(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost
(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1166)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter
(HeaderVerificationFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter
(ServeBlobFilter.java:60)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter
(StaticFileFilter.java:122)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1157)
at com.google.appengine.tools.development.BackendServersFilter.doFilter
(BackendServersFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle
(DevAppEngineWebAppContext.java:78)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle
(JettyContainerService.java:369)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is only usable
in client code! It cannot be called, for example, from server code. If you are
running a unit test, check that your test case extends GWTTestCase and that
GWT.create() is not called from within an initializer or constructor.
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.google.gwt.user.client.ui.UIObject.<clinit>(UIObject.java:187)
... 46 more

Almost for sure you are calling a class that is GWT client only. You have the error:
Caused by: java.lang.UnsupportedOperationException: ERROR: GWT.create() is only usable
in client code! It cannot be called, for example, from server code. If you are
running a unit test, check that your test case extends GWTTestCase and that
GWT.create() is not called from within an initializer or constructor.
You don't need to specifically call "GWT.create()" yourself to get that exception. you might be calling a GWT client only class on the server side. Also you might containg a "client only" object in one of your RPC's arguments or even on shared code being called on the server side.

FWIW, I had the same error and it ended up being a constant (static final) that used GWT.create() to initialise. The constant was in a class that needed to be loaded by the GIN dependency injection parser.
IE: It was trying to load the class (and call GWT.create()) during module compile.

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( )

Jackson: "Conflicting setter definitions for property" in JUnit Tests

I have an application that queries EC2 Instance data using Amazon's AWS SDK for Java. The Instance is serialized to a JSON String using the Jackson wrapper class included in the AWS SDK. Later, I'm able to use the Jackson.fromJsonString(String, Class) method to deserialize the JSON String back into an EC2 Instance object.
This all works great in my application code. However, it fails every single time when run from a JUnit test within Eclipse. I'm using the exact same data, and the exact same deserialization code. When I run it from a JUnit test, though, I get the following Exception:
com.amazonaws.SdkClientException: Unable to parse Json String.
at com.amazonaws.util.json.Jackson.fromJsonString(Jackson.java:66)
at com.myapp.filters.test.AbstractResourceFilterCriteriaTest.testMeetsCriteria_Fail(AbstractResourceFilterCriteriaTest.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Conflicting setter definitions for property "instanceType": com.amazonaws.services.ec2.model.Instance#setInstanceType(1 params) vs com.amazonaws.services.ec2.model.Instance#setInstanceType(1 params)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:269)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:461)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3838)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3732)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
at com.amazonaws.util.json.Jackson.fromJsonString(Jackson.java:64)
... 26 more
Caused by: java.lang.IllegalArgumentException: Conflicting setter definitions for property "instanceType": com.amazonaws.services.ec2.model.Instance#setInstanceType(1 params) vs com.amazonaws.services.ec2.model.Instance#setInstanceType(1 params)
at com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.getSetter(POJOPropertyBuilder.java:300)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.filterBeanProps(BeanDeserializerFactory.java:619)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:515)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:256)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:169)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:403)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:352)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
... 33 more
Any idea what on earth could be going wrong here? Why is it that it works just fine in the main application code, but fails when run as a JUnit test? Since I don't own the Instance object (it's part of Amazon's SDK) I can't modify any Jackson annotations. Any idea how I can get around this for my unit tests?
I would say you have a version issue with SDK between tests and production possibly. Looking at their source code for this class:
https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/Instance.java
They appear to have an annotation for jackson on one of the two setters, specifying that's the one to use for serialization / de-serialization. This is the latest version, I didn't tool back in history to see if older version was missing this.

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.

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.