Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I prepare a web interface that I could launch the WebDriver. I used servlet.java. I'm using JBoss application server, when I try to run it I receive the following exception

13:39:40,779 ERROR [[ArikTest]] Servlet.service() for servlet ArikTest threw exception java.lang.ClassNotFoundException: org.openqa.selenium.WebDriver at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at ArikTest.doGet(ArikTest.java:47) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke (SecurityAssociationValve.java:182) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke (CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process (Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Unknown Source)

share|improve this question
    
I couldnt find the answer over the web, please helppppp.. it is possible to launch the webdriver (selenium2) through a java application BUT when i try to run it "on a server" on Jboss i receive exceptions . am i missing something ? –  ArikL Jan 9 '12 at 11:50
add comment

3 Answers 3

Did you use Maven when creating Selenium project? Because it looks like you have problems with dependencies. All information you need for creating basic Selenium project can be founded on official documentation.

The easiest way to set up a Selenium 2.0 Java project is to use Maven. Maven will download the Java bindings (the Selenium 2.0 Java client library) and all its dependencies.

share|improve this answer
add comment

Thanks for the quick reply, For your question ,I am not using maven. Here is an example of what i want to do:

WebDriver driver = new FirefoxDriver();

Now if im doing right click --> run as java application .

Result: runing fine , no problem

BUT i try run it from a web application here is an example:

//servlet that receive a submit from a JSP page and i want the webdriver to start

public class HelloServlet extends HttpServlet {

public void doGet(HttpServletRequest request,
          HttpServletResponse response)

WebDriver driver = new FirefoxDriver();

}

i get the above exception, i use the JBOSS application server and i try to build a JSP page that with a click of a button the automation will start.

Is it possible ? is it because i try to run it above the Jboss server ? because i cant find an answer....

Thanks for any help

share|improve this answer
    
Arik, welcome to SQA. This site is a little different from a newsgroup. In SQA, if you want to respond to someone's answer, you should either update your original question or click on the "comment" link below their answer and type into the resulting text box. –  user246 Jan 9 '12 at 23:37
add comment

Your question does not really have anything to do with testing. You need to find someone who can tell you how to include the Selenium client pieces in a war (or ear?) file for JBoss. Perhaps you should try posting your question at http://stackoverflow.com/.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.