Skip to content

Commit

Permalink
Merge pull request #59 from lodygens/12.2.1-docker-apps
Browse files Browse the repository at this point in the history
12.2.1 docker apps
  • Loading branch information
lodygens committed Jan 8, 2018
2 parents 678ad45 + 4151e7c commit ee717d9
Show file tree
Hide file tree
Showing 29 changed files with 89 additions and 123 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ jdk:
notifications:
- email: false
script:
- pwd
- ls -l
- cd ./build/
- chmod +x travis-ci.sh build.sh
- ./travis-ci.sh
- gradle build install
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ dependencies {
compile "antlr:antlr:2.7.2"// ? https://mvnrepository.com/artifact/antlr/antlr
compile "org.json:json:20160810" // ? https://mvnrepository.com/artifact/org.json/json

compile ('org.web3j:core:3.2.0')

api 'org.apache.commons:commons-math3:3.6.1'

implementation 'com.google.guava:guava:23.0'
Expand Down Expand Up @@ -147,7 +149,7 @@ task copyMiscToDist(type: Copy) {

task mkdirKeystore(type: Exec) {
commandLine("sh", "-c",
"mkdir " + dist + "/keystore"
"mkdir -p " + dist + "/keystore"
)
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=12.0.1
version=12.2.1
Binary file added libXtremWeb/web3j-abi-3.2.0.jar
Binary file not shown.
Binary file added libXtremWeb/web3j-core-3.2.0.jar
Binary file not shown.
Binary file added libXtremWeb/web3j-crypto-3.2.0.jar
Binary file not shown.
Binary file added libXtremWeb/web3j-rlp-3.2.0.jar
Binary file not shown.
Binary file added libXtremWeb/web3j-tuples-3.2.0.jar
Binary file not shown.
Binary file added libXtremWeb/web3j-utils-3.2.0.jar
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/java/xtremweb/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ public CommClient commClient(final URI uri) throws IOException {
}
}

logger.debug("commClients.put(" + uri.getScheme() + ")");
commClients.put(uri.getScheme(), client);

client.setAutoClose(false);
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/xtremweb/common/XWTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -807,19 +807,21 @@ public static final X509Certificate[] retrieveCertificates(final String host, fi

final X509Certificate[] certs = (X509Certificate[]) socket.getSession().getPeerCertificates();
final Logger logger = new Logger("XWTools");
logger.info(host + " : certs retrieved = " + certs.length);
logger.debug(host + " : certs retrieved = " + certs.length);
int i = 0;
for (final X509Certificate cert : certs) {
PrintStream out = System.out;
logger.info("CN = " + cert.getSubjectX500Principal().getName());
logger.info("Issuer CN = " + cert.getIssuerX500Principal().getName());
logger.debug("CN = " + cert.getSubjectX500Principal().getName());
logger.debug("Issuer CN = " + cert.getIssuerX500Principal().getName());
if (sav) {
logger.info("Saving to " + host + "_" + i + ".pem");
logger.debug("Saving to " + host + "_" + i + ".pem");
out = new PrintStream(new File(host + "_" + i++ + ".pem"));
}
out.println("-----BEGIN CERTIFICATE-----");
out.println(new sun.misc.BASE64Encoder().encode(cert.getEncoded()));
out.println("-----END CERTIFICATE-----");
if((sav) || (logger.debug())) {
out.println("-----BEGIN CERTIFICATE-----");
out.println(new sun.misc.BASE64Encoder().encode(cert.getEncoded()));
out.println("-----END CERTIFICATE-----");
}
if (sav) {
out.close();
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/xtremweb/communications/CommClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ protected void mileStone(final String msg) {
* @see xtremweb.communications.URI#URI(String, UID)
*/
public URI newURI(final UID uid) throws URISyntaxException {
logger.finest("CommClient#newURI " + config.getCurrentDispatcher() + ":" + getPort() + "/" + uid);
final URI ret = new URI(config.getCurrentDispatcher(), uid);
logger.finest("CommClient#newURI : " + ret);
return ret;
}

Expand Down Expand Up @@ -325,7 +325,6 @@ public static void changeConfig(final XWConfigurator c) throws IOException {
try {
if (commHandlers.get(Connection.xwScheme()) == null) {
final String defaultLayer = config.getProperty(XWPropertyDefs.COMMLAYER);

addHandler(Connection.xwScheme(), defaultLayer);
}
if (commHandlers.get(Connection.xwsScheme()) == null) {
Expand Down Expand Up @@ -377,6 +376,7 @@ public static CommClient getClient(final String scheme) throws InstantiationExce
throw new InstantiationException("Comm Handlers not initialized");
}
try {
CommClient ret = (CommClient) (Class.forName((String) commHandlers.get(scheme))).newInstance();
return (CommClient) (Class.forName((String) commHandlers.get(scheme))).newInstance();
} catch (final IllegalAccessException e) {
throw new InstantiationException(e.getMessage());
Expand Down
60 changes: 30 additions & 30 deletions src/main/java/xtremweb/communications/XMLRPCCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command version");
try {
Expand All @@ -778,7 +778,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command ping");
try {
Expand All @@ -790,7 +790,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command disconnect");
try {
Expand All @@ -802,7 +802,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getuserby login");
try {
Expand All @@ -814,7 +814,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command get");
try {
Expand All @@ -826,7 +826,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a XMLRPCCommandGetWorkByExternalId");
try {
Expand All @@ -838,7 +838,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command gettask");
try {
Expand All @@ -850,7 +850,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getworks");
try {
Expand All @@ -862,7 +862,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command gethubaddr");
try {
Expand All @@ -874,7 +874,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command send");
try {
Expand All @@ -886,7 +886,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command gettasks");
try {
Expand All @@ -898,7 +898,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command download data");
try {
Expand All @@ -910,7 +910,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getapps");
try {
Expand All @@ -922,7 +922,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getdatas");
try {
Expand All @@ -934,7 +934,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getgroupworks");
try {
Expand All @@ -946,7 +946,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getgroups");
try {
Expand All @@ -958,7 +958,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command gethosts");
try {
Expand All @@ -970,7 +970,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getsessionworks");
try {
Expand All @@ -982,7 +982,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getsessions");
try {
Expand All @@ -994,7 +994,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command activatehost");
try {
Expand All @@ -1006,7 +1006,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command broadcastwork");
try {
Expand All @@ -1018,7 +1018,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getusergroups");
try {
Expand All @@ -1030,7 +1030,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command getusers");
try {
Expand All @@ -1042,7 +1042,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command remove");
try {
Expand All @@ -1054,7 +1054,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command uploaddata");
try {
Expand All @@ -1066,7 +1066,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command chmod");
try {
Expand All @@ -1078,7 +1078,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command workrequest");
try {
Expand All @@ -1090,7 +1090,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command workalive");
try {
Expand All @@ -1102,7 +1102,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}
logger.finest("not a command workalivebyuid");
try {
Expand All @@ -1114,7 +1114,7 @@ public static XMLRPCCommand newCommand(final InputStream in) throws IOException
return ret;
}
} catch (final InvalidKeyException e) {
e.printStackTrace();
logger.exception(e);
}

throw new IOException("Unknown XMLRPCCommand");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public static XMLRPCCommand newCommandSend(final InputStream in) throws IOExcept
}
logger.finest("not a command sendwork");

throw new InvalidKeyException("Unknown XMLRPCCommandSend");
throw new SAXException("Unknown XMLRPCCommandSend");
}

}
2 changes: 1 addition & 1 deletion src/main/resources/docker/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LABEL description="This creates a Docker image for the XWHEP client"

EXPOSE 4327

ENV XWVERSION "12.2.0"
ENV XWVERSION "12.2.1"


RUN apt-get update
Expand Down
Loading

0 comments on commit ee717d9

Please sign in to comment.