Wednesday, May 12, 2010

Gwibber on Ubuntu 10.04 LTS

While playing with the new Ubuntu 10.04 LTS, I saw the Gwibber client for Twitter, Facebook, Digg, Flickr and others. I know this has not much to do with WebCenter, Enterprise 2.0, Fusion, or even Oracle, but just would like to share in case you read my earlier post and decided to use Ubuntu 10.04.

I tried to make it work, so I could just see the tweets popping up on the desktop via notification-applet, but the first tries were frustrating...
I did manage to add my twitter account, but no updates would come. Facebook was even worst, as I could not even add the account.

After spending some time searching around, I found this bug #530195, where the comment #22 suggested that you increased the timeout in network.py.

I opened up  /usr/lib/python2.6/dist-packages/gwibber/microblog/network.py and noticed the original connection timeout was set to 8secs.

Not sure what internet provider people are using, and I actually thought I had a good speed (around 20Mbps), but that was still not enough. I'm also not sure about the DNS tricks (openDNS + google DNS = magic DNS :), so I just went the lazy way -- multiply by 10 :)

#/usr/lib/python2.6/dist-packages/gwibber/microblog/network.py

    self.curl.setopt(pycurl.TIMEOUT, 150)
    self.curl.setopt(pycurl.CONNECTTIMEOUT, 80)

That solved the Twitter problem, but I was still not able to add my account to Facebook.
After some more research, I found another bug #552227, with many suggestions on how to overcome that. I tried all the suggestions on that page but still no luck.

Ok, let's try the "twitter-hack" then :)... Found that there connection timeout was actually being set on another file -- /usr/lib/python2.6/dist-packages/gwibber/microblog/util/facelib.py

I again applied the "lazy 10x higher" fix:
#/usr/lib/python2.6/dist-packages/gwibber/microblog/util/facelib.py

    c.setopt(pycurl.TIMEOUT, 150)
    c.setopt(pycurl.CONNECTTIMEOUT, 80)

Yay! Finally able to see both Twitter and Facebook accounts on Gwibber! And the cool desktop icon notifications keep popping up now,  a quick not-that-intrusive way to keep updated on things. I really like it better than having either  an extra browser window, or another application running.

WebCenter on Ubuntu 10.04 LTS

Just finished installing WebCenter 11.1.1.2 on Ubuntu 10.04 LTS.
Note: -- this is *not* a supported configuration, I just did as a quick test environment!!!!

The steps are not much different from what I posted before, but you will get a lot of complaints during the initial system/environment checks. I decided just to ignore all the complaints from the Installer, and continue with the install.

This time, I used the newly released WebLogic Server 10.3.3, Repository Content Utility (rcu) 11.1.1.3, Oracle XE 10.2.0.1.1, and WebCenter 11.1.1.2 (you must install this before you can apply the 11.1.1.3 patch).

After installing WebCenter 11.1.1.2, and before applying the patch, I decided to start all servers to check the status of the install.
Both WLS_Admin, and WLS_Services started fine, but WLS_Spaces failed with the following error:
(........ initialization messages .........)
<May 12, 2010 10:36:50 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<May 12, 2010 10:36:50 AM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
[[Cjava.lang.NoClassDefFoundError: javax/wsdl/Definition
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.privateGetPublicMethods(Class.java:2557)
at java.lang.Class.getMethods(Class.java:1410)
at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.getImplementedInterfaces(EjbAnnotationProcessor.java:1687)
at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processSessionAnnotations(EjbAnnotationProcessor.java:447)
at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:310)
at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotations(EjbAnnotationProcessor.java:180)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandardAnnotations(EjbDescriptorReaderImpl.java:344)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:204)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
(........ bunch of errors .........)

Did a quick search, and found out a copy of wsdl4j.jar under
$DOMAIN_HOME/servers/WLS_Spaces/tmp/_WL_user/oracle.webcenter.jive.dependency/38f82s/APP-INF/lib/wsdl4j.jar
I copied under $DOMAIN_HOME/lib and tried starting WLS_Spaces again, but it failed with exact same error message.

Looking at the output from server start, notice the line that reads:
<May 12, 2010 10:35:55 AM EDT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
/opt/wls/user_projects/domains/base_domain/lib/mbeantypes/csp-id-asserter.jar:/opt/wls/user_projects/domains/base_domain/lib/wsdl4j.jar>

shows after the line that sets the classpath, and the line with the java ..... weblogic.Server ... not sure if this could be the problem -- classpath being set too late?

In any case, I just edited setDomainEnv.sh to make sure it would include wsdl.jar
# add the following line ....
POST_CLASSPATH=${DOMAIN_HOME}/lib/wsdl4j.jar${CLASSPATHSEP}${POST_CLASSPATH}

# BEFORE this line
if [ "${POST_CLASSPATH}" != "" ] ; then
    if [ "${CLASSPATH}" != "" ] ; then
        CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}${CLASSPATH}"
        export CLASSPATH
    else
        CLASSPATH="${POST_CLASSPATH}"
        export CLASSPATH
    fi
fi

Now WLS_Spaces started correctly, and I was able to login to WebCenter Spaces pages.

Again -- this is not supported, so I'm not sure what errors could still be ahead when I try more things.
In any case, I'll now try to setup the SAML-based Single Sign-on and will post the results here.