I wrote an ontology importer in Java to parse an RDF-formatted .owl file into a JSON-formatted string. More specifically, the static method parseOntologyObjectHierarchy parses the class hierarchy defined in the ontology into JSON. Everything works fine if I call the method from a JUnit test or the main method of a class (JUnit and the class main are invoked from IntelliJ IDEA Professional 2017). However, if I package my classes as a jar using gradle (including all dependencies), I get an org.semanticweb.owlapi.io.UnparsableOntologyException. The jar actually contains the required RDFXMLParser. Is the classpath in the jar not set properly?
Here is a minimal example IntelliJ IDEA project: https://drive.google.com/open?id=0B10MbhsMWfrydVNKZVJ0QVg1NlE
And here is the corresponding minimal jar: https://drive.google.com/open?id=0B10MbhsMWfrybjJIcDNWd0JFMUk
Here is the code:
public static String parseOntologyObjectHierarchy(String filename) throws OWLException {
System.out.println("OWL file: " + filename);
OWLOntology ontology = loadOntology(filename);
OWLDataFactory df = OWLManager.getOWLDataFactory();
return json = hierarchyToString(ontology, df.getOWLThing());
}
public static OWLOntology loadOntology(String filename) throws OWLOntologyCreationException {
File ontologyFile = new File(filename);
if (!ontologyFile.exists() || !ontologyFile.isFile()) {
throw new IllegalArgumentException("OWL file is not a file");
}
OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
OWLOntologyDocumentSource source = new FileDocumentSource(new File(filename), new RDFXMLDocumentFormat());
return ontologyManager.loadOntologyFromOntologyDocument(source);
}
Here is my build.gradle:
group 'com.example'
version '0.1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile group: 'net.sourceforge.owlapi', name: 'owlapi-osgidistribution', version: '5.1.0'
compile group: 'net.sourceforge.owlapi', name: 'owlapi-apibinding', version: '5.1.0'
compile group: 'net.sourceforge.owlapi', name: 'owlapi-parsers', version: '5.1.0'
compile group: 'net.sourceforge.owlapi', name: 'owlapi-impl', version: '5.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'net.sourceforge.owlapi:org.semanticweb.hermit:1.3.8.510'
compile group: 'org.glassfish', name: 'javax.json', version: '1.0.4'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'ExampleCom Ontology Importer',
'Implementation-Version': version,
'Main-Class': 'com.example.ontology.OntologyImporter'
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
Here is the exception text:
$ java -jar am-ontology_importer-all-0.1.0-SNAPSHOT.jar
OWL file: C:/Users/me/Desktop/Projects/example/example-0.1.0.owl
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further detail
s.
Exception in thread "main" org.semanticweb.owlapi.io.UnparsableOntologyException
: Problem parsing file:/C:/Users/me/Desktop/Projects/example/example-0.1.0.owl
Could not parse ontology. Either a suitable parser could not be found, or parsi
ng failed. See parser logs below for explanation.
The following parsers were tried:
1) org.coode.owlapi.obo12.parser.OWLOBO12Parser#1ca3d04
Detailed logs:
--------------------------------------------------------------------------------
Parser: org.coode.owlapi.obo12.parser.OWLOBO12Parser#1ca3d04
Stack trace:
Lexical error at line 1, column 22. Encountered: "\n" (10), after : "" o
rg.coode.owlapi.obo12.parser.OBOParserTokenManager.getNextToken(OBOParserTokenMa
nager.java:1059)
org.coode.owlapi.obo12.parser.OBOParser.jj_ntk_f(OBOParser.java:296)
org.coode.owlapi.obo12.parser.OBOParser.TagValuePair(OBOParser.java:147)
org.coode.owlapi.obo12.parser.OBOParser.Header(OBOParser.java:110)
org.coode.owlapi.obo12.parser.OBOParser.parse(OBOParser.java:80)
org.coode.owlapi.obo12.parser.OWLOBO12Parser.parse(OWLOBO12Parser.java:1
09)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OW
LOntologyFactoryImpl.java:188)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.load(OWLOntologyMa
nagerImpl.java:1072)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOn
tologyManagerImpl.java:1033)
uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOn
tologyDocument(OWLOntologyManagerImpl.java:982)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology
(OWLOntologyFactoryImpl.java:229)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.load(OWLOntolog
yManagerImpl.java:1072)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OW
LOntologyManagerImpl.java:1033)
at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFro
mOntologyDocument(OWLOntologyManagerImpl.java:982)
at com.example.ontology.OntologyImporter.loadOntology(OntologyImpo
rter.java:52)
at com.example.ontology.OntologyImporter.parseOntologyObjectHierar
chy(OntologyImporter.java:64)
at com.example.ontology.OntologyImporter.main(OntologyImporter.jav
a:142)
in your minimal jar, the META-INF/services folder contains multiple copies of org.semanticweb.owlapi.io.OWLParserFactory - these are likely coming from your merging of OWLAPI dependencies.
Each module declares in this file which parsers can be found in the module (they are interpreted by ServiceLoader to provide instances); owlapi-distribution contains a merged copy of all the files provided by OWLAPI modules. You need to ensure that that's the only file included in your jar.
The same is true for the other files found in this folder.
Related
I have a task to tackle into our old Grails application which developed by our previous co-worker. The version of grails apps used is 2.2.5 and run on Java 1.7. When I run the app I get this: ( about plugins.log4j.Log4jConfig.methodMissing BeanUtils)
Resolving [runtime] dependencies...
| Error log4j:ERROR Error initializing log4j: org/apache/commons/beanutils/BeanUtils
| Error java.lang.NoClassDefFoundError: org/apache/commons/beanutils/BeanUtils
| Error at org.codehaus.groovy.grails.plugins.log4j.Log4jConfig.methodMissing(Log4jConfig.groovy:103)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
The app does run but there is no log due to the above error message. Since there is no log so it is imposible to trace and understand the code. Thanks advance for any help.
Here are dependencies and plugin in BuildConfig.groovy
dependencies {
runtime 'mysql:mysql-connector-java:5.1.22'
test "org.spockframework:spock-grails-support:0.7-groovy-2.0"
compile "org.jadira.usertype:usertype.jodatime:1.9"
runtime 'com.paypal.sdk:rest-api-sdk:0.7.0'
}
plugins {
runtime ":hibernate:$grailsVersion"
runtime ":jquery:1.8.3"
runtime ":resources:1.1.6"
compile ':runtime-logging:0.4'
build ":tomcat:$grailsVersion"
compile ":spring-security-core:1.2.7.3"
compile ":spring-security-ui:0.2"
compile ":famfamfam:1.0.1"
compile ":jquery-ui:1.8.24"
compile ":joda-time:1.4"
compile ":quartz:1.0-RC6"
compile ":audit-logging:0.5.4"
compile ":console:1.2"
compile ":mail:1.0.1"
compile ":kickstart-with-bootstrap:0.9.6"
runtime ":database-migration:1.3.6"
compile ':cache:1.0.1'
compile ':crypto:2.0'
compile ":csv:0.3.1"
test ":code-coverage:1.2.6"
compile ":gmetrics:0.3.1"
compile ":codenarc:0.23"
compile ":export:1.6"
}
And Log4j configuration in Config.groovy
log4j = {
def gbPattern = pattern(conversionPattern: "%d{dd MMM yyyy HH:mm:ss} [%X{user_rid},%X{user_name},%X{user_action}] [%5p] %-30.30c{2} %m%n")
def infoLog = "${new File('./logs').exists() ? './logs' : '/tmp/'}/info.log"
def debugLog = "${new File('./logs').exists() ? './logs' : '/tmp/'}/debug.log"
appenders {
console name: 'stdout', layout: gbPattern
appender new DailyRollingFileAppender(
name: 'debugLog',
threshold: org.apache.log4j.Level.DEBUG,
datePattern: "'.'yyyy-MM-dd", // See the API for all patterns.
fileName: debugLog,
layout: gbPattern
)
appender new DailyRollingFileAppender(
name: 'rollingLog',
threshold: org.apache.log4j.Level.INFO,
datePattern: "'.'yyyy-MM-dd", // See the API for all patterns.
fileName: infoLog,
layout: gbPattern
)
}
root {
if(Environment.isDevelopmentMode()) {
info 'stdout', 'rollingLog', 'debugLog'
} else {
info 'rollingLog', 'debugLog'
}
additivity = false
}
Try adding bellow dependency in BuildConfig.groovy in plugins:
compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
i use JavaFX and jasperReort with Eclipse IDE, I'm migrate my project from JDK8 to (JDK15 + Gradle 6), when execute jasperreport method i get this error:
net.sf.jasperreports.engine.JRException: java.net.MalformedURLException: Cannot invoke "String.length()" because "spec" is null
gradle.build file:
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.3/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.8'
}
group 'com.numidia_technology'
version '1.0-SNAPSHOT'
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
jcenter()
maven{url "http://jasperreports.sourceforge.net/maven2/"}
maven{url "http://jaspersoft.artifactoryonline.com/jaspersoft/third-party-ce-artifacts/"}
}
configurations {
jasperreports {
transitive = true
}
}
dependencies {
testImplementation 'junit:junit:4.12'
testCompile group: 'org.apache.derby', name: 'derby', version: '10.15.2.0'
compile group: 'org.apache.derby', name: 'derbyclient', version: '10.15.2.0'
compile group: 'org.apache.derby', name: 'derbytools', version: '10.15.2.0'
compile group: 'org.apache.derby', name: 'derbynet', version: '10.15.2.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports', version: '6.16.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports-fonts', version: '6.16.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports-functions', version: '6.16.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports-metadata', version: '6.16.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports-chart-customizers', version: '6.16.0'
//compile group: 'net.sf.jasperreports', name: 'jasperreports-javaflow', version: '6.16.0'
compile group: 'net.sf.jasperreports', name: 'jasperreports-custom-visualization', version: '6.16.0'
//compile group: 'net.sf.jasperreports', name: 'jasperreports--chart-themes', version: '6.16.0'
compile group: 'org.controlsfx', name: 'controlsfx', version: '11.0.3'
compile group: 'commons-io', name: 'commons-io', version: '2.8.0'
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.7', ext: 'pom'
}
javafx {
modules = [ 'javafx.base','javafx.controls', 'javafx.fxml', 'javafx.swing', 'javafx.media', 'javafx.graphics']
version = '15.0.1'
}
mainClassName = 'com.numidia_technology.BusinessManagement'
run {
jvmArgs += ['--add-exports', 'javafx.base/com.sun.javafx.event=ALL-UNNAMED']
}
jar {
manifest {
attributes "Main-Class": "$mainClassName"
}
doFirst {
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
jasperReport Methode:
String reportSource = "demo.jrxml";
InputStream is = getClass().getResourceAsStream(reportSource);
String reportSourceSub = "demo_address.jrxml";
InputStream sub = getClass().getResourceAsStream(reportSourceSub);
JasperReport jasperReport = (JasperReport) JRLoader.loadObjectFromFile("demo.jasper");
JasperReport jasperReportSub = (JasperReport) JRLoader.loadObjectFromFile("demo_address.jasper");
JasperPrint jasperPrint = null;
jasperReportSub = JasperCompileManager.compileReport(sub);
jasperReport = JasperCompileManager.compileReport(is);
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("SUBREPORT_DIR", "");
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters,
new JRBeanCollectionDataSource(com.numidia_technology.ContactFactory.create()));
JasperViewer.viewReport(jasperPrint, false);
The issue mostly arises, when you want a resource using a url that is wrongly formatted. I don't understand well when using grandle but in maven an example of such an error would be caused by passing wrongly formatted url eg. (#Value("{reports.jasper.demo}")should be(#Value("${reports.jasper.demo}"), am assuming you have defined the url in your application.yml or properties....Make sure your resource url is correct
I'm new to Gradle.
When I run the build, instead of copying specific dependencies to specific directories, the build adds both compile and testCompile dependencies to src/test/resources.
I would like to be able to copy only test compile dependencies to src/test/resources and all other dependencies to main/src/resources.
Thank you
apply plugin: 'java'
apply plugin: 'war'
String spring_version = "3.1.2.RELEASE#jar" ;
String spring_sec_version = "3.1.2.RELEASE#jar" ;
String hibernate_version = "4.1.7.Final#jar" ;
repositories {
mavenCentral()
}
// "org.springframework:spring-oxm:"+spring_version,
List spring = [
"org.springframework:spring-context:"+spring_version,
"org.springframework:spring-beans:"+spring_version,
"org.springframework:spring-core:"+spring_version,
"org.springframework:spring-aop:"+spring_version,
"org.springframework:spring-expression:"+spring_version,
"org.springframework:spring-jdbc:"+spring_version,
"org.springframework:spring-tx:"+spring_version,
"org.springframework:spring-web:"+spring_version,
"org.springframework:spring-webmvc:"+spring_version,
"org.springframework:spring-orm:"+spring_version,
"org.springframework:spring-asm:"+spring_version
]
List spring_security = [
"org.springframework.security:spring-security core:"+spring_sec_version,
"org.springframework.security:spring-security-config:"+spring_sec_version,
"org.springframework.security:spring-security-web:"+spring_sec_version
]
List spring_aop = [
"aopalliance:aopalliance:1.0#jar",
"cglib:cglib-nodep:2.2.2#jar"
]
List validation_lib = [
"org.hibernate:hibernate-validator:4.3.0.Final#jar",
"javax.validation:validation-api:1.0.0.GA#jar"
]
List log_lib = [
"org.jboss.logging:jboss-logging:3.1.2.GA#jar",
"org.slf4j:slf4j-api:1.6.6#jar",
"org.slf4j:slf4j-jdk14:1.6.6#jar",
"org.slf4j:log4j-over-slf4j:1.6.6#jar",
"org.slf4j:jcl-over-slf4j:1.6.6#jar",
"log4j:log4j:1.2.17#jar"
]
List hibernate_api = [
"org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final#jar"
]
List hibernate = [
"org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.1.Final#jar",
"org.hibernate.common:hibernate-commons-annotations:4.0.1.Final#jar",
"org.javassist:javassist:3.16.1-GA",
"org.hibernate:hibernate-entitymanager:"+hibernate_version,
"org.hibernate:hibernate-core:"+hibernate_version
]
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.10'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
compile hibernate_api
compile hibernate
compile spring
compile spring_security
compile spring_aop
compile "org.codehaus.jackson:jackson-jaxrs:1.9.9" //lib jackson for JSON
compile validation_lib
compile log_lib
runtime "postgresql:postgresql:9.1-901.jdbc4#jar"
compile "rhino:js:1.7R2#jar"
}
task copyDependencies(type: Copy) {
from (configurations.compile)
into "src/main/resources"
}
task copyTestDependencies(type: Copy) {
from (configurations.testCompile)
into "src/test/resources"
}
build.dependsOn(copyDependencies)
build.dependsOn(copyTestDependencies)
Two things before answering:
The Gradle configurations compile and testCompile should be replaced with implementation and testImplementation. See documentation for details. My answer will use these instead.
Gradle has a great work avoidance approach, which is based on inputs / outputs computation. Copying anything into directories that are inputs of tasks, such as the resources directories, will mess that up. You really should avoid doing that and instead create new directories that are properly wired to be used where needed.
The problem you have is that testImplementation extends implementation and thus you will collect both runtime and test dependencies into the location for test dependencies.
The easiest path is to create a custom configuration for your tests dependencies so that you can access them independently of the runtime ones:
configurations {
testDependencies
testImplementations {
extendsFrom testDependencies
}
}
dependencies {
testDependencies group: 'junit', name: 'junit', version: '4.10'
// And others
}
And then you would copy the contents of testDependencies.
The one downside with this approach is that resolution of testDependencies will not be influenced by the runtime dependencies. This could be a problem but is context sensitive.
The other option is to filter runtime dependencies when copying the test ones. That solution is required if you realise that runtime dependencies impact the version of test dependencies.
I am trying to read gradle.properties into my build.gradle. I have defined some argument values in the property file and now wanted to pass these values to the argument. So that it will pass this argument value to my main methode.
But I am getting the following error:
group 'org.name'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'groovy'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile "joda-time:joda-time:2.2"
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.6'
// https://mvnrepository.com/artifact/org.dbunit/dbunit
compile group: 'org.dbunit', name: 'dbunit', version: '2.4.7'
compile "org.slf4j:slf4j-simple:1.7.9";
}
task runApp(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = 'ExportDatatoXML'
println url
println username
println password
println folderPath
// arguments to pass to the application
args
[project.property('url'),project.property('username'),
project.property('password'),project.property('folderPath')]
}
This is my build.gradle file
gradle.properties file is:
url =jdbc:mysql://127.0.0.1:3306/name
username =root
password =name
folderPath =C:/Users/name/Desktop/DataBase/
Error is following:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\name\IdeaProjects\HelloWorld\build.gradle' line: 36
* What went wrong:
A problem occurred evaluating root project 'AI'.
> Cannot cast object 'jdbc:mysql://127.0.0.1:3306/name' with class
'java.lang.String' to class 'int'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output.
BUILD FAILED
Total time: 12.448 secs
Cannot cast object 'jdbc:mysql://127.0.0.1:3306/name' with class
'java.lang.String' to class 'int'
13:01:41: External task execution finished 'build'
JavaExec.args is a list, so args[<anything>] is interpreted as "array-like-access" and so has to be an integer, but you give it a string.
Replace
args
[project.property('url'),project.property('username'),
project.property('password'),project.property('folderPath')]
with one of the following:
args
([project.property('url'),project.property('username'),
project.property('password'),project.property('folderPath')])
args project.property('url'), project.property('username'),
project.property('password'), project.property('folderPath')
args project.url, project.username, project.password, project.folderPath
args url, username, password, folderPath
All should be equivalent.
I have this problem with the annotations for few days...
Error:(13, 26) cannot find symbol class LoginActivityAnnotations_
But the annotation class exist and the class import in my MainActivity work greate
http://imagizer.imageshack.us/v2/150x100q90/911/x8RzRM.png
The annotaitons classes were generated correctly in this directory:
http://imagizer.imageshack.us/v2/150x100q90/538/bEplNx.png
This is my build.grandle file
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:+'
}
}
apply plugin: 'android'
apply plugin: 'android-apt'
repositories {
mavenCentral()
mavenLocal()
}
apt {
arguments {
resourcePackageName "com.ar.sdocs"
androidManifestFile variant.processResources.manifestFile
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.android.support:support-v4:20.0.0'
apt "org.androidannotations:androidannotations:+"
compile 'org.androidannotations:androidannotations-api:+'
compile 'com.nhaarman.listviewanimations:library:2.6.0'
compile files('libs/commons-lang3-3.3.1.jar')
compile 'com.google.android.gms:play-services:4.3.+'
compile files('libs/joda-time-2.3.jar')
compile files('libs/bcprov-ext-jdk15on-150.jar')
compile files('libs/bugsense-3.6.1.jar')
compile 'org.apache.httpcomponents:httpcore:4.3.2'
compile 'org.apache.httpcomponents:httpmime:4.3.4'
compile 'com.google.code.gson:gson:2.2.4'
compile files('libs/json-simple-1.1.1.jar')
apt "org.androidannotations:androidannotations:+"
compile 'org.androidannotations:androidannotations-api:+'
}
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName '0.1'
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
android.applicationVariants.each { variant ->
aptOutput = file("${project.buildDir}/generated/source/apt/${variant.dirName}")
println "****************************"
println "variant: ${variant.name}"
println "manifest: ${variant.processResources.manifestFile}"
println "aptOutput: ${aptOutput}"
println "****************************"
variant.javaCompile.doFirst {
println "*** compile doFirst ${variant.name}"
aptOutput.mkdirs()
variant.javaCompile.options.compilerArgs += [
'-processorpath', configurations.apt.getAsPath(),
'-AandroidManifestFile=' + variant.processResources.manifestFile,
'-s', aptOutput
]
}
variant.addJavaSourceFoldersToModel(aptOutput)
}
But every time I run a build, I get the error I mentioned before. I'm trying different configurations days ago but I can not find one that works
Thats the complete error (I only import the annotations class)
Error:(14, 26) cannot find symbol class LoginActivityAnnotations_
Note: Resolve log file to /Users/CARRY/AndroidStudioProjects/sdocs/SDocs/build/generated/source/apt/androidannotations.log
Note: Initialize AndroidAnnotations 3.0.1 with options {resourcePackageName=com.ar.sdocs, androidManifestFile=/Users/CARRY/AndroidStudioProjects/sdocs/SDocs/build/intermediates/manifests/debug/AndroidManifest.xml}
Note: Start processing for 5 annotations on 145 elements
Note: AndroidManifest.xml file found with specified path: /Users/CARRY/AndroidStudioProjects/sdocs/SDocs/build/intermediates/manifests/debug/AndroidManifest.xml
Note: AndroidManifest.xml found: AndroidManifest [applicationPackage=com.ar.sdocs, componentQualifiedNames=[com.ar.sdocs.main.MainActivity, com.ar.sdocs.login.LoginActivity, com.ar.sdocs.dashboard.DashboardActivity, com.ar.sdocs.login.registro.RegistroActivity, com.ar.sdocs.dashboard.settings.editar.SettingsUserEditActivity, com.ar.sdocs.dashboard.upload.UploadActivity, com.ar.sdocs.dashboard.materias.main.MateriaActivity, com.ar.sdocs.util.media.FilePickerActivity, com.ar.sdocs.gcm.GcmIntentService, com.ar.sdocs.gcm.GcmBroadcastReceiver], permissionQualifiedNames=[android.permission.USE_CREDENTIALS, android.permission.GET_ACCOUNTS, android.permission.READ_PROFILE, android.permission.READ_CONTACTS, android.permission.INTERNET, android.permission.WAKE_LOCK, com.google.android.c2dm.permission.RECEIVE, android.permission.CAMERA, android.permission.READ_EXTERNAL_STORAGE, com.example.gcm.permission.C2D_MESSAGE], applicationClassName=null, libraryProject=false, debugabble=false, minSdkVersion=14, maxSdkVersion=-1, targetSdkVersion=19]
Note: Found project R class: com.ar.sdocs.R
Note: Found Android class: android.R
Note: Validating elements
Note: Validating with EActivityHandler: [com.ar.sdocs.login.LoginActivityAnnotations]
/Users/CARRY/AndroidStudioProjects/sdocs/SDocs/src/main/java/com/ar/sdocs/login/LoginActivityAnnotations.java
Warning:(45, 1) The component LoginActivityAnnotations_ is not registered in the AndroidManifest.xml file.
Note: Validating with ViewByIdHandler: [emailEditText, passwordEditText]
Note: Validating with ClickHandler: [loginButtonClicked(), registerButtonClicked()]
Note: Validating with TouchHandler: [loginRelativeLayoutTouched(android.view.View,android.view.MotionEvent)]
Note: Validating with AfterViewsHandler: [verificarLogin()]
Note: Processing root elements
Note: Processing root elements EActivityHandler: [com.ar.sdocs.login.LoginActivityAnnotations]
Note: Processing enclosed elements
Note: Number of files generated by AndroidAnnotations: 1
Note: Writting following API classes in project: []
Note: Generating class: com.ar.sdocs.login.LoginActivityAnnotations_
Note: Time measurements: [Whole Processing = 148 ms], [Process Annotations = 32 ms], [Generate Sources = 31 ms], [Find R Classes = 24 ms], [Extract Annotations = 23 ms], [Validate Annotations = 16 ms], [Extract Manifest = 11 ms],
Note: Finish processing
Note: Start processing for 0 annotations on 1 elements
Note: Time measurements: [Whole Processing = 3 ms],
Note: Finish processing
Note: Start processing for 0 annotations on 0 elements
Note: Time measurements: [Whole Processing = 1 ms],
Note: Finish processing
Warning:Unclosed files for the types '[dummy1407025286017]'; these types will not undergo annotation processing
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Information:BUILD SUCCESSFUL
Information:Total time: 21.886 secs
Information:1 error
Information:4 warnings
Information:See complete output in console
I could be because you havn't included the LoginActivityAnnotations_ file where you use it - because Android Studio does not help you with that. I had that problem.
You need to make an include of the package where the LoginActivityAnnotations file.
If you were using this include, to get the file without the underscore:
com.example.LoginActivityAnnotations
Then use this one:
com.example.* //To load LoginActivityAnnotations_
(The include will be grey and you will still be left with red words but it will compile)