Ok finally found the real issue. It's 255 chars by the way.

There's one test that creates a key generator for joe publisher at the
maximum allowable key length. Since the order of test runs in not the same
everytime it runs, this would occasionally run before various other tests
that create a new business. The recent changes for JIRA
https://issues.apache.org/jira/browse/JUDDI-841 must set the joepublisher's
key domain as the max length, thus the save business request without a key
defined gets a guid appended to the end the key domain, thus exceed the max
length of the column.

The problem is, how can be best handle this? I was planning on adding an
extra check for getDomain, where the key domain + the length of a UUID is
<= 255. Any other ideas?


On Mon, Feb 24, 2014 at 8:32 PM, Kurt T Stam <[email protected]> wrote:

>  That key seems 256 characters to me.
>
> cat key | wc -m
>      256
>
>
>
> On 2/24/14, 8:13 PM, Alex O'Ree wrote:
>
> the key is valid and a constant, however the line referenced in source is
> not the constant listed in the error. perhaps there's a queuing mechanism
> in play. actual key is
>
> uddi:www.mycoolxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcompany.com:keygenerator
> which is 255 chars
>
>
> On Mon, Feb 24, 2014 at 7:39 PM, Kurt T Stam <[email protected]> wrote:
>
>> 1. Looks like the key is longer then 255 characters - is it a generated
>> key?
>>
>> 2. Is the is v2 formatted key? I don't think it is a valid v3 key
>>
>> --Kurt
>>
>>
>> On 2/24/14, 7:33 PM, Alex O'Ree wrote:
>>
>>> I started getting this gem of an error during the build. I'm not sure
>>> what the root cause is, and it's intermittent.
>>>
>>> ContactPhoneMaxLongMaxUseTypetest
>>> Feb 24, 2014 6:58:27 PM org.hibernate.util.JDBCExceptionReporter
>>> logExceptions
>>> WARNING: SQL Error: 20000, SQLState: 22001
>>> Feb 24, 2014 6:58:27 PM org.hibernate.util.JDBCExceptionReporter
>>> logExceptions
>>> SEVERE: A truncation error was encountered trying to shrink VARCHAR
>>> 'uddi:www.mycoolxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>> xxxxxxxxx&' to length 255.
>>> Feb 24, 2014 6:58:27 PM
>>> org.hibernate.event.def.AbstractFlushingEventListener performExecutions
>>> SEVERE: Could not synchronize database state with session
>>> org.hibernate.exception.DataException: could not insert:
>>> [org.apache.juddi.model.BusinessEntity]
>>>         at
>>> org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
>>>         at
>>> org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
>>>         at
>>> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2267)
>>>         at
>>> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)
>>>         at
>>> org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:56)
>>>         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
>>>         at
>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
>>>         at
>>> org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
>>>         at
>>> org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:29
>>> 8)
>>>         at
>>> org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41)
>>>         at
>>> org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969)
>>>         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
>>>         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>>>         at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66)
>>>         at
>>> org.apache.juddi.query.EntityQuery.getQueryResult(EntityQuery.java:135)
>>>         at
>>> org.apache.juddi.query.FindEntityByPublisherQuery.select(FindEntityByPublisherQuery.java:93)
>>>         at
>>> org.apache.juddi.query.FindBusinessByPublisherQuery.select(FindBusinessByPublisherQuery.java:48)
>>>         at
>>> org.apache.juddi.validation.ValidatePublish.validateSaveBusinessMax(ValidatePublish.java:374)
>>>         at
>>> org.apache.juddi.api.impl.UDDIPublicationImpl.saveBusiness(UDDIPublicationImpl.java:603)
>>>         at
>>> org.apache.juddi.api.impl.API_140_NegativePublicationTest.ContactPhoneMaxLongMaxUseTypetest(API_140_NegativeP
>>> ublicationTest.java:935)
>>>
>>
>>
>
>

Reply via email to