Removing annoying Cisco Jabber thingy

0 0
Read Time:30 Second

Cisco Jabber 11.7 on Windows 10. It has a small, somewhat hidden grey bar at the top of my screen, that shows some buttons and a search field if I put the mouse over it. I didn’t know the name of it, and it’s a bit hard to find a solution for removing it without that. In the settings nothing seems to do the trick or to be at least somewhat related.

Apparently, this is the “docked window”. On the main window, after clicking the gear button, there is a checkbox for “Show docked window”, that does remove it.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Atom dependencies on openSUSE

0 0
Read Time:22 Second

An RPM package is provided for download on the Atom website, however, installing it on openSUSE Tumbleweed won’t install all of its dependencies. Running it from the console will give:

/usr/share/atom/atom: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

According to the error message installing gconf2 will be required too.

sudo zypper install gconf2

After that Atom should work on openSUSE.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

H.264 on openSUSE (round 2)

0 0
Read Time:27 Second

My previous post about this may be useful, but this one also works with gstreamer.

First from the official wiki for giving Firefox H.264 capabilities:

sudo zypper addrepo -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman 

adding the packman repositories

sudo zypper install libavcodec56 libavcodec57 libavformat56 libavformat57 libavdevice56 libavdevice57

installing the codecs.
Now this only makes it available for Firefox so we also need (inspired by the unofficial multimedia codec guide):

sudo zypper install gstreamer-plugins-libav 

enables it for gstreamer too.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

SSH connection problem

0 0
Read Time:32 Second

bmiklos@workstation:~> ssh my.server.com
channel 0: open failed: connect failed: Connection timed out
ssh_exchange_identification: Connection closed by remote host

In cases like the one above this page gives good hints for solving the problem. They’re missing my case though:
The ~/.ssh/config file can contain host rules which accidentally apply to the host. E.g.:

Host *serv*.com
    ProxyCommand ssh my.service.com -W %h:%p
    User bmiklos

in my case.

Make sure that if you use wildcards in the host name, be specific enough!

(Connecting with the -v flag can also help determining what options are applied to the connection.)

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

H.264 on openSUSE

0 0
Read Time:1 Minute, 8 Second

I’ve installed openSUSE Tumbleweed.

For some licensing reasons it doesn’t contain the necessary codecs for playing H.264 files. Following neither the official, nor the unofficial documentation solved this problem for me, so for future reference, here are the exact steps that helped for me:

    1. Adding the Packman repositories:
      sudo zypper ar -f -n packman http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman
    2. Installing mplayer and all its dependencies:
      sudo zypper install mplayer

But this is still not enough, there are still errors like


