rehamaltamimi / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

A truncation error was encountered trying to shrink VARCHAR 'Template:es-verb form of/{{ #switch: imperative | ind | ind&' to length 256. #45

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
> What steps will reproduce the problem?
I do not have steps to reproduct for this yet but it appears that some column 
in derby has inadequate length.

> What is the expected output? What do you see instead?
The field should be able to accomodate larger text sizes.

> What version of the product are you using? On what operating system?
3.0.14 with windows-7, 32-bit

> Please provide any additional information below.
Please review the stack trace below:

............................java.sql.SQLDataException: A truncation error was 
encountered trying to shrink VARCHAR 'Template:es-verb form of/{{ #switch: 
imperative  | ind | ind&' to length 256.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at info.bliki.api.creator.WikiDB.insertTopic(WikiDB.java:124)
at info.bliki.wiki.impl.APIWikiModel.getRawWikiContent(APIWikiModel.java:155)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:590)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:71)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:60)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:43)
at 
info.bliki.wiki.template.AbstractTemplateFunction.parse(AbstractTemplateFunction
.java:40)
at info.bliki.wiki.template.If.parseFunction(If.java:35)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:556)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:596)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:71)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:60)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:43)
at info.bliki.wiki.filter.WikipediaParser.parse(WikipediaParser.java:1490)
at info.bliki.wiki.model.AbstractWikiModel.render(AbstractWikiModel.java:949)

Caused by: java.sql.SQLException: A truncation error was encountered trying to 
shrink VARCHAR 'Template:es-verb form of/{{ #switch: imperative  | ind | ind&' 
to length 256.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(
Unknown Source)... 39 more
Caused by: ERROR 22001: A truncation error was encountered trying to shrink 
VARCHAR 'Template:es-verb form of/{{ #switch: imperative  | ind | ind&' to 
length 256.
at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
at org.apache.derby.iapi.types.SQLChar.hasNonBlankChars(Unknown Source)
at org.apache.derby.iapi.types.SQLVarchar.normalize(Unknown Source)
at org.apache.derby.iapi.types.SQLVarchar.normalize(Unknown Source)
at org.apache.derby.iapi.types.DataTypeDescriptor.normalize(Unknown Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.normalizeRow(Unknown 
Source)
at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown 
Source)
at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown 
Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source)... 33 morejava.sql.SQLDataException: A truncation error was encountered 
trying to shrink VARCHAR 'Template:es-verb form of/{{ #switch: indicative  | 
ind | ind&' to length 256.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at info.bliki.api.creator.WikiDB.insertTopic(WikiDB.java:124)
at info.bliki.wiki.impl.APIWikiModel.getRawWikiContent(APIWikiModel.java:155)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:590)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:71)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:60)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:43)
at 
info.bliki.wiki.template.AbstractTemplateFunction.parse(AbstractTemplateFunction
.java:40)
at info.bliki.wiki.template.If.parseFunction(If.java:35)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:556)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseTemplate(TemplateParser.java:596)
at 
info.bliki.wiki.filter.TemplateParser.parseTemplateOrTemplateParameter(TemplateP
arser.java:524)
at info.bliki.wiki.filter.TemplateParser.runParser(TemplateParser.java:231)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:122)
at info.bliki.wiki.filter.TemplateParser.parseRecursive(TemplateParser.java:71)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:60)
at info.bliki.wiki.filter.TemplateParser.parse(TemplateParser.java:43)
at info.bliki.wiki.filter.WikipediaParser.parse(WikipediaParser.java:1490)
at info.bliki.wiki.model.AbstractWikiModel.render(AbstractWikiModel.java:949)

Caused by: java.sql.SQLException: A truncation error was encountered trying to 
shrink VARCHAR 'Template:es-verb form of/{{ #switch: indicative  | ind | ind&' 
to length 256.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(
Unknown Source)... 39 more
Caused by: ERROR 22001: A truncation error was encountered trying to shrink 
VARCHAR 'Template:es-verb form of/{{ #switch

Original issue reported on code.google.com by ayush.gu...@gmail.com on 22 Jun 2010 at 5:29

GoogleCodeExporter commented 8 years ago
Can you provide more information about the code snippet you're rendering?
I assume that the #switch parser function ({{ #switch: imperative  | ind | 
ind&...) isn't correctly resolved.

Original comment by axelclk@gmail.com on 22 Jun 2010 at 6:11

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 22 Jun 2010 at 6:12

GoogleCodeExporter commented 8 years ago
One of the markup being processed when this error occured was:
"{{es-verb form 
of|ending=ar|mood=imperative|sense=affirmative|pers=2|formal=no|number=singular|
[[abacorar]]}}" 

and the is mediawikiApiUrl is 
"http://en.wiktionary.org/w/api.php"

Original comment by ayush.gu...@gmail.com on 24 Jun 2010 at 7:07

GoogleCodeExporter commented 8 years ago
Also, the code just prints the stacktrace in the 
APIWikiModel.getRawWikiContent() instead of bubbling the exception. Is that 
intended?

Original comment by ayush.gu...@gmail.com on 24 Jun 2010 at 7:09