[JBoss Seam] - Re: s:link fragment
by msznapka
What about to have fragment identifier in pages.xml, I can imagine something like smart help page which gives you the right chapter according to page where you are:
| <page view-id="/*">
| <rule if-outcome="help">
| <redirect view-id="/help.xhtml"/>
| </rule>
| </page>
|
| <page view-id="/applicationOne/*">
| <rule if-outcome="help">
| <redirect view-id="/help.xhtml" fragment="chap_appOne"/>
| </rule>
| </page>
|
| <page view-id="/applicationTwo/*">
| <rule if-outcome="help">
| <redirect view-id="/help.xhtml" fragment="chap_appTwo"/>
| </rule>
| </page>
|
it will be much easier than dynamically generate s:link's fragment attribute for each xhtml page
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109882#4109882
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109882
17 years, 1 month
[EJB/JBoss] - Apparently wrong driver class specified for URL: class
by dipti.patel
Hi,
I m trying to get datasource connection using jboss 4.0.4 & oracle 10g. I have my EJB connecting to database. For
this I have followed following steps,
1. Placed this EJB.jar in Ear.ear file
2. Added ojdbc14.jar from 10g into EAR file
3. Updated MANIFEST.MF of EJB.jar to refer to ojdbc14.jar
4. Created 'jboss-app.xml' in 'Ear\Meta-Inf' folder to create class loader
5. Content of 'jboss-app.xml' are as follows,
<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
<loader-repository>
loader=MYCL
</loader-repository>
</jboss-app>
6. When I try to deploy this EAR file, I'm getting following error,
20:42:56,559 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable:
(org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class:
oracle.jdbc.driver.OracleDriver, url: jdbc:oracle:thin:@3.96.199.229:1521:atlord32)
at
org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFact
ory.java:179)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConne
ctionPool.java:565)
at
org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:25
0)
at
org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.j
ava:529)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
at
org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:301)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectio
nManager2.java:842)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
at org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:195)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:306)
at org.apache.commons.dbutils.QueryRunner.query(QueryRunner.java:328)
7. When I add ojdbc14.jar in classpath or server\lib directory, it's working fine. what could be causing this?
Thanks in advance for help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109881#4109881
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109881
17 years, 1 month
[Security & JAAS/JBoss] - Role Authorization problem with Custom Authenticator
by brengl
Hello, I am writing a custom Authenticator class that collects credentials from a Siteminder SMSESSION cookie. I created a security domain called CustomSMAuth and assigned the SimpleServerLoginModule to it. According to JBoss doc, this authenticator assigns a role of 'user' if the username and password are the same value. That is the behavior I'm trying to get.
I can confirm that the Authenticator is executed and is working, but access is denied based on the user role authorization. I'm not sure if my authenticator class should be doing something different, or if I have a configuration issue with JBoss. Any help would be appreciated!
The authenticator, after retrieving the userid value, does the following:
GenericPrincipal userPrincipal = new GenericPrincipal(context.getRealm(), userid.trim(),userid.trim());
session.setAttribute(Constants.SESS_USERNAME_NOTE, userPrincipal);
request.setUserPrincipal(userPrincipal);
register(request, response, userPrincipal, "SMSESSION", userid.trim(), userid.trim());
return true;
my web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Success</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>SMSESSION</auth-method>
</login-config>
<security-role>
<role-name>user</role-name>
</security-role>
jboss-web.xml:
<jboss-web>
<security-domain>java:/jaas/CustomSMAuth</security-domain>
</jboss-web>
login-config.xml:
<application-policy name="CustomSMAuth">
<login-module code = "org.jboss.security.auth.spi.SimpleServerLoginModule"
flag = "required">
</login-module>
</application-policy>
and the log excerpt showing output from my authenticator and the authorization failure:
2007-12-03 09:54:44,518 DEBUG [com.sas.smutil.SMSESSIONAuthenticator] Login return code: 1
2007-12-03 09:54:44,518 DEBUG [com.sas.smutil.SMSESSIONAuthenticator] Validation Accepted, setting user principal
2007-12-03 09:54:44,533 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Authenticated 'sasdemo' with type 'SMSESSION'
2007-12-03 09:54:44,533 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Calling accessControl()
2007-12-03 09:54:44,533 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] Checking roles GenericPrincipal[sasdemo()]
2007-12-03 09:54:44,533 DEBUG [org.apache.catalina.realm.RealmBase] Username sasdemo does NOT have role user
2007-12-03 09:54:44,533 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] No role found: user
2007-12-03 09:54:44,533 TRACE [org.jboss.web.tomcat.security.JBossSecurityMgrRealm] Checking for all roles mode: authOnly
2007-12-03 09:54:44,533 DEBUG [org.apache.catalina.authenticator.AuthenticatorBase] Failed accessControl() test
2007-12-03 09:54:44,533 TRACE [org.jboss.security.SecurityAssociation] clear, server=true
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] ---------------------------------------------------------------
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] authType=SMSESSION
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentLength=-1
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] contentType=text/html;charset=utf-8
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] cookie=JSESSIONID=6F898FB15DD78EC4EEBC503B5593873C; domain=null; path=/
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=Pragma=No-cache
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=Cache-Control=no-cache
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=Expires=Wed, 31 Dec 1969 19:00:00 EST
2007-12-03 09:54:44,533 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] header=Set-Cookie=JSESSIONID=6F898FB15DD78EC4EEBC503B5593873C; Path=/
2007-12-03 09:54:44,549 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] message=Access to the requested resource has been denied
2007-12-03 09:54:44,549 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] remoteUser=sasdemo
2007-12-03 09:54:44,549 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] status=403
2007-12-03 09:54:44,549 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost]] ===============================================================
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109878#4109878
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109878
17 years, 1 month
[Messaging, JMS & JBossMQ] - MDBs not processing Queue
by seoeng
I have deployed 2 nodes in a cluster with both having 2 MDBs, each consuming (see below) at max, 5 JMS Messages at a time. However, when I start up the cluster, node 1 starts processing fully, but node 2 does not. Instead, node 2's MDB1s grabs its 5 JMS Messages, but node 2's MDB2s never processing anything.
Below is the jboss.xml in my EJB.jar's META-INF directory. Can anyone tell me if I am just not configuring the nodes correctly? Could the JMS Messages be in a wierd state or something?
| <invoker-proxy-binding>
| <name>message-driven-bean-1</name>
| <invoker-mbean>default</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <CreateJBossMQDestination>true</CreateJBossMQDestination>
| <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
| <MinimumSize>1</MinimumSize>
| <MaximumSize>5</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>10</ReconnectIntervalSec>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
| <invoker-proxy-binding>
| <name>message-driven-bean-2</name>
| <invoker-mbean>default</invoker-mbean>
| <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
| <proxy-factory-config>
| <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
| <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
| <CreateJBossMQDestination>true</CreateJBossMQDestination>
| <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
| <MinimumSize>1</MinimumSize>
| <MaximumSize>5</MaximumSize>
| <KeepAliveMillis>30000</KeepAliveMillis>
| <MaxMessages>1</MaxMessages>
| <MDBConfig>
| <ReconnectIntervalSec>10</ReconnectIntervalSec>
| <DLQConfig>
| <DestinationQueue>queue/DLQ</DestinationQueue>
| <MaxTimesRedelivered>10</MaxTimesRedelivered>
| <TimeToLive>0</TimeToLive>
| </DLQConfig>
| </MDBConfig>
| </proxy-factory-config>
| </invoker-proxy-binding>
| </invoker-proxy-bindings>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109871#4109871
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109871
17 years, 1 month