==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.64.101 (external)
Cannot find codec 'h264' in libavcodec...
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Cannot find codec 'h264' in libavcodec...
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Cannot find codec 'h264_crystalhd' in libavcodec...
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Cannot find codec 'h264_vda' in libavcodec...
VDecoder init failed :(
Requested video codec family [coreavcwindows] (vfm=dshow) not available.
Enable it at compilation.
Cannot find codec matching selected -vo and video format 0x34363248.
==========================================================================

  1. Doing a full repository vendor change, whatever that is:
    sudo zypper dup --from packman

mplayer is able to play all kind of files now on my system. For a bit easier control I’m using gnome-mplayer:
sudo zypper install gnome-mplayer

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Tests with gradle from IntelliJ

0 0
Read Time:44 Second

I’m trying to run tests as gradle tasks from IntelliJ with specifying which tests do I actually want to run.

From the console the tests run fine:
./gradlew myTestTask --tests 'com.mycompany.MyTestClass'

But if I create a new run/debug configuration in IntelliJ with myTestTask as the task and --tests 'com.mycompany.MyTestClass' as the script parameters then the runs produce errors like:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myProject:myTestTask'.
> No tests found for given includes: ['com.mycompany.MyTestClass']

Apparently IntelliJ puts singe quotes around the task + script parameters, as it can be seen from the third line of the output and this seems to cause problems

1:16:34 PM: Executing external task 'myTestTask --tests 'com.mycompany.MyTestClass''...

Using double quotes instead of single ones solves the problem, and the configuration runs fine:
--tests "com.mycompany.MyTestClass"

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Using Selenium with a virtual framebuffer

0 0
Read Time:34 Second

I needed to run my Selenium tests on a virtual machine, on RedHat Enterprise Linux 6.6 in a multi-screen environment and this messed up the screenshots that the tests took. Virtual frame buffer to the rescue:

First I had to install it,

wget http://vault.centos.org/6.2/os/x86_64/Packages/xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm

sudo yum localinstall xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm 

then I could start it,

Xvfb :1 -screen 5 1024x768x8 &

make that terminal session use it,

export DISPLAY=:1.5

and I could finally run my tests, with the screenshots working fine.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Oracle and empty strings

0 0
Read Time:1 Minute, 28 Second

Still as a reminder to myself in case some rows are missing from a query…

Oracle stores empty strings as NULL. So far I’m good, everybody’s aware of that, I think that I know everything. Then suddenly a query doesn’t return all the values I expect from it and I wonder why.

For example if I have the query

SELECT * FROM FOO WHERE BAR <> '';

I may expect it to return every row where BAR isn’t an empty string. Or in Oracle’s case a NULL. Well, too bad, because an empty string isn’t NULL. So any row where BAR is NULL will be ignored and won’t be in the resultset. I have to get rows like that with

SELECT * FROM FOO WHERE BAR IS NOT NULL;

But there is more. Let’s see the next query:

SELECT * FROM FOO WHERE BAR <> 'A';

What does this do? Gets every row where BAR doesn’t equal 'A'? Yes. Except the ones where BAR is NULL. And those rows will miss again.

SELECT * FROM FOO WHERE BAR <> 'A' OR BAR IS NULL;

is the way to go if we really want everything except where BAR is 'A'.

Moral of the story, I should read the documentation before jumping to conclusions, as it clearly states that “If you use any other condition with nulls and the result depends on the value of the null, then the result is UNKNOWN.” and also that “A condition that evaluates to UNKNOWN acts almost like FALSE. For example, a SELECT statement with a condition in the WHERE clause that evaluates to UNKNOWN returns no rows.”

(And of course it behaves the same with UPDATEs and not just with SELECTs.)

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Too many beans

0 0
Read Time:5 Minute, 23 Second

Situation: I have a Weblogic container, an application, which I would like to deploy with an ant script and an error message saying:

[wlst] Exception in thread "main" java.lang.IllegalStateException: Traceback (innermost last):
[wlst]   File "/local/bmiklos/projects/.../build/container/weblogic12/weblogic_setup_server.py", line 28, in ?
[wlst]   File "/local/bmiklos/container/weblogic/12.1.1.0.4/server/wlserver/common/wlst/weblogic_base.py", line 328, in createDataSource
[wlst] weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.JDBCPropertyBeanImpl@8218c7([...]/JDBCDriverParams/Properties/Properties[user])"
[wlst]     at weblogic.descriptor.internal.ReferenceManager.registerBean(ReferenceManager.java:232)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.setProperties(JDBCPropertiesBeanImpl.java:133)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.addProperty(JDBCPropertiesBeanImpl.java:79)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.createProperty(JDBCPropertiesBeanImpl.java:152)
[wlst]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wlst]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[wlst]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[wlst]     at java.lang.reflect.Method.invoke(Method.java:601)
[wlst]     at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)
[wlst]     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
[wlst]     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.internal.JMXContextInterceptor.invoke(JMXContextInterceptor.java:263)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.edit.internal.RecordingInterceptor.invoke(RecordingInterceptor.java:199)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.internal.SecurityMBeanMgmtOpsInterceptor.invoke(SecurityMBeanMgmtOpsInterceptor.java:65)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserverTraceback (innermost last):
[wlst]   File "/local/bmiklos/projects/.../build/container/weblogic12/we.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.edit.internal.EditLockInterceptor.invoke(EditLockInterceptor.java:112)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$blogic_setup_server.py", line 28, in ?
[wlst]   File "/local/bmiklos/container/weblogic/12.1.1.0.4/server/wlserver/common/wlst/weblogic16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.manag_base.py", line 328, in createDataSource
[wlst] weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.desement.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeancriptor.wl.JDBCPropertyBeanImpl@8218c7([MB-DS]/JDBCDriverParams/Properties/Properties[user])"
[wlst]     at weblogic.descriptor.inteservers.internal.SecurityInterceptor.invoke(SecurityInterceptor.java:444)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerrnal.ReferenceManager.registerBean(ReferenceManager.java:232)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.setProperti.invoke(WLSMBeanServer.java:323)
[wlst]     at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder$11$1.run(JMXConnectoes(JDBCPropertiesBeanImpl.java:133)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.addProperty(JDBCPropertiesBeanImpl.jarSubjectForwarder.java:663)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.mbeanservers.va:79)
[wlst]     at weblogic.j2ee.descriptor.wl.JDBCPropertiesBeanImpl.createProperty(JDBCPropertiesBeanImpl.java:152)
[wlst]     at sun.reflect.Nainternal.JMXConnectorSubjectForwarder$11.run(JMXConnectorSubjectForwarder.java:661)
[wlst]     at weblogic.security.acl.internal.AuthentictiveMethodAccessorImpl.invoke0(Native Method)
[wlst]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[wlst] atedSubject.doAs(AuthenticatedSubject.java:363)
[wlst]     at weblogic.management.mbeanservers.internal.JMXConnectorSubjectForwarder.invok    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[wlst]     at java.lang.reflect.Method.invoke(Mee(JMXConnectorSubjectForwarder.java:654)
[wlst]     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:14thod.java:601)
[wlst]     at weblogic.management.jmx.modelmbean.WLSModelMBean.invoke(WLSModelMBean.java:437)
[wlst]     at com.sun.jmx.interceptor.D86)
[wlst]     at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:96)
[wlst]     at javax.management.remote.rmi.RMICefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
[wlst]     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmonnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1327)
[wlst]     at java.security.AccessController.doPrivileged(Native MethodxMBeanServer.java:792)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBas)
[wlst]     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1426)
[wlst]     at javax.management.remoe.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServete.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:847)
[wlst]     at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(UnknrInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.internal.JMXContextIntercepown Source)
[wlst]     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:693)
[wlst]     at weblogic.rmi.internal.BasicServerRef$1.tor.invoke(JMXContextInterceptor.java:263)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanrun(BasicServerRef.java:518)
[wlst]     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
[wlst]     at webServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanlogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
[wlst]     at weblogic.rmi.internal.BasicServerRef.handleRequest(Baserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.edit.insicServerRef.java:514)
[wlst]     at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
[wlst]     at weblogic.work.Executeternal.RecordingInterceptor.invoke(RecordingInterceptor.java:199)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerIntercepThread.execute(ExecuteThread.java:256)
[wlst]     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
[wlst]
[wlst] weblogic.descriptor.BeanAlretorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessController.doPrivileged(Native Method)
[wlst]     at weblogadyExistsException: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.JDBCProperic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.managemetyBeanImpl@8218c7([MB-DS]/JDBCDriverParams/Properties/Properties[user])"
[wlst]
[wlst]     at weblogic.management.scripting.WLSTInterpretent.mbeanservers.internal.SecurityMBeanMgmtOpsInterceptor.invoke(SecurityMBeanMgmtOpsInterceptor.java:65)
[wlst]     at weblogic.managementrInvoker.printError(WLSTInterpreterInvoker.java:146)
[wlst]     at weblogic.management.scripting.WLSTInterpreterInvoker.executePyScript(WL.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
[wlst]     at java.security.AccessControllerSTInterpreterInvoker.java:111)
[wlst]     at weblogic.management.scripting.WLSTInterpreterInvoker.main(WLSTInterpreterInvoker.java:30)
[wlst] .doPrivileged(Native Method)
[wlst]     at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.invoke(WLSMBeanServerInterceptorBase.java:447)
[wlst]     at weblogic.management.mbeanservers.edit

The problem in my case is that the container gets corrupt somehow, so I need to delete the directory containing it and re-create the whole thing. After that deploying my application works again.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Velocity template not showing results from Java method call

0 0
Read Time:38 Second

We can call methods of any Java class from Apache Velocity. Now if that method happens to return a List<String>, and then process that list with #foreach, then we should be aware that in Velocity the result will be something like [foo, bar] instead of ["foo", "bar"]. We will get an array of texts and not an array of strings. If we assume that we get strings and try to manipulate them that way, let’s say by calling toUpperCase() on them Velocity may just decide to ignore that method call on a thing that doesn’t have that method and show nothing as a result. No error messages either. Making it quite hard to figure out what went wrong. At least this happened in my case.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %