Nutch Exception: ''..cannot be resolved to a type" - eclipse

I followed the steps using this site : http://wiki.apache.org/nutch/RunNutchInEclipse
I encountered a problem while running which that says
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
String cannot be resolved to a type
Exception cannot be resolved to a type
System cannot be resolved
at org.apache.nutch.crawl.Crawl.main(Crawl.java:53)
The build was successful.
I am using nutch 1.4.
Moreover, I would like to tell that i didnt understood the point 3 of section "Establish the Eclipse environment for Nutch" and skipped it. I guess the problem lies there only.
Can you please help me as the more I try to resolve it, the more i get frustrated.Trying it from past 2 days.
It's a humble request please help.

Do you want it to run from eclipse? AFAIK only if you want to modify Nutch code it makes sense to run from eclipse and do all set up. In case if you want to run from eclipse for some reason, 3rd point means: You need to add those path. i.e within plugin folder there are many other folder. You need to manually expand each folder and add src/test and src/java. Ex: there is folder called creative commons. In that there src and within that there is java and test folder. You need to select both. Similarly do for all directories within plugin folder.

Related

Keep Getting Error When Trying to Run Javafx on Eclipse with Mac

So I keep getting this error when trying to run my program:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.controls not found
I'm using a mac with eclipse, and my VM argument is:
--module-path /Users/myname/Desktop/javafx-sdk-11.0.2_3/lib --add-modules javafx.controls,javafx.fxml
I've tried everything, javafx.controls.jar and the other .jar file are in my lib folder. I've reinstalled the javafx program, changed my file path around hundreds of times, and I've tried to install plugins. Does anyone have any idea as too what can be happening? JavaFX is also an added library in my project, and all the .jar files assocated with it are added to it. Please let me know if anyone has an idea. Best!
I had success with the following additional step.
In the Run Configuration->Dependencies tab, click the "ModulePath" and then add the JavaFX JDK's jars (or the /lib folder that holds the jars) to the list.
You can inspect the generated command line, and check that these are included in the -p option.
IDK why this step should be needed. I would think Eclipse should be smart enough to include something on the dependency module path if it were in the project's Build Path Library list.
I have questions about this at eclipse.org and gluon. Maybe there will be an explanation, or fix so that this step isn't needed, or an edit to the documentation to let us know we need to do this.

JVM_SetNativeThreadName could not be located in the dynamic link library jvm.dll

