- This topic has 12 replies, 12 voices, and was last updated 12 years, 7 months ago by support-swapna.
-
AuthorPosts
-
raa2001MemberWhen I execute the following, i get:
prop.put(Context.INITIAL_CONTEXT_FACTORY,”weblogic.jndi.WLInitialContextFactory”);
prop.put(Context.PROVIDER_URL,”t3://localhost:7001″ );
InitialContext ctx = new InitialContext(prop);
MyBeanRemote bean = (MyBeanRemote) ctx.lookup(“ejb/MyBeanRemote”);javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’ [Root exception is javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’]; remaining name ‘MyBeanRemote’
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:217)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jndi.internal.ServerNamingNode_1000_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:379)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:37)
Caused by: javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1138)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:251)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:205)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:213)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Loyal WaterMemberIm sorry but I dont have an idea about whats wrong here. Have you tried looking for a solution on google ?
raa2001MemberThe reason it is returning this eror is that Weblogic is not identifying it as an j2EE app. There was a probelm with weblogic and BEA stated to create a new domain.
However, when I used the Managed Deployer from MyEclipse to deploy to a specific Web logic 10 domain, it states that it deployed successfully. When I login into the Weblogic admin console and select the domain and then Deployment, I do not see the J2EE app.
Therefore, I ceated a new project and deployed it manually, but it returns the following error:
Unable to access the selected application.
Exception in AppMerge flows’ progression
Exception in AppMerge flows’ progression
[J2EE:160120]Error: The module, ‘EJBProjectTutorialEJB.jar’, is declared either in the application.xml or in the weblogic-application.xml descriptor but cannot be found in the ear fileThe application.xml is as follows:
<?xml version=”1.0″ encoding=”UTF-8″?>
<application xmlns=”http://java.sun.com/xml/ns/javaee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”5″ xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd”>
<display-name>EJBProjectTutorial</display-name>
<module id=”myeclipse.1185394894765″>
<ejb>EJBProjectTutorialEJB.jar</ejb>
</module>
</application>
CyTGMember� believe im in the somewhat same boat here! .. if you figured a way around this, please let me know (i did manage to start my own thread on the subject before finding you ; http://www.myeclipseide.com/PNphpBB2-viewtopic-t-18307-highlight-ejb3.html )
kurzsebMemberThis message has not been recovered.
Andres FariasMember@kurzseb wrote:
You should :
1 – Declare the JNDI name on the ejb annotation :
@Stateless(name = “TestBean”, mappedName = “TestBean”)
public class TestBean implements Test {
…
2 – Use the following JNDI name :
“TestBean#com.ejb.sessions.Test”Great, I had the very same problem and this solution worked just fine to me.
Nevertheless, I’d complete the explanation saying that TestBean is the implementation class and Test is the Remote Interface…Any way, I didn’t know this kind of JNDI pattern name. Is it only for WebLogic? I’ve reading the Oreilly EJB 3.0 (5th ed) and I have read nothing like that…
Thanks for the hint!
Andres
Girish PanditParticipantThis message has not been recovered.
callatisMemberThis message has not been recovered.
cottongearMemberI am trying to get a simple Stateless Session bean working on WebLogic 10 MP1 with Seam.
My HelloBean.java code is :
@Stateless @Name("hb") @JndiName("hb") public class HelloBean implements HelloBeanLocal { .....
I tried with/without
@JndiName("hb")
option.
Local Interface:
@Local public interface HelloBeanLocal { public String sayHello();
And in my xhtml, I am trying to access this bean like this:
<h:outputText value="#{hb.sayHello}" />>
When I try to run this I get the following exception:
WARNING: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@143c677) threw exception org.jboss.seam.InstantiationException: Could not instantiate Seam component: hb at org.jboss.seam.Component.newInstance(Component.java:2106) at org.jboss.seam.Component.getInstance(Component.java:1988) at org.jboss.seam.Component.getInstance(Component.java:1950) at org.jboss.seam.Component.getInstance(Component.java:1944) at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55) at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50) at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166) at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64) at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44) at org.jboss.el.parser.AstValue.getValue(AstValue.java:63) at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) at javax.faces.component.UIOutput.getValue(UIOutput.java:173) at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:829) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:281) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215) at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:810) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215) at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:810) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:134) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:510) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393) 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:2140) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) Caused by: javax.naming.NameNotFoundException: Unable to resolve 'hb'. Resolved ''; remaining name 'hb' at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1138) at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:251) at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171) at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:205) at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254) at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.jboss.seam.Component.instantiateSessionBean(Component.java:1367) at org.jboss.seam.Component.instantiate(Component.java:1331) at org.jboss.seam.Component.newInstance(Component.java:2084) ... 75 more
Kindly help.
try{}catchMemberThis message has not been recovered.
GRKMember@raa2001 wrote:
When I execute the following, i get:
prop.put(Context.INITIAL_CONTEXT_FACTORY,”weblogic.jndi.WLInitialContextFactory”);
prop.put(Context.PROVIDER_URL,”t3://localhost:7001″ );
InitialContext ctx = new InitialContext(prop);
MyBeanRemote bean = (MyBeanRemote) ctx.lookup(“ejb/MyBeanRemote”);javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’ [Root exception is javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’]; remaining name ‘MyBeanRemote’
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:217)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jndi.internal.ServerNamingNode_1000_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:379)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:37)
Caused by: javax.naming.NameNotFoundException: Unable to resolve ‘ejb.MyBeanRemote’. Resolved ‘ejb’
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1138)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:251)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:171)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:205)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:213)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
prashantpharateMember@kurzseb wrote:
You should :
1 – Declare the JNDI name on the ejb annotation :
@Stateless(name = “TestBean”, mappedName = “TestBean”)
public class TestBean implements Test {
…
2 – Use the following JNDI name :
“TestBean#com.ejb.sessions.Test”Solved my problem. Thanks
support-swapnaModeratorprashantpharate,
Glad that it is solved.
Do let us know if you see any other issues. -
AuthorPosts