maven-glassfish-plugin can't get maven-metadata.xml - java

I have used this plugin for one year.But several days ago,it stopped when tried to get some metadata.xml files from ocean.net.au.
Downloading: http://maven.ocean.net.au/release/org/apache/maven/maven-plugin-api/maven-metadata.xml
Downloading: http://maven.ocean.net.au/snapshot/org/apache/maven/maven-plugin-api/maven-metadata.xml
Downloading: http://maven.ocean.net.au/external/org/apache/maven/maven-plugin-api/maven-metadata.xml
Why this plugin needs to get these metadata.xml files every time?
It seems the ocean.net.au site is down,did you run into the same problem?I am in China,we have GFW.
Can I let this plugin don't download metadata.xml files each time?
Thanks.

I decided to use the command line to do this. It's easy.
Start domain1 in debug mode:
asadmin start-domain --debug=true domain1
Deploy an application:
mvn clean install
asadmin --host=localhost --port=4848 --passwordfile=$GLASSFISH_HOME/glassfish_password --echo=true --interactive=false deploy --force=true --name=jsf2 --contextroot=kaimei ./target/kaimei.war

I had the same issue and I set the domain to resolve to a running apache. So I had not to wait for the timeout. I used my local domain but I do have by default an apache running. So you might need to change it to an IP of an always up service (for example, google company website, ..)
On (most) linux (and mac?) it's in
/etc/hosts (need to be root).
On windows
Windows 95/98/Me: c:\windows\hosts
Windows NT/2000/XP Pro: c:\winnt\system32\drivers\etc\hosts
Windows XP Home: c:\windows\system32\drivers\etc\hosts
Windows Vista: c:\windows\system32\drivers\etc\hosts
You execute a ping for finding the ip (ex: google')
lucs#worf:~$ ping www.google.com
PING www.l.google.com (173.194.65.147) 56(84) bytes of data.
You can add flowing line in your host-file (ex: google').
173.194.65.147 maven.ocean.net.au

Related

Connecting JMSToolbox to JMS app on OpenLiberty

I am trying to connect JMSToolbox to an app that is driven by JMS queues running on OpenLiberty.
I am using Open liberty version 22. Specifically 22.0.0.11-202210101601
As far as I can tell, the correct documentation to follow is https://github.com/jmstoolbox/jmstoolbox/wiki/2.2-Setup-for-IBM-LibertyProfile
The installed features I have on the Open Liberty server from the documentation are as follows:
restConnector-2.0 (note restConnector-1.0 as specified in the
documentation does not seem to be available)
appSecurity-2.0
wasJmsClient-2.0
wasJmsServer-1.0
Note I was not able to install restConnector-1.0 from the documentation as I could only find restConnector-2.0.
For the extra jars, I was only able to find restConnector.jar
I could not find the other jars specified in the documentation:
com.ibm.ws.ejb.thinclient_x.y.z.jar (from <was_full_home>/runtimes)
com.ibm.ws.orb_x.y.z.jar (from <was_full_home>/runtimes)
com.ibm.ws.sib.client.thin.jms_x.y.z.jar (from
<was_full_home>/runtimes) (tested with x.z.y ==8.5.5.0+, 9.0.0.0)
Where do I get these jars from? I'm not sure what WAS Full Home means. Am I supposed to take them from a copy of WAS? Are these Jars proprietary?
Thanks,
John
"WAS full" refers to "traditional" WebSphere Application Server. You can download it following this page https://www.ibm.com/cloud/blog/websphere-trial-options-and-downloads
WAS full home is shorthand for WAS installation directory, typically /IBM/WebSphere/AppServer.
These jars are included in the /runtimes subdirectory after you installed the product.
So typical approach following above page would be:
download InstallationManager
install InstallationManager
install developers version either v9 (http://www.ibm.com/software/repositorymanager/com.ibm.websphere.ILAN.v90) or v8.5.5 (https://www.ibm.com/software/repositorymanager/com.ibm.websphere.DEVELOPERSILAN.v85)
copy required jars from the installation directory
... but that would take a while...
So alternatively you could (if you have docker), which should be much faster than whole mumbo-jumbo with installation:
pull WAS v8.5 or v9 version from here https://hub.docker.com/r/ibmcom/websphere-traditional
start container: docker run --name was-server -p 9043:9043 -p 9443:9443 -d ibmcom/websphere-traditional
locate required files:
$ cd opt/IBM/WebSphere/AppServer/runtimes/
$ ls -la
total 343540
com.ibm.jaxrs1.1.thinclient_9.0.jar
com.ibm.jaxrs2.0.thinclient_9.0.jar
com.ibm.jaxws.thinclient_9.0.jar
com.ibm.ws.admin.client.forJython21_9.0.jar
com.ibm.ws.admin.client_9.0.jar
com.ibm.ws.ejb.embeddableContainer_9.0.jar
com.ibm.ws.ejb.embeddableContainer_nls_9.0.jar
com.ibm.ws.ejb.portable_9.0.jar
com.ibm.ws.ejb.thinclient_9.0.jar
com.ibm.ws.jpa-2.0.thinclient_9.0.jar
com.ibm.ws.jpa-2.1.thinclient_9.0.jar
com.ibm.ws.messagingClient.jar
com.ibm.ws.orb_9.0.jar
com.ibm.ws.sib.client.thin.jms_9.0.jar
com.ibm.ws.sib.client_ExpeditorDRE_9.0.jar
com.ibm.ws.webservices.thinclient_9.0.jar
com.ibm.xml.thinclient_9.0.jar
endorsed
properties
sibc.jmsra.rar
sibc.nls.zip
copy required files from the container:
docker cp <containerID>:/opt/IBM/WebSphere/AppServer/runtimes/xyz.jar .

Unable to create directory path [/User/Desktop/db2/logs] for Neo4j store

I am trying to use a tool that, in two steps, analyzes code smells for android.
In the first step, the tool parses an apk and generates within a directory .db files that should then be converted to CSV files in the next step; however, whenever I try to run the second step, the console returns the following error:
java.io.IOException: Unable to create directory path [/User/Desktop/db2/logs] for Neo4j store.
I think it is a Neo4J configuration problem.
I am currently running the tool with the following Java configuration:
echo $JAVA_HOME
/home/User/openlogic-openjdk-11.0.15
update-alternatives --config java
* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
To be safe, I also started Neo4J, which returned the following output
sudo systemctl status neo4j.service
neo4j.service - Neo4j Graph Database
Loaded: loaded (/lib/systemd/system/neo4j.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-07-06 20:11:04 CEST; 16min ago
Main PID: 1040 (java)
Tasks: 57 (limit: 18901)
Memory: 705.4M
CPU: 16.639s
CGroup: /system.slice/neo4j.service
└─1040 /usr/bin/java -cp "/var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/*" -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExper>.
How can I solve this?
You posted this error:
java.io.IOException: Unable to create directory path [/User/Desktop/db2/logs] for Neo4j store.
From that error, it looks like:
Neo4j was installed at "/User/Desktop/db2"
The permissions for that directory do not have "write" permission
I tried to reproduce this locally using Neo4j Community 4.4.5, following the steps below.
I do see an IOException related to "logs", but it's slightly different from what you posted. Perhaps we're on different versions of Neo4j.
Open terminal into install directory: cd neo4j
Verify "neo4j" is stopped: ./bin/neo4j stop
Rename existing "logs" directory: mv logs logs.save
Remove write permission for the Neo4j install: chmod u-w .
Start neo4j in console mode: ./bin/neo4j console
Observe errors in console output
2022-07-08 03:28:38.081+0000 INFO Starting...
ERROR StatusLogger Unable to create file [****************************]/neo4j/logs/debug.log
java.io.IOException: Could not create directory [****************************]/neo4j/logs
...
To fix things, try:
Get a terminal into your Neo4j directory:
cd /User/Desktop/db2
Set write permissions for the entire directory tree:
chmod u+w -R .
Start neo4j in console mode:
./bin/neo4j console
If this works and you're able to run neo4j fine, it points to an issue with user permissions when running neo4j as a system service.
The best steps from there depend on the system, your access, how comfortable you are making changes, probably other things. An easy, brute-force hammer would be to manually create each directory you discover (such as "/User/Desktop/db2/logs") and grant premissions to all users (chmod ugo+w .), then try re-running the service, see what errors pop up. Repeat that until you're able to run the service without errors.

Jenkins "Failed to install JDK" Exit code=-1

(Adding this here as I did not find an answer anywhere)
I configured Jenkins to automatically install JDK from the "Global Tools Configuration" > "JDK Installation" menu. The option works across all 14 nodes (various Windows and Linux) but one.
A server Windows Server 2012 R2 (amd64) with 20 executors, which has been running without issue for just under 3 years.
The log file references in the build's console (i.e. ...tools\hudson.model.JDK\install1873722508778839961log) is empty.
The build's console shows the following:
[EnvInject] - Loading node environment variables. Installing
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
[Oracle_Java_8.0_191] $
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L
E:\Jenkins_APA_8080\tools\hudson.model.JDK\install1873722508778839961log
Failed to install JDK. Exit code=-1 ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:137)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:235)
at
org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:51)
at
hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:542)
at
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:462)
at hudson.model.Run.execute(Run.java:1810) at
hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at
hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429) Caused by:
hudson.AbortException at
hudson.tools.JDKInstaller.install(JDKInstaller.java:292) at
hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:157)
at
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
at
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at
hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at hudson.model.JDK.forNode(JDK.java:148) at
org.jenkinsci.plugins.envinject.util.RunHelper.getJDKVariables(RunHelper.java:111)
at
org.jenkinsci.plugins.envinject.util.RunHelper.getBuildVariables(RunHelper.java:135)
... 8 more
I logged onto the server as a local admin and attempted to run the JDK installation line shown in the build console:
E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191\jdk.exe
/s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress
INSTALLDIR=E:\Jenkins_APA_8080\tools\hudson.model.JDK\Oracle_Java_8.0_191
/L E:\Jenkins_APA_8080\tools\hudson.model.JDK
The installation seemed to run and this time the log file contained text. I double checked the owner and permissions on the Jenkins folders and they were owned by a local admin and not a domain admin (this is normal for our Jenkins installation).
However, the login credentials of the Jenkins service on this machine were set to a domain admin (not local admin).
Changing the Jenkins Services Log On credentials resolved the issue. Even though this node has been running for over a couple years without issue, its credentials were not correct.

