java.lang.NoClassDefFoundError: com/teamdev/jxbrowser/events/NavigationListener

1,085 views
Skip to first unread message

Shaba

unread,
Jan 5, 2011, 10:08:48 AM1/5/11
to watij
Hi All,

I have just started on with WebSpec.

here's my piece of code.
I have included all jars that are required.

package com.ttc.tropics;

import org.watij.webspec.WebSpecTestCase;
import org.watij.webspec.dsl.WebSpec;
import org.watij.webspec.dsl.Tag;




public class FirstTestWebSpec extends WebSpecTestCase
{

Tag result,txtLogin,txtPwd;

protected void setUp() throws Exception
{
super.setUp();
mozilla().open("http://lonrgs01.corp.ttc:7777/tropics/
tropicsui/cs/uam/details/CsLogin.jsp");
result = find.input().with.id("result");
result.shouldExist();
}


public void testLogin()
{
WebSpec spec = new WebSpec().ie();
//spec.open
txtLogin = spec.findWithId("txtLoginUserID");
txtLogin.set("tropics.support7");
txtPwd = spec.findWithId("txtLoginPassword");
txtPwd.set("lontps02");
spec.find.button("cmdLogIn");
// spec.find().
}

protected void tearDown() throws Exception
{
super.tearDown();
closeAll();
}

}


=============================================
StacK trace :
-------------------

java.lang.NoClassDefFoundError: com/teamdev/jxbrowser/events/
NavigationListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:
99)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:
59)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
445)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
196)
Caused by: java.lang.ClassNotFoundException:
com.teamdev.jxbrowser.events.NavigationListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 23 more

Brian Knorr

unread,
Jan 5, 2011, 10:41:47 AM1/5/11
to watij
Please add all the jars in the lib directory to your classpath.

Shaba K

unread,
Jan 5, 2011, 5:51:28 PM1/5/11
to wa...@googlegroups.com
I am using Eclipse so the classpath issue won't occur.
 
I have added all jars that comes in lib folder along side the webspec.jar & also the watij jar files ..
 
Can someone out there help me on this please.
 
-Shabana

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


Brian Knorr

unread,
Jan 5, 2011, 6:30:44 PM1/5/11
to watij
NavigationListener is in jxbrowser-2.5.jar, which means this jar is
not in your classpath. Sounds like something is wrong in your eclipse
setup.

On Jan 5, 4:51 pm, Shaba K <shabazi...@gmail.com> wrote:
> I am using Eclipse so the classpath issue won't occur.
>
> I have added all jars that comes in lib folder along side the webspec.jar &
> also the watij jar files ..
>
> Can someone out there help me on this please.
>
> -Shabana
>
> > watij+un...@googlegroups.com <watij%2Bunsu...@googlegroups.com>.

Shaba K

unread,
Jan 6, 2011, 8:20:07 AM1/6/11
to wa...@googlegroups.com
I have that in my  build path i have attached screen shot
 


 
To unsubscribe from this group, send email to watij+un...@googlegroups.com.
buildpath.png

Shaba K

unread,
Jan 6, 2011, 8:56:31 AM1/6/11
to wa...@googlegroups.com
ahh i was able to oversome that issue but it is still erronoeus
 
java.lang.SecurityException: class "com.jniwrapper.win32.ie.event.HttpSecurityHandler"'s signer information does not match signer information of other classes in the same package
 at java.lang.ClassLoader.checkCerts(Unknown Source)
 at java.lang.ClassLoader.preDefineClass(Unknown Source)

 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$000(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at com.teamdev.jxbrowser.ie.IEBrowser.<init>(Unknown Source)
 at com.teamdev.jxbrowser.ie.IEBrowser.<init>(Unknown Source)
 at com.teamdev.jxbrowser.ie.IEBrowserFactory.create(Unknown Source)
 at com.teamdev.jxbrowser.BrowserFactory.createBrowser(Unknown Source)
 at org.watij.webspec.dsl.WebSpec.ie(WebSpec.java:271)
 at com.ttc.tropics.FirstTestWebSpec.testLogin(FirstTestWebSpec.java:26)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at junit.framework.TestCase.runTest(TestCase.java:164)
 at junit.framework.TestCase.runBare(TestCase.java:130)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:120)
 at junit.framework.TestSuite.runTest(TestSuite.java:230)
 at junit.framework.TestSuite.run(TestSuite.java:225)
 at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Brian Knorr

