My first version (in azure-pipelines.yml) targeted the tempDirectory/bin folder:
- task: JavaToolInstaller#0
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: LocalDirectory
jdkFile: "JDK Bin.zip"
jdkDestinationDirectory: "$(agent.tempDirectory)/bin"
cleanDestinationDirectory: true
and I was rewarded with
Retrieving the JDK from local path.
Creating destination folder: I:\Agent-Win-A\_work\_temp\jdk
Extracting file: I:\Agent-Win-A\_work\1637\s\JDK Bin.zip
[command]I:\Agent-Win-A\_work\_tasks\JavaToolInstaller_c0e0b74f-0931-47c7-ac27-7c5a19456a36\0.151.2\FileExtractor\7zip\7z.exe x -oI:\Agent-Win-A\_work\_temp\jdk "I:\Agent-Win-A\_work\1637\s\JDK Bin.zip"
7-Zip [64] 16.00 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-10
Scanning the drive for archives:
1 file, 8875164 bytes (8668 KiB)
Extracting archive: I:\Agent-Win-A\_work\1637\s\JDK Bin.zip
--
Path = I:\Agent-Win-A\_work\1637\s\JDK Bin.zip
Type = zip
Physical Size = 8875164
Everything is Ok
Folders: 1
Files: 121
Size: 21509208
Compressed: 8875164
(node:12092) Warning: Use Cipheriv for counter mode of aes-256-ctr
JAVA_HOME is being set to: I:\Agent-Win-A\_work\_temp\jdk\bin
JAVA_HOME_11_x64 is being set to: I:\Agent-Win-A\_work\_temp\jdk\bin
##[error]Directory does not exist: I:\Agent-Win-A\_work\_temp\jdk\bin\bin
##[error]Directory does not exist: I:\Agent-Win-A\_work\_temp\jdk\bin\bin
I have no idea where it gets that it should be looking for \bin\bin - it looks to me like everything is working as expected
My .zip file has this structure:
bin/
- server/
- somefile.dll
- *lots of dlls*
Anyone know where I'm screwing up?
##[error]Directory does not exist: I:\Agent-Win-A_work_temp\jdk\bin\bin
The root cause of this issue could be that the JavaToolInstaller task hasn't created the correct destination folder.
Based on my test, I could run the task successfully with the same Yaml definition.
I notice that the task will create a destination folder: xxxx\Agent2\_work\_temp\bin\JAVA_HOME_11_x64_JDK Bin_zip
But in your case, it creates the wrong path: xxx\_work\_temp\jdk
According to your log, your are using the JavaToolInstaller task version : 0.151.2. This could be an old task version. I am using the version 0.177.0
You could try to navigate to I:\Agent-Win-A\_work\_tasks and find the folder JavaToolInstallerxxxx. Then you could delete it and re-run the pipeline.
The pipeline will download the latest version of the JavaToolInstaller task automatically.
Related
I am trying to create a pipeline using Concourse CI using Maven. The pipeline should:
Get the code from git.
Build and run test using maven.
the project generates html report in target folder
above steps are executing properly. The question how to access the output i.e target folder generated by the maven project.
I am not able to access the generated folder and copy to the required folder for later usage.
File pipeline.yml:
resources:
- name: branch-master
type: git
source:
uri: {{git-url}}
branch: master
jobs:
- name: MavenJob
serial: true
plan:
- get: branch-master
trigger: true
- task: mvn-test
privileged: true
file: branch-dev/AppDemo/test.yml
File test.yml:
platform: linux
image_resource:
type: docker-image
source:
repository: maven
tag: latest
inputs:
- name: branch-master
outputs:
- name: mvn-output
run:
path: "mvn"
args: ["-f", "branch-master/AppDemo/pom.xml", "test"]
Please some body help me.
Thanks in advance.
For sake of simplicity and unambiguity I renamed your git repo to project. Let's assume it contains concourse's yamls. And there is a directory AppDemo with java-maven app
project/pipeline.yml:
resources:
- name: project
type: git
source:
uri: {{git-url}}
branch: master
jobs:
- name: MavenJob
serial: true
plan:
- get: project
trigger: true
- task: mvn-test
privileged: true
file: project/test.yml
the job above should locate and trigger the test.yml task
project/test.yml:
platform: linux
image_resource:
type: docker-image
source:
repository: maven # let's hope bin/bash is available there. if no, use sh
tag: latest
inputs:
- name: project # project is your git-repo. all paths are relative to it's location
outputs:
- name: mvn-output
run:
path: /bin/bash
args:
- project/test-script.sh:
project/test-script.sh:
_ROOT=$(pwd)
echo "starting test-script from directory: $ROOT"
cd _ROOT/AppDemo
mvn test
if you want to pass outputs of maven job somewhere further, then you should just copy all those files into mvn-output directory later in the script.
I would also recommend using this bash-script as wrapper rather than raw "maven call" - it's more convenient for debugging the whole process as you can, e.g. echo'ing paths.
in case of any error, if container still alive, try hijacking into it to see what has actually happened there and where files are located:
fly -t <target> hijack -u <url-of-failed-job-from-your-browser>
hope this helps
NOVICE HERE - I am trying to Execute a WSDL file in a remote ubuntu terminal. I have installed Java, Axis, and ant. I also specified the classpath and CLASSPATH (wasn't sure if case was a thing). But when I run it using this command:
$AXIS2_HOME/bin/wsdl2java.sh -uri ShippingService.wsdl -p pws.client.ShippingService.wsdl -d adb -s
I get this error:
Using AXIS2_HOME: /opt/axis2
Using JAVA_HOME: /usr/lib/jvm/jdk-13.0.1
Error: -classpath requires class path specification
AXIS2_HOME=/opt/axis2 is defined in the /etc/environment; as is JAVA_HOME.
The instructions specify to use axis2-1.4.1 I am using axis2-1.7.9 which is the latest version. The older one has this file in its classpath specification annogen-0.1.0.jar the newer axis2 doesn't. Is this a possible issue?
Here is the Readme.txt (only available for Windows XP):
Requires:
Basic understanding of Web Services with Java
Valid Development/Production Key and Password
Java SE Development Kit (JDK 6 Update 16)
AXIS2 from Apache
Ant from Apache
This example covers the creation of a proper SOAP Client to communicate with the Shipping Web Services. The solution file was built on a Windows XP system using the Java Development Kit and AXIS2. The generated sample stub files are located in folder ShippingServiceStub based on this system that generated them. You can gather the pre-compiled stubs by making sure the Stub class files are in your classpath, or you can generate the stubs on your own following all the steps below.
To Complete:
1. Download Shipping Service 2.0 WSDL File from Eship Web Services site (Login Required)
a) https://eship.purolator.com/SITE/en/resourcecentre/samplecode.aspx
Note: In this sample the file has been unzipped to C:\EWSSample\ShippingService-Create directory. There should now be ShippingService.wsdl in the directory C:\EWSSample\ShippingService-Create\Development. This is the file we will concentrate on in the next step.
2. Execute WSDL2JAVA to build the stub files (Run this in the C:\EWSSample\ShippingService-Create\Development directory)
a) Example for all WSDLs from Eship Web Services site
%AXIS2_HOME%\bin\wsdl2java -uri WSName.wsdl -p pws.client.WSName -d adb -s
where:
WSName is the name of the web service, for example: ShippingService
AXIS2_HOME is environment variable pointing to your Axis2 installation, for example C:\axis2\axis2-1.4.1
-d adb means that provided samples use Axis Data Binding. It generates one stub class per web service which extends org.apache.axis2.client.Stub.
b) Our current example
C:\AXIS2\axis2-1.4.1\bin\wsdl2java -uri ShippingService.wsdl -p pws.client.ShippingService -d adb -s
Note: If you receive an error 'The JAVA_HOME environment variable is not defined' refer to Installation and Environment Notes file.
Note: If you receive an error 'The AXIS2_HOME environment variable is not defined' refer to Installation and Environment Notes file.
Response received:
Using AXIS2_HOME: C:\AXIS2\axis2-1.4.1
Using JAVA_HOME: C:\Program Files\Java\jdk1.6.0_16
Retrieving document at 'ShippingService.wsdl'.
What happened? build.xml was created in local directory. 'src\pws\client\ShippingService' directory created with ShippingServiceCallbackHandler.java, ShippingServiceContract_Consolidate_ValidationFaultFault_FaultMessage.java, ShippingServiceContract_CreateShipment_ValidationFaultFault_FaultMessage, ShippingServiceContract_ValidateShipment_ValidationFaultFault_FaultMessage, ShippingServiceContract_VoidShipment_ValidationFaultFault_FaultMessage and ShippingServiceStub java files created.
3. Download Shipping Service 2.0 Create java sample code and extract ShipmentClientCreate.java to C:\EWSSample\ShippingService-Create\Development\src\pws\client\ShippingService directory.
4. Edit the file and modify the following code
a) Define the Production (or development) Key and Password
b) Define your Purolator Account Number ( Note the Test Account Number is 9999999999 )
c) Define your Postal Code. Make sure the sending postal code is the one you registered with when receiving the Development Key and Password.
5. Run ant to compile.
a) Type 'C:\ANT\apache-ant-1.7.1\bin\ant' from the C:\EWSSample\ShippingService-Create\Development directory.
Response received:
Buildfile: build.xml
init:
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build\classes
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build\lib
pre.compile.test:
[echo] Stax Availability= true
[echo] Axis2 Availability= true
compile.src:
[javac] Compiling 5 source files to C:\EWSSample\ShippingService-Create\Development\build\classes
[javac] Note: C:\EWSSample\ShippingService-Create\Development\src\pws\client\ShippingService\ShippingServiceStub.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
jar.client:
[jar] Building jar: C:\EWSSample\ShippingService-Create\Development\build\lib\ShippingService-test-client.jar
BUILD SUCCESSFUL
Total time: 13 seconds
b) Type 'C:\ANT\apache-ant-1.7.1\bin\ant' from the C:\EWSSample\ShippingService-Create\Development directory.
Response received:
Buildfile: build.xml
init:
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build\classes
[mkdir] Created dir: C:\EWSSample\ShippingService-Create\Development\build\lib
pre.compile.test:
[echo] Stax Availability= true
[echo] Axis2 Availability= true
compile.src:
[javac] Compiling 4 source files to C:\EWSSample\ShippingService-Create\Development\build\classes
[javac] C:\EWSSample\ShippingService-Create\Development\src\pws\client\ShippingService\ShippingServiceStub.java:34: error: incompatible types: java.lang.String cannot be converted to pws.client.ShippingService.ShippingServiceStub.String
[javac] return Long.toString(System.currentTimeMillis()) + "_" + counter;
[javac] ^
[javac] Note: C:\EWSSample\ShippingService-Create\Development\src\pws\client\ShippingService\ShippingServiceStub.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
BUILD FAILED
C:\EWSSample\ShippingService-Create\Development\build.xml:43: Compile failed; see the compiler error output for details.
Total time: 4 seconds
In case you see this error, update C:\EWSSample\ShippingService-Create\Development\src\pws\client\ShippingService\ShippingServiceStub.java by changing method signature of getUniqueSuffix to
private static synchronized java.lang.String getUniqueSuffix(){
6. Navigate to the C:\EWSSample\ShippingService-Create\Development\src\ directory and compile the client code by running the following
a) javac pws\client\ShippingService\ShipmentClientCreate.java
Possible Error 1: 'javac' is not recognized as an internal or external command, operable program or batch file.
Resolution 1: You need to add the Java path to the PATH Environment Variable. %JAVA_HOME%\bin. Refer to Installation and Environment Notes file for additional information.
Possible Error 2: package org.apache.axis2 does not exist throws org.apache.axis2.AxisFault
Resolution 2: Classpath variable needs to be set. Refer to Installation and Environment Notes file for additional information.
Response Received:
C:\EWSSample\ShippingService-Create\Development\src>javac pws\client\ShippingService\ShipmentClientCreate.java
Note: .\pws\client\ShippingService\ShippingServiceStub.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7. Running the code after valid compile above.
a) C:\EWSSample\ShippingService-Create\Development\src>java pws.client.ShippingService.ShipmentClientCreate
Possible Error 1:
WARNING:
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.AxisService).
log4j:WARN Please initialize the log4j system properly.
Resolution 1: http://logging.apache.org/log4j/1.2/manual.html. Refer to Installation and Environment Notes file for additional information.
Possible Error 2:
[main] INFO org.apache.axis2.transport.http.HTTPSender - Unable to sendViaPost to url[https://devwebservices.purolator.com/EWS/V2/Shipping/ShippingService.asmx]
org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized
Resolution 2: Make sure you are using your Development key and Password when connecting to the devwebservices instance.
Possible Error 3:
[main] INFO org.apache.commons.httpclient.HttpMethodDirector - No credentials available for BASIC 'Purolator'#devwebservices.purolator.com:
Resolution 3:
Make sure code has import procedures:
import org.apache.axis2.client.Options;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.transport.http.HttpTransportProperties;
Try the alternate way to send in credentials to web service. Make sure you remark the other credentials that you tried.
Options options = stub._getServiceClient().getOptions();
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
auth.setUsername("your key here");
auth.setPassword("your password here");
options.setProperty(HTTPConstants.AUTHENTICATE,auth);
Response Received:
Here are the setup instructions (only available for Windows XP):
Applications to Install:
Java SE Development Kit (JDK 6 Update 16)
AXIS2 from Apache
Ant from Apache
This example covers the creation of a proper SOAP Client to communicate with the Shipping Web Services. The solution file was built on a Windows XP system using the Java Development Kit and AXIS2.
Installation Instructions for the Environment:
1. Download and install the Java Development Kit
a) In this document Java SE Development Kit 6 Update 16 was downloaded an installed
b) Location: http://java.sun.com/javase/downloads/index.jsp
c) run jdk-6u16-windows-i586.exe (Extracts Installation files)
d) Installed to C:\Program Files\Java\jdk1.6.0_16
2. Download and unpack AXIS 2 Standard Binary Distribution version 1.4.1
a) Location: http://ws.apache.org/axis2/download/1_4_1/download.cgi
b) Unzip to directory (C:\AXIS2\axis2-1.4.1)
Make sure you add JAVA_HOME environment variable pointing to your Java engine root folder (C:\Program Files\Java\jdk1.6.0_16).
This can be completed by right clicking My Computer. Select Properties. Select Advanced, select Environment variables. Select 'New' of JAVA_HOME is not listed under System Variables.
In our example C:\Program Files\Java\jdk1.6.0_16
Make sure you add AXIS2_HOME environment variable pointing to your Axis engine root folder (C:\AXIS2\axis2-1.4.1).
This can be completed by right clicking My Computer. Select Properties. Select Advanced, select Environment variables. Select 'New' of AXIS_HOME is not listed under System Variables.
In our example C:\AXIS2\axis2-1.4.1
Use the online tutorial from Apache for non Java programmers.
Note: Java sample code uses web service client stubs created with Wsdl2Java utility from Apache Axis2 Web services engine.
3. Download and unpack Apache Ant (1.7.1)
a) Location: http://ant.apache.org/bindownload.cgi
b) Unzip to directory (C:\Ant\apache-ant-1.7.1)
Note: Apache Ant is a Java-based build tool.
4. Set the Classpath for the jar files that are included in the AXIS directory.
a) run the following from command line
set classpath=C:\AXIS2\axis2-1.4.1\lib\activation-1.1.jar;
C:\AXIS2\axis2-1.4.1\lib\annogen-0.1.0.jar;
C:\AXIS2\axis2-1.4.1\lib\axiom-api-1.2.7.jar;
C:\AXIS2\axis2-1.4.1\lib\axiom-dom-1.2.7.jar;
C:\AXIS2\axis2-1.4.1\lib\axiom-impl-1.2.7.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-adb-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-adb-codegen-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-ant-plugin-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-clustering-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-codegen-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-corba-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-fastinfoset-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-java2wsdl-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-jaxbri-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-jaxws-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-jaxws-api-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-jibx-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-json-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-jws-api-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-kernel-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-metadata-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-mtompolicy-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-saaj-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-saaj-api-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-spring-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\axis2-xmlbeans-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\backport-util-concurrent-3.1.jar;
C:\AXIS2\axis2-1.4.1\lib\commons-codec-1.3.jar;
C:\AXIS2\axis2-1.4.1\lib\commons-fileupload-1.2.jar;
C:\AXIS2\axis2-1.4.1\lib\commons-httpclient-3.1.jar;
C:\AXIS2\axis2-1.4.1\lib\commons-io-1.4.jar;
C:\AXIS2\axis2-1.4.1\lib\commons-logging-1.1.1.jar;
C:\AXIS2\axis2-1.4.1\lib\geronimo-annotation_1.0_spec-1.1.jar;
C:\AXIS2\axis2-1.4.1\lib\geronimo-stax-api_1.0_spec-1.0.1.jar;
C:\AXIS2\axis2-1.4.1\lib\httpcore-4.0-beta1.jar;
C:\AXIS2\axis2-1.4.1\lib\httpcore-nio-4.0-beta1.jar;
C:\AXIS2\axis2-1.4.1\lib\jalopy-1.5rc3.jar;
C:\AXIS2\axis2-1.4.1\lib\jaxb-api-2.1.jar;
C:\AXIS2\axis2-1.4.1\lib\jaxb-impl-2.1.6.jar;
C:\AXIS2\axis2-1.4.1\lib\jaxb-xjc-2.1.6.jar;
C:\AXIS2\axis2-1.4.1\lib\jaxen-1.1.1.jar;
C:\AXIS2\axis2-1.4.1\lib\jettison-1.0-RC2.jar;
C:\AXIS2\axis2-1.4.1\lib\jibx-bind-1.1.5.jar;
C:\AXIS2\axis2-1.4.1\lib\jibx-run-1.1.5.jar;
C:\AXIS2\axis2-1.4.1\lib\log4j-1.2.15.jar;
C:\AXIS2\axis2-1.4.1\lib\mail-1.4.jar;
C:\AXIS2\axis2-1.4.1\lib\mex-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\neethi-2.0.4.jar;
C:\AXIS2\axis2-1.4.1\lib\soapmonitor-1.4.1.jar;
C:\AXIS2\axis2-1.4.1\lib\woden-api-1.0M8.jar;
C:\AXIS2\axis2-1.4.1\lib\woden-impl-dom-1.0M8.jar;
C:\AXIS2\axis2-1.4.1\lib\wsdl4j-1.6.2.jar;
C:\AXIS2\axis2-1.4.1\lib\wstx-asl-3.2.4.jar;
C:\AXIS2\axis2-1.4.1\lib\xalan-2.7.0.jar;
C:\AXIS2\axis2-1.4.1\lib\xercesImpl-2.8.1.jar;
C:\AXIS2\axis2-1.4.1\lib\xml-apis-1.3.04.jar;
C:\AXIS2\axis2-1.4.1\lib\xml-resolver-1.2.jar;
C:\AXIS2\axis2-1.4.1\lib\xmlbeans-2.3.0.jar;
C:\AXIS2\axis2-1.4.1\lib\XmlSchema-1.4.2.jar;
5. Set up the file log4j.properties which displays additional information when running code in command line.
a) Location of Information: http://logging.apache.org/log4j/1.2/manual.html
b) Create File named: 'log4j.properties' in C:\EWSSample\ShippingService-Create\Development\src directory with the following information.
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Please assist. Cheers!
New to cloud foundry, using the java buildpack to push a zip distribution of a java app. It detects the start script correctly, but when the start script gets to the point where it needs to start up the jvm, I get this error:
bash: java: command not found
Apparently 'java' is not on the shell's path during execution of the script, and I'm not finding a JAVA_HOME definition anywhere.
What is the path to use for starting java apps?
Where is it documented?
FALSE ALARM
Many thanks to #DanielMikusa for pointing out that JAVA_HOME is indeed set, even in the pretty old version of the buildpack that was in use. Nothing to see here.
EDIT #1
I've been able to find out that when the start script launches there is a jre located in $PWD/.buildpack-java/oracle_jre. But, this can't be what I'm expected to use to specify for the path of JAVA_HOME, can it? It seems like this location is entirely dependent on the java buildpack's current implementation. It seems like either the jre's bin folder should be in the start script's process' path or that there should be an environment variable or other configuration established prior to running the launch script so I can use that value for finding the java executable.
EDIT #2
Below is the output during the cf push operation:
PS E:\dev\hoobajoob\myproject\build\distributions> cf push -p .\my-service-1.0.0.zip my-service
Using manifest file E:\dev\hoobajoob\myproject\build\distributions\manifest.yml
Creating app my-service in org DEV / space dev as chefhoobajoob#github.com...
OK
Creating route my-service.cflab.dctmlabs.com...
OK
Binding my-service.cflab.dctmlabs.com to my-service...
OK
Uploading my-service...
Uploading app files from: C:\Users\hoobajoob\AppData\Local\Temp\unzipped-app384867239
Uploading 9.7M, 9390 files
Done uploading
OK
Starting app my-service in org DEV / space dev as chefhoobajoob#github.com...
Downloading oracle_buildpack_151...
Downloading binary_buildpack...
Downloading go_buildpack...
Downloading python_buildpack...
Downloading java-buildpack-offline-v3-19-2...
Downloaded java-buildpack-offline-v3-19-2
Downloading java-buildpack-offline-4-7...
...<more downloads>
Creating container
Successfully created container
Downloading app package...
Downloaded app package (53.1M)
Staging...
-----> Java Buildpack Version: v3.5.1 (offline) | https://github.com/cloudfoundry/java-buildpack.git#3abc3db
-----> Downloading Oracle JRE 1.8.0_112 from http://127.0.0.1/oracle-jre/trusty/x86_64/jre-8u112-linux-x64.tar.gz (found
in cache)
Expanding Oracle JRE to .java-buildpack/oracle_jre (2.3s)
-----> Downloading Open JDK Like Memory Calculator 2.0.1_RELEASE from https://download.run.pivotal.io/memory-calculator/
trusty/x86_64/memory-calculator-2.0.1_RELEASE.tar.gz (found in cache)
Memory Settings: -Xms2304M -XX:MetaspaceSize=314572K -Xss1M -Xmx2304M -XX:MaxMetaspaceSize=314572K
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from https://download.run.pivotal.io/auto-reconfiguration/
auto-reconfiguration-1.10.0_RELEASE.jar (found in cache)
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading droplet...
Uploading build artifacts cache...
Uploaded build artifacts cache (108B)
Uploaded droplet (120.5M)
Uploading complete
Destroying container
Successfully destroyed container
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
OK
App my-service was started using this command `CALCULATED_MEMORY=$($PWD/.java-buildpack/oracle_jre/bin/java-buildpack-memory-calculator-2.0.1_RELEASE -memorySizes=metaspace:64m.. -memoryWeights=heap:75,metaspace:10,native:10,stack:5 -memoryInitials=heap:100%,metaspace:100% -totMemory=$MEMORY_LIMIT) && JAVA_HOME=$PWD/.java-buildpack/oracle_jre JAVA_OPTS="-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/oracle_jre/bin/killjava.sh $CALCULATED_MEMORY" exec $PWD/my-service-1.0.0/bin/launch`
Writing up the comments above in case someone else comes across this question.
We reviewed the full output of staging and the start up command generated by the Java buildpack.
We could see from the start command generated by the Java buildpack that it is the start commands responsibility to set JAVA_HOME.
If you rely on the Java buildpack to create the start command for your dist-zip style applications, it will "do the right thing" and add the JAVA_HOME environment variable with the correct path to the start command.
If you need to create a custom start command, it is your responsibility to set JAVA_HOME correctly.
If you cf ssh into an application started by the Java buildpack, it is your responsibility to set JAVA_HOME.
When i run as java application, i got this error. i included build.xml to build and generating apk file from java application.
[taskdef] Could not load definitions from resource anttasks.properties. It could not be found.
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-check-env:
BUILD FAILED
C:\Android_workspace\apktest\build.xml:246: Problem: failed to create task or type checkenv
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
Total time: 0 seconds
Check my answer here {How to generate apk file programmatically through java code}
i think your problem here that you need to update the build.xml file by running this command:
android update project --name <project_name> --target <target_ID> --path <path_to_your_project>
I am following
Red5 Media Server - Workspace Setup Guide - r4737!
I am able to build Red5 distribution and rename distribution jar files i.e completed upto step 6.But when I followed step 7 - Run inside of eclipse failed to debug it as java application -
Red5 root: /home/yuvraj/Documents/RED5/red5 java code all/java/server/trunk
Configuation root: /home/yuvraj/Documents/RED5/red5 java code all/java/server/trunk/conf
Red5 server jar was not found, using fallback.
URL list: [file:/home/yuvraj/Documents/RED5/red5%20java%20code%20all/java/server/trunk/red5.jar]
Bootstrap exception: null
Bootstrap exit
java.lang.NullPointerException
at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:172)
at org.red5.classloading.ClassLoaderBuilder.build(ClassLoaderBuilder.java:96)
at org.red5.server.Bootstrap.bootStrap(Bootstrap.java:117)
at org.red5.server.Bootstrap.main(Bootstrap.java:48)
I couldn't find conf directory neither in /home/yuvraj/Documents/RED5/red5 java code all/java/server/trunk/ nor in /Red5_server/bin while setting classpath in java debug.
If you followed step by step the guide, you are probably using the 1.0.2 RC4.
Try this now:
Extract the red5-server-1.0.2-RC4.zip from the target folder to a custom folder
(I have it in c:\red5-server-1.0.2-RC4 )
Copy red5.jar and bootstrap.jar in the place you extracted red5. (In my case c:\red5-server-1.0.2-RC4\ )
Repeat the step 7 in the Guide and be carefull at point L.
conf directory is in \red5-server-1.0.2-RC4\
From the output you've shown, I'd assume you're missing the lib directory and its contents. This wiki link should help: https://code.google.com/p/red5/wiki/ServerWontStart#Bootstrap_exception