Spring circular dependencies only on linux build - java

I have a problem with a spring boot app (1.4.1) and I have no clue what is happen:
The app failed to start due to a "circular dependency" error, but this only happens, when I package the app on our CI server (Ubuntu).
We tried following stuff so far:
Running via IntelliJ and Maven on Windows is working
Running package on the Windows machine and then execute the war is working on Windows and Linux.
Running package on the Linux CI machine and then execute the war is not working on windows and not on Linux.
tried all profiles and there is no difference - so this does not affect anything
same versions of JDK and Maven on CI and Windows machine
Similar problems only say that running on windows works, but not on linux, which (mostly) happens, because the ordering of "resolve and list resource-files" is system-dependent and therefore the ordering of dependency loading is different.
But this would indicate that the packaged version from the CI-system should run on Windows (or the packages version from windows should not run on linux). But it does not!
Since we have no other ideas: what can we investigate?

Related

Is there a way to make Windows-like paths accessible from Linux?

Recently I've installed Kali Linux 2020.1b for Windows C: partition as a second OS, because as I know kali-rolling repo has a lot of packages, unlike Ubuntu, Debian, ... repos. Windows 10 and Kali Linux can be loaded from the Grub now, and I got a problem when I tried to open my Eclipse IDE (Eclipse Java Photon) Workspace from NTFS partition D:. I got many errors, eclipse can't find build path jars, because they are located at D:\...\spigot-1.15.2\spigot-api-....jar. I don't want to change build path every time, when I boot to another OS. How to make Windows-like paths (like C:\ProgramData\... or D:\Java\EPModule\...) accessible from Linux? I mean exactly such paths, not their alternatives like /media/(my username)/(partition id or label)/(my files here)/.

Can't run service builder (liferay 6.2)

I'm running Eclipse Neon (tried with Mars too) and Liferay 6.2
I try to run the service builder but:
If I run with java 8 (unsupported, I know), it says it requires a 1.6 compliant JVM. Correct.
If I run with java 7, it says "Unsupported major.minor version 52.0". That's my nightmare.
Yes, I've cleaned everything before. In fact, I created a brand new project, in an Eclipse with only jre7 installed, pointing all to jre7 (compiler, facets...)
Eclipse is running over jre8, but can't run on jre7 because some of the plugins requires jre8. Anyway, some days ago it do worked in this Eclipse, so it's not the problem.
Service Builder might pull code from more than your Eclipse project setup - e.g. from the running Liferay installation that the plugin sdk points to.
I've not heard of a com.aspr.seu package in Liferay - is that your own, or unknown to you as well?
If service builder ran in the past (e.g. with Java 8), it created a yourprojectname-service.jar - that might be one that is pulled into the build process and that you might not have cleaned yet. You definitely have a class that was built with Java 8 on the classpath, you'll just need to find it. It might help to know that servicebuilder is executed through an Ant task outside of Eclipse, thus it might not be enough to search through all of the files that Eclipse has configured on its classpath, but rather on what's configured for the Plugins-SDK

IntelliJ IDEA + Vagrant: compile and run in VM environment

I have to use a Java library that has a lot of bugs on Mac OS X and I can't stop using it. I set up a VM (Ubuntu 13) and set up my development environment there, and that works. But is it possible to be able to keep developing on Mac and set-up IntelliJ IDEA 13.1 to compile -> run my project in a Vagrant environment? I could not find any tutorials with how to do that, and not even sure if that's possible.
you can continue working on mac/intelliJ to edit and compile your project files, to run it, it will depend what you are using.
To synchronize the files between your os and the vm, you should set up a vagrant sync the folder between the 2 machines.
Lets say you run your project on mac under /Users/name/project/myproject this project is setup on intelliJ so you can run from intelliJ and compile from there. add this to your Vagrantfile
config.vm.synced_folder "/Users/name/project/myproject", "/project"
It will create a /project directory in your vm.
To run your project, it really depends on your running configuration. For example you can configure a Tomcat remote Run configuration in IntelliJ so if you configure your vm information, it can manage your remote Tomcat installed on your vm. Synchronize your project folder with your Tomcat Webapps (sync_folder or symlink) and it should work.

Setting the JVM to use with Ant when using the command line

I have to build a project using Ant from the command line. It is an EAR to be deployed on weblogic 8.1 and as such the classpath is set on the correct jrockit, shipped with the 8.1 server. However, the tool keeps using the jre7 (also installed on my machine), going as far as not even starting if i uninstall the jre7 and leading to problems such as "Cannot find class Object", and so on.
Before running ant, I run the %WEBLOGIC_HOME%/server/bin/setWLSenv.cmd file in the same console session. Both %WEBLOGIC_HOME% and %JAVA_HOME% are correctly set. The jre7, as far as I know, is not referenced in any environment variable nor in any of the build files. I am not permitted to modify the build.xml file, also I can't use Eclipse or any other GUI to build the project.
So, how can I persuade ant to use the correct JVM?

Eclipse, java and dotCMS logging issue

I've been assigned the task of tracking down why a webpage is breaking under dotCMS. The page shows an error stack trace with a description that suggests it relates to SQL. I got access to the remote file system and was able to pull up the java file. The sql it is generating is failing when passed to a getResults method. I was wanting to see the value of that string of sql.
Maybe I could create a text file with that value through java. The previous programmer (that left the business) told me that I would need to shut down the server, clean plugins, deploy plugins and re-start the server so the source could be recompiled into jar files. I don't know how to do any of that at this point...and I wonder if those measures should only be taken when I'm deploying the fix.
I know Eclipse has logging abilities because I've dabbled with Android. I didn't know if there is a way that I could somehow remotely connect to the file. I found a tutorial for setting up eclipse with dotcms. It however wants me to check out the official dotcms source to my machine. I guess I don't understand how remote connections work with eclipse and if eclipse could even help with this issue. Noob question for sure!
When you want to run dotCMS from within eclipse it is not that hard. Remember that dotCMS is just tomcat with a default host deployed in it (the dotCMS application). You can download the dotCMS source here: http://dotcms.com/downloads/index.dot. Startup eclipse and add a tomcat server ( It is tomcat 6.0.26 at this moment), pointing the tomcat folder to the tomcat directory in the dotCMS install folder. You can start tomcat from eclipse this way.
You will have to deploy the plugins if you need to debug those. Below I describe it in detail, but dotCMS has a page on this on their official site as well: http://dotcms.com/plugins/plugin-faq.dot#HowInstall
Make sure you have access to the server that dotCMS is deployed on. On windows that would mean a remote desktop, and on linux you'll need ssh. If you have it running in eclipse on your local system then of course you're set already.
After logging in on the server make sure you have apache ant installed on your system. You can check if you have it by typing "ant -version" on the command line (in a dos box on windows). If you have it installed you'll see something like this:
Apache Ant version 1.8.0 compiled on March 11 2010
if you don't have it installed you can download it here: http://ant.apache.org/bindownload.cgi
install ant and make sure you put the /bin folder on the PATH, so you will be able to call ant from all directories
Now check if you have a JAVA jdk installed. You will need a jdk and not only a jre, because building the plugins includes compiling java files into classes. You can check if you have the jdk installed by typing "javac" on the command line. If you don't have it, install the latest java jdk from here : http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html
install the jdk and make sure the /bin folder os on the PATH
Now stop dotCMS
Go to the root of the dotCMS folder and undeploy the plugins using this command:
ant undeploy-plugins
Now build the plugins
ant build-plugins.
And finally deploy them
ant deploy-plugins
Your plugins are redeployed now. You can restart dotCMS.

Categories

Resources