Help with GCF connector that uses autosync?

Hi, all. I was wondering if anyone ever came across this error while trying to test out their GCF connector (using autosync)?

If you can, I could use suggestions/help or whatever you can offer!! :)

Error after trying to log in:

System Error
Can't service request to /cp/ip/sync
Click here to go back to previous page.
com/pipeline/security/sso/SecretStoreImpl$1

The cpipconnector.log says this:
[2009-04-23 19:27:46,080] [ERROR] http-8008-Processor22:/oraclereports/Authenticate com.campuspipeline.sso.authenticator.SSOOperations.authenticateUser:218 authentication failed with exception:
java.lang.Exception: Class not initialized correctly. Please check XML configuration settings.
at com.campuspipeline.sso.authenticator.SSOOperations.authenticateUser(SSOOperations.java:111)
at com.campuspipeline.cpipconnector.CpipOperationsDefault.perform1_3_6_1_4_1_4409_1_1_4_2(CpipOperationsDefault.java:221)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.campuspipeline.cpipconnector.CpipOperationsBase.perform(CpipOperationsBase.java:63)
at com.campuspipeline.cpipconnector.CpipConnectorServlet.doPost(CpipConnectorServlet.java:164)
at com.campuspipeline.cpipconnector.CpipConnectorServlet.doGet(CpipConnectorServlet.java:103)

and the cp.log says this:
[2009-04-23 19:28:42,534] [ERROR](WebUtil.java:3223) {http-443-Processor20} [com.pipeline.web.WebUtil]: Displaying error page to user: Can't service request to /cp/ip/sync
java.lang.NoClassDefFoundError: com/pipeline/security/sso/SecretStoreImpl$1
at com.pipeline.security.sso.SecretStoreImpl.getSecretRecoverySession(SecretStoreImpl.java:926)
at com.pipeline.security.sso.SecretStoreImpl.removeSecretIdFromSRS(SecretStoreImpl.java:389)
at com.pipeline.security.sso.SecretStoreImpl.writeSecret(SecretStoreImpl.java:168)
at com.pipeline.sdk.cpip.ExternalUser.setESltc(ExternalUser.java:129)
at com.pipeline.sdk.cpip.ExternalSystemV2.setESltc(ExternalSystemV2.java:1290)
at com.pipeline.gist.ExternalSystemManagerImpl$SetEsLTCCall.secureExecute(ExternalSystemManagerImpl.java:680)
at com.pipeline.gist.ExternalSystemManagerImpl.inlineCall(ExternalSystemManagerImpl.java:1480)
at com.pipeline.gist.ExternalSystemManagerImpl.setEsLTC(ExternalSystemManagerImpl.java:637)
at com.pipeline.extsys.MMServlet.syncAccount(MMServlet.java:447)
at com.pipeline.extsys.MMServlet.doGet(MMServlet.java:207)
at com.pipeline.extsys.MMServlet.doPost(MMServlet.java:145)

Thanks!!!!!!!!!!! :)
- Carol
Seton Hall

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Carol,

Hi Carol,

it looks as if the cpipconnector service has not been stopped & started again since the channel was installed. That will generally result in a xml error at the session portion because it is trying to get to the properties file, but the properties file name (myconnector.properties) has not been established in the services list.

run the stop & start services command from the https-cpipconnector directory & see if that helps.

The other issue is you may need to set up your connector in the password sync list - run cptool sync password & see if your connector is listed there. If not, that might be the solution.

Cheers,
Catherine

GRABFROMHEADER question

Catherine, thanks for your reply. I did stop/start, it's a dev box with only a few developers so we stop/start services often.
I took your suggestion of adding the connector to the password sync list - still no luck.
I had previously thought that with autosync=true, I thought this might happen automatically. Nevertheless, it's in the list now.

All - Here are a few more questions: In the documentation, it says that although autosync is almost always used with pickup html, it can be used with pickup response if you have a valid authenticate section in the xml. So that is what I'm trying first.
Also, in the xml file, I am trying to grab something from the "HEADER"

Here's a sample of the code with some variables replaced. What I am hoping to accomplish:
Go to the URL in the GET. It redirects. Grab a variable value "sitetoken" from the URL that resulted in the redirection of the GET and place it in a variable called _TOKEN.

for example: the URL that the get below redirects to might be
http://ourdevbox.edu/login.jsp?sitetoken=v1.2~B34C0&p_error_code=

And I want to grab the value v1.2~B34C0

Does the following snippet of code look correct? Does anyone know of a way I can tell if it ran? I looked in the logs. I tried setting logs to DEBUG but I see no sign of "sitetoken" however it's very possible my connector is failing before that.

