[JBoss JIRA] Created: (JBAS-4643) Fix org.jboss.test.xml.DDValidatorUnitTestCase (5 failures)
by Dimitris Andreadis (JIRA)
Fix org.jboss.test.xml.DDValidatorUnitTestCase (5 failures)
-----------------------------------------------------------
Key: JBAS-4643
URL: http://jira.jboss.com/jira/browse/JBAS-4643
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: Test Suite
Reporter: Dimitris Andreadis
Assigned To: Alexey Loubyansky
Fix For: JBossAS-5.0.0.Beta3
testEjbJar Failure 5 from 165 are invalid expected:<0> but was:<5>
junit.framework.AssertionFailedError: 5 from 165 are invalid expected:<0> but was:<5>
at org.jboss.test.xml.DDValidatorUnitTestCase.validate(DDValidatorUnitTestCase.java:115)
at org.jboss.test.xml.DDValidatorUnitTestCase.testEjbJar(DDValidatorUnitTestCase.java:76)
9.162
testJBossXml Failure 3 from 143 are invalid expected:<0> but was:<3>
junit.framework.AssertionFailedError: 3 from 143 are invalid expected:<0> but was:<3>
at org.jboss.test.xml.DDValidatorUnitTestCase.validate(DDValidatorUnitTestCase.java:115)
at org.jboss.test.xml.DDValidatorUnitTestCase.testJBossXml(DDValidatorUnitTestCase.java:81)
2.797
testJBossCmpJdbc Success 0.994
testWebXml Success 1.930
testJBossWeb Failure 4 from 39 are invalid expected:<0> but was:<4>
junit.framework.AssertionFailedError: 4 from 39 are invalid expected:<0> but was:<4>
at org.jboss.test.xml.DDValidatorUnitTestCase.validate(DDValidatorUnitTestCase.java:115)
at org.jboss.test.xml.DDValidatorUnitTestCase.testJBossWeb(DDValidatorUnitTestCase.java:96)
0.455
testApplicationXml Failure 8 from 50 are invalid expected:<0> but was:<8>
junit.framework.AssertionFailedError: 8 from 50 are invalid expected:<0> but was:<8>
at org.jboss.test.xml.DDValidatorUnitTestCase.validate(DDValidatorUnitTestCase.java:115)
at org.jboss.test.xml.DDValidatorUnitTestCase.testApplicationXml(DDValidatorUnitTestCase.java:101)
0.635
testJBossApp Failure 2 from 37 are invalid expected:<0> but was:<2>
junit.framework.AssertionFailedError: 2 from 37 are invalid expected:<0> but was:<2>
at org.jboss.test.xml.DDValidatorUnitTestCase.validate(DDValidatorUnitTestCase.java:115)
at org.jboss.test.xml.DDValidatorUnitTestCase.testJBossApp(DDValidatorUnitTestCase.java:106)
0.825
--
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
17 years, 1 month
[JBoss JIRA] Created: (JBAOP-305) annotations not found for non-generic implementations of generic interface methods
by Havoc Pennington (JIRA)
annotations not found for non-generic implementations of generic interface methods
----------------------------------------------------------------------------------
Key: JBAOP-305
URL: http://jira.jboss.com/jira/browse/JBAOP-305
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Havoc Pennington
I'm not sure if this is an AOP problem or a how-jboss-is-using-AOP-on-EJB3-session-beans problem, but I'll file it here to start.
The original issue is TransactionAttribute(NEVER) being ignored on certain session bean methods, the test case / details on that are in this list post:
http://groups.google.com/group/mugshot/browse_thread/thread/bc43e0dd34c8c...
I made an AOP test case that either shows an AOP problem or shows a way jboss could easily misuse AOP.
In the AOP test case, If there is an interface Foo<T> with method frobate(T t), then you look that up in AOP as resolveAnnotation("frobate", new Class[] { Object.class })
But if you implement that interface ("class FooImpl implements Foo<Double>") then you have to look that up in AOP as
resolveAnnotation("frobate", new Class[] { Double.class }) - looking it up with the erasure (Object.class arg) will not work, it returns null for the annotation.
So if someone were iterating over methods in the interface, looking each one up on the implementing class, they would not get the annotation for any generic methods in the interface implemented in the class.
The case that's going wrong in EJB3 is a little bit more complicated, so maybe there is some attempt at handling this that isn't catching all the cases.
It looks like further investigation requires messing with jboss TxInterceptor etc. itself, which is a little bit more than I think I can bite off, but hopefully this info is a helpful start.
Thanks
--
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
17 years, 1 month
[JBoss JIRA] Created: (JBAS-4975) Usage of read-ahead on-find with entity beans containing binary attributes (mapped to BLOB, VARBINAR, ...) breaks eager loading.
by Rothe Marco (JIRA)
Usage of read-ahead on-find with entity beans containing binary attributes (mapped to BLOB, VARBINAR, ...) breaks eager loading.
--------------------------------------------------------------------------------------------------------------------------------
Key: JBAS-4975
URL: http://jira.jboss.com/jira/browse/JBAS-4975
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: CMP service
Affects Versions: JBossAS-4.2.2.GA
Reporter: Rothe Marco
Assigned To: Alexey Loubyansky
I' ve found out that using the read ahead strategy "on-find" on an EJB2 entity bean which contains at least one binary persistent attribute (e.g public abstract byte[] getBinaryImage();) can break the eager loading of attributes causing "strange" exceptions.
It is related to the fix of issue http://jira.jboss.org/jira/browse/JBAS-3800.
This fix brought in the following code to the JDBCEJBQLQuery.java
// exclude non-searchable columns if distinct is used
if(compiler.isSelectDistinct())
{
boolean[] mask = getEagerLoadMask();
JDBCFieldBridge[] tableFields = selectEntity.getTableFields();
for(int i = 0; i < tableFields.length; ++i)
{
if(mask[i] && !tableFields[i].getJDBCType().isSearchable())
{
mask[i] = false;
}
Manipulation of mask[i] has the side effect to be visible on ALL finders defined for entity because the mask array is hold by JDBCEntityBridge and shared through all JDBCAbstractQueryCommand instances referencing to this JDBCEntityBridge as selectEntity.
Executing an non distinct query on the bean can cause calls with wrong parameters to the method loadArgumentResults in
JDBCAbstractQueryCommand.EagerCollectionFactory at line 756 and the following.
JDBCFieldBridge[] tableFields = selectEntity.getTableFields();
for(int i = 0; i < eagerLoadMask.length; i++)
{
if(eagerLoadMask[i])
{
JDBCFieldBridge field = tableFields[i];
ref[0] = null;
// read the value and store it in the readahead cache
index = field.loadArgumentResults(rs, index, ref);
if(addPk)
{
selectReadAheadCache.addPreloadData(curPk, field, ref[0]);
}
}
}
Depending on the order of declaring the ejb-find methods for the entity the sql-string of an JDBCAbstractQueryCommand instance maybe compiled before the mask array is changed (by compiling an dictinct-query). In such cases the jdbc-resultset contains the binary column but the if-statement if(eagerLoadMask[i]) skip to load it into the JDBCFieldBridge object. An increment on the index variable (which point to the position to process next from the resultset) is skipped too. Processing the following result set columns cause errors because now JDBC-type at position index does not match the JDBCFieldBridge at tableFields[i].
--
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
17 years, 1 month