java.lang.NoClassDefFoundError: org.bouncycastle.jce.provider.BouncyCastleProvider

6,905 views
Skip to first unread message

lutfijd

unread,
Jun 22, 2011, 1:33:32 PM6/22/11
to Selenium Users
Im unable to open an https site using selenium 2.0b1 (not webdriver),
on a windows 7 using IE8.

whenever i start the test, it hangs on selenium.start();

i tried to use the latest selenium2.0rc3 and i got internal server
error right out of the box (so im not even going down that road).

anywho, what concerns me right now is the NoClassDefFoundError that im
getting when running the tests, any ideas?


here is my server setup:

RemoteControlConfiguration config = new
RemoteControlConfiguration();
config.setPort(seleniumPort);
config.setTimeoutInSeconds(getSeleniumServerTimeout());
config.setSingleWindow(true);
seleniumServer.start();


here is my selenium setup
selenium = new CTSelenium(hostName, seleniumPort, "*iexploreproxy",
getHostURL());
selenium.start()

[INFO ] [2011-06-22 13:05:39,791] [] [SystemOut: Port in use : 49152]
[INFO ] [2011-06-22 13:05:39,792] [] [SystemOut: Port in use : 49153]
[INFO ] [2011-06-22 13:05:39,793] [] [SystemOut: Port in use : 49154]
[INFO ] [2011-06-22 13:05:39,793] [] [SystemOut: Port in use : 49155]
[INFO ] [2011-06-22 13:05:40,793] [] [SystemOut: Port not in use :
49156]
[INFO ] [2011-06-22 13:05:41,274] [] [Java: IBM Corporation 2.4]
[INFO ] [2011-06-22 13:05:41,274] [] [OS: Windows 7 6.1 build 7600
x86]
[INFO ] [2011-06-22 13:05:41,277] [] [v2.0 [b1], with Core v2.0 [b1]]
[INFO ] [2011-06-22 13:05:41,387] [] [RemoteWebDriver instances should
connect to: http://127.0.0.1:49156/wd/hub]
[INFO ] [2011-06-22 13:05:41,388] [] [Version Jetty/5.1.x]
[INFO ] [2011-06-22 13:05:41,389] [] [Started HttpContext[/selenium-
server,/selenium-server]]
[INFO ] [2011-06-22 13:05:41,650] [] [Started
org.openqa.jetty.jetty.servlet.ServletHandler@b0e0b0e]
[INFO ] [2011-06-22 13:05:41,650] [] [Started HttpContext[/wd,/wd]]
[INFO ] [2011-06-22 13:05:41,650] [] [Started HttpContext[/selenium-
server/driver,/selenium-server/driver]]
[INFO ] [2011-06-22 13:05:41,650] [] [Started HttpContext[/,/]]
[INFO ] [2011-06-22 13:05:41,652] [] [Started SocketListener on
0.0.0.0:49156]
[INFO ] [2011-06-22 13:05:41,652] [] [Started
org.openqa.jetty.jetty.Server@79497949]
[INFO ] [2011-06-22 13:05:41,695] [] [Checking Resource aliases]
[INFO ] [2011-06-22 13:05:41,699] [] [Command request:
getNewBrowserSession[*iexploreproxy, https://abc.abcdef.tyu] on
session null]
[INFO ] [2011-06-22 13:05:41,701] [] [creating new remote session]
[INFO ] [2011-06-22 13:05:41,866] [] [Allocated session
e9abdc99714047569d90ecf42ad1ef79 for https://abc.abcdef.tyu/,
launching...]
[INFO ] [2011-06-22 13:05:42,342] [] [Launching Internet Explorer...]
[WARN ] [2011-06-22 13:05:43,263] [] [CONNECT abc.abcdef.tyu:443 HTTP/
1.0]
java.lang.NoClassDefFoundError:
org.bouncycastle.jce.provider.BouncyCastleProvider
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at
org.openqa.selenium.server.ProxyHandler.wireUpSslWithCyberVilliansCA(ProxyHandler.java:
705)
at
org.openqa.selenium.server.ProxyHandler.getSslRelayOrCreateNew(ProxyHandler.java:
641)
at
org.openqa.selenium.server.ProxyHandler.handleConnect(ProxyHandler.java:
589)
at org.openqa.selenium.server.ProxyHandler.handle(ProxyHandler.java:
274)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
Caused by: java.lang.ClassNotFoundException:
org.bouncycastle.jce.provider.BouncyCastleProvider
at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:
76)
at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
... 16 more
[WARN ] [2011-06-22 13:06:36,747] [] [CONNECT bugs.launchpad.net:443
HTTP/1.1]
java.lang.NoClassDefFoundError:
org.bouncycastle.jce.provider.BouncyCastleProvider
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at
org.openqa.selenium.server.ProxyHandler.wireUpSslWithCyberVilliansCA(ProxyHandler.java:
705)
at
org.openqa.selenium.server.ProxyHandler.getSslRelayOrCreateNew(ProxyHandler.java:
641)
at
org.openqa.selenium.server.ProxyHandler.handleConnect(ProxyHandler.java:
589)
at org.openqa.selenium.server.ProxyHandler.handle(ProxyHandler.java:
274)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)
at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)
at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)
at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:
820)
at
org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:
986)
at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:
243)
at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
Caused by: java.lang.ClassNotFoundException:
org.bouncycastle.jce.provider.BouncyCastleProvider
at
java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:
76)
at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
... 16 more

Lutfi Dughman

unread,
Jun 22, 2011, 1:44:39 PM6/22/11
to Selenium Users
ok, i added bcprov-jdk15-135.jar to my classpath and that fixed the problem.

now im facing a different issue, in the browser i get the following:


HTTP ERROR: 400

Could not proxy https://abc.abcdef.tyu:443/
java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

RequestURI=/

Powered by Jetty://



bcprov-jdk15-135.jar


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Lutfi Dughman

unread,
Jun 22, 2011, 3:02:43 PM6/22/11
to Selenium Users
Issue solved, instead of using ibm jre, i used Sun jre.

Lutfi Dughman

unread,
Jun 22, 2011, 6:01:37 PM6/22/11
to Selenium Users
for those who might have the same problem and still want to use IBM JRE here is the solution for that 


http://oracleim-help.blogspot.com/2010/10/javalangclassnotfoundexception.html

 

 

java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory

java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory 

Problem:
I encountered this error while trying to integrate NetpointWASRegistry with WAS

java.net.SocketException: Cannot find the specified class java.security.PrivilegedActionException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory


Solution:
There is a missing class file, you may want to verify the following

C:\IBM\WebSphere\AppServer\java\jre\lib\security\java.security

ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
# WebSphere socket factories (in cryptosf.jar)
#ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
#ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory


It will work!

Luke Inman-Semerau

unread,
Jun 22, 2011, 6:12:04 PM6/22/11
to seleniu...@googlegroups.com
I feel sorry for you... I did not enjoy my experience developing in a WebSphere container... WAS helped me re-affirm my dislike for "enterprise" == always a few releases behind and much more expen$ive
Reply all
Reply to author
Forward
0 new messages