I am trying to create an executable file from my project but unfortunately I have this failure:
Buildfile: C:\02_DEV\R_5_2_3\DiagraDB\build.xml
compile:
[javac] Compiling 1 source file to C:\02_DEV\R_5_2_3\DiagraDB\bin
dist:
[jar] Building jar: C:\DiagraDB_build\lib\DiagraDB.jar
[copy] Copying 1 file to C:\DiagraDB_build\mysql
[launch4j] Compiling resources
[launch4j] Linking
[launch4j] C:\02_DEV\R_5_2_3\DiagraDB\launch4j\bin\ld.exe: C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\crt2.o: No such file: No such file or directory
BUILD FAILED
C:\02_DEV\R_5_2_3\DiagraDB\build.xml:125: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\02_DEV\R_5_2_3\DiagraDB\launch4j\bin\ld.exe -mi386pe --oformat pei-i386 --subsystem windows -s C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\crt2.o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\head\guihead.o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\head\head.o C:\Users\MET4ABT\AppData\Local\Temp\launch4j5622103051739315213o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libmingw32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libgcc.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libmsvcrt.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libkernel32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libuser32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libadvapi32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libshell32.a -o C:\DiagraDB_build\DiagraDB.exe
Total time: 6 seconds
I have read some kind of stuff such as Launch4j / windres: how to set paths correctly? but I couldn't make it work for mine.
(I have the JDK Version 7 and windows 7.) I appreciate your suggestions about a solution for this problem. Thanks in advance.
Related
I am using JAVA 11.0.11
I have installed ant on my Linux desktop.
Then to install optional dependencies i run following command which is on the documentation.
ant -f fetch.xml -Ddest=system
After running , I received following error.
-setup-temp-cache:
-fetch-netrexx:
[ftp] getting files
[ftp] 0 files retrieved
-fetch-netrexx-no-commons-net:
netrexx:
[checksum] Could not find file /root/.ant/tempcache/NetRexx.zip to generate checksum for.
BUILD FAILED
/usr/local/apache-ant/fetch.xml:368: Could not find file /root/.ant/tempcache/NetRexx.zip to generate checksum for.
Total time: 22 seconds
I have done the Jenkins Setup to clone solution from Github Repo and trigger the build and solution should run on multiple browsers in parallel (I'm using ANT build).
But when I'm trying to run scripts, its triggering the build but unable to clone solution on VM, throwing below error
Started by upstream project "HippoAutomationTests" build number 12
originally caused by:
Started by user Andy Williams
[EnvInject] - Loading node environment variables.
Building on master in workspace /x01/builds/workspace/HippoAutomationTests/browser/Firefox
using credential b89b0ace-6852-43d4-83a7-83f3ba77a290
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://bitbucket.org/kohler_source/hippoautomationtests.git # timeout=10
Fetching upstream changes from https://bitbucket.org/kohler_source/hippoautomationtests.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials Bitbucket Credentials
> git fetch --tags --progress https://bitbucket.org/kohler_source/hippoautomationtests.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 104215052b7b4ae548eb2a4782bd9292bc93b95a (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 104215052b7b4ae548eb2a4782bd9292bc93b95a
Commit message: "Updating the solution"
> git rev-list --no-walk 104215052b7b4ae548eb2a4782bd9292bc93b95a # timeout=10
[Firefox] $ /x01/jenkins/tools/hudson.tasks.Ant_AntInstallation/Ant_Installation/bin/ant -file build.xml -DGroup=HippoIndia -Dbrowser=Firefox -DURL=http://plumbingindia.kohler.acct.us.onehippo.com/ -DrealTimeReport=true -DrunParallel=methods -Dselenium.capture.path=/Test/build/test-output/new -Dtest.url=http://plumbingindia.kohler.acct.us.onehippo.com/ -DuseVideoCapture=false -DbuildName=Test -DdbMode=false -Dselenium.timeout=60000 -DlocalExecution=true -DthreadCount=1 -Dtest.browser=Firefox -Dpackages=com.tests.* -Dtest.browser.version=11.0 -DretryCount=0 -Dselenium.port=4444 -DdbUrl=localhost:3306/isaf -DshowVideosOnPass=false -DdataProviderThreadCount=20 -Dgroups=HippoIndia -DuseProxy=false -DdbUser=isaf_user -Dselenium.host=localhost -DdbPass=isaf#123 -DreportType=iwafreport build.config run.test
Buildfile: /x01/builds/workspace/HippoAutomationTests/browser/Firefox/build.xml
build.config:
[copy] Copying 1 file to /x01/builds/workspace/HippoAutomationTests/browser/Firefox
clean:
[delete] Deleting directory /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build
init:
[mkdir] Created dir: /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build
[mkdir] Created dir: /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build/test-classes
[mkdir] Created dir: /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build/test-output
compile:
[javac] /x01/builds/workspace/HippoAutomationTests/browser/Firefox/build.xml:99: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 18 source files to /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build/test-classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
run.test:
[java] Error occurred during initialization of VM
[java] Error opening zip file or JAR manifest missing : /x01/builds/workspace/HippoAutomationTests/browser/Firefox/lib\aspectjweaver.jar
[java] agent library failed to init: instrument
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 4 seconds
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build/test-output/IwafReport to /x01/jenkins/jobs/HippoAutomationTests/configurations/axis-browser/Firefox/htmlreports/HTML_20Report
ERROR: Specified HTML directory '/x01/builds/workspace/HippoAutomationTests/browser/Firefox/Test/build/test-output/IwafReport' does not exist.
Build step 'Publish HTML reports' changed build result to FAILURE
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
testng-results.xml was last modified before this build started. Ignoring it.
testng-results.xml was last modified before this build started. Ignoring it.
Saving reports...
Found matching files but did not find any TestNG results.
Finished: FAILURE
Please provide some suggestion to resolve the issue.
The aspectjweaver.jar JAR is missing on your build environment as per the error message:
[java] Error occurred during initialization of VM [java] Error opening zip file or JAR manifest missing : /x01/builds/workspace/HippoAutomationTests/browser/Firefox/lib\aspectjweaver.jar
[java] agent library failed to init: instrument
[java] Java Result: 1
Ensure that this JAR is present and don't use \ as a path delimiter. It should be lib/aspectjweaver.jar just like rest of the path.
I'm tired of searching for answers, my problem is:
I want to create an executable file, I am working on a large program, and I encounter this problem, I did not find a solution, I created a new program to look for the problem, the new program does not have any code, just a line in order to show 'Hello Word' and added a picture in another package, And again encountered the same problem:
ant -f 'MyPath'\\New -Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Updating property file: 'MyPath'\New\build\built-clean.properties
Deleting directory 'MyPath'\New\build
clean:
init:
deps-jar:
Created dir: 'MyPath'\New\build
Updating property file: 'MyPath'\New\build\built-jar.properties
Created dir: 'MyPath'\New\build\classes
Created dir: 'MyPath'\New\build\empty
Created dir: 'MyPath'\New\build\generated-sources\ap-source-output
Compiling 1 source file to 'MyPath'\New\build\classes
Copying 1 file to 'MyPath'\New\build\classes
Attempt to copy 'MyPath'\New\src\pic\1.png to 'MyPath'\New\build\classes\pic\1.png using NIO Channels failed due to 'MyPath'\New\build\classes\pic\1.png (Accès refusé)'. Falling back to streams.
'MyPath'\New\nbproject\build-impl.xml:931: Failed to copy 'MyPath'\New\src\pic\1.png to 'MyPath'\New\build\classes\pic\1.png due to java.io.FileNotFoundException 'MyPath'\New\build\classes\pic\1.png (Accès refusé)
BUILD FAILED (total time: 2 seconds)
I'm using Netbeans IDE 8.2 , Sys : Windows 10.
It's a file/folder permissions problem. Your user does not have the rights to make changes to certain files/folders involved in the build process, so neither does Netbeans. You can validate this by running that ant command as root through the command line - it should suddenly work.
I solved the problem on mac by changing the group permissions for the parent folder listed in the error message and adding my user to said group.
I'm not an expert when it comes to permissions on Windows, so I shouldn't try to tell you how to do the same there, but you could reference something like this - https://www.online-tech-tips.com/computer-tips/set-file-folder-permissions-windows/ - for help in achieving the same thing.
I'm running ./run.sh from Alfresco All-in-One extension but I got the error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.2:compile
(default-compile) on project repo-amp: Compilation failure:
Compilation failure:
[ERROR]
/home/user/signextension/sign/repo-amp/src/main/java/pt/empt/sign/fields/CreateFields.java:[3,25]
package com.itextpdf.text does not exist
[ERROR]
/home/user/signextension/sign/repo-amp/src/main/java/pt/empt/sign/fields/CreateFields.java:[4,25]
package com.itextpdf.text does not exist
[ERROR]
/home/user/signextension/sign/repo-amp/src/main/java/pt/empt/sign/fields/CreateFields.java:[5,1]
package com.itextpdf.text.pdf does not exist
My run.sh:
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs the full all-in-one
# (Alfresco + Share + Solr) using the runner project
springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar
if [ ! -f $springloadedfile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
I try this:
#!/bin/bash
# Downloads the spring-loaded lib if not existing and runs the full all-in-one
# (Alfresco + Share + Solr) using the runner project
springloadedfile=~/.m2/repository/org/springframework/springloaded/1.2.3.RELEASE/springloaded-1.2.3.RELEASE.jar
itextpdffile=~/.m2/repository/com/itextpdf/itextpdf/5.5.7/itextpdf-5.5.7.jar
if [ ! -f $springloadedfile ] && [ ! -f $itextpdffile ]; then
mvn validate -Psetup
fi
MAVEN_OPTS="-javaagent:$springloadedfile -javaagent:$itextpdffile -noverify -Xms256m -Xmx2G" mvn clean install -Prun
But I got the error:
Failed to find Premain-Class manifest attribute in
/home/user/.m2/repository/com/itextpdf/itextpdf/5.5.7/itextpdf-5.5.7.jar
Error occurred during initialization of VM agent library failed to
init: instrument
Any help for solve this?
The itext library is not a javaagent library, check this link to learn more about java agents and what are they meant for !
The right way to add itext dependency to your project is by adding this snippet:
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.7</version>
</dependency>
To your main pom.xml file (or the repo-amp pom.xml alternatively) (in the dependencies section). And of course roll back any changes you made to the run.sh file !
hey all I followed the steps here: http://wiki.apache.org/pig/PiggyBank
to build the piggybank jar but I keep getting the output below. I also built the pig project from source and reference that in my .bash_profile:
cloudera#cloudera-demo:~/piggybank/java$ ./makepiggy.sh
Buildfile: /home/cloudera/piggybank/java/build.xml
download-hive-deps:
init:
compile:
[echo] *** Compiling Pig UDFs ***
[javac] /home/cloudera/piggybank/java/build.xml:100: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 153 source files to /home/cloudera/piggybank/java/build/classes
BUILD FAILED
/home/cloudera/piggybank/java/build.xml:100: /home/build/ivy/lib does not exist.
here is my bash_profile:
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
export CLASSPATH=$CLASSPATH:/home/cloudera/pig/trunk/pig.jar
** UPDATE **
The docs were incorrect on the Wiki page, they appear to be correct now: http://wiki.apache.org/pig/PiggyBank
follow the new instructions and you should be fine
The docs were incorrect on the Wiki page, they appear to be correct now: http://wiki.apache.org/pig/PiggyBank
follow the new instructions and you should be fine
Create a directory for the Pig source code: mkdir pig
cd into that directory: cd pig
Checkout the Pig source code: svn checkout http://svn.apache.org/repos/asf/pig/trunk/ .
Build the project: ant
cd into the piggybank dir: cd contrib/piggybank/java
Build the piggybank: ant
You should now see a piggybank.jar file in that directory.