shweta garg Messages: 12 Registered: February 2012
Junior Member
I am a newbie with eclipse and AJDT both...
Firstly I installed eclipse, and it is working f9. Since, I am working with 3.7.2 version of eclipse, so I downloaded "ajdt_2.1.3_for_eclipse_3.7. zip". Then UNZIPPED it and put it in plugin, features and dropins folder of eclipse.
Now when I am running my "Hello World" project (code is available with AJDT distribution), it is giving following error:
Exception in thread "main" java.lang.NoClassDefFoundError: helloworld/Hello
Caused by: java.lang.ClassNotFoundException: helloworld.Hello
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: helloworld.Hello. Program will exit.
According to me, either some package or link with package is missing or some path problem is there in eclilpse. Because java and aj files are getting built by command line but not with eclipse...
I am attaching my eclipse SDK window with "Hello World example" here.
Do not use the drop-ins directory. Either install from the update site or follow the instructions on the downloads page: http://www.eclipse.org/ajdt/downloads/
Quote:
To install from a zip file, download the zip and point your p2 installer to that file. Then proceed as if it were a normal update site. Do not unzip the update site into the dropins directory.
1. Help -> Install new software
2. In the "Work with" text box, type: http://download.eclipse.org/tools/ajdt/37/update
3. press enter and wait for the contents to load
4. Check AJDT and click next and follow the instructions.
shweta garg Messages: 12 Registered: February 2012
Junior Member
Thanx for the procedure...
But I have already tried this so many times, but after giving the specified url, it is giving me "Pending" even ater 1 hr also.
I have changed my proxy settings also correctly.
Then, instead of using http://download.eclipse.org/tools/ajdt/37/update as the work with, click on the "add..." button next to the text box. Click on "Archive" and navigate to your downloaded AJDT zip. Use that update site and follow with step 3.
You need to first clean out your drop-ins folder. But, at this point, things may be too messy in there and you may have to start with a new installation of Eclipse.
shweta garg Messages: 12 Registered: February 2012
Junior Member
As you have directed I have installed eclipse 3.7.1 again and then installed AJDT_2.1.3_for_eclipse_3.7 by following above 4 steps.
When I restarted eclipse after installing AJDT, it is giving following error in eclipse/configuration/1328730311553.log file
!SESSION 2012-02-09 01:15:11.431 -----------------------------------------------
eclipse.buildId=M20110909-1335
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_IN
Command-line arguments: -os linux -ws gtk -arch x86
!ENTRY org.eclipse.osgi 4 0 2012-02-09 01:15:11.960
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:225)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:655)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.NullPointerException
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:258)
at java.lang.StringCoding.encode(StringCoding.java:290)
at java.lang.String.getBytes(String.java:954)
at java.io.UnixFileSystem.getLastModifiedTime(Native Method)
at java.io.File.lastModified(File.java:843)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at java.util.zip.ZipFile.<init>(ZipFile.java:148)
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:274)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:87)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:100)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:73)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:245)
at org.eclipse.equinox.weaving.hooks.WeavingBundleFile.getEntry(Unknown Source)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getEntry(BundleFileWrapperChain.java:43)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry0(BaseData.java:114)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry(BaseData.java:105)
at org.eclipse.osgi.internal.baseadaptor.AdaptorUtil.loadManifestFrom(AdaptorUtil.java:187)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest0(EclipseStorageHook.java:410)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest(EclipseStorageHook.java:397)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.createCachedManifest(EclipseStorageHook.java:392)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.getManifest(CachedManifest.java:42)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:142)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:1)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.lookupResourceBundle(ManifestLocalization.java:104)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getResourceBundle(ManifestLocalization.java:91)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getHeaders(ManifestLocalization.java:52)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:964)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:911)
at org.eclipse.equinox.weaving.hooks.SupplementerRegistry.addSupplementer(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.initialize(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.frameworkStart(Unknown Source)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:253)
at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:60)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 12 more
Root exception:
java.lang.NullPointerException
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:258)
at java.lang.StringCoding.encode(StringCoding.java:290)
at java.lang.String.getBytes(String.java:954)
at java.io.UnixFileSystem.getLastModifiedTime(Native Method)
at java.io.File.lastModified(File.java:843)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at java.util.zip.ZipFile.<init>(ZipFile.java:148)
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:274)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:87)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:100)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:73)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:245)
at org.eclipse.equinox.weaving.hooks.WeavingBundleFile.getEntry(Unknown Source)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getEntry(BundleFileWrapperChain.java:43)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry0(BaseData.java:114)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry(BaseData.java:105)
at org.eclipse.osgi.internal.baseadaptor.AdaptorUtil.loadManifestFrom(AdaptorUtil.java:187)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest0(EclipseStorageHook.java:410)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest(EclipseStorageHook.java:397)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.createCachedManifest(EclipseStorageHook.java:392)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.getManifest(CachedManifest.java:42)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:142)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:1)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.lookupResourceBundle(ManifestLocalization.java:104)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getResourceBundle(ManifestLocalization.java:91)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getHeaders(ManifestLocalization.java:52)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:964)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:911)
at org.eclipse.equinox.weaving.hooks.SupplementerRegistry.addSupplementer(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.initialize(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.frameworkStart(Unknown Source)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:253)
at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:60)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:225)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:655)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
!ENTRY org.eclipse.osgi 4 0 2012-02-09 01:15:11.961
!MESSAGE Startup error
!STACK 1
java.lang.RuntimeException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:233)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:655)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:225)
... 10 more
Caused by: java.lang.NullPointerException
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561)
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:258)
at java.lang.StringCoding.encode(StringCoding.java:290)
at java.lang.String.getBytes(String.java:954)
at java.io.UnixFileSystem.getLastModifiedTime(Native Method)
at java.io.File.lastModified(File.java:843)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at java.util.zip.ZipFile.<init>(ZipFile.java:148)
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:274)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:87)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:100)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:73)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:245)
at org.eclipse.equinox.weaving.hooks.WeavingBundleFile.getEntry(Unknown Source)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getEntry(BundleFileWrapperChain.java:43)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry0(BaseData.java:114)
at org.eclipse.osgi.baseadaptor.BaseData.getEntry(BaseData.java:105)
at org.eclipse.osgi.internal.baseadaptor.AdaptorUtil.loadManifestFrom(AdaptorUtil.java:187)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest0(EclipseStorageHook.java:410)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.getGeneratedManifest(EclipseStorageHook.java:397)
at org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.createCachedManifest(EclipseStorageHook.java:392)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.getManifest(CachedManifest.java:42)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:142)
at org.eclipse.core.runtime.internal.adaptor.CachedManifest.get(CachedManifest.java:1)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.lookupResourceBundle(ManifestLocalization.java:104)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getResourceBundle(ManifestLocalization.java:91)
at org.eclipse.osgi.framework.internal.core.ManifestLocalization.getHeaders(ManifestLocalization.java:52)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:964)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getHeaders(AbstractBundle.java:911)
at org.eclipse.equinox.weaving.hooks.SupplementerRegistry.addSupplementer(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.initialize(Unknown Source)
at org.eclipse.equinox.weaving.hooks.WeavingHook.frameworkStart(Unknown Source)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:253)
at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:60)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 12 more
shweta garg Messages: 12 Registered: February 2012
Junior Member
I have not done any clean option.
But when I have again opened eclipse SDK, it is again opened normally.
And one thing has changed, initially it was showing a small red cross sign on the Aspectj project icon in Project Explorer, but it is showing it without that red mark.
Might be this is because I have installed eclipse and AJDT fresh.
But still when I am running the code, it is giving following error:
Exception in thread "main" java.lang.NoClassDefFoundError: helloworld/Hello
Caused by: java.lang.ClassNotFoundException: helloworld.Hello
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: helloworld.Hello. Program will exit.