This is an issue with the registry

getPortletApplication(ObjectID)

I made some changes and added test coverage for that
method in the RegistryDirectTest2.  It passes with
HSQL.  I do not have MySql, could someone test it out
with MySql once I commit.

Thanks.

David.

--- David Sean Taylor <[EMAIL PROTECTED]> wrote:
> Im getting a test failure
> Im using MySQL backend
> 
> [org.apache.ojb.broker.accesslayer.JdbcAccessImpl]
> ERROR: SQLException  
> during the execution of the query (for a  
>
org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl):
>  
> Cannot convert class
> org.apache.jetspeed.util.JetspeedObjectID to SQL  
> type requested due to java.lang.ClassCastException -
> null
> Cannot convert class
> org.apache.jetspeed.util.JetspeedObjectID to SQL  
> type requested due to java.lang.ClassCastException -
> null
> ------------- ---------------- ---------------
> ------------- Standard Error -----------------
> log4j:WARN No appenders could be found for logger  
>
(org.apache.jetspeed.components.jndi.TyrexJNDIComponent).
> log4j:WARN Please initialize the log4j system
> properly.
> java.sql.SQLException: Cannot convert class  
> org.apache.jetspeed.util.JetspeedObjectID to SQL
> type requested due to  
> java.lang.ClassCastException - null
>       at  
>
com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:916)
>       at  
>
com.mysql.jdbc.PreparedStatement.setObject(PreparedStatement.java:937)
>       at  
>
org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(Delegating
> 
> PreparedStatement.java:254)
>       at  
>
org.apache.ojb.broker.platforms.PlatformDefaultImpl.setObjectForStatemen
> 
> t(Unknown Source)
>       at  
>
org.apache.ojb.broker.accesslayer.StatementManager.bindStatementValue(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown
> 
>   Source)
>       at  
>
org.apache.ojb.broker.accesslayer.StatementManager.bindSelectionCriteria
> 
> (Unknown Source)
>       at  
>
org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown
> 
>   Source)
>       at  
>
org.apache.ojb.broker.accesslayer.StatementManager.bindStatement(Unknown
> 
>   Source)
>       at  
>
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
>  
> Source)
>       at
>
org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown
> Source)
>       at  
>
org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknow
> 
> n Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(
> 
> Unknown Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknow
> 
> n Source)
>       at  
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(
> 
> Unknown Source)
>       at  
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(
> 
> Unknown Source)
>       at  
>
org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.getObjec
> 
> tByQuery(PBStore.java:206)
>       at  
>
org.apache.jetspeed.components.portletregistry.PortletRegistryComponentI
> 
>
mpl.getPortletApplication(PortletRegistryComponentImpl.java:177)
>       at  
>
org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl.getUserInfoMap(Use
> 
> rInfoManagerImpl.java:123)
>       at  
>
org.apache.jetspeed.userinfo.TestUserInfoManager.testSetUserInfoMap(Test
> 
> UserInfoManager.java:157)
>       at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>       at  
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> 
> a:39)
>       at  
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> 
> Impl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:324)
>       at
> junit.framework.TestCase.runTest(TestCase.java:154)
>       at
> junit.framework.TestCase.runBare(TestCase.java:127)
>       at
>
junit.framework.TestResult$1.protect(TestResult.java:106)
>       at
>
junit.framework.TestResult.runProtected(TestResult.java:124)
>       at
> junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at
>
junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at  
>
org.apache.jetspeed.components.ComponentAwareTestSuite.runTest(Component
> 
> AwareTestSuite.java:141)
>       at
> junit.framework.TestSuite.run(TestSuite.java:203)
>       at  
>
org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentAwar
> 
> eTestSuite.java:108)
>       at  
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe
> 
> stRunner.java:325)
>       at  
>
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitT
> 
> estRunner.java:536)
> ------------- ---------------- ---------------
> Testcase:  
>
testSetUserInfoMap(org.apache.jetspeed.userinfo.TestUserInfoManager):
>  
> Caused an ERROR
> org.apache.ojb.broker.PersistenceBrokerSQLException:
>  
> java.sql.SQLException: Cannot convert class  
> org.apache.jetspeed.util.JetspeedObjectID to SQL
> type requested due to  
> java.lang.ClassCastException - null
> org.apache.ojb.broker.PersistenceBrokerException:  
> org.apache.ojb.broker.PersistenceBrokerSQLException:
>  
> java.sql.SQLException: Cannot convert class  
> org.apache.jetspeed.util.JetspeedObjectID to SQL
> type requested due to  
> java.lang.ClassCastException - null
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery(Un
> 
> known Source)
>       at  
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknow
> 
> n Source)
>       at  
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(
> 
> 
=== message truncated ===



        
                
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to