[JBoss JIRA] Created: (JBAS-3923) CMP mixing database columns on high load
by Marius Kotsbak (JIRA)
CMP mixing database columns on high load
----------------------------------------
Key: JBAS-3923
URL: http://jira.jboss.com/jira/browse/JBAS-3923
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: JBossAS-4.0.4.GA
Environment: -Debian Linux sarge (stable)
-Postgresql 8.1.4
-jdbc driver postgresql-8.1-407.jdbc3.jar
Reporter: Marius Kotsbak
This exception appears on high load (stress testing) of a product on JBoss 4.0.4:
2006-12-04 17:46:06,732 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException in method: public abstract no.boostcom.sms
fusion.beans.RecurringDataLocal no.boostcom.smsfusion.beans.InboxLocal.getRecurringData(), causedBy:
org.postgresql.util.PSQLException: Bad value for type timestamp : active
at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:232)
at org.postgresql.jdbc2.TimestampUtils.toTimestamp(TimestampUtils.java:307)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:419)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getTimestamp(AbstractJdbc2ResultSet.java:2088)
at org.jboss.resource.adapter.jdbc.WrappedResultSet.getTimestamp(WrappedResultSet.java:943)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader$12.readResult(JDBCResultSetReader.java:255)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCResultSetReader$AbstractResultSetReader.get(JDBCResultSetReader.java:500)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.j
ava:482)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadArgumentResults(JDBCAbstractCMPFieldBridge.j
ava:432)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.loadInstanceResults(JDBCAbstractCMPFieldBridge.j
ava:393)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:207)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:88)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:646)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:628)
at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:406)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:252)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:243)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:126)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:276)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:104)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:68)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:520)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
The value "active" is valid for another column in the same entity bean than the timestamp column JBoss is trying to use it on.
We see other similar stacktraces:
2006-12-04 17:46:12,884 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public a
bstract boolean no.boostcom.smsfusion.smsfusionReceiverBeans.MtextHelperLocal.storeSMS(no.polardesign.boostcom.sms.SMSInnMel
ding,no.boostcom.smsfusion.beans.InboxVO) throws javax.ejb.ObjectNotFoundException,javax.naming.NamingException,javax.ejb.Fi
nderException,javax.ejb.CreateException, causedBy:
org.postgresql.util.PSQLException: Bad value for type timestamp : WAP Ordbok
at org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:232)
Here another column is exchanged with the timestamp column.
Removing the CMRs between all related CMP beans (which also removes locking) seems to remove this problem, but that can result in much work. Get-fields in the entity beans are set to read only to reduce locking.
The same code worked fine on JBoss 3.2.5 using the same stress tests. It is also working on JBoss 4.0.4 during single accesses (not multitasking).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months
[JBoss JIRA] Commented: (EJBTHREE-491) @RunAs + @Management/Service not working - @SecurityDomain ignored?
by Manuel Duran Aguete (JIRA)
[ http://jira.jboss.com/jira/browse/EJBTHREE-491?page=comments#action_12355607 ]
Manuel Duran Aguete commented on EJBTHREE-491:
----------------------------------------------
The same issue here with Jboss-4.0.5.GA jems installer with ejb3.
Resolved using:
@Service(objectName="myservice")
@SecurityDomain("MySecurityDomain")
//@RunAs("service") <--Doesn't work's
public class MyService implements MyServiceMBean {
...
...
}
jboss.xml:
<jboss>
<!-- <security-domain>java:/jaas/MySecurityDomain</security-domain> -->
<unauthenticated-principal>anonymous</unauthenticated-principal>
...
...
</jboss>
> @RunAs + @Management/Service not working - @SecurityDomain ignored?
> -------------------------------------------------------------------
>
> Key: EJBTHREE-491
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-491
> Project: EJB 3.0
> Issue Type: Bug
> Components: EJB3 Extensions
> Affects Versions: EJB 3.0 RC5 - PFD
> Environment: JBoss AS 4.0.4RC1 vanilla
> Reporter: Jens Elkner
> Fix For: EJB 3.0 RC6 - PFD
>
>
> I'm trying to run a @Service with a special role, so that it is able to access other beans, but @SecurityDomain seems to be ignored and thus the service is not started.
> E.g.:
> @Service
> @SecurityDomain("shared")
> @RunAs("staff")
> public class UpdateService
> implements UpdateServiceM
> {
> ...
> }
> @Local
> @Management
> public interface UpdateServiceM {
> ... // defines e.g. start() and stop(), but not create() and destroy()
> }
> @Stateless
> @SecurityDomain("shared")
> @RolesAllowed("staff")
> public class UpdateServiceSB implements UpdateServiceDaoL {
> ...
> }
> @Local
> public interface UpdateServiceDaoL extends UpdateServiceDao {
> ...
> }
> All SBs/IFs are part of the same foo.ear .
> Deployment Exception:
> 2006-03-28 23:43:26,263 WARN [ScannerThread:org.jboss.system.ServiceController:424] - Problem starting service jboss.j2ee:ear=foo.ear,jar=foo-ejb-0.0.9a.jar,name=UpdateService,service=EJB3,type=ManagementInterface
> javax.ejb.EJBAccessException: Authentication failure
> at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:46)
> at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:71)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:174)
> at org.jboss.ejb3.service.ServiceContainer.localInvoke(ServiceContainer.java:142)
> at org.jboss.ejb3.service.ServiceMBeanDelegate.invoke(ServiceMBeanDelegate.java:166)
> at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:991)
> at $Proxy0.start(Unknown Source)
> ...
> Caused by: javax.security.auth.login.LoginException: java.lang.NullPointerException
> at org.jboss.security.Util.createPasswordHash(Util.java:407)
> at org.jboss.security.auth.spi.UsernamePasswordLoginModule.createPasswordHash(UsernamePasswordLoginModule.java:367)
> at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:195)
> ...
> 2006-03-28 23:53:25,969 ERROR [main:org.jboss.deployment.scanner.URLDeploymentScanner:548] - Incomplete Deployment listing:
> --- MBeans waiting for other MBeans ---
> ObjectName: jboss.j2ee:ear=foo.ear,jar=foo-ejb-0.0.9a.jar,name=UpdateService,service=EJB3,type=ManagementInterface
> State: FAILED
> Reason: javax.ejb.EJBAccessException: Authentication failure
> --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
> ObjectName: jboss.j2ee:ear=foo.ear,jar=foo-ejb-0.0.9a.jar,name=UpdateService,service=EJB3,type=ManagementInterface
> State: FAILED
> Reason: javax.ejb.EJBAccessException: Authentication failure
> ...
> Actually I'm wondering, why the UsernamePasswordLoginModule appears in the stack trace, because @SecurityDomain("shared") is defined as:
> ...
> <application-policy name="@security.domain@">
> <authentication>
> <login-module
> code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
> flag="required">
> <module-option name="dsJndiName">java:/@security.ds@</module-option>
> <module-option name="principalsQuery"
> >SELECT passwd FROM users WHERE login=? AND (ISNULL(expire) OR (UNIX_TIMESTAMP() - (expire/1000) < 0))</module-option>
> <module-option name="rolesQuery"
> >SELECT r.name, 'Roles' FROM users u, roles r, user2role m WHERE u.login=? AND u.uid=m.users_uid AND m.roles_gid=r.gid</module-option>
> <module-option name="hashAlgorithm">MD5</module-option>
> <module-option name="hashEncoding">base64</module-option>
> </login-module>
> </authentication>
> </application-policy>
> ...
> So no UsernamePasswordLoginModule at all. Finally my guess is, that @SecurityDomain is completely ignored during deployment and that's why the start fails....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 2 months