Sorry, forgot to attach the test case result

Ate Douma wrote:

Related to my previous mail (HSQLDB reliability) is the mapping of JetspeedObjectID to an INTEGER field in OJB repository_registry.xml.

After I found out about the problem of the mapping I searched for a way to let OJB do an conversion.
The FieldConversion interface is available for that and it turned out that an implementation for JetspeedObjectID was already written, just not used yet (or anymore).


After looking up the first reference to a JetspeedObjectID I found in that for the PortletApplicationDefinitionImpl.id mapping the conversion attribute referencing the ObjectIDtoLongFieldConversion implementation of FieldConversion was commented out. So I enabled it again.
Wrong. Now I got an IllegalArgumentException thrown.
I've attached the test case result which shown the error and stack trace for it.
Note: I did put logging messages in the ObjectIDtoLongFieldConversion sqlToJava and javaToSql methods to see what was passed in and you'll notice one of these (sqlToJava) in the test case results.


What is going wrong here I really don't know as this probably requires detailed OJB knowledge which I don't have.
I have a bad feeling though it could be related to the fact that this id field has autoincrement defined and from the error log you can see the problem seems to come from code handling that. If thats the cause of it then probably OJB doesn't support FieldConversion for autoincrement fields which would be a real bummer as it really is required here.


Anyway, I leave this to the OJB expects to look into it. My current expertise ends here. I saw Brian McCallister joined the club so maybe he can shine some light on this?

Well, this is the last problem for now I have to get Oracle usage. Hopefully once these are resolved no other will pop up (note I didn't got passed the allBuild yet, running J2 is still way off as such).

I am more than willing to test any workaround or fix on oracle so as soon as anyone got something to test just let me know.

Regards,

Ate


Ate Douma wrote:


I've created Blocking issue JS2-18 last night after a long frustrated day trying to get J2 ready to use Oracle as db.

In that issue I identified (at least) 5 major problems I like to ask attention to.

Although JIRA is fine for issue tracking I think the mailing list is more interactive to discuss these issues.
Therefore I created this mail as a wrapper for the several problems which I will describe separately as reply to this mail.


I am very dependent on Oracle for running J2 as it is required for my client. Furthermore, in our project we will start developing portlets based on J2 any time now (I know its kind of early for that but we need some result before the summer and hopefully our development will provide lots of feedback to J2 to help it get out of the door sooner).

Regards, Ate

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



.


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




Testsuite: 
org.apache.jetspeed.components.portletentity.TestPortletEntityAccessComponent
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 5.563 sec
------------- Standard Output ---------------
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
 INFO: JNDI successfully initiallized
 INFO: Setting up data source pooling for com.p6spy.engine.spy.P6SpyDriver
 INFO: Max active connnections set to: 20
 INFO: Pool is set to "2" when all connections are exhausted.
 INFO: Attempting to start DBCPCDatasourceComponent.
 INFO: DBCPCDatasourceComponent successfuly started!
DEBUG: Binding [EMAIL PROTECTED] to name comp/env/jdbc/jetspeed
 INFO: JNDI successfully initiallized
 INFO: Setting up data source pooling for com.p6spy.engine.spy.P6SpyDriver
 INFO: Max active connnections set to: 20
 INFO: Pool is set to "2" when all connections are exhausted.
 INFO: Attempting to start DBCPCDatasourceComponent.
 INFO: DBCPCDatasourceComponent successfuly started!
DEBUG: Binding [EMAIL PROTECTED] to name comp/env/jdbc/jetspeed
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
 INFO: PersistenceStore Time To Live set to 15000
 INFO: PersistenceStore will be checked for inactivity every 10 seconds.
 INFO: PersistenceStore Time To Live set to 15000
 INFO: PersistenceStore will be checked for inactivity every 10 seconds.
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
 INFO: JNDI successfully initiallized
 INFO: Setting up data source pooling for com.p6spy.engine.spy.P6SpyDriver
 INFO: Max active connnections set to: 20
 INFO: Pool is set to "2" when all connections are exhausted.
 INFO: Attempting to start DBCPCDatasourceComponent.
 INFO: DBCPCDatasourceComponent successfuly started!
DEBUG: Binding [EMAIL PROTECTED] to name comp/env/jdbc/jetspeed
 INFO: JNDI successfully initiallized
 INFO: Setting up data source pooling for com.p6spy.engine.spy.P6SpyDriver
 INFO: Max active connnections set to: 20
 INFO: Pool is set to "2" when all connections are exhausted.
 INFO: Attempting to start DBCPCDatasourceComponent.
 INFO: DBCPCDatasourceComponent successfuly started!
DEBUG: Binding [EMAIL PROTECTED] to name comp/env/jdbc/jetspeed
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
 INFO: PersistenceStore Time To Live set to 15000
 INFO: PersistenceStore will be checked for inactivity every 10 seconds.
 INFO: PersistenceStore Time To Live set to 15000
 INFO: PersistenceStore will be checked for inactivity every 10 seconds.
cn=org.nanocontainer.script.groovy.GroovyContainerBuilder
Finding logfile from basedir C:\eclipse\workspace\jetspeed-2\components\registry
[PersistentField] ERROR: while set field: 
[try to set 'object value' in 'target object'
target obj class: 
org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImplid
target field type: int
object value class: org.apache.jetspeed.util.JetspeedObjectID
object value: 1
]
null
------------- ---------------- ---------------
------------- Standard Error -----------------
ObjectIDtoLongFieldConversion.sqlToJava(1) (java.lang.Integer)
java.lang.IllegalArgumentException
        at 
sun.reflect.UnsafeIntegerFieldAccessorImpl.set(UnsafeIntegerFieldAccessorImpl.java:80)
        at java.lang.reflect.Field.set(Field.java:519)
        at 
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl.doSet(PersistentFieldDirectAccessImpl.java:71)
        at 
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.set(AbstractPersistentField.java:98)
        at 
org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelper.java:302)
        at 
