(no subject)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

robyp
Hi to all

i have a problem to use Dbunit on derby database (JavaDB in
Netbeans)

I try to to write all data to xml file : this work fine
than i try
to execute a TestClass but it told me java.class.NotFound Exception

In report
dir into a TEST-dbunitspike.TestDb.xml i get the following message:

<error
message="dbunitspike.TestDb" type="java.lang.ClassNotFoundException">java.lang.
ClassNotFoundException: dbunitspike.TestDb
        at java.net.URLClassLoader$1.run
(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged
(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.
Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.
loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.
lang.Class.forName(Class.java:169)
</error>

I attached source and ant build
file. I run ant file into Netbeans.Somebody can help me what's going wrong??


thank you!

Roby
------------------------------------------------------------------------------

_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user

TestDb.java (2K) Download Attachment
RunDbTest.xml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Matthias Gommeringer
Hi Roby,

did you try to set an explicit classpath for the junit task?

<junit printsummary="yes" haltonfailure="yes">
  <classpath>
         <fileset dir="${lib}"><include name="*.jar"/> </fileset>
         <fileset dir="${class}"><include name="*.class"/> </fileset>
  </classpath>
...

HTH,
matthias


> -----Ursprüngliche Nachricht-----
> Von: <[hidden email]>, <[hidden email]>
> Gesendet: 30.06.09 17:59:06
> An: [hidden email]
> Betreff: [dbunit-user] (no subject)
> Priorität: Hoch


> Hi to all
>
> i have a problem to use Dbunit on derby database (JavaDB in
> Netbeans)
>
> I try to to write all data to xml file : this work fine
> than i try
> to execute a TestClass but it told me java.class.NotFound Exception
>
> In report
> dir into a TEST-dbunitspike.TestDb.xml i get the following message:
>
> <error
> message="dbunitspike.TestDb" type="java.lang.ClassNotFoundException">java.lang.
> ClassNotFoundException: dbunitspike.TestDb
> at java.net.URLClassLoader$1.run
> (URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged
> (Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.
> Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.
> loadClass(ClassLoader.java:252)
> at java.lang.ClassLoader.loadClassInternal
> (ClassLoader.java:320)
> at java.lang.Class.forName0(Native Method)
> at java.
> lang.Class.forName(Class.java:169)
> </error>
>
> I attached source and ant build
> file. I run ant file into Netbeans.Somebody can help me what's going wrong??
>
>
> thank you!
>
> Roby
>
> <hr>
> ------------------------------------------------------------------------------
>
>
> <hr>
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>


______________________________________________________
GRATIS für alle WEB.DE-Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


------------------------------------------------------------------------------
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Luiz Eduardo Guida Valmont-2
In reply to this post by robyp
Roby,

Looks like you've got a misconfigured classpath. Please check your project's classpath and the run configuration classpath as well.

Regards,
Luiz

2009/6/30 [hidden email] <[hidden email]>
Hi to all

i have a problem to use Dbunit on derby database (JavaDB in
Netbeans)

I try to to write all data to xml file : this work fine
than i try
to execute a TestClass but it told me java.class.NotFound Exception

In report
dir into a TEST-dbunitspike.TestDb.xml i get the following message:

<error
message="dbunitspike.TestDb" type="java.lang.ClassNotFoundException">java.lang.
ClassNotFoundException: dbunitspike.TestDb
       at java.net.URLClassLoader$1.run
(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged
(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at sun.misc.
Launcher$AppClassLoader.loadClass(Launcher.java:301)
       at java.lang.ClassLoader.
loadClass(ClassLoader.java:252)
       at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:320)
       at java.lang.Class.forName0(Native Method)
       at java.
lang.Class.forName(Class.java:169)
</error>

I attached source and ant build
file. I run ant file into Netbeans.Somebody can help me what's going wrong??


thank you!

Roby
------------------------------------------------------------------------------

_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user



------------------------------------------------------------------------------

_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user