I am having a problem building from the server. My project is an Android application using Netbeans IDE. When I run my application everything works fine, the the compiler reports no error at all. But when I send the server build Netbeans report a successful build but but when I login to the build server what i see there is a Build Fail with an error log.
The following is the error log I get from the build server:
Executing: /home/ec2-user/android-sdk/tools/android create project --target android-14 --name MyApplication --path /tmp/build4676848571336833460xxx/MyApplication --activity MyApplicationStub --package com.mycompany.myapp Created directory /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp
Added file /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp/MyApplicationStub.java
Created directory /tmp/build4676848571336833460xxx/MyApplication/res
Created directory /tmp/build4676848571336833460xxx/MyApplication/bin
Created directory /tmp/build4676848571336833460xxx/MyApplication/libs
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/values
Added file /tmp/build4676848571336833460xxx/MyApplication/res/values/strings.xml
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/layout
Added file /tmp/build4676848571336833460xxx/MyApplication/res/layout/main.xml
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-hdpi
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-mdpi
Created directory /tmp/build4676848571336833460xxx/MyApplication/res/drawable-ldpi
Added file /tmp/build4676848571336833460xxx/MyApplication/AndroidManifest.xml
Added file /tmp/build4676848571336833460xxx/MyApplication/build.xml
Added file /tmp/build4676848571336833460xxx/MyApplication/proguard-project.txt
Executing: /home/ec2-user/android/ant/bin/ant release Buildfile: /tmp/build4676848571336833460xxx/MyApplication/build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is proguard.cfg
[echo] Proguard.config is enabled
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 22.2.1
[checkenv] Installed at /home/ec2-user/android-sdk
-setup:
[echo] Project Name: MyApplication
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 18.1.1
[echo] Resolving Build Target for MyApplication...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/res
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/rsObj
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/rsLibs
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/gen
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/classes
[mkdir] Created dir: /tmp/build4676848571336833460xxx/MyApplication/bin/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for MyApplication...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 405 source files to /tmp/build4676848571336833460xxx/MyApplication/bin/classes
[javac] /tmp/build4676848571336833460xxx/MyApplication/src/com/mycompany/myapp/MyApplicationStub.java:119: error: unreported exception IOException; must be caught or declared to be thrown
[javac] i.start();
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
BUILD FAILED
/home/ec2-user/android-sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/home/ec2-user/android-sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 26 seconds
Don't add exception throws statements to the start() callback.
Related
I received this "BUILD FAILED" while trying to install EJBCA on UBUNTU 18.04. The following messages appeared below "BUILD FAILED":
/opt/ejbca_ce_6_15_2_1/build.xml:1323: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/build.xml:260: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build.xml:16: Compile failed; see the compiler error output for details.
Above the Build Failed message there were a total of 39 "javac" errors, specifying the problem. Some of those are:
jar:
[mkdir] Created dir: /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
[javac] Compiling 1 source file to /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
[javac] /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/src/sun/security/pkcs11/CESeCoreUtils.java:15: error: package sun.security.pkcs11.wrapper is not visible
[javac] import static sun.security.pkcs11.wrapper.PKCS11Constants.CKA_SENSITIVE;
[javac] ^
[javac] (package sun.security.pkcs11.wrapper is declared in module jdk.crypto.cryptoki, which is not in the module graph)
Others are like:
137: error: cannot find symbol
[javac] if ( e.getErrorCode()==CKR_ATTRIBUTE_READ_ONLY ) {
[javac] ^
[javac] symbol: variable CKR_ATTRIBUTE_READ_ONLY
[javac] location: class CESeCoreUtils
The complete list of errors in this link https://pastebin.com/LMzDhdKn
Most likely you are not using one of the supported JDK versions. In the beginning of your build log (which you haven't pasted here) it prints what java version is used by your system. Make sure this is a supported one (from the EJBCA documentation). Since you are using Ubuntu, I'd recommend installing the OpenJDK 8 packages, and making sure this is used by configuring Ubuntu to use this, with the 'update-java-alternatives' command.
The build log should then print in the beginning that OpenJDK 8 (with some specific build number) is being used.
Project will not build: error: package java.util.logging does not exist [javac] import java.util.logging.Level;
Steps to reproduce: (eclipse neon)
1. create a new codenameone project.
2. open codenameone settings, download admob extension
3. refresh cn1libraries.
Gets the following errors. Note that the native android does not have the java util. Why is it using javase ?
Buildfile: /Users/sam/dev/wordtime5_ws/test2/build.xml
jar:
[echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
[echo] code size and wider device support
[copy] Copying 1 file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[javac] /Users/sam/dev/wordtime5_ws/test2/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[copy] Copying 11 files to /Users/sam/dev/wordtime5_ws/test2/build/tmp
[jar] Building jar: /Users/sam/dev/wordtime5_ws/test2/dist/test2.jar
[javac] /Users/sam/dev/wordtime5_ws/test2/build.xml:171: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to /Users/sam/dev/wordtime5_ws/test2/native/internal_tmp
[javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:16: error: package java.util.logging does not exist
[javac] import java.util.logging.Level;
[javac] ^
[javac] /Users/sam/dev/wordtime5_ws/test2/lib/impl/native/javase/com/codename1/admob/AdMobNativeImpl.java:17: error: package java.util.logging does not exist
[javac] import java.util.logging.Logger;
[javac] ^
[javac] 2 errors
I needed to create a new codenameone project and copy my sources into that. My project was over a year old.
I wanted to dive into CN1 soures. I've followed this and this tutorial with git. However in NetBeans when I ctrl-click on a CN1 object it shows "Showing generated source file. No sources are attached to class' JAR file.". If I attach the sources I've just downloaded ie "CodenameOne/CodenameOne/src" the sources are still unfound!
I tried to clean and build the project but errors appeared :
Building jar: /home/pathTo/CodenameOneSRC/CodenameOne/CodenameOne/dist/CodenameOne.jar
CodenameOne.jar:
JavaSE.init:
JavaSE.deps-jar:
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build
Updating property file: /home/pathTo/myProject/build/built-jar.properties
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/empty
Created dir: /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/generated-sources/ap-source-output
Compiling 21 source files to /home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:115: error: package com.jhlabs.image does not exist
import com.jhlabs.image.GaussianFilter;
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter
location: class JavaSEPort
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java:8757: error: cannot find symbol
GaussianFilter gf = new GaussianFilter(radius);
symbol: class GaussianFilter location: class JavaSEPort
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.
3 errors
1 warning
/home/pathTo/myProject/nbproject/build-impl.xml:914: The following error occurred while executing this line:
/home/pathTo/myProject/nbproject/build-impl.xml:1445: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:937: The following error occurred while executing this line:
/home/pathTo/CodenameOneSRC/CodenameOne/Ports/JavaSE/nbproject/build-impl.xml:269: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 14 seconds)
Furthermore the project cannot be run anymore because the main class is not found (although I added the ports/JavaSE.jar in the run section).
What can I do to correctly attach sources and make change to CN1 source code ?
Any help appreciated,
Regards
You need the cn1-binaries project and need to make sure the paths within the JavaSE project lead to valid locations within that project.
E.g. GaussianFilter is defined within Filters.jar that resides in that project.
I have not done any build on the server before, but I have created numerous applications on my system. When trying to send this particular application to the build server, it was giving error on netbeans. This was the error I was getting:
init:
deps-clean:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-clean.properties
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
refresh-libs:
Deleting directory C:\Users\Olubori\Documents\NetBeansProjects\Interview\lib\impl
clean:
copy-desktop-override:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
copy-libs:
deps-jar:
Updating property file: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\built-jar.properties
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller code size and wider device support
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\tmp
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\empty
Compiling 1 source file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.5
1 warning
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build\classes
compile:
Created dir: C:\Users\Olubori\Documents\NetBeansProjects\Interview\dist
Copying 1 file to C:\Users\Olubori\Documents\NetBeansProjects\Interview\build
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:990: The following error occurred while executing this line:
C:\Users\Olubori\Documents\NetBeansProjects\Interview\nbproject\build-impl.xml:834: copylibs doesn't support the "excludeFromCopy" attribute.
BUILD FAILED (total time: 0 seconds)
What could be the cause and how will I solve it?
Just remove that attribute from the XML build file, its a NetBeans bug: https://groups.google.com/d/msg/codenameone-discussions/X_HMILMsw_Y/jE0xDsL7nfAJ
I'm trying to learn about grails with Google App Engine and JPA by following a few tutorials:
http://www.morkeleb.com/2009/08/12/grails-and-google-appengine-beginners-guide/
http://inhouse32.appspot.com/index.html
http://grails.org/plugin/app-engine
I've got grails 1.3.0 RC 2, and App Engine SDK 1.3.3, and I'm using Windows 7. The steps that I try are:
grails create-app appname
cd appname
grails install-plugin app-engine. I answer jpa when asked about jdo/jpa. It appears to install the gorm-jpa plugin automatically, although the tutorials all suggest installing gorm-jpa manually.
grails install-plugin gorm-jpa (just in case)
grails create-domain-class test.Person
Edit the grails-app/domain/test/Person.groovy to add name and address fields:
package test
import javax.persistence.*;
// import com.google.appengine.api.datastore.Key;
#Entity
class Person implements Serializable {
#Id
#GeneratedValue(strategy = GenerationType.IDENTITY)
Long id
#Basic
String name
#Basic
String address
static constraints = {
id visible:false
}
}
grails generate-all test.Person
I get errors during this final step:
C:\Users\John\Workspaces\STS\appname>grails generate-all test.Person
Welcome to Grails 1.3.0.RC2 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\Users\John\Downloads\grails-1.3.0.RC2\grails-1.3.0.RC2
Base Directory: C:\Users\John\Workspaces\STS\appname
Resolving dependencies...
Dependencies resolved in 493ms.
Running script C:\Users\John\Downloads\grails-1.3.0.RC2\grails-1.3.0.RC2\scripts\GenerateAll.groovy
Environment set to development
[copy] Copied 4 empty directories to 2 empty directories under C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources
[copy] Copied 4 empty directories to 2 empty directories under C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources
[copy] Copied 1 empty directory to 1 empty directory under C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes
[groovyc] Compiling 12 source files to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes
Note: C:\Users\John\.grails\1.3.0.RC2\projects\appname\plugins\gorm-jpa-0.7.1\src\java\org\grails\jpa\domain\JpaGrailsDomainClass.java uses or overrides 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.
[groovyc] Compiling 8 source files to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes
[mkdir] Created dir: C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\grails-app\i18n
[native2ascii] Converting 13 files from C:\Users\John\Workspaces\STS\appname\grails-app\i18n to C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\grails-app\i18n
[mkdir] Created dir: C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\plugins\gorm-jpa-0.7.1\grails-app\i18n
[mkdir] Created dir: C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\plugins\app-engine-0.8.10\grails-app\i18n
[native2ascii] Converting 1 file from C:\Users\John\.grails\1.3.0.RC2\projects\appname\plugins\gorm-jpa-0.7.1\grails-app\i18n to C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\plugins\gorm
-jpa-0.7.1\grails-app\i18n
[native2ascii] Converting 1 file from C:\Users\John\.grails\1.3.0.RC2\projects\appname\plugins\app-engine-0.8.10\grails-app\i18n to C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources\plugins\a
pp-engine-0.8.10\grails-app\i18n
[copy] Copying 1 file to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes
[copy] Copying 2 files to C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources
[copy] Copied 2 empty directories to 2 empty directories under C:\Users\John\.grails\1.3.0.RC2\projects\appname\resources
[copy] Copying 1 file to C:\Users\John\.grails\1.3.0.RC2\projects\appname
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\plugins\app-engine-0.8.10
[copy] Copying 1 file to C:\Users\John\Workspaces\STS\appname\web-app\plugins\app-engine-0.8.10
[copy] Copying 1 file to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\lib
[copy] Copying 64 files to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\lib
Configuring persistence for AppEngine
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes\META-INF
[copy] Copying 1 file to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes\META-INF
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\plugins\app-engine-0.8.10
[copy] Copying 2 files to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\plugins\app-engine-0.8.10
[mkdir] Created dir: C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\plugins\gorm-jpa-0.7.1
[copy] Copying 2 files to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\plugins\gorm-jpa-0.7.1
Packaging AppEngine jar files
Enhancing JDO classes
[enhance] DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
[enhance] DataNucleus Enhancer completed with success for 1 classes. Timings : input=589 ms, enhance=200 ms, total=789 ms. Consult the log for full details
[groovyc] Compiling 1 source file to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF\classes
[copy] Copying 1 file to C:\Users\John\.grails\1.3.0.RC2\projects\appname
[copy] Copying 1 file to C:\Users\John\Workspaces\STS\appname\web-app\WEB-INF
Configuring persistence for AppEngine
Packaging AppEngine jar files
Enhancing JDO classes
[enhance] DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
[enhance] DataNucleus Enhancer completed with success for 1 classes. Timings : input=585 ms, enhance=28 ms, total=613 ms. Consult the log for full details
Generating views for domain class test.Person ...
java.lang.reflect.InvocationTargetException
at SimpleTemplateScript1.run(SimpleTemplateScript1.groovy:43)
at _GrailsGenerate_groovy.generateForDomainClass(_GrailsGenerate_groovy:85)
at _GrailsGenerate_groovy$_run_closure1.doCall(_GrailsGenerate_groovy:50)
at GenerateAll$_run_closure1.doCall(GenerateAll.groovy:42)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/MappingException
... 15 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.MappingException
at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 15 more
Error running generate-all: null
What am I doing wrong?
Where is the log file that I'm supposed to consult for details?
It seems that setting visibility to false with the standard scaffolding causes errors. I had to delete the middle line from this block, and it worked:
static constraints = {
id visible:false
}
I suppose this is one of the costs of 'convention over configuration': hidden dependencies. Or it could be that I'm still learning...