Schema type definition

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Schema type definition

Alex Sharaz-2
Hi,

I've a db2 database with a column type of bigint

in an xpl file I've got

  <sql:get-column-value type="xs:integer" column="ACCTINOCTETS"/>

THis fails with an error

2008-05-20 17:11:29,792 ERROR ProcessorService  - Exception at line 69  
of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl
org.orbeon.oxf.common.ValidationException: line 69 of oxf:/apps/db2-
dot1x-stats/service-get-wired-dot1x.xpl: Error attribute "type" has
  a bad value(schema: http://orbeon.org/oxf/xml/sql)
oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl, line 69, column  
-1: Error attribute "type" has a bad value(schema: http://orbeon
.org/oxf/xml/sql)


I've also tried xs:int but that gives the same result.

What would the correct type vale be for a "bigint"?
Alex



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Schema type definition

fl.schmitt(ops-users)
hi Alex,

> What would the correct type vale be for a "bigint"?

i think it would be xs:long [1], but the documentation doesn't count it
as a supported type [2], so maybe you will have to use xs:double.

[1] http://www.w3.org/TR/xmlschema-2/#long
[2] http://www.orbeon.com/ops/doc/processors-sql#column-values


HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Schema type definition

Alex Sharaz-2
In reply to this post by Alex Sharaz-2
many thanks for this but nope

using xs:double generated the same error as before 
using xs:long gave


Exception at line 69 of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl
org.orbeon.oxf.common.ValidationException: line 69 of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl: Error attribute "type" has
 a bad value(schema: http://orbeon.org/oxf/xml/sql)
oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl, line 69, column -1: Error attribute "type" has a bad value(schema: http://orbeon
.org/oxf/xml/sql)

On May 21, 2008, at 9:35 AM, Florian Schmitt wrote:

hi Alex,

> What would the correct type vale be for a "bigint"?

i think it would be xs:long [1], but the documentation doesn't count it
as a supported type [2], so maybe you will have to use xs:double.

[1] http://www.w3.org/TR/xmlschema-2/#long
[2] http://www.orbeon.com/ops/doc/processors-sql#column-values


HTH
florian


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Schema type definition

fl.schmitt(ops-users)
hi Alex,

> using xs:double generated the same error as before
> using xs:long gave

just for comleteness - does the XPL contain a namespace declaration for
xmlns:xs?

florian




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Schema type definition

Alex Sharaz-2
Hi at the top

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
         xmlns:sql="http://orbeon.org/oxf/xml/sql"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:oxf="http://www.orbeon.com/oxf/processors"
         xmlns:xi="http://www.w3.org/2001/XInclude">

.......

  <sql:config>
                 <users>
                     <sql:connection>
                         <sql:datasource>radiator</sql:datasource>
                         <sql:execute>
                             <sql:query>
                                 select  
USERNAME
,NASIDENTIFIER
,OUTER_EAP_ID
,ACCTSESSIONID,MY_TIME_STAMP,CALLING_STATION_ID,IDENTIFIER,NASPO
RT
,NASPORTTYPE
,SERVICETYPE
,ACCT_SESS_TIME_STAMP,ACCTINOCTETS,ACCTOUTOCTETS,FRAMEDIPADDRESS from  
db2inst3.RADONLINE  where (SERVICETYPE='Do
t1X' and NASPORTTYPE='Wired') order by MY_TIME_STAMP
                             </sql:query>
                             <sql:result-set>
                                 <sql:row-iterator>
                                     <user>
                                         <username>
                                             <sql:get-column-value  
type="xs:string" column="USERNAME"/>
                                         </username>
.......
                               <sql:get-column-value type="xs:long"  
column="ACCTINOCTETS"/>
                                         </acctinoctets>
                                         <acctoutoctets>
                                             <sql:get-column-value  
type="xs:long" column="ACCTOUTOCTETS"/>
                                         </acctoutoctets>
                                         <ipaddress>
                                             <sql:get-column-value  
type="xs:string" column="FRAMEDIPADDRESS"/>
                                         </ipaddress>
                                     </user>
                                 </sql:row-iterator>
                             </sql:result-set>
                         </sql:execute>
                     </sql:connection>
                 </users>
             </sql:config>


On May 21, 2008, at 12:55 PM, Florian Schmitt wrote:

> hi Alex,
>
>> using xs:double generated the same error as before using xs:long gave
>
> just for comleteness - does the XPL contain a namespace declaration  
> for xmlns:xs?
>
> florian
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Schema type definition

fl.schmitt(ops-users)
hi Alex,

hmm, strange - is there a way to check which database value is causing
that error?

florian




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Schema type definition

Alex Sharaz-2
The table columns defined as bigint represent the number of octets  
passed inbound and outbound from the switch port on the network. The  
columns are only updated upon receipt of a RADIUS Accounting Alive  
packet so by default their content is unknown. I'll refine the query  
to select an entry that in know has data in it. ... and set up the db  
so that when a record is created these columns have a default val of 0

... but not today I'm off to boston for a hol
:-)
Alex

On May 21, 2008, at 1:26 PM, Florian Schmitt wrote:

> hi Alex,
>
> hmm, strange - is there a way to check which database value is  
> causing that error?
>
> florian
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Schema type definition

Alex Sharaz-2
In reply to this post by Alex Sharaz-2
Been doing some more work on this.

The problem is definitely with bigints.
I've changed the DB table so the def val is 0 instead of being null to no avail.

The next thing I did was to cast the big int columns into a string:-

select USERNAME,NASIDENTIFIER,OUTER_EAP_ID,ACCTSESSIONID,MY_TIME_STAMP,CALLING_STATION_ID,IDENTIFIER,NASPORT,NASPORTTYPE,SERVICETYPE,CAST(CAST(acctinoctets as CHAR(50)) AS VARCHAR(50)),CAST(CAST(acctoutoctets as CHAR(50)) AS VARCHAR(50)),FRAMEDIPADDRESS from db2inst3.RADONLINE  where NASPORTTYPE='Wired' order by MY_TIME_STAMP

The above works from an sql point of view ( tried out a subset on the command line.

However, in my  xpl file where I've got 

  <sql:result-set>
                                <sql:row-iterator>
                                   ......
                                        <acctinoctets>
                                            <sql:get-column-value type="xs:string" column="acctinoctets"/>
                                        </acctinoctets>
.......

I now get a jdbc error saying 

2008-06-25 11:43:00,194 INFO  ProcessorService  - /db2-dot1x-stats/ - Received request
2008-06-25 11:43:00,259 INFO  ProcessorService  - /db2-dot1x-stats/ - Timing: 65 - Cache hits for cache.main: 369, fault: 0, adds:
 0, expirations: 0, success rate: 100%
2008-06-25 11:43:02,606 INFO  ProcessorService  - /xforms-server - Received request
2008-06-25 11:43:02,624 INFO  ProcessorService  - /db2-dot1x-stats/get-wired-dot1x - Received request
2008-06-25 11:43:02,668 INFO  DatabaseContext  - Rolling back JDBC connection for datasource: jdbc/radiator.
2008-06-25 11:43:02,669 ERROR ProcessorService  - Exception at line 66 of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl
com.ibm.db2.jcc.a.SqlException: [ibm][db2][jcc][10150][10300] Invalid parameter: Unknown column name acctinoctets.

Help !!
Alex


On May 21, 2008, at 12:35 PM, Alex Sharaz wrote:

many thanks for this but nope

using xs:double generated the same error as before 
using xs:long gave


Exception at line 69 of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl
org.orbeon.oxf.common.ValidationException: line 69 of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl: Error attribute "type" has
 a bad value(schema: http://orbeon.org/oxf/xml/sql)
oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl, line 69, column -1: Error attribute "type" has a bad value(schema: http://orbeon
.org/oxf/xml/sql)

On May 21, 2008, at 9:35 AM, Florian Schmitt wrote:

hi Alex,

> What would the correct type vale be for a "bigint"?

i think it would be xs:long [1], but the documentation doesn't count it
as a supported type [2], so maybe you will have to use xs:double.

[1] http://www.w3.org/TR/xmlschema-2/#long
[2] http://www.orbeon.com/ops/doc/processors-sql#column-values


HTH
florian


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Schema type definition

fl.schmitt(ops-users)
Alex Sharaz schrieb:

> select
> USERNAME,NASIDENTIFIER,OUTER_EAP_ID,ACCTSESSIONID,MY_TIME_STAMP,CALLING_STATION_ID,IDENTIFIER,NASPORT,NASPORTTYPE,SERVICETYPE,CAST(CAST(acctinoctets
> as CHAR(50)) AS VARCHAR(50)),CAST(CAST(acctoutoctets as CHAR(50)) AS
> VARCHAR(50)),FRAMEDIPADDRESS from db2inst3.RADONLINE  where
> NASPORTTYPE='Wired' order by MY_TIME_STAMP

does it help if you set the column name explicitly? ..., CAST( CAST(
acctinoctets as CHAR(50)) AS VARCHAR(50)) AS acctinoctets, ...


HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Schema type definition

Alex Sharaz-2
1st thing i tried was setting column-name="acctinoctets" with column-
name=CAST......

got

2008-06-25 11:43:02,624 INFO  ProcessorService  - /db2-dot1x-stats/get-
wired-dot1x - Received request
2008-06-25 11:43:02,668 INFO  DatabaseContext  - Rolling back JDBC  
connection for datasource: jdbc/radiator.
2008-06-25 11:43:02,669 ERROR ProcessorService  - Exception at line 66  
of oxf:/apps/db2-dot1x-stats/service-get-wired-dot1x.xpl
com.ibm.db2.jcc.a.SqlException: [ibm][db2][jcc][10150][10300] Invalid  
parameter: Unknown column name CAST(CAST(acctinoctets as CHAR(50)) AS  
VARCHAR(5
0)).

On Jun 25, 2008, at 1:42 PM, Florian Schmitt wrote:

> Alex Sharaz schrieb:
>
>> select  
>> USERNAME
>> ,NASIDENTIFIER
>> ,OUTER_EAP_ID
>> ,ACCTSESSIONID
>> ,MY_TIME_STAMP
>> ,CALLING_STATION_ID
>> ,IDENTIFIER,NASPORT,NASPORTTYPE,SERVICETYPE,CAST(CAST(acctinoctets  
>> as CHAR(50)) AS VARCHAR(50)),CAST(CAST(acctoutoctets as CHAR(50))  
>> AS VARCHAR(50)),FRAMEDIPADDRESS from db2inst3.RADONLINE  where  
>> NASPORTTYPE='Wired' order by MY_TIME_STAMP
>
> does it help if you set the column name explicitly? ...,  
> CAST( CAST( acctinoctets as CHAR(50)) AS VARCHAR(50)) AS  
> acctinoctets, ...
>
>
> HTH
> florian
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Schema type definition

fl.schmitt(ops-users)
hi Alex,

> 1st thing i tried was setting column-name="acctinoctets" with
> column-name=CAST......

i meant to set the column name in your SQL expression that creates the
result, not in the sql:result-set. Additionally, did you check which
column name is returned when issuing the SQL SELECT command directly?

florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Schema type definition

Alex Sharaz-2
magic!! works a treat  all i had to do was

cast(cast .....) as fred

and then specify fred in the sql-result-set

many thanks
alex

On 25 Jun 2008, at 17:43, Florian Schmitt wrote:

> hi Alex,
>
>> 1st thing i tried was setting column-name="acctinoctets" with  
>> column-name=CAST......
>
> i meant to set the column name in your SQL expression that creates  
> the result, not in the sql:result-set. Additionally, did you check  
> which column name is returned when issuing the SQL SELECT command  
> directly?
>
> florian
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

errors when starting 250608 build of orbeon

Alex Sharaz-2
Hi,
Found these in the orbeon log file  for the 250608 nightly build
=====
2008-06-26 12:03:17,390 WARN  EXistServlet  - Looking for a valid  
Transformer...
Checking for Saxon, found version 8.8 needed version 9.0.0.4
Checking for Saxon, found version 8.8 needed version 9.0.0.3
Checking for Xalan, found version Xalan Java 2.5.1 needed version  
Xalan Java 2.7.0
Checking for Saxon, found version 8.8 needed version 8.9.0.3
Warning: Failed find a valid Transformer!

Please add an appropriate Transformer to the class-path, e.g. in the  
'endorsed' folder of the servlet container or in the 'endorsed' folder  
of the JRE.
=====

orbeon WEB-INF/lib directory has Saxon 8.8 Xalan 2.5.1 etc
Alex



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: errors when starting 250608 build of orbeon

Erik Bruchez
Administrator
Those have been there for a while. eXist seems to work fine still, but  
at some point it would be nice to upgrade to Saxon 9 and a newer Xerces.

-Erik

On Jun 26, 2008, at 4:08 AM, Alex Sharaz wrote:

> Hi,
> Found these in the orbeon log file  for the 250608 nightly build
> =====
> 2008-06-26 12:03:17,390 WARN  EXistServlet  - Looking for a valid  
> Transformer...
> Checking for Saxon, found version 8.8 needed version 9.0.0.4
> Checking for Saxon, found version 8.8 needed version 9.0.0.3
> Checking for Xalan, found version Xalan Java 2.5.1 needed version  
> Xalan Java 2.7.0
> Checking for Saxon, found version 8.8 needed version 8.9.0.3
> Warning: Failed find a valid Transformer!
>
> Please add an appropriate Transformer to the class-path, e.g. in the  
> 'endorsed' folder of the servlet container or in the 'endorsed'  
> folder of the JRE.
> =====
>
> orbeon WEB-INF/lib directory has Saxon 8.8 Xalan 2.5.1 etc
> Alex
>
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws