[EJB 3.0] - Accessing EJB3s through a firewall
by magnus.ahlander
I have an instance of JBossAS running on an internal server behind an external server (firewall/router). The external server has port forwarding configured for ports 8080 (HTTP), 1098 and 1099 (JNDI) and 3873 (EJB3). I'm trying to access EJB3 through a Swing Client. However, I'm getting a timeout exeception, which reveals that ejb3s are accessed through ip of the internal server:
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://<INTERNAL_SERVER_IP>:3873/]
|
I resolved this problem by configuring the following for all used EJB3 in jboss.xml:
<session>
| <ejb-name>TestBean</ejb-name>
| <remote-binding>
| <client-bind-url>socket://<EXTERNAL_SERVER_IP>:3873</client-bind-url>
| </remote-binding>
| </session>
However, as this configuration is packet within the EAR file it is an ugly solution.
I wonder if it would be possible to configure this in jboss-server.xml of ejb3.deployer? Something like:
<attribute name="clientConnectAddress"><EXTERNAL_SERVER_IP></attribute>
| <attribute name="clientConnectPort">3873</attribute>
I'm using JBossAS 4.2.1 GA. I have set -Djava.rmi.server.hostname=<EXTERNAL_SERVER_IP>. I'm starting JBossAS with -b 0.0.0.0.
Regards,
Magnus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118642#4118642
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118642
18 years, 6 months
[Security & JAAS/JBoss] - SSO with Multiple Roles
by cvelo
Hello - I am using JBoss 422 with embedded tomcat. I've written my own custom login module which extends org.jboss.security.auth.spi.AbstractServerLoginModule. The module validates the user name and password from 1 system, then retrieves domain groups from an ldap system and maps those groups to application specific roles in the web apps I am working on (so for example I am a member of 'WebAdmins' group in LDAP domain which maps to 'ADMINS' role in 1 web app and 'SuperUser' role in a 2nd app).
I have configured /deploy/custom-login-config.service.xml and /conf/custom-login-config.xml. The custom-login-config.xml contains 2 applications policies, say P1 and P2. I've setup 1 web app in 1 ear and another web app in 2nd ear and setup the /META-INF/jboss-app with the security domain in app 1 going to P1 and the security-domain in app 2 going to P2. This is all working fine. I can login to both and get the correct roles setup.
The issue is that I have to login to each specific ear file on the server. When I do that all is well, my login module authenticates me, gets the ldap groups I am a member of and maps those to application roles. Obviously though I do not want our users logging into each ear file. To work around that I enabled
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
in /deploy/jboss-web.deployer/server.xml file. When I do that I do not have to login again but my login module does not run, so I cannot map the domain groups the application roles.
Is there any setup that will allow me to both login to a server once and map domain groups to application roles on an ear by ear basis? I've tried using multiple application-policy elements in the login-config and using only 1. I've tried that with and without the SingleSignOn valve and am stumped.
We should be moving to a 2 server clustered jboss setup also, so if there is a setup that would users to hit any web app on any server and be authenticated to all web apps on all servers that would be the best.
Thanks in advance,
chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118637#4118637
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118637
18 years, 6 months
[JBoss Seam] - Veto Page Flow
by tom_goring
Hi,
Is there a way to veto the transition in a page flow... e.g. in the case of some business rule failure ?
E.g.
the bean wizard.saveStuff adds a bunch of faces messages and returns to indicate a fail.
| ..
| <page name="PageX" view-id="/pageX.xhtml">
| <redirect/>
| <transition name="previous" to="PageY"/>
| <transition name="next" to="PageX">
| <action expression="#{wizard.saveStuff}"/>
| </transition>
| </page>
|
In spring webflow you can define that you transition only transition on certain return codes.
I can see you could do this with a decision states but I would have to code one for each view state.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118612#4118612
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118612
18 years, 6 months
[JBoss Seam] - Re: Weird classloading problem
by adamw
Hello,
The same happens with the EJB3 timer service (however Quartz is better, as the EJB3 timers, if they have an interval, don't stop when the application is undeployed, even after an AS restart :) ).
I think there are really two problems:
1. On every timer interval, I get a "Caused by: org.hibernate.type.SerializationException: could not deserialize" exception (when reading a serialized field from a DB). There are no problems with it when reading the data from the webapp.
Part of the stack trace:
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.blog.session.feed.posts.filter.AndFilter
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:585)
| at org.hibernate.util.SerializationHelper$CustomObjectInputStream.resolveClass(SerializationHelper.java:268)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:210)
|
2. Additionally, sometimes (problem no. 1 appears always), when opening the webapp, I get the java.lang.NoClassDefFoundError for the Instance or Proxy class.
Example stacktrace:
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: feedsService
| at org.jboss.seam.Component.newInstance(Component.java:1970)
| at org.jboss.seam.Component.getInstance(Component.java:1873)
| at org.jboss.seam.Component.getInstance(Component.java:1840)
| 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:53)
| 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.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:102)
| at com.sun.facelets.component.UIRepeat.getValue(UIRepeat.java:143)
| at com.sun.facelets.component.UIRepeat.getDataModel(UIRepeat.java:121)
| at com.sun.facelets.component.UIRepeat.setIndex(UIRepeat.java:305)
| at com.sun.facelets.component.UIRepeat.process(UIRepeat.java:333)
| at com.sun.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:617)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
| at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.shotoku.web.ResourcesFilter.doFilter(ResourcesFilter.java:183)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| 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:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| 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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)
| at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
| at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
| at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 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:613)
| Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
| at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:190)
| at org.jboss.seam.Component.createProxyFactory(Component.java:2260)
| at org.jboss.seam.Component.getProxyFactory(Component.java:1375)
| at org.jboss.seam.Component.wrap(Component.java:1366)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1288)
| at org.jboss.seam.Component.instantiate(Component.java:1273)
| at org.jboss.seam.Component.newInstance(Component.java:1966)
| ... 74 more
| Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
| at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:165)
| at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:186)
| ... 80 more
| Caused by: java.lang.NoClassDefFoundError: org/jboss/seam/intercept/Proxy
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:177)
| at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
| ... 81 more
|
--
Thanks,
Adam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118580#4118580
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118580
18 years, 6 months
[JBoss Seam] - Re: Easiest way to disable UrlRewrite in Seam examples?
by david.spark
For the Wiki example there's no UrlRewriteFilter section in web.xml, but there was something in Components.xml. I tried removing the following code from Components.xml:
<component name="wikiUrlRewriteFilter" class="org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter" precedence="30">
| <property name="initParameters">
| <key>logLevel</key><value>WARN</value>
| <key>statusEnabled</key><value>false</value>
| </property>
| </component>
But then when I tried to deploy it I get the following error:
10:30:20,628 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.contextFilter
| 10:30:20,628 INFO [SeamFilter] Initializing filter: wikiUrlRewriteFilter
| 10:30:20,644 ERROR [[/wiki]] Exception starting filter Seam Filter
| java.lang.NullPointerException:
| at org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter$FilterConfigWrapper.getInitParameter(WikiUrlRewriteFilter.java:72)
| at org.tuckey.web.filters.urlrewrite.utils.Log.setConfiguration(Log.java:563)
| at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.init(UrlRewriteFilter.java:214)
| at org.jboss.seam.wiki.core.ui.WikiUrlRewriteFilter.init(WikiUrlRewriteFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter.init(SeamFilter.java:97)
| at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
| at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
| at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
| at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3720)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4365)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| 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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
| 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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 10:30:20,644 ERROR [StandardContext] Error filterStart
Which I guess makes sense now I've removed that data it's looking for but doesn't really help me :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118573#4118573
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118573
18 years, 6 months
[JBoss jBPM] - Re: logging jboss web console problem
by rodosa
| 19:46:56,440 ERROR [STDERR] 09-ene-2008 19:46:56 com.sun.faces.lifecycle.ELResol
| verInitPhaseListener populateFacesELResolverForJsp
| INFO: JSF1027: [null] The ELResolvers for JSF were not registered with the JSP c
| ontainer.
| 19:46:56,659 ERROR [STDERR] 09-ene-2008 19:46:56 com.sun.facelets.compiler.TagLi
| braryConfig loadImplicit
| INFO: Added Library from: jar:file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/t
| mp/deploy/tmp4741jbpm-console-exp.war/WEB-INF/lib/gravel-14.jar!/META-INF/gravel
| -compat.taglib.xml
|
This could be not exactly an error? This could be an information???
I don't have enter in the web console because the application tells me that the user and password are incorrect!!
I'm using MySQL and I have data in JBPM_ID_USER, JBPM_ID_GROUP & JBPM_ID_MEMBERSHIP. I added this, to login-config.xml file:
| <application-policy name = "jbpm">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag="required">
| <module-option name="dsJndiName">java:/JbpmDS</module-option>
| <module-option name="principalsQuery">
| SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?
| </module-option>
| <module-option name="rolesQuery">
| SELECT g.NAME_ ,'Roles'
| FROM JBPM_ID_USER u,
| JBPM_ID_MEMBERSHIP m,
| JBPM_ID_GROUP g
| WHERE g.TYPE_='security-role'
| AND m.GROUP_ = g.ID_
| AND m.USER_ = u.ID_
| AND u.NAME_=?
| </module-option>
| </login-module>
| </authentication>
| </application-policy>
|
| <application-policy name = "MySqlDbRealm">
| <authentication>
| <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
| <module-option name = "principal">xxx</module-option>
| <module-option name = "userName">xxx</module-option>
| <module-option name ="password">xxx</module-option>
| <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=JbpmDS</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
But it doesn't work. It seems as if jbpm doesn't connect with my MySQL DB.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118572#4118572
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118572
18 years, 6 months