[JBoss AOP] - Getting nullpointer exception while running the server(After
by biswajit_sahoo
Hi All,
I am getting following exception after configuring the Aop.Please help me to slove the problem.I am using Jboss 4.0.4 and JDK 5.0
2008-05-02 10:53:43,234 WARN [org.jboss.system.ServiceController:337] Problem creating service jboss.aop:service=AspectManager
java.lang.NullPointerException
at org.jboss.aop.deployment.AspectManagerServiceJDK5.attachTranslator(AspectManagerServiceJDK5.java:42)
at org.jboss.aop.deployment.AspectManagerService.createService(AspectManagerService.java:121)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
a
Regards,
Biswajit Sahoo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148293#4148293
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148293
16 years, 4 months
[EJB/JBoss] - error accessing an EJB via JNDI
by loucs
i have a strange error accessing an EJB session from a jndi lookup :
Infos :
JBoss 4.2.2.GA
JBossPortal 2.6.4.GA
EJB3
my session bean is in an ear package containing portlets for portal.
i'm trying to do the jndi lookup from a jar called by jboss portal (not from my ear).
I can see in the jmx console that my EJB is bind to the global JNDI namespace and i get the right object from my lookup.
My problem is that i got an exception when i try to cast the object i got from jndi to the local or remote interface of my ejb session, althought i verified that the object i got was really implementing my ejb interface (with getClass().getInterfaces() )
i think it might has something to do with the fact that my EJB interface is deployed in the ear and in a separate jar file in the portal's libdir (but it's the only way for me not to have a class not found exception, as jboss portal classloader can't access my ear classes.
if someone has even the tiniest clue on this matter, i'd take it with pleasure :)
see the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&t=134638
Regards,
--
Lucas
Montes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148289#4148289
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148289
16 years, 4 months
[Beginners Corner] - error when used JBossPortlet instead of GenricPortlet
by csagar
Hi,
i am trying to use JBossPortlet instead of GenericPortlet
This is my code
//************************************************************
package org.jboss.portlet1.hello;
import java.io.IOException;
import java.io.PrintWriter;
import javax.portlet.PortletException;
import javax.portlet.PortletSecurityException;
import org.jboss.portlet.JBossPortlet;
import org.jboss.portlet.JBossRenderRequest;
import org.jboss.portlet.JBossRenderResponse;
public class SagarHelloWorld extends JBossPortlet {
public void doView(JBossRenderRequest request,JBossRenderResponse response) throws PortletException,PortletSecurityException, IOException
{
response.setContentType("text/html");
PrintWriter printwriter = response.getWriter();
printwriter.write("Hello World!");
printwriter.close();
}
}
i have to use these two additional jars along with portlet.jar
1.portal-portlet-lib.jar
2.jboss-portlet-api-lib.jar
which i downloaded from - http://viewvc.jboss.org/cgi-bin/viewvc.cgi/labs/labs/jbossforums/branches...
But when i deploy the portlet i get following error--
java.lang.ClassCastException: org.jboss.portlet.JBossRenderRequest
at org.jboss.portlet.JBossPortlet.render(JBossPortlet.java:390)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:58)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:62)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:47)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:80)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:104)
at org.jboss.portal.web.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:74)
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:585)
at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:80)
at org.jboss.portal.web.command.CommandDispatcher.include(CommandDispatcher.java:50)
at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:66)
at org.jboss.portal.web.ServletContainer.include(ServletContainer.java:182)
at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.dispatch(AbstractRequestContext.java:81)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:76)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:68)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:60)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:198)
at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:233)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.org$jboss$portal$core$impl$portlet$state$ProducerPortletInvoker$invoke$aop(ProducerPortletInvoker.java:53)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java)
at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:147)
at org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:150)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$1.invoke(InstanceContainerImpl.java:99)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.portlet.management.PortletContainerManagementInterceptorImpl.invoke(PortletContainerManagementInterceptorImpl.java:58)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:116)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:91)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:134)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.org$jboss$portal$core$impl$model$instance$InstanceContainerImpl$invoke$aop(InstanceContainerImpl.java:427)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$invoke_N8654503705355129869.invokeNext(InstanceContainerImpl$invoke_N8654503705355129869.java)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.invoke(InstanceContainerImpl.java)
at org.jboss.portal.core.impl.model.instance.AbstractInstance.invoke(AbstractInstance.java:231)
at org.jboss.portal.core.impl.model.content.InternalContentProvider.renderWindow(InternalContentProvider.java:265)
at org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.execute(RenderWindowCommand.java:92)
at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:123)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:56)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:133)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:78)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:56)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134)
at org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.render(RenderWindowCommand.java:72)
at org.jboss.portal.core.model.portal.command.render.RenderPageCommand.execute(RenderPageCommand.java:203)
at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.java:68)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invoke(EventBroadcasterInterceptor.java:123)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInterceptor.java:56)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:133)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:78)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:56)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50)
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.java:134)
at org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:74)
at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:79)
at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:53)
at org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:70)
at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:271)
at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:259)
at org.jboss.portal.core.controller.Controller.handle(Controller.java:217)
at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(PortalContextPathInterceptor.java:45)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:246)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterceptor.java:69)
at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:250)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
--------------------------------------------------------------------------------
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148286#4148286
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148286
16 years, 4 months
[JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException: Can't find prope
by joepareti
After a long time I am revisiting this topic and even though I tried to implement your advise the very same error message stays:
javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
Below are the details on what I did. TIA for any further help.
SOURCE CODE MODIFICATIONS
package za.co.solms.finance.calculators;
import javax.naming.Context;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import swingwt.awt.*;
import java.text.*;
import java.util.*;
import swingwtx.swing.*;
import swingwt.awt.event.*;
public class LoanCalculatorClient extends JFrame
{
public LoanCalculatorClient()
{
setTitle("Solms Training Loan Calculator");
java.util.Hashtable properties = new java.util.Hashtable();
properties.put(Context.PROVIDER_URL,"localhost:1099");
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.rmi.security.manager", "yes");
/*env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming.client:org.jnp.interfaces");*/
/* this is default env.put(jnp.socketFactory,"org.jnp.interfaces.TimedSocketFactory"); */
/* Context initialContext = new InitialContext(env); */
javax.naming.Context context = new javax.naming.InitialContext(properties);
calculatorPanel = new LoanCalculatorPanel();
getContentPane().add(calculatorPanel);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent event)
{
calculatorPanel.destroy();
System.exit(0);
}
});
pack();
}
public static void main(String[] args)
{
new LoanCalculatorClient().show();
}
private LoanCalculatorPanel calculatorPanel;
}
=======
public void connect()
{
try
{
InitialContext jndiContext = new InitialContext();
System.out.println("Now looking up session bean " + jndiName + " ...");
java.util.Hashtable properties = new java.util.Hashtable();
properties.put(Context.PROVIDER_URL,"localhost:1099");
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.rmi.security.manager", "yes");
javax.naming.Context context = new javax.naming.InitialContext(properties);
Object beanHomeRef
= jndiContext.lookup(jndiName);
System.out.println("got it");
LoanCalculatorHome home =
(LoanCalculatorHome)PortableRemoteObject.narrow
(beanHomeRef, LoanCalculatorHome.class);
loanCalculator = home.create();
}
ERRORS IN THE LOG FILE FROM BUILDING THE CLIENT JAR
/usr/local/samba/tmp/jboss/jboss_demo_solms/src/client/application/LoanCalculatorClient.java:17: error: Undefined variable or class name: `java.naming.factory.initial'.
[javac] env.put(java.naming.factory.initial,"org.jnp.interfaces.NamingContextFactory");
[javac] ^
[javac]
This has been fixed by using:
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
in lieu of:
properties.put(java.naming.factory.initial,"org.jnp.interfaces.NamingContextFactory");
This may be a coincidence, but the client run-time error also refers to "java.naming.factory.initial" ; so I am starting to suspect a more fundamental problem with java.
ALTERNATIVE WAYS TO ACCESS THE JNDI SERVICE?
Because I think the following java statement causes the exception:
Object beanHomeRef
= jndiContext.lookup(jndiName);
I am wondering if one could use instead something like:
Object beanHomeRef
= jndiContext.lookup("java:/path");
Or
Java.lang.Object ejbHome =
= initialContext.lookup("ava:/path");
WARNINGS IN THE LOG FILE FROM BUILDING THE CLIENT JAR
I don't know how serious the following are:
[javac] Using gcj compiler
dropping /usr/local/samba/tmp/jboss/jboss_demo_solms/${classpath} from path as it doesn't exist
and
Property ${classpath} has not been set
- is classpath case sensitive?
- I know from a previous experience that classpath was fixed by just listing jar files; in this case it does indeed contain jar files AND regular directories ???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148285#4148285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148285
16 years, 4 months
[JBoss Portal] - Re: problem while implementing portal identity API with a jn
by loucs
i finally got rid of the Wrong tx on thread, but another strange issue is happening :
I first get the TransactionManager via jndi (java:TransactionManager).
then i suspend the current transaction :
t = tm.suspend();
then i do the lookup of my EJB remote or local interface, and i put it into an JBossProxy interface.
then i print infos with the getClass() method :
|
| tmp = (JBossProxy) new InitialContext().lookup("smalltox-ear/IdentityUserModule/remote");
| System.out.println("obj : " + tmp.getClass().getName() + " " + tmp.getClass().getSimpleName() + " " + tmp.getClass().getSuperclass() + " " + tmp.getClass().getPackage() );
|
|
| for (int i = 0; i < tmp.getClass().getMethods().length; i++) {
| System.out.println("method : " + tmp.getClass().getMethods()
| .getName());
| }
|
|
| for (int i = 0; i < tmp.getClass().getInterfaces().length; i++)
| System.out.println("Interface : " + tmp.getClass().getInterfaces()
| .getName());
|
|
|
and here's the output :
|
| obj : $Proxy855 $Proxy855 class java.lang.reflect.Proxy null
|
| 10:20:29,339 INFO [STDOUT] method : hashCode
| 10:20:29,339 INFO [STDOUT] method : equals
| 10:20:29,339 INFO [STDOUT] method : toString
| 10:20:29,339 INFO [STDOUT] method : findUserByUserName
| 10:20:29,340 INFO [STDOUT] method : getAsynchronousProxy
| 10:20:29,340 INFO [STDOUT] method : isProxyClass
| 10:20:29,340 INFO [STDOUT] method : getProxyClass
| 10:20:29,340 INFO [STDOUT] method : newProxyInstance
| 10:20:29,340 INFO [STDOUT] method : getInvocationHandler
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : getClass
| 10:20:29,340 INFO [STDOUT] method : notify
| 10:20:29,340 INFO [STDOUT] method : notifyAll
|
| 10:20:29,340 INFO [STDOUT] Interface : com.smalltox.foundation.identity.IdentityUserModuleRemote
| 10:20:29,341 INFO [STDOUT] Interface : org.jboss.ejb3.JBossProxy
|
|
then i try to cast the JBossProxy object into my local or remote interface and i got a class cast exception :
$Proxy855 cannot be cast to com.smalltox.foundation.identity.IdentityUserModuleRemote
this is really strange, and the samething happen whether i resume the transaction before the cast of after..
the encouraging part is that portal continues to work well after i resume the transaction.
i'd like to add that in my jmx console, i've got this output in the JNDIView :
|
| when remote + ejb stateful
| Global JNDI Namespace
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- remote (class: java.lang.Object)
| | | +- remoteStatefulProxyFactory (proxy: $Proxy857 implements interface org.jboss.ejb3.Pr
| oxyFactory)
|
| when remote and ejb statless
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy854 implements interface com.smalltox.foundation.identity.Iden
| tityUserModuleRemote,interface org.jboss.ejb3.JBossProxy)
|
|
| when i make my EJB local and stateless:
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $proxy855 implements interface com.smalltox.foundation.identity.Ident
| ityUserModuleLocalInterface, interface org.jboss.ejb3.JBossProxy)
|
|
|
i think it migth be caused by the fact my local or remote interfaces are in a jar in the libdir of portal, and also in my ear. but i can't see any other way of calling my ejb from the portal app.
any clues would help a lot,
Regards,
--
Lucas
Montes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148283#4148283
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148283
16 years, 4 months
[JNDI/Naming/Network] - Re: transaction exception while jndi lookup
by loucs
i finally got rid of the Wrong tx on thread, but another strange issue is happening :
I first get the TransactionManager via jndi (java:TransactionManager).
then i suspend the current transaction :
t = tm.suspend();
then i do the lookup of my EJB remote or local interface, and i put it into an JBossProxy interface.
then i print infos with the getClass() method :
|
| tmp = (JBossProxy) new InitialContext().lookup("smalltox-ear/IdentityUserModule/remote");
| System.out.println("obj : " + tmp.getClass().getName() + " " + tmp.getClass().getSimpleName() + " " + tmp.getClass().getSuperclass() + " " + tmp.getClass().getPackage() );
|
|
| for (int i = 0; i < tmp.getClass().getMethods().length; i++) {
| System.out.println("method : " + tmp.getClass().getMethods()
| .getName());
| }
|
|
| for (int i = 0; i < tmp.getClass().getInterfaces().length; i++)
| System.out.println("Interface : " + tmp.getClass().getInterfaces()
| .getName());
|
|
|
and here's the output :
|
| obj : $Proxy855 $Proxy855 class java.lang.reflect.Proxy null
|
| 10:20:29,339 INFO [STDOUT] method : hashCode
| 10:20:29,339 INFO [STDOUT] method : equals
| 10:20:29,339 INFO [STDOUT] method : toString
| 10:20:29,339 INFO [STDOUT] method : findUserByUserName
| 10:20:29,340 INFO [STDOUT] method : getAsynchronousProxy
| 10:20:29,340 INFO [STDOUT] method : isProxyClass
| 10:20:29,340 INFO [STDOUT] method : getProxyClass
| 10:20:29,340 INFO [STDOUT] method : newProxyInstance
| 10:20:29,340 INFO [STDOUT] method : getInvocationHandler
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : wait
| 10:20:29,340 INFO [STDOUT] method : getClass
| 10:20:29,340 INFO [STDOUT] method : notify
| 10:20:29,340 INFO [STDOUT] method : notifyAll
|
| 10:20:29,340 INFO [STDOUT] Interface : com.smalltox.foundation.identity.IdentityUserModuleRemote
| 10:20:29,341 INFO [STDOUT] Interface : org.jboss.ejb3.JBossProxy
|
|
then i try to cast the JBossProxy object into my local or remote interface and i got a class cast exception :
$Proxy855 cannot be cast to com.smalltox.foundation.identity.IdentityUserModuleRemote
this is really strange, and the samething happen whether i resume the transaction before the cast of after..
the encouraging part is that portal continues to work well after i resume the transaction.
i'd like to add that in my jmx console, i've got this output in the JNDIView :
|
| when remote + ejb stateful
| Global JNDI Namespace
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- remote (class: java.lang.Object)
| | | +- remoteStatefulProxyFactory (proxy: $Proxy857 implements interface org.jboss.ejb3.Pr
| oxyFactory)
|
| when remote and ejb statless
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy854 implements interface com.smalltox.foundation.identity.Iden
| tityUserModuleRemote,interface org.jboss.ejb3.JBossProxy)
|
|
| when i make my EJB local and stateless:
|
| +- smalltox-ear (class: org.jnp.interfaces.NamingContext)
| +- IdentityUserModule (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $proxy855 implements interface com.smalltox.foundation.identity.Ident
| ityUserModuleLocalInterface, interface org.jboss.ejb3.JBossProxy)
|
|
|
i think it migth be caused by the fact my local or remote interfaces are in a jar in the libdir of portal, and also in my ear. but i can't see any other way of calling my ejb from the portal app.
any clues would help a lot,
Regards,
--
Lucas
Montes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148281#4148281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148281
16 years, 4 months