unread,
Jan 6, 2011, 10:16:30 AM1/6/11
to watij
This error usually occurs because you have duplicate classes that are
in different jars or packages. It seems you are trying to mix a bunch
of jars together...looking at the screenshot of your classpath I can
see why this may be occurring. Please try just using the webspec
required jars only from lib and src/dist and then slowly at the other
ones.

Best,

Brian
> On Thu, Jan 6, 2011 at 1:20 PM, Shaba K <shabazi...@gmail.com> wrote:
> > I have that in my  build path i have attached screen shot
>
> >> watij%2Bunsu...@googlegroups.com<watij%252Buns...@googlegroups.com>

Shaba K

unread,
Jan 6, 2011, 1:12:06 PM1/6/11
to wa...@googlegroups.com
Hi,
 
I was able to resolve the issue.
 
But i see this issue now ...
 
 

log4j:WARN No appenders could be found for logger (com.jniwrapper.DefaultLibraryLoader).

log4j:WARN Please initialize the log4j system properly.

#

# An unexpected error has been detected by Java Runtime Environment:

#

# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0c862123, pid=1668, tid=41824

#

# Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows-x86)

# Problematic frame:

# C 0x0c862123

#

# An error report file with more information is saved as:

# C:\Eclipse_Tests\WebSpec\hs_err_pid1668.log

#

# If you would like to submit a bug report, please visit:

# http://java.sun.com/webapps/bugreport/crash.jsp

# The crash happened outside the Java Virtual Machine in native code.

# See problematic frame for where to report the bug.

#

 
-Shabana

To unsubscribe from this group, send email to watij+un...@googlegroups.com.

Brian Knorr

unread,
Jan 6, 2011, 2:09:18 PM1/6/11
to watij
The warnings are normal...we will be cleaning those up soon. Also the
access violation is a known issue and randomly occurs when closing all
open browsers, but it shouldn't affect the outcome of your tests.

Best,

Brian

On Jan 6, 12:12 pm, Shaba K <shabazi...@gmail.com> wrote:
> Hi,
>
> I was able to resolve the issue.
>
> But i see this issue now ...
>
> log4j:WARN No appenders could be found for logger
> (com.jniwrapper.DefaultLibraryLoader).
>
> log4j:WARN Please initialize the log4j system properly.
>
> #
>
> # An unexpected error has been detected by Java Runtime Environment:
>
> #
>
> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0c862123, pid=1668,
> tid=41824
>
> #
>
> # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows-x86)
>
> # Problematic frame:
>
> # C 0x0c862123
>
> #
>
> # An error report file with more information is saved as:
>
> # C:\Eclipse_Tests\WebSpec\hs_err_pid1668.log
>
> #
>
> # If you would like to submit a bug report, please visit:
>
> #http://java.sun.com/webapps/bugreport/crash.jsp
>
> # The crash happened outside the Java Virtual Machine in native code.
>
> # See problematic frame for where to report the bug.
>
> #
>
> -Shabana
>
> > >  at org.watij.webspec.dsl.WebSpec.ie<http://org.watij.webspec.dsl.webspec.ie/>
> ...
>
> read more »

Shaba K

unread,
Jan 6, 2011, 6:11:29 PM1/6/11
to wa...@googlegroups.com
Thanks Brian,
 
My tests just terminated without even performing any action should i add a wait in between every command/step.
 
We have our framework in watij i want to understand how to go about building the existing testscripts in WebSpec.
 
Also is it possible to have watij scripts integrated with Hudson ??
 
Please point me to any blogs or tips on how to go about that would be a great help.
 
-Shabana

--
You received this message because you are subscribed to the Google Groups "watij" group.
To post to this group, send email to wa...@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages