← Back to team overview

dhis2-devs team mailing list archive

Re: generate resource table error

 

Using Google Translate, the syntax error is related to the attempt to
create a table with a blank column name, namely   VARCHAR (250) (notice the
blank)

I think the the current methods to generate column names attempt to remove
all non-safe characters, and looks like they are all being stripped out
resulting in a blank column name.


Regards,
Jason






On Sat, Jul 27, 2013 at 6:19 AM, easy <lin_xd@xxxxxxx> wrote:

> that's right, for chinese DE groupset name,create table sql  will get null.
> CREATE
> TABLE _dataelementgroupsetstructure ( dataelementid INTEGER NOT NULL,
> dataelementname VARCHA
> R (250), [*this chinese name *] VARCHAR (250), qr7oQXJ4LW9
> CHARACTER(11),  VARCHAR (250), PVBSMpEIesq CHARACTER(11
>
> ), PRIMARY KEY ( dataelementid ) )
>
>
>
>
> --
> 此致
>
> easy
> 莫愁前路无知己,天下谁人不识君。
>
> At 2013-07-26 20:36:59,"Lars Helge Øverland" <larshelge@xxxxxxxxx> wrote:
>
> Hi easy,
>
> it seems the error message is in chinese (after org.postgresql.util.
> PSQLException: error ), hard for me to understand in order to help, any
> chance you can translate or provide in English?
>
> regards,
>
> Lars
>
>
> On Fri, Jul 26, 2013 at 11:57 AM, easy <lin_xd@xxxxxxx> wrote:
>
>> * ERROR 2013-07-26 17:46:46,431 Error while executing action
>> (ExceptionInterceptor.java [htt
>> p-apr-8080-exec-2])
>> org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad
>> SQL grammar [CREATE
>> TABLE _dataelementgroupsetstructure ( dataelementid INTEGER NOT NULL,
>> dataelementname VARCHA
>> R (250),  VARCHAR (250), qr7oQXJ4LW9 CHARACTER(11),  VARCHAR (250),
>> PVBSMpEIesq CHARACTER(11
>> ), PRIMARY KEY ( dataelementid ) )]; nested exception is
>> org.postgresql.util.PSQLException:
>> error: 语法错误 在 "(" 或附近的
>>   位置:118
>>         at
>> org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(S
>> QLErrorCodeSQLExceptionTranslator.java:237)
>>         at
>> org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate
>> (AbstractFallbackSQLExceptionTranslator.java:72)
>>         at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
>>         at
>> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:428)
>>         at
>> org.hisp.dhis.resourcetable.jdbc.JdbcResourceTableStore.createDataElementGroupSet
>> Structure(JdbcResourceTableStore.java:163)
>>         at
>> org.hisp.dhis.resourcetable.DefaultResourceTableService.generateDataElementGroupS
>> etTable(DefaultResourceTableService.java:276)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>         at java.lang.reflect.Method.invoke(Unknown Source)
>>         at
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.
>> java:317)
>>         at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Refl
>> ectiveMethodInvocation.java:183)
>>         at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMe
>> thodInvocation.java:150)
>>         at
>> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithI
>> nvocation(TransactionInterceptor.java:96)
>>         at
>> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithin
>> Transaction(TransactionAspectSupport.java:260)
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References