Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Error with JDBC source

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Error with JDBC source


Chronological Thread 
  • From: "Katika,Shanthi Swaroop" <>
  • To: "Hyzer, Chris" <>, "" <>
  • Subject: Re: [grouper-users] Error with JDBC source
  • Date: Fri, 26 Aug 2016 14:22:47 +0000
  • Accept-language: en-US
  • Ironport-phdr: 9a23:/neP9B+GQ6Nav/9uRHKM819IXTAuvvDOBiVQ1KB91+IcTK2v8tzYMVDF4r011RmSAtWdtqkP0reempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBWB6kG1uHQyCwfyL049DeTvG5WYx5Cy3OCj6ZDJSwRTj3ygeb50KlO7oRiH8oFcjpFlN7480F7UuXZSYMxXw39lP1Seg0y668utttY3/D5Xpuos7YtdSqjgZIw5S6BVFjIrLzpz6cH240rtVwyKszE/W3kXkRMMOAjM6g36X9/KrSLgse1lkmHOJs7/UbE3UBy/4aMtRRP13nRUfwUl+X3a35QjxJlQpwis8kRy

Yup, changing it to a string fixed it. We didn’t have this issue when the
datasource was MySQL. It might be a database specific thing.

Thanks a lot!

Best,
Swaroop

On 8/22/16, 4:18 PM, "Hyzer, Chris"
<>
wrote:

I think the subject id must be a string... any chance you can make a
subject table/view with a string as id (i.e. the int stored as a varchar)?
If not we will need to edit the subject API...

Thanks,
Chris

-----Original Message-----
From: Katika,Shanthi Swaroop
[mailto:]

Sent: Monday, August 22, 2016 4:03 PM
To: Hyzer, Chris
<>;


Subject: Re: [grouper-users] Error with JDBC source

I’m facing a new issue now when using the following command in gsh.

Do I need to add any more parameters to the source file?

gsh 1% subject=SubjectFinder.findById("GrouperSystem")
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``subject=SubjectFinder.findById("GrouperSystem");'' : Method Invocation
SubjectFinder.findById
// See error log for full stacktrace
// caused by: edu.internet2.middleware.subject.SourceUnavailableException:
// SQLException occurred: Conversion failed when converting the nvarchar
value 'GrouperSystem' to data type int.: select proData.profile_id AS id,
proData.display_name AS displayName, proData.ufid AS description from
profile_data AS proData where proData.profile_id = ?
// caused by: com.microsoft.sqlserver.jdbc.SQLServerException:
// Conversion failed when converting the nvarchar value 'GrouperSystem'
to data type int.
gsh 2% GrouperSession.startRootSession()
edu.internet2.middleware.grouper.GrouperSession:
f95be634669448fe8803cfef5bc762a8,'GrouperSystem','application'
gsh 3% subj=SubjectFinder.findById("GrouperSystem")
// Error: unable to evaluate command: Sourced file: inline evaluation of:
``subj=SubjectFinder.findById("GrouperSystem");'' : Method Invocation
SubjectFinder.findById
// See error log for full stacktrace
// caused by: edu.internet2.middleware.subject.SourceUnavailableException:
// SQLException occurred: Conversion failed when converting the nvarchar
value 'GrouperSystem' to data type int.: select proData.profile_id AS id,
proData.display_name AS displayName, proData.ufid AS description from
profile_data AS proData where proData.profile_id = ?
// caused by: com.microsoft.sqlserver.jdbc.SQLServerException:
// Conversion failed when converting the nvarchar value 'GrouperSystem'
to data type int.

Best,
Swaroop

On 8/22/16, 3:24 PM,
"
on behalf of Katika,Shanthi Swaroop"
<
on behalf of
>
wrote:

Thanks, it solved it after I added the three source parameters. Yes,
profile_id was an int.


Best,
Swaroop

On 8/22/16, 2:22 PM, "Hyzer, Chris"
<>
wrote:

Is profile_id an int?

Set something like this in sources.xml for that source:

<init-param>
<param-name>subjectIdToFindOnCheckConfig</param-name>
<param-value>1</param-value>
</init-param>

https://bugs.internet2.edu/jira/browse/GRP-374

Thanks
Chris



-----Original Message-----
From:


[mailto:]
On Behalf Of Swaroop Katika
Sent: Monday, August 22, 2016 2:06 PM
To:

Subject: [grouper-users] Error with JDBC source

