[Beginner's Corner] - Extending web application's classpath
by Adrie de Heer
Adrie de Heer [http://community.jboss.org/people/ahr] created the discussion
"Extending web application's classpath"
To view the discussion, visit: http://community.jboss.org/message/605420#605420
--------------------------------------------------------------
Hi all,
When trying to migrate our web application which currently runs on Apache Geronimo to JBoss 6.0.0.Final I came across the following.
Is there a way to add a custom directory to the web application's classpath without changing the server configuration manually. In our situation we have multiple web applications deployed to one server each having their own properties file and other configuration stuff (for some reason this data is put outside the ear). In the application I want to read these files in an application independent manner, i.e. without the need to know the webapp's name. On Geronimo we use the 'classesDirs' property of the SharedLib gbean in geronimo-application.xml to extend the application's classpath with the specific webapp's configuration directory.
On JBoss I was thinking about the following configuration. Let's say I have webapp1 and webapp2 each using a separate config.properties file. I can put these files e.g. in the JBoss conf directory as follows:
$JBOSS_HOME/server/<server-name>/conf/webapp1/config.properties
$JBOSS_HOME/server/<server-name>/conf/webapp2/config.properties
If I could add the $JBOSS_HOME/server/<server-name>/conf/<webapp> directory to the application's classpath the properties file can be read by calling getResourceAsStream("/config.properties").
Is there a proper way to achieve this?
I know the $JBOSS_HOME/server/<server-name>/conf directory is on the classpath by default so I can read the properties using getResourceAsStream("/<webapp>/config.properties") but that's not what I want.
Thanks in advance.
Regards,
Adrie
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605420#605420]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[JBoss Messaging] - Exception in publishing the webservice on JBoss 4.2.3_GA
by Amogh Soman
Amogh Soman [http://community.jboss.org/people/asoman] created the discussion
"Exception in publishing the webservice on JBoss 4.2.3_GA"
To view the discussion, visit: http://community.jboss.org/message/605418#605418
--------------------------------------------------------------
Hi,
I am trying to publish a simple websrvice on JBos 4.2.3_GA deployed on unix box.
But I am getting the following exception when trying to deploy the service:
It seems the server data directory is not available. but I am not sure.
Can someone help me on this?
Thanks in advance.
java.lang.NullPointerException
at org.jboss.wsf.stack.jbws.WSDLFilePublisher.getPublishLocation(WSDLFilePublisher.java:326)
at org.jboss.wsf.stack.jbws.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:105)
at org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect.create(PublishContractDeploymentAspect.java:52)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy(DeploymentAspectManagerImpl.java:118)
at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDeployerHook.java:97)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy55.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605418#605418]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[JBoss Portal] - Getting nullpointer exception while doing requestDispatcher.include
by febaportal
febaportal [http://community.jboss.org/people/febaportal] created the discussion
"Getting nullpointer exception while doing requestDispatcher.include"
To view the discussion, visit: http://community.jboss.org/message/605417#605417
--------------------------------------------------------------
Hi,
I am trying to display a jsp page by using PortletRequestDispatcher.include() method, but i am getting the following exception. Kindly suggest what might be the issue, and solution for the same. I am using jboss-portal-2.7.2, portlet2.0 and JBossTools-ALL-win32-3.0.3.v200910211631N-H194-GA alongwith eclipse ganymede.
Code used to display jsp:
PortletRequestDispatcher requestDispatcher = getPortletContext()
.getRequestDispatcher("/jsp/HomePage.jsp");
requestDispatcher.include(request, response);
Exception:
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
at org.apache.jasper.compiler.JspRuntimeContext.getWrapper(JspRuntimeContext.java:187)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:298)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
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.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:142)
at org.jboss.portal.portlet.impl.jsr168.api.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:79)
at com.infosys.feba.framework.controller.FEBAProtlet.doView(FEBAProtlet.java:118)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:97)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.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_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.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_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:49)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:196)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.SignOutInterceptor.invoke(SignOutInterceptor.java:43)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:49)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:46)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:82)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:48)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.access$001(ContextDispatcherInterceptor.java:49)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:123)
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:597)
at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:130)
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:79)
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.impl.DefaultServletContainer.include(DefaultServletContainer.java:190)
at org.jboss.portal.portlet.impl.spi.AbstractServerContext.dispatch(AbstractServerContext.java:69)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:77)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.ValveInterceptor.invoke(ValveInterceptor.java:75)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.container.ContainerPortletInvoker.invoke(ContainerPortletInvoker.java:116)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:221)
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:145)
at org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:149)
at org.jboss.portal.core.model.instance.InstanceInvoker.invoke(InstanceInvoker.java:42)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor.invoke(PortalSessionSynchronizationInterceptor.java:93)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.model.instance.InstanceSecurityInterceptor.invoke(InstanceSecurityInterceptor.java:93)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor.invoke(ConsumerCacheInterceptor.java:162)
at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl.org$jboss$portal$core$impl$model$instance$InstanceContainerImpl$invoke$aop(InstanceContainerImpl.java:408)
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:294)
at org.jboss.portal.core.model.portal.command.render.RenderWindowCommand.execute(RenderWindowCommand.java:100)
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:124)
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:134)
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.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:48)
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.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:55)
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:80)
at org.jboss.portal.core.model.portal.command.render.RenderPageCommand.execute(RenderPageCommand.java:222)
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:124)
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:134)
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.BackwardCompatibilityInterceptor.invoke(BackwardCompatibilityInterceptor.java:48)
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.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:55)
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:80)
at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:78)
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:315)
at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:303)
at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
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:196)
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.IdentityCacheInterceptor.invoke(IdentityCacheInterceptor.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.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:252)
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:182)
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:619)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605417#605417]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
Extending web application's classpath
by Adrie de Heer
Hi all,
When trying to migrate our web application which currently runs on Apache
Geronimo to JBoss 6.0.0.Final I came across the following.
Is there a way to add a custom directory to the web application's classpath
without changing the server configuration manually. In our situation we have
multiple web applications deployed to one server each having their own
properties file and other configuration stuff (for some reason this data is
put outside the ear). In the application I want to read these files in an
application independent manner, i.e. without the need to know the webapp's
name. On Geronimo we use the 'classesDirs' property of the SharedLib gbean
in geronimo-application.xml to extend the application's classpath with the
specific webapp's configuration directory.
On JBoss I was thinking about the following configuration. Let's say I have
webapp1 and webapp2 each using a separate config.properties file. I can put
these files e.g. in the JBoss conf directory as follows:
$JBOSS_HOME/server/<server-name>/conf/webapp1/config.properties
$JBOSS_HOME/server/<server-name>/conf/webapp2/config.properties
If I could add the $JBOSS_HOME/server/<server-name>/conf/<webapp> directory
to the application's classpath the properties file can be read by calling
getResourceAsStream("/config.properties").
Is there a proper way to achieve this?
I know the $JBOSS_HOME/server/<server-name>/conf directory is on the
classpath by default so I can read the properties using
getResourceAsStream("/<webapp>/config.properties")
but that's not what I want.
Thanks in advance.
Regards,
Adrie
14 years, 11 months
[EJB3] - EntityManager.find returns null.
by Joseph Hwang
Joseph Hwang [http://community.jboss.org/people/aupres] created the discussion
"EntityManager.find returns null."
To view the discussion, visit: http://community.jboss.org/message/605376#605376
--------------------------------------------------------------
My developmet environment is
OS : Linux CentOS 5.6
JDK : JDK 1.6
JBoss : JBoss 5.1.0.GA
DB : Oracle 11g
EntityManager.find method always returns null. Same source is executed good on Windows Server 2008 and SQL Server 2008.
Codes are
-Members.java(Entity)-
package com.aaa.ejb3;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "family")
public class Members implements Serializable {
@Id
@Column(name = "EMP_ID")
private String ID;
@Column(name = "EMP_Passwd")
private String Passwd;
@Column(name = "EMP_Name")
private String Name;
....getter와 setter method....
Through STDOUT
13:48:53,875 INFO [STDOUT] Hibernate: select members0_.EMP_ID as EMP1_2_0_, members0_.EMP_Name as EMP2_2_0_, members0_.EMP_Passwd as EMP3_2_0_ from family members0_ where members0_.EMP_ID=?
13:48:53,951 INFO [STDOUT] null
13:48:53,952 INFO [STDOUT] Hibernate: select members0_.EMP_ID as EMP1_2_0_, members0_.EMP_Name as EMP2_2_0_, members0_.EMP_Passwd as EMP3_2_0_ from family members0_ where members0_.EMP_ID=?
SQL select is done well and there is no exception, but why EntityManager.find returns null?
When I execute EntityManager.persist, insert SQL is generated and values are inserted to Oracle DB!!!!
I need your advice ! Thanks in advance
Best Regards
-EJBLoginBean.java(Session Bean)-
package com.aaa.ejb3;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless
public class EJBLoginBean implements IEJBLogin {
@PersistenceContext(unitName="MyDBTest")
EntityManager em;
public Object loginFunc(Class clazz, Object primaryKey) {
// TODO Auto-generated method stub
Object obj = em.find(clazz, primaryKey);
System.out.println(obj); // always returns null
return em.find(clazz, primaryKey);
}
}
- WSLoginTest.java(EJB Invocation)-
@WebService
public class WSLoginTest implements WSLoginTestPort {
@EJB
IEJBLogin login;
public String loginFunc(String ID, String Passwd) {
// TODO Auto-generated method stub
try {
Members member = new Members();
member = (Members)login.loginFunc(Members.class, ID); *// I tried ID.trim but failed.*
if( member == null )
return "no user."; //always return this value
else if(!Passwd.equals(member.getPasswd().trim()))
return "wrong password";
else
return member.toString();
}
catch(Exception e) {
return e.getMessage();
}
}
}
in console
13:47:37,381 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=TotalTestEAR.ear/EJBLoginModule.jar#MyDBTest
.....
13:47:48,492 INFO [SchemaUpdate] updating schema
13:47:57,430 INFO [TableMetadata] table found: SCOTT.FAMILY
13:47:57,430 INFO [TableMetadata] columns: [emp_passwd, emp_name, emp_id]
JBoss recognized Entity ...
There is no Exception.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605376#605376]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months
[jBPM] - How to signal event inside WorkItemHandler implementation in jBPM5
by Nick Tan
Nick Tan [http://community.jboss.org/people/missedone] created the discussion
"How to signal event inside WorkItemHandler implementation in jBPM5"
To view the discussion, visit: http://community.jboss.org/message/605321#605321
--------------------------------------------------------------
hi, folks
i'm now trying to signalEvent inside a custom WorkItemHandler implementation, so that the business process can catch this event, and deal with it correspondingly.
i implemented the method executeWorkItem(WorkItem, WorkItemManager)
and i think to signal event, first need to get the instance of ProcessInstance, or ksession, but failed to find a way out.
someone might said that, why not inject the ksession within the constructor. OK, but i think while registering the handler in jbpm-console, it only recognize the default constructor, right?
any suggestion?
thanks
--
Nick
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605321#605321]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 11 months