java9: IllegalArgumentException using jlink - java-9

Im exploring java9 and Im tring to create a custom jre following this link.
But Im getting IllegalArgumentException.Below is my folder structure after compilation .
out
|->moduleA
| |->module-info.java
| |->pkg1
| |->Test.class
|
|->java.base.jmod
Im able to run my program with default jre.But when I tried creating custom jre using the following command :jlink --module-path out --add-modules moduleA,java.base --output customjre
I get Error: java.lang.IllegalArgumentException
Im not sure what Im missing.Any help will be really useful.

Related

Error when opening GeoMondrian schema file and using MDX query in GeoMondrian Workbench

I'm having trouble using the GeoMondrian Workbench on my Ubuntu 18.04 LTS system. I've followed the installation instructions and have installed the following:
Oracle Java 8
PostgreSQL 9.5
PostGIS 2.5
I've downloaded the GeoMondrian Workbench and the "simple_geofoodmart.sql" file, created a database, and passed the necessary parameters to the workbench.
However, when I try to open the "simple_geofoodmart.xml" schema file, I get the following error:
Error: Schema file /home/tarik/workbench/demo/simple_geofoodmart.xml is invalid. org/opengis/referencing/NoSuchAuthorityCodeException java.lang.NoClassDefFoundError: org/opengis/referencing/NoSuchAuthorityCodeException
Additionally, when I try to use an MDX query, I get the following error:
"Exception in thread 'AWT-EventQueue-0' java.lang.NoClassDefFoundError: Could not initialize class mondrian.olap.fun.GlobalFunTable at mondrian.rolap.RolapSchema$RolapSchemaFunctionTable.defineFunctions(RolapSchema.java:1643)"
I've tried to resolve all the dependencies and have made sure that I have the necessary JAR files in my classpath, but I'm still getting the same errors. Can anyone help me figure out what's going wrong and how to fix it? Thank you!

Facing issue to Build and deploy backbase custom authenticator

I am working on backbase identity version 2022-08-LTS. Trying to use custom authenticator using link but when i execute the command java -cp ../custom-authenticator/target/custom-authenticator-2022.08-LTS-jar-with-dependencies.jar:backbase-identity-1.10.6.1-cr.0.jar io.quarkus.runner.GeneratedMain from backbase-identity module then got error Error: Could not find or load main class io.quarkus.runner.GeneratedMain Caused by: java.lang.ClassNotFoundException: io.quarkus.runner.GeneratedMain can any one help me on it

Job failed for Integration in GitLab (jq: error (at <stdin>:9): Cannot iterate over null (null))

I am working in GitLab and I connect my GitLab with salesforce. I created a Gitlab-ci.yml in my project directory. Now when I execute the pipeline in GitLab testing phase pass but failed in integration part at following code PACKAGE_VERSION_JSON="$(eval sfdx force:package:version:list --concise --released --packages $PACKAGE_NAME --json | jq '.result | sort_by(-.MajorVersion, -.MinorVersion, -.PatchVersion, -.BuildNumber) | .[0]? // ""')"
Can anyone tell me how can I resolve this issue. ?
Please make sure that you have generated package in the same org,which you are using for git lab authentication.

Apache beam WordCount running error in windows

Trying to run WordCount example of Apache Beam (version 2.0.0) by first running
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.beam \
-DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
-DarchetypeVersion=2.0.0 \
-DgroupId=org.example \
-DartifactId=word-count-beam \
-Dversion="0.1" \
-Dpackage=org.apache.beam.examples \
-DinteractiveMode=false
then running
$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount -Dexec.args="--inputFile=pom.xml --output=counts" -Pdirect-runner
and getting the following error
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project word-count-beam: An exception occured while executing the
Java class. null: InvocationTargetException: java.lang.IllegalStateException: U
nable to find registrar for d -> [Help 1]
However, if I run the same project downloaded and built in Mar 2017 (Beam v0.6.0), everything works fine. I just wonder what update of the Beam release causes this error.
This error happens due to TextIO#from("path_to_file") method doesn't support Windows file system paths.
For example the following code throws IllegalStateException:
TextIO.read().from("d:\\file.txt") // also "file:\\D:\\file.txt" throw exc
Exception in thread "main"
org.apache.beam.sdk.Pipeline$PipelineExecutionException:
java.lang.IllegalStateException: Unable to find registrar for d
I hope that Apache Beam team will fix it in near future...
This error seems to indicate you are trying to access a file with invalid scheme.
It comes from here: FileSystems.java
It may be an issue with your OS.
Can you provide information about your OS and dev environment?
EDIT:
Since you're using Windows as you say and as MeetJoeBlack explains - my first assumption was probably correct.
I suggest you try to run the code via Docker using this Maven Docker Image
You can read the howto in there - If you need more help just ping me.

JBoss Fuse: java.lang.IllegalStateException: Resource has no uri for installed bundle

I'm working on JBossFuse 6.2, have a CXF endpoint for which I needed to setup some special properties through httpj:engine-factory configuration block. Upon trying that I hited this issue
MapMetadataImpl not found by org.apache.cxf.cxf-rt-transports-http-jetty
The error was the following
> ERROR | pool-43-thread-1 | BlueprintContainerImpl | 14 -
> org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint
> container for bundle test-ws java.lang.NoClassDefFoundError:
> org/apache/aries/blueprint/reflect/MapMetadataImpl at
> org.apache.cxf.transport.http_jetty.blueprint.JettyServerEngineFactoryParser.parseEngineConnector(JettyServerEngineFactoryParser.java:110)
> at
> org.apache.cxf.transport.http_jetty.blueprint.JettyServerEngineFactoryParser.parse(JettyServerEngineFactoryParser.java:83)
It appeared when trying to add the httpj block for CXF definition.
<httpj:engine-factory bus="cxf">
<httpj:engine port="${port}" host="${host}">
<httpj:threadingParameters minThreads="${minThreads}" maxThreads="${maxThreads}"/>
</httpj:engine>
</httpj:engine-factory>
I tried the solution provided, in the referred posts that is installing the osgi bundle for Blueprint Core Compatibility.
osgi:install mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0
However, after installing the bundle upon container start I get the following exception:
2016-06-22 11:01:13,279 | ERROR | 63859-1-thread-1 | DeploymentAgent | ?? | 83 - io.fabric8.fabric-agent - 1.2.0.redhat-133 | Unable to update agent
java.lang.IllegalStateException: Resource has no uri
at io.fabric8.agent.service.Deployer.getBundleInputStream(Deployer.java:1354)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at io.fabric8.agent.service.Deployer.deploy(Deployer.java:714)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at io.fabric8.agent.service.Agent.provision(Agent.java:348)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at io.fabric8.agent.service.Agent.provision(Agent.java:194)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:642)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:256)[83:io.fabric8.fabric-agent:1.2.0.redhat-133]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_80]
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_80]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_80]
Has anybody ever applied the proposed solution in JbossFuse? I don't event understand that much why that exception is being fired.
Thanks in advanced!
I anybody falls into this, I got an answer from someone at Red Hat. The problem I was having is that I was on a Fabric environment, so I had to add the OSGi Blueprint Core Compatibility bundle to the Karaf profile in the Fabric. It can be done from the karaf console by running the following command
profile-edit --bundles mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0 karaf 1.x
Where 1.x is current fabric version in use.
If you are NOT on a fabric environment, then the solution posted above should work just as is.
Hope this helps!

Resources