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: "Hyzer, Chris" <>
  • To: "Katika,Shanthi Swaroop" <>, "" <>
  • Subject: RE: [grouper-users] Error with JDBC source
  • Date: Mon, 22 Aug 2016 20:18:18 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:Jq2wNhUmezvjjAQNSfwLZsfEQ9DV8LGtZVwlr6E/grcLSJyIuqrYZhOHt8tkgFKBZ4jH8fUM07OQ6P+wHzFbqs/c+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3HUNPK+/0Ao/fidisn6D3osWLIlYAuD3oK5B7MBS1pEHqtsAQnYtjYp0uwwHOpWMCM7BNxmp0JFGatwvy4oG98IM1t2watOgm6tZNS+DnZKkiVpRZCigrKWY4+JetuBXeB0Pb6WEbT30biF9VGAXf9zn7WIv8qC33qrA71SWHa57YV7cxDH6C/rVmUlugoycdNiVzuDXSgcxhnq9BiBO6rFpi24PSZseYOOcoLfCVRs8TWWcUBpUZbCdGGI7pKtJXV+c=
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

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