I started to get this error while launching eclipse:
The procedure entry point JVM_SetNativeThreadName could not be located in the dynamic link library jvm.dll
I reinstalled jre and set the classpath and then reinstalled eclipse but to no avail.
Kindly guide me through this error.
Thanks.
Looks like it might be this http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7116189, in which case I'd suggest trying JVM 7u4 or later (http://www.oracle.com/technetwork/java/javase/2col/7u4bugfixes-1579555.html).
[followup]
I stumbled on this problem with my own (not eclipse's) native launcher based on the Janel project. My particular case was caused by a bad-uninstall leaving jre/client/jvm.dll behind. This particular jvm.dll didn't have the JVM_SetNativeThreadName, though jre/server/jvm.dll did. The solution was to remove the old client directory and use the server jvm.dll.
For me it was quite easy to solve:
In my "PATH" variable was only listed the jre not jdk path. After adding this it worked fine again.

Referencing a GWT project from another GWT one - Problems

I am already using an open source GWT project (iServe) and I would like to integrate into it another open source GWT project (PetalsBPM), by which I mean being able to call it and reference its methods.
I have imported iServe in Eclipse (it has multiple modules) as separate Maven projects referencing its other and can run it successfully through Runas -> Web application in development mode.
If I do that and run the other project through the console as mvn gwt:run, I call initiate PetalsMBP through iServe. However, that means that the two programs have to run as is, without communication with each other.
I have also imported the second project into eclipse as a java project successfully (converting into a Maven one causes problems - various lifecycle configurations ones), but whenever I try to add to to iServe through Properties -> Java Build Path -> Projects, although it does not cause any errors immediately, I cannot launch iServe anymore. It produces the following error:
"Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:...iserve-sal-gwt-1.0.0-SNAPSHOT"): CreateProcess error=206, The filename or extension is too long"
Are my problems related to the fact that PetalsBPM is not a Maven project in Eclipse (I doubt it)?
Am I doing something wrong, i.e., this is not the way to reference a project from another one? should I add a reference to the first project's (iServe) gwt.xml file?
Is there a way to do what I want without having to wrap the second project as a jar and calling it from iServe? I would prefer not to, since producing a jar every time I make a slight change is not exactly efficient!
P.S: The second project is a regular GWT project with an entrypoint, not just a module. Should I remove this?
UPDATE: Trying to figure out the source of this error, I attempted to simplify the problem, so I performed the following moves:
I created two new simple GWT projects and tried to reference one
from the other. Worked fine
I referenced the project I actually want
to use (PetalsBPM) from the simple one I just created. Also works
fine.
I referenced the new simple project from the original one I
want to use (iServe). Also works fine.
Tried doing what I actually
want to do, copying the settings from 2&3. Produces the same error
"CreateProcess error=206, The filename or extension is too long" if
I reference PetalsBPM (does not when I remove it from the referenced
projects)
So, I tried switching workspaces. I created a new workspace in C:\, and moved the actual projects there. Still it did not work. :(
Any more ideas?
I met the same type of error "Create Process, error=206, path too long etc." a hundred times.
Then, I found a solution/explanation in google-groups, it solved my problem.
I post the content and link as it might help others.
This website (StackOverflow) really helped me a thousand times.
Thanks to you all !
solution/explanation :
(Response from Stephen Johnson)
(...) if you're using eclipse plugin go to Project | Properties, choose
Google \ App Engine \ ORM and only include directories that you have
classes that you want enhanced. By default it does the entire project
so that includes a lot of needless files. (...)
Link :
original post # google-groups
Read the exception message again. Somewhere along the way Maven is generating a path that is too long for (some) Windows API to handle, try moving your workspace to a directory straight below C:\.
I just tried "skolima" reply and it worked for me. In Eclipse I clicked File->Switch Workspace.
Three things to note:
After I created the workspace in "C:\workspace" I had to update my Project->Properties > Java Build Path > Libraries > Add External JARs...
I'm using Windows 7.
I'm using "Eclipse Java EE IDE for Web Developers"
I hope this others.

Location of config file for devmode in Eclipse?

I have a multi module GWT project (say a.gwt.xml, b.gwt.xml, c.gwt.xml) that I am building in eclipse and testing in devmode. All was working well until I deleted one of the gwt module file and associated source. Now when I try to launch devmode from eclipse it fails with the following error message.
Loading modules
com.fubar.b
[ERROR] Unable to find 'com/fubar/b.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
I assume that this means there is a stale reference to the now defunct b.gwt.xml but I can't seem to find it in any of the config files. Any ideas?
At present I am working around this by doing a copy+rename a.gwt.xml -> b.gwt.xml (so there are effectively 2 copies of the a module names a + b) which works fine but compiles 2 copies of same module :(
What I think is your runtime configuration which is gone wrong. Individual projects should be fine. Open the runtime configuration which you were running and check the entries in GWT! If the module you have deleted still exists here, then you need to remove it.
Runtime config for project
You can refer to the following Video.
http://www.youtube.com/watch?v=UW4WSYs1bKE
To rename
Right Click on the project.
Select Run As ---> Run Configurations.
In the Arguments Tab, change the Old Module Names in Program
Arguments.
Also Make sure, in GWT Tab, Selected module name is correct.
ALREADY I HAVE ANSWERED THIS HERE : GWT:how can i rename my module

getting "no repository found at..." error when placing my plugin into Eclipse's dropins directory

i am using eclipse 3.5 to create a simple plugin bearing an extension point. i built it using headless pde build via ant. the plugin functions properly. i then proceeded to test its extension point by placing my plugin jar into eclipse_home/dropins with intention of eventually creating an extension. but after i start eclipse, i get the following error in its log:
!ENTRY org.eclipse.equinox.p2.core 4 0 2012-03-22 01:00:45.270
!MESSAGE Provisioning exception
!STACK 1
org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at file:/C:/eclipse35/dropins/MyPlugin/.
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:380)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:641)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:88)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.loadMetadataRepository(Activator.java:90)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.getMetadataRepository(DropinsRepositoryListener.java:184)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.addRepository(DropinsRepositoryListener.java:79)
at org.eclipse.equinox.internal.p2.reconciler.dropins.DropinsRepositoryListener.added(DropinsRepositoryListener.java:57)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.processFile(DirectoryWatcher.java:200)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.scanDirectories(DirectoryWatcher.java:161)
at org.eclipse.equinox.internal.provisional.p2.directorywatcher.DirectoryWatcher.poll(DirectoryWatcher.java:108)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.watchDropins(Activator.java:491)
at org.eclipse.equinox.internal.p2.reconciler.dropins.Activator.start(Activator.java:167)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
i have tried both just placing the plugin jar directly in the dropins directory, as well as using the following directory structure: eclipse_home/dropins/MyPlugin/plugins/myplugin.jar. both approaches work just fine with 3rd party plugins, but not with mine. please let me know what i am doing wrong. thank you!
It seems like two problems. The "no repository found" error message looks like this problem. And then there is the issue with your plugin not starting.
First you should check if the plugin is found.
Then you should check if the plugin is resolved, i.e if all requirements are fulfilled.
If you have the plugin development version of Eclipse, then you can open the plugin registry view. See if your plugin is in the list, if so, then the atleast it has been found. Then right click on it, enable advanced operations, and after that choose diagnose. Some requirement has probably not been fulfilled.
If you dont have the Plugin version of Eclipse, you can use the osgi console. Go to console view, and choose OSGI console in the view menu.
Run command ss to list all plugins, and diag 123 where the number is the id of your plugin to diagnose it.
Also, see a previous answer to a similar question
Edit: Oh, and I have been having some serious problems getting plugins placed in the dropins catalog to work at times... You could try to copy it to the eclipse/plugins catalog directly.