My netbeans have a problem with geotools

6 messages Options
Embed this post
Permalink
dadar

My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
When I'm compiling the source in netbeans there is this error

Exception in thread "main" java.lang.NoClassDefFoundError: net/miginfocom/swing/MigLayout
        at org.geotools.swing.JMapFrame.initComponents(JMapFrame.java:262)
        at org.geotools.swing.JMapFrame.showMap(JMapFrame.java:119)
        at com.mycompany.cobacoba.Quickstart.main(Quickstart.java:43)
Caused by: java.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout
        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)
        ... 3 more

does anybody know how to solve this problem??
if I'm run it from command prompt there is no problem, but if I run it from netbeans I have that error
Jody Garnett-2

Re: My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
Hi Dadar; you may want to try the netbeans forums for help on this
one; especially if it working from the command line.  I had a bit of
trouble asking it to download all the jars from maven.

Jody

On Mon, Oct 5, 2009 at 7:35 PM, dadar <[hidden email]> wrote:

>
> When I'm compiling the source in netbeans there is this error
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/miginfocom/swing/MigLayout
>        at org.geotools.swing.JMapFrame.initComponents(JMapFrame.java:262)
>        at org.geotools.swing.JMapFrame.showMap(JMapFrame.java:119)
>        at com.mycompany.cobacoba.Quickstart.main(Quickstart.java:43)
> Caused by: java.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout
>        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)
>        ... 3 more
>
> does anybody know how to solve this problem??
> if I'm run it from command prompt there is no problem, but if I run it from
> netbeans I have that error
> --
> View this message in context: http://n2.nabble.com/My-netbeans-have-a-problem-with-geotools-tp3767585p3767585.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
dadar

Re: My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
Hmm I see Jody. I'll try it
but what I supposed to say in the forums about this problem

Darmawan

Jody Garnett-2 wrote:
Hi Dadar; you may want to try the netbeans forums for help on this
one; especially if it working from the command line.  I had a bit of
trouble asking it to download all the jars from maven.

Jody

On Mon, Oct 5, 2009 at 7:35 PM, dadar <iam_untouchable2003@yahoo.com> wrote:
>
> When I'm compiling the source in netbeans there is this error
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> net/miginfocom/swing/MigLayout
>        at org.geotools.swing.JMapFrame.initComponents(JMapFrame.java:262)
>        at org.geotools.swing.JMapFrame.showMap(JMapFrame.java:119)
>        at com.mycompany.cobacoba.Quickstart.main(Quickstart.java:43)
> Caused by: java.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout
>        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)
>        ... 3 more
>
> does anybody know how to solve this problem??
> if I'm run it from command prompt there is no problem, but if I run it from
> netbeans I have that error
> --
> View this message in context: http://n2.nabble.com/My-netbeans-have-a-problem-with-geotools-tp3767585p3767585.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
Hi Darmawan,

> Hmm I see Jody. I'll try it
> but what I supposed to say in the forums about this problem

Simply describe the problem: ie. you have a Maven app that you can
build successfully with Netbeans but when you try to run it from
within the IDE you get a class not found error. However, when you run
it with maven from the command line it works.

It doesn't seem to be a problem that anyone here has experienced
otherwise I think you would have got a response - that's why Jody is
suggesting the Netbeans forum.

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
dadar

Re: My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
Michael, I already solve it
when i try run the project in netbeans 7.0 and 6.7.1 there is no problem at all :)
but everytime i run the project, the netbeans must transfer the repository to central repository so it takes a long time to run. why is that happen??

Darmawan

mbedward wrote:
Hi Darmawan,

> Hmm I see Jody. I'll try it
> but what I supposed to say in the forums about this problem

Simply describe the problem: ie. you have a Maven app that you can
build successfully with Netbeans but when you try to run it from
within the IDE you get a class not found error. However, when you run
it with maven from the command line it works.

It doesn't seem to be a problem that anyone here has experienced
otherwise I think you would have got a response - that's why Jody is
suggesting the Netbeans forum.

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: My netbeans have a problem with geotools

Reply Threaded More More options
Print post
Permalink
2009/10/6 dadar wrote:
>
> Michael, I already solve it
> when i try run the project in netbeans 7.0 and 6.7.1 there is no problem at
> all :)

That's great.

> but everytime i run the project, the netbeans must transfer the repository
> to central repository so it takes a long time to run. why is that happen??

If you are using GeoTools 2.6-SNAPSHOT you will get that behaviour.
The 'snapshot' is the current GeoTools development code and it changes
every day, so Maven is downloads the new jars every day. If you can
use version 2.6-M3 instead it will stop that from happening.

Another option is to build and run your Maven project offline. When
running maven from the command line you can add the -o flag to specify
offline mode. In Netbeans you can achieve the same thing by
right-clicking on your project and selecting Custom goals...  Specify
clean install as the goals and tick the 'Build offline' checkbox.

Hope this helps
Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users