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.
Related
Unable to build the react-native application because of library react-native-reanimated which is causing the error "cannot find symbol ViewManagerResolver viewManagerResolver"
cannot find symbol ViewManagerResolver viewManagerResolver
/home/bhargav/projects/simplefin-mobile/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:13: error: cannot find symbol
ViewManagerResolver viewManagerResolver,
^
symbol: class ViewManagerResolver
location: class ReanimatedUIImplementation
/home/bhargav/projects/simplefin-mobile/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:11: error: recursive constructor invocation
public ReanimatedUIImplementation(
^
Note: /home/bhargav/projects/simplefin-mobile/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.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.
2 errors
Note: /home/bhargav/projects/simplefin-mobile/node_modules/unimodules-app-loader/android/src/main/java/org/unimodules/apploader/AppLoaderProvider.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
package.json
"react": "16.11.0",
"react-native": "^0.63.4",
"react-native-reanimated": "^2.2.0",
In \node_modules\react-native-reanimated\android\src\main\java\com\swmansion\reanimated\layoutReanimation\ReanimatedUIImplementation.java
Modify the following:
In line 13 inside ReanimatedUIImplementation:
ViewManagerResolver viewManagerResolver
To:
UIManagerModule.ViewManagerResolver viewManagerResolver
I encourage you to use version 2.11.0 or the latest check here to Solve this issue also you need to do this command inside android folder
./gradlew clean
and build from scratch specially if you recently increased the version, Android Studio keeps node_modules to not re-download the whole thing, react-native-reanimated is no exception.
Do the following:
change react-native-reanimated version in your package.json to ^1.13.2
then in terminal in your project root folder paste this:
rm -rf node_modules && yarn && rm -rf ~/.gradle/caches/* && ./scripts/buildAndroidRelease.sh
Then go to the your sdk location and clean the ndk folder (by default C:\Users\Your_User_name\AppData\Local\Android\Sdk\ndk)(you can also find sdk location in Android Studio -> Tools -> SDK Manager
This actions remove all previous build stuff.
Now try to rebuild your app
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.
Ok, I ran some of the demos under the simular from eclipse. Submitted a desktop build and got a jar. Now how do I run the jar? It doesn't seem
to be directly runnable.
Also, where should I have found this information instead of asking
a bonehead question here?
> Buildfile: G:\share\projects\eclipse\Charts Demo\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 G:\share\projects\eclipse\Charts Demo\build\tmp
> [javac] G:\share\projects\eclipse\Charts Demo\build.xml:147: warning: 'includeantruntime' was not set, defaulting to
> build.sysclasspath=last; set to false for repeatable builds
> [javac] Compiling 25 source files to G:\share\projects\eclipse\Charts Demo\build\tmp
> [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
> [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
> [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
> [javac] Note: Some input files use or override a deprecated API.
> [javac] Note: Recompile with -Xlint:deprecation for details.
> [javac] Note: G:\share\projects\eclipse\Charts Demo\src\com\codename1\demos\charts\ChartDemosForm.java uses unchecked
> or unsafe operations.
> [javac] Note: Recompile with -Xlint:unchecked for details.
> [javac] 3 warnings
> [jar] Building jar: G:\share\projects\eclipse\Charts Demo\dist\Charts Demo.jar
> [javac] G:\share\projects\eclipse\Charts Demo\build.xml:171: warning: 'includeantruntime' was not set, defaulting to
> build.sysclasspath=last; set to false for repeatable builds BUILD
> SUCCESSFUL Total time: 1 second
Normally, desktop build was supposed to return exe file for windows and dmg for Mac. Something might have gone wrong for you to get jar file.
You can find bunch of information on How do I page and here's a link to desktop build.
Another thing you can do is prefix your Google search with https://www.codenameone.com.
For example, search for desktop build like this: https://www.codenameone.com desktop application
I will also suggest you follow Codenameone blog, as new features, latest release and archive of many cool stuff released in the past are available there.
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.