On Jun 14, 2007, at 3:44 AM, Brian J. Sayatovic wrote:
I upgraded to Derby 10.2.2.0 and it worked (still with
XWiki 1.1-
M1... I dare not rollback!)
Thank for the feedback. I've upgraded XWiki to use Derby 10.2.2.0.
This is included in 1.1M2 which will be released tomorrow.
See
Regards,
Brian.
Brian J. Sayatovic wrote:
> OK, I re-tried with XWiki 1.0 and got the same results.
> Frustrated, I've move to XWiki 1.1-M1. I downloaded the mapping
> file for 1.1M1 from that same page and deployed it. I got the
> same type of exception:
>
> Error number 8002 in 8: Cannot create user XWiki.TestUser
> Wrapped Exception: Error number 3201 in 3: Exception while saving
> document XWiki.TestUser
> Wrapped Exception: could not insert:
> [com.xpn.xwiki.doc.XWikiDocument]
> com.xpn.xwiki.XWikiException: Error number 8002 in 8: Cannot
> create user XWiki.TestUser
> Wrapped Exception: Error number 3201 in 3: Exception while saving
> document XWiki.TestUser
> Wrapped Exception: could not insert:
> [com.xpn.xwiki.doc.XWikiDocument]
> at com.xpn.xwiki.XWiki.createUser(XWiki.java:2827)
> at com.xpn.xwiki.XWiki.createUser(XWiki.java:2601)
> at com.xpn.xwiki.XWiki.createUser(XWiki.java:2509)
> at com.xpn.xwiki.web.RegisterAction.action(RegisterAction.java:44)
> ... snip ...
> Wrapped Exception:
> SQL Exception: An attempt was made to get a data value of type
> 'CLOB' from a data value of type 'VARCHAR'.
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException
> (Unknown Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException
> (Unknown Source)
> at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversion(
> Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setNull
> (Unknown Source)
> at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setNull
> (DelegatingPreparedStatement.java:104)
>
>
> I'm not giving up, but I'm at least convinced that its not
> specific to 1.0, but specific to something I'm doing.
>
> The exception would lead me to believe its still a CLOB/VARCHAR
> mismatch, but I even checked the mapping file myself and saw no
> VARCHARs left.
>
> Is there a specific version of Derby I need? I'm using 10.1.2.0.
>
> Regards,
> Brian.
>
> P.S. I just realized I never did the "load default XAR" step, will
> try that...
>
> Vincent Massol wrote:
>> Hi Brian,
>>
>> On Jun 7, 2007, at 3:42 AM, Brian J. Sayatovic wrote:
>>
>>> Ah, that helped a bunch! Now I can get in and start to do
>>> stuff. But, creating a user failed. I think I can follow the
>>> pattern of your fix and fix it locally...
>>
>> I've just tried it here and it worked fine. Here's what I've done:
>>
>> 1) configure xwiki to use derby
>> 2) start xwiki (thus with an empty Derby DB)
>> 3) load the default xwiki XAR
>> 4) go to the register page (
http://localhost:8080/xwiki/bin/
>> register/XWiki/Register) and create a user
>>
>> Is that what you've done too?
>>
>> Thanks
>> -Vincent
>>
>>>
>>> Wrapped Exception:
>>>
>>> SQL Exception: An attempt was made to get a data value of type
>>> 'CLOB' from a data value of type 'VARCHAR'.
>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>> Source)
>>> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
>>> Source)
>>> at org.apache.derby.impl.jdbc.Util.generateCsSQLException
>>> (Unknown Source)
>>> at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException
>>> (Unknown Source)
>>> at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException
>>> (Unknown Source)
>>> at
>>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.dataTypeConversio
>>> n(Unknown Source)
>>> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.setNull
>>> (Unknown Source)
>>> at
>>> org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setNull
>>> (DelegatingPreparedStatement.java:104)
>>> at org.hibernate.type.NullableType.nullSafeSet
>>> (NullableType.java:75)
>>> at org.hibernate.type.NullableType.nullSafeSet
>>> (NullableType.java:58)
>>> at
>>> org.hibernate.persister.entity.AbstractEntityPersister.dehydrate
>>> (AbstractEntityPersister.java:1826)
>>> at
>>> org.hibernate.persister.entity.AbstractEntityPersister.dehydrate
>>> (AbstractEntityPersister.java:1803)
>>> at org.hibernate.persister.entity.AbstractEntityPersister.insert
>>> (AbstractEntityPersister.java:2059)
>>> at org.hibernate.persister.entity.AbstractEntityPersister.insert
>>> (AbstractEntityPersister.java:2427)
>>> at org.hibernate.action.EntityInsertAction.execute
>>> (EntityInsertAction.java:51)
>>> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
>>> at org.hibernate.engine.ActionQueue.executeActions
>>> (ActionQueue.java:227)
>>> at org.hibernate.engine.ActionQueue.executeActions
>>> (ActionQueue.java:140)
>>> at
>>> org.hibernate.event.def.AbstractFlushingEventListener.performExecut
>>> ions(AbstractFlushingEventListener.java:296)
>>> at org.hibernate.event.def.DefaultFlushEventListener.onFlush
>>> (DefaultFlushEventListener.java:27)
>>> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1009)
>>> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:
>>> 356)
>>> at org.hibernate.transaction.JDBCTransaction.commit
>>> (JDBCTransaction.java:106)
>>> at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction
>>> (XWikiHibernateBaseStore.java:573)
>>> at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction
>>> (XWikiHibernateBaseStore.java:547)
>>> at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc
>>> (XWikiHibernateStore.java:309)
>>> at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc
>>> (XWikiCacheStore.java:100)
>>> at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc
>>> (XWikiCacheStore.java:94)
>>> at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:914)
>>> at com.xpn.xwiki.XWiki.createUser(XWiki.java:2762)
>>> ...
>>>
>>>
>>> Regards,
>>> Brian.
>>>
>>> Vincent Massol wrote:
>>>> Hi Brian,
>>>>
>>>> I know what's wrong. We've changed the database model a bit in
>>>> 1.1 (we've added a comment field) so as you're using 1.0 the
>>>> XWikiDocument class doesn't have the getter/setter for comments.
>>>>
>>>> + <property name="comment"
type="string">
>>>> + <column name="XWD_COMMENT"
length="1023" not-
>>>> null="true" />
>>>> + </property>
>>>>
>>>> I've uploaded a fixed HBM file on
>>>>
http://www.xwiki.org/xwiki/bin/view/AdminGuide/InstallationDerby
>>>>
>>>> Sorry about that
>>>> -Vincent
>>>>
>>>>
>>>> On Jun 5, 2007, at 3:57 AM, Brian J. Sayatovic wrote:
>>>>
>>>>> I tried the XML file you provided in the linked page. I got
>>>>> past where I was stuck before, but now got this:
>>>>>
>>>>> org.hibernate.PropertyNotFoundException: Could not find a
>>>>> getter for comment in class com.xpn.xwiki.doc.XWikiDocument
>>>>> at
>>>>> org.hibernate.property.BasicPropertyAccessor.createGetter
>>>>> (BasicPropertyAccessor.java:282)
>>>>> at org.hibernate.property.BasicPropertyAccessor.getGetter
>>>>> (BasicPropertyAccessor.java:275)
>>>>> at org.hibernate.mapping.Property.getGetter(Property.java:
>>>>> 251)
>>>>> at
>>>>> org.hibernate.tuple.PojoEntityTuplizer.buildPropertyGetter
>>>>> (PojoEntityTuplizer.java:255)
>>>>> at org.hibernate.tuple.AbstractEntityTuplizer.<init>
>>>>> (AbstractEntityTuplizer.java:121)
>>>>> at org.hibernate.tuple.PojoEntityTuplizer.<init>
>>>>> (PojoEntityTuplizer.java:55)
>>>>> at org.hibernate.tuple.TuplizerLookup.create
>>>>> (TuplizerLookup.java:64)
>>>>> at org.hibernate.tuple.EntityMetamodel.<init>
>>>>> (EntityMetamodel.java:257)
>>>>> at
>>>>> org.hibernate.persister.entity.AbstractEntityPersister.<init>
>>>>> (AbstractEntityPersister.java:412)
>>>>> at
>>>>>
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(
>>>>> SingleTableEntityPersister.java:108)
>>>>> at
>>>>> org.hibernate.persister.PersisterFactory.createClassPersister
>>>>> (PersisterFactory.java:55)
>>>>> at org.hibernate.impl.SessionFactoryImpl.<init>
>>>>> (SessionFactoryImpl.java:215)
>>>>> at org.hibernate.cfg.Configuration.buildSessionFactory
>>>>> (Configuration.java:1176)
>>>>> at
>>>>> com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate
>>>>> (XWikiHibernateBaseStore.java:134)
>>>>> at
>>>>> com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate
>>>>> (XWikiHibernateBaseStore.java:389)
>>>>> at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc
>>>>> (XWikiHibernateStore.java:342)
>>>>> at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc
>>>>> (XWikiCacheStore.java:160)
>>>>> at com.xpn.xwiki.XWiki.getDocument(XWiki.java:936)
>>>>> at com.xpn.xwiki.XWiki.getDocument(XWiki.java:970)
>>>>> at com.xpn.xwiki.XWiki.getPrefsClass(XWiki.java:2179)
>>>>> at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:675)
>>>>> at com.xpn.xwiki.XWiki.<init>(XWiki.java:567)
>>>>> at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:282)
>>>>> at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:383)
>>>>> at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:96)
>>>>> at ...
>>>>> at org.apache.tomcat.util.threads.ThreadPool
>>>>> $ControlRunnable.run(ThreadPool.java:684)
>>>>> at java.lang.Thread.run(Unknown Source)
>>>>>
>>>>> This is using XWiki 1.0.
>>>>>
>>>>> Did you encounter this along the way?
>>>>>
>>>>> Regards,
>>>>> Brian.
>>>>>
>>>>> Vincent Massol wrote:
>>>>>> FWIW I've succeeded in running XWiki on Derby and I have
>>>>>> created this page to document it:
>>>>>>
http://www.xwiki.org/xwiki/bin/view/AdminGuide/InstallationDerby
>>>>>>
>>>>>> -Vincent
>>>>>>
>>