Dienstag, 15. Oktober 2024

Updating Maven SNAPSHOT dependencies in Intellij

 Intellij 2024.2.3 (Ultimate Editon)


Sometimes updating SNAPSHOT dependencies in big projects just does not work. When something is changed in one workspace and a maven clean install is done, it can be  hard to get this in another workspace as updated dependency, at least in my experience.

What worked for me was the Maven Helper Plugin, where you get a "Dependency Analyzer" Tab for the pom file. There is a button "Reimport", which works fine to get the wanted updates for the SNAPSHOT dependencies.





Montag, 24. Juni 2024

Fix error message "Failed to retrieve application JMX service URL" in Intellij

 Intellij: 2024.1.3 (Ultimate Edition)


Just add "-Djava.rmi.server.hostname=localhost" as VM Option to your Run Configuration:





Search for a packaged jar in JFrog

 It always takes me some time in JFrog to find out where specific jars are used, so here a short instruction:


1. Go to Artifacts:




2. Open the filter and choose Type "Archive"

3. Put the name or part of the name of the jar, that usage you want to find out, into the name field:


That's it.



Mittwoch, 25. Oktober 2023

Primefaces dialog stopped working after migration from 11 to 12

JSF 2.1.19 
Primefaces 12.0 

 After migrating Primefaces from 11 to 12 the dialog buttons (yes and no) stopped working, the action in the underlying commandButton was not called anymore. The problem was solved with adding the attribute type="button" to the confirmDialog


Donnerstag, 13. April 2023

Migrate to Spring Boot 3, but stay with jaxws-api 2.3.1

There are good guides (Spring Boot 3.0 Migration Guide) to migrate a Spring Boot 2.7.x project to 3.0.x, but in my case I got some technical debt from jaxws.

The project consumes a lot of different services (soap, rest) where the generated code is capsuled in a little jar. This jars are used by some other projects, so I could not touch them. This means the project has to use jaxws-api 2.3.1.

I got a lot of errors when following the normal migration guides with the jaxb stuff which all could be solved with the proper dependencies.

Dependencies before migration:


     	<dependency>
            <groupid>javax.xml.ws</groupid>
            <artifactid>jaxws-api</artifactid>
        </dependency>
        <dependency>
            <groupid>com.sun.xml.ws</groupid>
            <artifactid>rt</artifactid>
            <version>2.3.2</version>
            <exclusions>
                <!--this is excluded to have fewer log entries on startup-->
                <exclusion>
                    <artifactid>ha-api</artifactid>
                    <groupid>org.glassfish.ha</groupid>
                </exclusion>
            </exclusions>
        </dependency>

After a lot of trail and error I came up with the following solution:

        <dependency>
            <groupId>javax.xml.ws</groupId>
            <artifactId>jaxws-api</artifactId>
            <version>2.3.1</version>
        </dependency>
        <!-- needed for java.lang.ClassNotFoundException: com.sun.xml.bind.api.JAXBRIContext -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
            <version>1.5.3</version>
        </dependency>
        <dependency>
            <groupId>org.jvnet.staxex</groupId>
            <artifactId>stax-ex</artifactId>
            <version>1.8.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>rt</artifactId>
            <version>2.3.1</version>
            <exclusions>
                <!-- this is excluded to have fewer log entries on startup -->
                <exclusion>
                    <artifactId>ha-api</artifactId>
                    <groupId>org.glassfish.ha</groupId>
                </exclusion>
            </exclusions>
        </dependency>