org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:345)
        at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:171)
        at org.apache.ojb.broker.Identity.init(Identity.java:118)
        at org.apache.ojb.broker.Identity.<init>(Identity.java:87)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:679)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)
        at 
org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.store(PBStore.java:362)
        at 
org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.makePersistent(PBStore.java:346)
        at 
org.apache.jetspeed.components.portletentity.TestPortletEntityAccessComponent.setupTestData(TestPortletEntityAccessComponent.java:162)
        at 
org.apache.jetspeed.components.portletentity.TestPortletEntityAccessComponent.setUp(TestPortletEntityAccessComponent.java:66)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        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(ComponentAwareTestSuite.java:141)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentAwareTestSuite.java:108)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:325)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:536)
------------- ---------------- ---------------

Testcase: testEntities took 0.735 sec
        Caused an ERROR
Can not init Identity for given object [EMAIL PROTECTED]
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException: Can not init 
Identity for given object [EMAIL PROTECTED]
        at org.apache.ojb.broker.Identity.init(Identity.java:125)
        at org.apache.ojb.broker.Identity.<init>(Identity.java:87)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:679)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)
        at 
org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.store(PBStore.java:362)
        at 
org.apache.jetspeed.components.persistence.store.ojb.pb.PBStore.makePersistent(PBStore.java:346)
        at 
org.apache.jetspeed.components.portletentity.TestPortletEntityAccessComponent.setupTestData(TestPortletEntityAccessComponent.java:162)
        at 
org.apache.jetspeed.components.portletentity.TestPortletEntityAccessComponent.setUp(TestPortletEntityAccessComponent.java:66)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.runTest(ComponentAwareTestSuite.java:141)
        at 
org.apache.jetspeed.components.ComponentAwareTestSuite.run(ComponentAwareTestSuite.java:108)
Caused by: org.apache.ojb.broker.PersistenceBrokerException: Error while trying to 
autoincrement field class 
org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl#id
        at 
org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelper.java:307)
        at 
org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java:345)
        at org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:171)
        at org.apache.ojb.broker.Identity.init(Identity.java:118)
        ... 19 more
Caused by: org.apache.ojb.broker.metadata.MetadataException: Error setting field:id in 
object:org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl
        at 
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl.doSet(PersistentFieldDirectAccessImpl.java:88)
        at 
org.apache.ojb.broker.metadata.fieldaccess.AbstractPersistentField.set(AbstractPersistentField.java:98)
        at 
org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelper.java:302)
        ... 22 more
Caused by: java.lang.IllegalArgumentException
        at 
sun.reflect.UnsafeIntegerFieldAccessorImpl.set(UnsafeIntegerFieldAccessorImpl.java:80)
        at java.lang.reflect.Field.set(Field.java:519)
        at 
org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl.doSet(PersistentFieldDirectAccessImpl.java:71)
        ... 24 more

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

Reply via email to