I want to build a web project (war) with Apache Ant. The project has dependencies to classes in javax.ejb and similar packages which are included in my server runtime. So building with eclipse works fine. However, when trying to build the war with Apache Ant, the following error occurs:
[javac] ...\Test.java:3: error: package javax.ejb does not exist
[javac] import javax.ejb.Timeout;
[javac] ^
[javac] ...\Test.java:7: error: cannot find symbol
[javac] #Timeout
[javac] ^
[javac] symbol: class Timeout
[javac] location: class Test
[javac] 2 errors
You can reproduce the problem with the following minimal example.
Test.java
import javax.ejb.Timeout;
public class Test {
#Timeout
public void test() {}
}
build.xml
<project name="Test" default="compile">
<target name="compile">
<mkdir dir="build"/>
<javac srcdir="src" destdir="build" />
</target>
</project>
I know this can be solved by adding the server runtime to the classpath, but since I want to build the project on a Jenkins server where no server runtime exists, I was wondering if there is any possibility to build this project without the runtime.
I am fairly new to Kivy and Android app development. I did a basic hello world app with Kivy and was trying to make an APK from it with Buildozer. These were the errors that I see:
-compile:
[javac] Compiling 11 source files to /home/ratul/Devel/Python/Kivy/test/.buildozer/android/platform/python-for-android/dist/ratulsapp/bin/classes
[javac] /home/ratul/Devel/Python/Kivy/test/.buildozer/android/platform/python-for-android/dist/ratulsapp/src/org/renpy/android/PythonService.java:64: error: cannot find symbol
[javac] notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent);
[javac] ^
[javac] symbol: method setLatestEventInfo(Context,String,String,PendingIntent)
[javac] location: variable notification of type Notification
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error
BUILD FAILED
/home/ratul/Devel/Android/Sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/home/ratul/Devel/Android/Sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.
I don't understand where the problem is coming from. I tried specifying version from main.py but that doesn't help either. Any pointers? Thanks in advance.
Notification.setLatestEventInfo is removed in API Level 23 (Android 6.0):
https://developer.android.com/sdk/api_diff/23/changes/android.app.Notification.html
Here some solutions to use instead: How to implement the deprecated methods of Notification
I am using javac in ant to compile a project and I am getting an compilation error message without the file or line number. Why is this and how can i find where in the (large) project the problem is?
build.xml
make_folders:
compile:
[javac] Compiling 33 source files to *project root*/bin/classes
[javac] error: incompatible types: String cannot be converted to Integer
[javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[javac] 1 error
BUILD FAILED
*project root*/build.xml:33: Compile failed; see the compiler error output for details.
And heres the relevant lines with verbose set to true:
[javac] [loading ZipFileIndexFileObject[/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/lib/ct.sym(META-INF/sym/rt.jar/java/util/Date.class)]]
[javac] error: incompatible types: String cannot be converted to Integer
UPDATE:
So I managed to figure out that the error it was originating from calling a function in a class from within an inner class in said outer class. I'm not sure why this produced an error or why it was presented with such little information so any help would still be appreciated.
When I try to build nutch 2.1 on my windows 7 machine i get the below error:
Buildfile: C:\apache-nutch-2.1\build.xml
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
ivy-probe-antlib:
ivy-download:
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
ivy-download-unchecked:
ivy-init-antlib:
ivy-init:
init:
resolve-default:
[ivy:resolve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = C:\apache-nutch-2.1\ivy\ivysettings.xml
[taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found.
copy-libs:
compile-core:
C:\apache-nutch-2.1\build.xml:97: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 181 source files to C:\apache-nutch-2.1\build\classes
warning: [path] bad path element "C:\apache-nutch-2.1\build\lib\activation.jar": no such file or directory
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\APIInfoResource.java:23: error: package org.restlet.resource does not exist
import org.restlet.resource.Get;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\APIInfoResource.java:24: error: package org.restlet.resource does not exist
import org.restlet.resource.ServerResource;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\APIInfoResource.java:26: error: cannot find symbol
public class APIInfoResource extends ServerResource {
^
symbol: class ServerResource
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\AdminResource.java:23: error: package org.restlet.resource does not exist
import org.restlet.resource.Get;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\AdminResource.java:24: error: package org.restlet.resource does not exist
import org.restlet.resource.ServerResource;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\AdminResource.java:28: error: cannot find symbol
public class AdminResource extends ServerResource {
^
symbol: class ServerResource
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:22: error: package org.restlet.data does not exist
import org.restlet.data.Form;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:23: error: package org.restlet.resource does not exist
import org.restlet.resource.Delete;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:24: error: package org.restlet.resource does not exist
import org.restlet.resource.Get;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:25: error: package org.restlet.resource does not exist
import org.restlet.resource.Post;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:26: error: package org.restlet.resource does not exist
import org.restlet.resource.Put;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:27: error: package org.restlet.resource does not exist
import org.restlet.resource.ServerResource;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\ConfResource.java:29: error: cannot find symbol
public class ConfResource extends ServerResource {
^
symbol: class ServerResource
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\DbReader.java:29: error: package org.apache.avro.util does not exist
import org.apache.avro.util.Utf8;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\DbReader.java:30: error: package org.apache.gora.query does not exist
import org.apache.gora.query.Query;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\DbReader.java:31: error: package org.apache.gora.query does not exist
import org.apache.gora.query.Result;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\DbReader.java:32: error: package org.apache.gora.store does not exist
import org.apache.gora.store.DataStore;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\api\DbReader.java:52: error: cannot find symbol
DataStore<String,WebPage> store;
^
symbol: class DataStore
location: class DbReader
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:22: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:23: error: package org.apache.avro does not exist
import org.apache.avro.Schema;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:24: error: package org.apache.avro does not exist
import org.apache.avro.AvroRuntimeException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:25: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:26: error: package org.apache.avro.util does not exist
import org.apache.avro.util.Utf8;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:27: error: package org.apache.avro.ipc does not exist
import org.apache.avro.ipc.AvroRemoteException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:28: error: package org.apache.avro.generic does not exist
import org.apache.avro.generic.GenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:29: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificExceptionBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:30: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecordBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:31: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecord;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:32: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificFixed;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:33: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StateManager;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:34: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.PersistentBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:35: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.StateManagerImpl;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:36: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StatefulHashMap;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:37: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.ListGenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:40: error: cannot find symbol
public class WebPage extends PersistentBase {
^
symbol: class PersistentBase
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:41: error: cannot find symbol
public static final Schema _SCHEMA = Schema.parse("{\"type\":\"record\",\"name\":\"WebPage\",\"namespace\":\"org.apache.nutch.storage\",\"fields\":[{\"name\":\"baseUrl\",\"type\":\"string\"},{\"name\":\"status\",\"type\":\"int\"},{\"name\":\"fetchTime\",\"type\":\"long\"},{\"name\":\"prevFetchTime\",\"type\":\"long\"},{\"name\":\"fetchInterval\",\"type\":\"int\"},{\"name\":\"retriesSinceFetch\",\"type\":\"int\"},{\"name\":\"modifiedTime\",\"type\":\"long\"},{\"name\":\"protocolStatus\",\"type\":{\"type\":\"record\",\"name\":\"ProtocolStatus\",\"fields\":[{\"name\":\"code\",\"type\":\"int\"},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"}},{\"name\":\"lastModified\",\"type\":\"long\"}]}},{\"name\":\"content\",\"type\":\"bytes\"},{\"name\":\"contentType\",\"type\":\"string\"},{\"name\":\"prevSignature\",\"type\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\"},{\"name\":\"title\",\"type\":\"string\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"parseStatus\",\"type\":{\"type\":\"record\",\"name\":\"ParseStatus\",\"fields\":[{\"name\":\"majorCode\",\"type\":\"int\"},{\"name\":\"minorCode\",\"type\":\"int\"},{\"name\":\"args\",\"type\":{\"type\":\"array\",\"items\":\"string\"}}]}},{\"name\":\"score\",\"type\":\"float\"},{\"name\":\"reprUrl\",\"type\":\"string\"},{\"name\":\"headers\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"outlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"inlinks\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"markers\",\"type\":{\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":\"bytes\"}}]}");
^
symbol: class Schema
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:77: error: cannot find symbol
private Utf8 baseUrl;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:22: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:23: error: package org.apache.avro does not exist
import org.apache.avro.Schema;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:24: error: package org.apache.avro does not exist
import org.apache.avro.AvroRuntimeException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:25: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:26: error: package org.apache.avro.util does not exist
import org.apache.avro.util.Utf8;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:27: error: package org.apache.avro.ipc does not exist
import org.apache.avro.ipc.AvroRemoteException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:28: error: package org.apache.avro.generic does not exist
import org.apache.avro.generic.GenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:29: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificExceptionBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:30: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecordBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:31: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecord;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:32: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificFixed;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:33: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StateManager;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:34: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.PersistentBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:35: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.StateManagerImpl;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:36: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StatefulHashMap;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:37: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.ListGenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ProtocolStatus.java:40: error: cannot find symbol
public class ProtocolStatus extends PersistentBase {
^
symbol: class PersistentBase
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:86: error: cannot find symbol
private Utf8 contentType;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:89: error: cannot find symbol
private Utf8 title;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:90: error: cannot find symbol
private Utf8 text;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:22: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:23: error: package org.apache.avro does not exist
import org.apache.avro.Schema;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:24: error: package org.apache.avro does not exist
import org.apache.avro.AvroRuntimeException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:25: error: package org.apache.avro does not exist
import org.apache.avro.Protocol;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:26: error: package org.apache.avro.util does not exist
import org.apache.avro.util.Utf8;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:27: error: package org.apache.avro.ipc does not exist
import org.apache.avro.ipc.AvroRemoteException;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:28: error: package org.apache.avro.generic does not exist
import org.apache.avro.generic.GenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:29: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificExceptionBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:30: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecordBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:31: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificRecord;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:32: error: package org.apache.avro.specific does not exist
import org.apache.avro.specific.SpecificFixed;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:33: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StateManager;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:34: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.PersistentBase;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:35: error: package org.apache.gora.persistency.impl does not exist
import org.apache.gora.persistency.impl.StateManagerImpl;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:36: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.StatefulHashMap;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:37: error: package org.apache.gora.persistency does not exist
import org.apache.gora.persistency.ListGenericArray;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\ParseStatus.java:40: error: cannot find symbol
public class ParseStatus extends PersistentBase {
^
symbol: class PersistentBase
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:93: error: cannot find symbol
private Utf8 reprUrl;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:94: error: cannot find symbol
private Map<Utf8,Utf8> headers;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:94: error: cannot find symbol
private Map<Utf8,Utf8> headers;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:95: error: cannot find symbol
private Map<Utf8,Utf8> outlinks;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:95: error: cannot find symbol
private Map<Utf8,Utf8> outlinks;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:96: error: cannot find symbol
private Map<Utf8,Utf8> inlinks;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:96: error: cannot find symbol
private Map<Utf8,Utf8> inlinks;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:97: error: cannot find symbol
private Map<Utf8,Utf8> markers;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:97: error: cannot find symbol
private Map<Utf8,Utf8> markers;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:98: error: cannot find symbol
private Map<Utf8,ByteBuffer> metadata;
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:102: error: cannot find symbol
public WebPage(StateManager stateManager) {
^
symbol: class StateManager
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:110: error: cannot find symbol
public WebPage newInstance(StateManager stateManager) {
^
symbol: class StateManager
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:113: error: cannot find symbol
public Schema getSchema() { return _SCHEMA; }
^
symbol: class Schema
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:171: error: cannot find symbol
public Utf8 getBaseUrl() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:174: error: cannot find symbol
public void setBaseUrl(Utf8 value) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:225: error: cannot find symbol
public Utf8 getContentType() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:228: error: cannot find symbol
public void setContentType(Utf8 value) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:243: error: cannot find symbol
public Utf8 getTitle() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:246: error: cannot find symbol
public void setTitle(Utf8 value) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:249: error: cannot find symbol
public Utf8 getText() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:252: error: cannot find symbol
public void setText(Utf8 value) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:267: error: cannot find symbol
public Utf8 getReprUrl() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:270: error: cannot find symbol
public void setReprUrl(Utf8 value) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:273: error: cannot find symbol
public Map<Utf8, Utf8> getHeaders() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:273: error: cannot find symbol
public Map<Utf8, Utf8> getHeaders() {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\storage\WebPage.java:276: error: cannot find symbol
public Utf8 getFromHeaders(Utf8 key) {
^
symbol: class Utf8
location: class WebPage
C:\apache-nutch-2.1\src\java\org\apache\nutch\indexer\mongodb\MongodbIndexer.java:18: warning: [deprecation] JobConf in org.apache.hadoop.mapred has been deprecated
import org.apache.hadoop.mapred.JobConf;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\indexer\mongodb\MongodbWriter.java:7: warning: [deprecation] JobConf in org.apache.hadoop.mapred has been deprecated
import org.apache.hadoop.mapred.JobConf;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\tools\arc\ArcInputFormat.java:23: warning: [deprecation] FileInputFormat in org.apache.hadoop.mapred has been deprecated
import org.apache.hadoop.mapred.FileInputFormat;
^
C:\apache-nutch-2.1\src\java\org\apache\nutch\tools\arc\ArcInputFormat.java:24: warning: [deprecation] FileSplit in org.apache.hadoop.mapred has been deprecated
import org.apache.hadoop.mapred.FileSplit;
^
..
..
more errors are there ..........
C:\apache-nutch-2.1\src\java\org\apache\nutch\util\SuffixStringMatcher.java:46: warning: [rawtypes] found raw type: Iterator
Iterator iter= suffixes.iterator();
^
missing type arguments for generic class Iterator<E>
where E is a type-variable:
E extends Object declared in interface Iterator
C:\apache-nutch-2.1\src\java\org\apache\nutch\util\ToolUtil.java:48: warning: [unchecked] unchecked cast
Map<String,Object> jobs = (Map<String,Object>)results.get(Nutch.STAT_JOBS);
^
required: Map<String,Object>
found: Object
100 errors
69 warnings
How can I fix this and get Nutch running?
For those desperate Googlers who find this:
I had a similar issue which I was able to troubleshoot by adding -v (verbose) to my ant command. With that, I could see that it was a cygwin/windows path issue that was actually causing the problem. Reluctantly, I opened a cmd.exe prompt, set the appropriate environment variables, and it worked fine.
I am trying to compile the canonical metamodel classes for some JPA entities using an ant script. I am using OpenJPA. I would like the generated files to be located in a subdirectory which, according to the OpenJPA documentation, I can do by specifying the -s option for javac. The way I am trying to do this right now is like this:
<compilerarg value="-s c:\buildfiles"/>
However, I keep getting an error that says:
javac: invalid flag: -s
Usage: javac <options> <source files>
If I do:
<compilerarg value="-version"/>
it tells me that I am using 1.6. And if I do:
<compilerarg value="-help"/>
it lists -s as a valid option. Does anybody have any advice on what I can do to accomplish what I'm trying to do? Thank you!
You have two args in there, with a space between them. You just need to separate them:
<compilerarg value="-s"/>
<compilerarg value="c:\buildfiles"/>
At the moment you're parsing the single arg "-s c:\buildfiles". If you run
ant -verbose
you can verify this - you'll see something like:
[javac] Compilation arguments:
[javac] '-classpath'
[javac] ''
[javac] '-sourcepath'
[javac] '/a/b/c'
[javac] '-target'
[javac] '1.5'
[javac] '-g:none'
[javac] '-s c:\buildfiles' <-- here is the problem
[javac] '-source'
[javac] '1.5'
[javac]
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.