Jetty.project: Jetty on Arm7 platform

Created on 23 May 2016  路  8Comments  路  Source: eclipse/jetty.project

Hi I am trying to use jetty jar for authentication. I have a device which uses arm7 architecture. However, when I am trying to use jetty I get the following exception :

Defaulting Uptime to NOIMPL due to (java.lang.UnsupportedOperationException) Implementation not available in this environment

Enhancement

All 8 comments

Stack trace ?

Also need the type and version of your jvm. Version of jetty would also be good to know.

Your version of Java on the ARM7 machine is not a full implementation of Java. Is it a compact profile of java perchance?

The code that performs the Uptime check is here ...

https://github.com/eclipse/jetty.project/blob/jetty-9.3.8.v20160314/jetty-util/src/main/java/org/eclipse/jetty/util/Uptime.java#L43-L74

Basically, your JVM is missing many of the JMX classes, or has different ones from default.

Try this call on a simple java class in your environment and let us know if you get results

java.lang.management.ManagementFactory.getRuntimeMXBean().getUptime()

Hi apologies for delay in reply. I will give a little baackground to where I am using Jetty project. I am using jetty project to contact a server which uses HTTP2 protocol requests for communication. These HTTP2 requests have to be carried throught ALPN which is implemented through Jetty.

@sbordet -> The stack trace only seems to be this. I dont seem to get more trace than this.
@gregw -> I am actually using cvm. Its another version of jvm used in our device.

cvm -version
java version "1.8.0_06-ea"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_06-ea-b00, profile compact1, headless)
Java HotSpot(TM) Embedded Minimal VM (build 25.6-b00, mixed mode)

Although our device does not use jvm, cvm works pretty much like jvm.
About the jetty version -> I will list the jars that I am using in my application.

jetty-alpn-client-9.3.7.v20160115.jar  jetty-http-9.3.7.v20160115.jar         jetty-security-9.3.7.v20160115.jar     jetty-servlet-9.3.7.v20160115.jar
jetty-client-9.3.7.v20160115.jar       jetty-io-9.3.7.v20160115.jar           jetty-server-9.3.7.v20160115.jar       jetty-util-9.3.7.v20160115.jar

I can guess, that the version is 9.3.7. Please correct me if I am wrong.

@joakime -> As you rightly pointed, cvm (version of java on my device) is a compact version of java. As you suggested I tried running the method in a java class on my device, however I am getting a NoClassdefexception for java.lang.management.ManagementFactory. It turns out the cvm implementation does not have class file in the rt.jar. I tried adding the jar to the classpath externally(by downloading another instance of rt.jar). However, I am getting another exception
Exception in thread "main" java.lang.SecurityException: Prohibited package name: java.lang.management.

@joakime @sbordet @gregw . I really appreciate your help and thank you for the same. Please let me know if any more clarification is needed on any part.

@gaurav-lagad a few points.

In order to use HTTP2 you need a valid ALPN library to enable the TLS/Encyption requirements for HTTP2.
The jetty project maintains an alpn-boot.jar that modifies core OpenJDK classes to enable this functionality (via the -Xbootclasspath JVM command line).

This alpn-boot.jar is highly JVM specific.

See http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html#alpn-versions

We do not have an alpn-boot.jar suitable for CVM, you'll have to fork our alpn-boot and create one specific for your CVM.

If you are using a Java 8 compact 3 profile, you should probably not use the full blown Jetty artifacts, as those are not suitable in restricted classlib environments.

However, not all is lost, our build has a compact3 profile option to build a uber-jar of Jetty components that are suitable for a Java 8 compact3 enviornment. If you are interested in this, you'll have to build your own version of jetty from source.

$ git clone https://github.com/eclipse/jetty.project.git
$ cd jetty.project
$ git checkout jetty-9.3.9.v20160517
$ mvn -Pcompact3 clean install -Dmaven.test.skip=true
$ ls aggregates/jetty-all-compact3 

Hi @joakime. So, I have seen alpn jar is specific to JVM. You have given guidelines to build the alpn for compact3 profile, but my cvm version has compact1 profile. Can you give guidelines how I can build a uber-jar of Jetty components for my compact1 profile or a workaround the same? Thanks

@gaurav-lagad we do not have a compact1 suitable build of Jetty. sorry. If you want to take a stab at making one, fork/clone this project, and submit a pull request for it.

we will not be producing a compact1 build of Jetty. closing.

Was this page helpful?
0 / 5 - 0 ratings