Hi,

I'm trying to change my database source from an external MySql
database to the
internal grouper MsSql database.

But when the run gsh, it's throwing me the following error. I'm
not sure where
grouperTestSubjectByIdOnStartupASDFGHJ is coming from and where
the data
conversion is happening.

Looking for advice on how to troubleshoot this.

Using GROUPER_HOME:
/var/www/grouper/grouper.apiBinary-2.2.2/bin/..
Using GROUPER_CONF:
/var/www/grouper/grouper.apiBinary-2.2.2/bin/../conf
Using JAVA: java
using MEMORY: 64m-750m
Grouper starting up: version: 2.2.2, build date: null, env: <no
label
configured>
grouper.properties read from:
/var/www/grouper/grouper.apiBinary-2.2.2/conf/grouper.properties
Grouper current directory is:
/var/www/grouper/grouper.apiBinary-2.2.2/bin
log4j.properties read from:
/var/www/grouper/grouper.apiBinary-2.2.2/conf/log4j.properties
Grouper logs are not using log4j: class
org.apache.commons.logging.impl.SLF4JLocationAwareLog
grouper.hibernate.properties:

/var/www/grouper/grouper.apiBinary-2.2.2/conf/grouper.hibernate.properties
grouper.hibernate.properties:

grouper_int@jdbc:sqlserver://ahc-sdf09c.ahc.ufl.edu:1433;databaseName=grouper_
d
sources.xml read from:
/var/www/grouper/grouper.apiBinary-2.2.2/conf/sources.xml
sources.xml groupersource id: g:gsa
sources.xml groupersource id: grouperEntities
sources.xml jdbc source id: grouper_d:
GrouperJdbcConnectionProvider
Subject API error: error with subject source id: grouper_d, name:
GROUPER_D
JDBC Source Adapter, problem with getSubject by id, in
sources.xml: search
searchSubject: ,
edu.internet2.middleware.subject.SourceUnavailableException:
SQLException occurred: Conversion failed when converting the
nvarchar value
'grouperTestSubjectByIdOnStartupASDFGHJ' to data type int.: select
proData.profile_id AS id, proData.display_name AS displayName,
proData.description AS description from profile_data AS proData
where
proData.profile_id = ?
at

edu.internet2.middleware.subject.provider.JDBCSourceAdapter.createUniqueSubjec
t(JDBCSourceAdapter.java:480)
at

edu.internet2.middleware.subject.provider.JDBCSourceAdapter.uniqueSearch(JDBCS
ourceAdapter.java:269)
at

edu.internet2.middleware.subject.provider.JDBCSourceAdapter.getSubject(JDBCSou
rceAdapter.java:193)
at

edu.internet2.middleware.subject.SubjectCheckConfig.checkConfig(SubjectCheckCo
nfig.java:111)
at

edu.internet2.middleware.grouper.misc.GrouperCheckConfig$1.callback(GrouperChe
ckConfig.java:439)
at

edu.internet2.middleware.grouper.GrouperSession.callbackGrouperSession(Grouper
Session.java:974)
at

edu.internet2.middleware.grouper.misc.GrouperCheckConfig.checkConfig(GrouperCh
eckConfig.java:435)
at

edu.internet2.middleware.grouper.misc.GrouperStartup.startup(GrouperStartup.ja
va:256)
at

edu.internet2.middleware.grouper.app.gsh.GrouperShell.main(GrouperShell.java:1
51)
at

edu.internet2.middleware.grouper.app.gsh.GrouperShellWrapper.main(GrouperShell
Wrapper.java:31)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException:
Conversion failed
when converting the nvarchar value
'grouperTestSubjectByIdOnStartupASDFGHJ' to
data type int.
at

com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServe
rException.java:216)
at

com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerR
esultSet.java:4853)
at

com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResul
tSet.java:1781)
at

com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1
034)
at

com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:2859)
at

edu.internet2.middleware.subject.provider.JDBCSourceAdapter.createUniqueSubjec
t(JDBCSourceAdapter.java:468)
... 9 more

Type help() for instructions
Error: Cannot properly read UTF string from resource:
grouperUtf8.txt:
'ٹٺٻټكلل'
Error: Queries in your database seem to be case insensitive, this
can be a
problem for Grouper, if you are using MySQL you should use a bin
collation
gsh 0%



Best,
Swaroop









Archive powered by MHonArc 2.6.19.

Top of Page