<GET a:url="http://xxx.shu.edu/extsys" a:query="" a:redirects="yes" />
<SEARCH a:symbol="_TOKEN" a:source="${_RESPONSE_HEADERS}" a:value="${_VALUE}" >
<GRABFROMHEADER a:name="Location" a:start="?sitetoken=" a:end="&p_error_code=" />
</SEARCH>

Do you have cpiplog4j set

Do you have cpiplog4j set similar to this?

log4j.rootCategory=DEBUG, file, console
log4j.category.com.campuspipeline=DEBUG
log4j.category.campuspipeline=DEBUG
log4j.category.org.apache.commons.httpclient=WARN
log4j.category.com.campuspipeline.sso.authenticator.HttpSteps=DEBUG
log4j.category.com.campuspipeline.sso.authenticator.SSOOperations=DEBUG

if so, then you need to check these things:

* are the es.systems values correct?
* are the es..* values correct?
* does cpipconnector.properties file include your .properties file appropriately?
* have you verified that the XML file is well-formed?
* is the .properties file valid (no spaces at the end of lines, etc.)

if so, then you should see interesting messages in the cpipconnector.log file including lines indicating that the GET was executed, the SEARCH was executed, and the GRABFROMHEADER was executed. And/Or you will see other related messages that should help you further along.

As far as the snippet you've posted the biggest problem I see is the ampersand in the value of the a:end attribute of the GRABFROMHEADER tag. The cpipconnector.log file will point this out as would a XML validator such as the one included with the cptool command: "cptool validate file yourfilename.xml". Swap out the ampersand with the encoded value & and you should do better, making the value "&p_error_code".

thanks

thanks ... debug stuff is there.
The cptool validate file command is great! I never knew of that one. :)

The connector is getting there, still failing, but I will post more later. I got thru all of these great suggestions, etc.

Will report more soon. Thanks again!

Try GRAB instead of GRABFROMHEADER

I didn't have any luck with GRABFROMHEADER but did get the GRAB statement to work. You will have to change the source to _RESPONSE and use a SET after the GRAB. You would then use _USERID in your redirect url.
Here's some sample code:

<SEARCH a:symbol="userId" a:source="${_RESPONSE}" a:value="${_VALUE}" >
<GRAB a:start="CU-USER-D:CU-ISU-ID" value="" a:end="" />" />
</SEARCH >
<SET a:symbol="_USERID" a:value="${userId}" / >

Use url encoding for &, ", < and > characters in the GRAB statement.

I hope this helps.

Alicia

Thanks

I've had more luck with GRAB, also. GRAB from what I understand searches the RESPONSE, which is kind of equivalent to what you see when you "view source" ? Is that true?

In my case I am able to replace the GRABFROMHEADER with GRAB.

I did find one blooper in my xml -- thanks to the other response for which I'm about to respond .....which I fixed. I think the GRAB is now working! (the connector isn't, but the GRAB is. Slowly but surely ................)

Thanks again this helped!

PS How exactly do I use the _USERID in your example in the redirect (in a url) .. is it like this "&whatever=${_mygrabvalue} " but only encoded like the rest of the "redirect" url?

Would it be:
http://ourdevserver.shu/edu/cp/ip/login?sys=extsys4&url=
where the unencoded url is the url

Or would it be {_USERID} or $_USERID in the url?

using the SET in pickup response

In our Blackboard vlebb.properties we have something like this (except it is all on one very long line).

vlebb.pickup.response =<html>
<head>
< DEREKCOMMENT val="Some Meta tags to prevent browser cache" />
<title>Loading... </title>
< DEREKCOMMENT val="Some javascript for Bb to mash and hash the credentials" />
</head>
<body bgcolor="#ffffff">Loading...
< DEREKCOMMENT val="Some calls to the javascript" />
<script language="JavaScript">
FormAction = "https://URL OF OUR Bb Login Webapp";
newURL = "~{_DESTURL}";
if (newURL == "http://dummy") newURL = "";
document.writeln("<form action='" + FormAction + "' method='post' name='login'>");
< DEREKCOMMENT val="Hidden fields for Login form" />
document.writeln("<input type='hidden' name='new_loc' value='" + newURL + "'>");
document.writeln("</form>");
< DEREKCOMMENT val="Some calls to the javascript" />
document.forms[0].submit();
</script>
</body> </html>

Hopefully you can see the relevant part (DESTURL), which could be changed to ~{_USERID}

Derek
p.s. We quite like the way we can pass in a dummy DESTURL, which allows for deep linking with a default location where this is not required.

Yes, it should be

Yes, it should be ${_mygrabvalue} in the url and encoded.

Alicia

Thanks!

:)

Syndicate content