This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Dec 5, 2006 1:13 PM by Vladimir Ikryanov  
Jake Dempsey   4 posts since
Dec 4, 2006
Currently Being Moderated

Dec 4, 2006 1:39 PM

Can not create IEAutomation

For some of our users of watij, they are unable to run tests and receive a noclass def exception.  The exception is below.  This exception is ocurring in watij when we first try to create an instance of IEAutomation:

 

WebBrowser webBrowser = new IEAutomation();

 

The exception is:

java.lang.NoClassDefFoundError

     at com.jniwrapper.win32.ie.HeadlessBrowser.a(SourceFile:91)

     at com.jniwrapper.win32.ie.HeadlessBrowser.(SourceFile:21)

     at watij.runtime.ie.IE$1.isReady(IE.java:85)

     at watij.time.WaiterImpl.waitUntil(WaiterImpl.java:16)

     at watij.runtime.ie.IE.start(IE.java:82)

     at watij.runtime.ie.IE.start(IE.java:408)

     at watij.GoogleTest.testGoogleSearch(GoogleTest.java:12)

     

I double checked with the user that they had jniwrap.dll in their system32 folder and also have jniwrap and jexplorer jars in the classpath.  What is odd is that if they run a small test with our preconfigured packaged version of Beanshell, it works just fine.  However, running a test from the command line or from eclipse gives us the above stack.

 

Is there possible a dll on this machine that is not registered?  Any help would be appreciated.

 

Jake Dempsey

www.watij.com

Vladimir Ikryanov TeamDev Ltd. 404 posts since
Apr 24, 2006
Currently Being Moderated
1. Dec 4, 2006 3:41 PM in response to: Jake Dempsey
Re: Can not create IEAutomation

Hi Jake,

 

I have tried to run the following example from the command line and from eclipse:

 

IEAutomation automation = new IEAutomation();
automation.setVisible(true);
automation.navigate("www.google.com");
automation.waitReady();

And I didn't get any exceptions. The example works well.

 

In fact jniwrap.dll doesn't have any relation to the current stack trace. This exception is thrown because the specified class could not be found. Please make sure you didn't change the JExplorer library (jexplorer.jar). Also please specify the build number of JExplorer that you use. You can find the build number in the jexplorer.jar\META-INF\MANIFEST.MF file.  It will greatly help us in reproducing the issue.

 

Regards,

Vladimir

Vladimir Ikryanov TeamDev Ltd. 404 posts since
Apr 24, 2006
Currently Being Moderated
3. Dec 4, 2006 4:37 PM in response to: Jake Dempsey
Re: Can not create IEAutomation

We don't have any rules to in what order the jars have to be on the classpath. But I recommend to include the jars onto the classpath in the following order:

 

- comfyj.jar

- jexplorer.jar

- jniwrap.jar

- winpack.jar

- the libraries of your application

 

Try to specify the classpath of your application by the above way and let me know the results. Also could you specify the customer environment (like OS and IE version)?

 

Regards,

Vladimir

 

Message was edited by: Vladimir Ikryanov

Vladimir Ikryanov TeamDev Ltd. 404 posts since
Apr 24, 2006
Currently Being Moderated
6. Dec 5, 2006 1:13 PM in response to: Jake Dempsey
Re: Can not create IEAutomation

Hi Jake,

 

I am glad that you solved the issue.

 

Please contact us if you have any further questions.

 

Regards,

Vladimir

More Like This

  • Retrieving data ...