java 8 with Glassfish 4.1 Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available

I create a simple java web service project in intellij idea and configured the glassfish 4.1 server. and just run the application. output window shows the following messages
C:\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
[2015-06-10 01:35:00,667] Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
server is running fine. but webservice is not deployed. can anyone help me.
I use java 8. intellij 14, glassfish 4.1 and windows 8.1
I followed following posts, but none of these are helps me.
post one , post two , post 03, post 04
I spend last two day to find an answer, please help me.
Check your Facets and your Artifacts are all right. Facets must have web deployment description and Web Resource description, the absolute path is all right.
Check the Artifact output directory, make directories:
WEB-INF/class/{your compile output},
the resource directory for example web app directory content.
I think the IntelliJ use ant as it's deployment tools, then you can image how it work, just denote the path the project need

Unable to clone/push/pull a project on Git Bash

I previously worked on a project in Ruby on Rails using Vagrant as development environment. After I finished the project, I started to work in a project in Java, but when i try to clone the project into my workspace, i'm getting this error on Git Bash console:
git clone git#git.address.com:mari/project.git
Cloning into 'project'
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in 'initialize': No route to host - connect(2) (Errno::EHOSUNREACH)
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in 'open'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in 'block in connect'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:55:in 'timeout'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:100:in 'timeout'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in 'connect'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in 'do_start'
from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in 'start'
from /opt/git/gitlab-shell/lib/gitlab_net.rb:56:in 'get'
from /opt/git/gitlab-shell/lib/gitlab_net.rb:17:in 'allowed?'
from /opt/git/gitlab-shell/lib/gitlab_net.rb:51:in 'validate_access'
from /opt/git/gitlab-shell/lib/gitlab_net.rb:21:in 'exec'
from /opt/git/gitlab-shell/lib/gitlab_net.rb:16:in '<main>'
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
NOTE: I've tried this solution (Change the URI (URL) for a remote Git repository) and didn't work. Any idea what might be happening?
EDIT: I'm using Windows, but the VM used on Vagrant is Linux.
Try adding the protocol to the beginning of the remote url:
ssh://git#git.address.com/mari/project.git
Also don't use a : to seperate path and uri, but use a / instead.
Of course, you can use another protocol as ssh.
try git remote url like this
http://<username>#git.address.com/<path>.git

Categories

Resources