java.lang.NoClassDefFoundError: sun/security/pkcs11/SunPKCS11

After upgrading to openfire 3.4.2 on linux I receive this errror while connecting and my session is always Offline:

5

fernando.ribeiro

Gajim

Autenticado!http://jabber.conab.gov.br:9090/images/lock.gif!

Offline

0

10.1.16.151

[fernando.ribeiro|http://jabber.conab.gov.br:9090/session-summary.jsp?jid=fernando.ribeiro%40jabbe r.conab.gov.br%2FGajim&close=true|Clique para matar a sessão…]

2007.12.27 08:30:29 org.jivesoftware.openfire.nio.ConnectionHandler.exceptionCaught(ConnectionHandle r.java:109)

java.lang.NoClassDefFoundError: sun/security/pkcs11/SunPKCS11

at org.jivesoftware.smack.ConnectionConfiguration.(ConnectionConfiguration.j ava:60) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:173)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Thread.java:595)

What version of Java are you running? What Linux distro? What hardware architecture?

The SunPKCS11 library is included with Sun’s java, but it is native libraries and may not be available on all platforms. Looking at the trace, it seems its coming from the gateway plugin, which must have upgraded to a more recent version of Smack. Daniel (the gateway plugin dev) is on vacation at the moment, between him and I we should be able to figure out some solution to this problem, if your architecture dosnt have support for SunPKCS11.

slushpupie,

What version of Java are you running? What Linux distro? What hardware architecture?

Java Version:

java version “1.5.0_10”

Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)

Java HotSpot™ 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)

Distro: Debian stable (etch)

Arch: amd64

processor : 3

vendor_id : GenuineIntel

cpu family : 6

model : 15

model name : Intel(R) Xeon(R) CPU E5310 @ 1.60GHz

stepping : 7

cpu MHz : 1595.925

cache size : 4096 KB

physical id : 3

siblings : 1

core id : 0

cpu cores : 1

fpu : yes

fpu_exception : yes

cpuid level : 10

wp : yes

flags : fpu tsc msr pae mce cx8 apic mca cmov pat pse36

clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc

pni monitor ds_cpl vmx tm2 cx16 xtpr lahf_lm

bogomips : 3991.89

clflush size : 64

cache_alignment : 64

address sizes : 36 bits physical, 48 bits virtual

The SunPKCS11 library is included with Sun’s java, but it is native libraries and may not be available on all platforms. Looking at the trace, it seems its coming from the gateway plugin, which must have upgraded to a more recent version of Smack. Daniel (the gateway plugin dev) is on vacation at the moment, between him and I we should be able to figure out some solution to this problem, if your architecture dosnt have support for SunPKCS11.

Thanks.

Best Regards,

Fernando Ribeiro

As a workaround, you can upgrade to java6 (if you wish). AMD64 Java didnt get PKCS11 support until java6, so java5 might cause this kind of hickup. Debian dosnt have packages of java6 for etch directly, but you can either just install the sun java yourself, or create a package by installing “java-pakcage” and following the directions. (If you want help upgrading java, just ask, I can help with that)