bennidi / mbassador

Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
MIT License
955 stars 146 forks source link

Method `addPublicationErrorHandler` not found on `BusConfiguration` class in 1.2.1. #121

Closed basil-bourque closed 9 years ago

basil-bourque commented 9 years ago

Good: The method BusConfiguration::addPublicationErrorHandler method is found in the source code on GitHub. Perhaps that is the unreleased 1.2.2 code?

Bad: That method is not found by NetBeans 8.0.2 on Java 8 Update 51 when using a dependency of 1.2.1. I have no other problems with MBassador except this one method. Commenting out that one method calls makes the compiler happy.

Example app:

package space.dawg.mavenprojectbogus;

import net.engio.mbassy.bus.MBassador;
import net.engio.mbassy.bus.common.Properties;
import net.engio.mbassy.bus.config.BusConfiguration;
import net.engio.mbassy.bus.config.Feature;

public class Main
{

    public static void main ( String[] args ) {
        System.out.println( "BASIL - sRunning main method of Bogus." );

        MBassador globalBus = new MBassador( new BusConfiguration()
                .addFeature( Feature.SyncPubSub.Default() )
                .addFeature( Feature.AsynchronousHandlerInvocation.Default() )
                .addFeature( Feature.AsynchronousMessageDispatch.Default() )
                .addPublicationErrorHandler( null )
                .setProperty( Properties.Common.Id , "global bus" )
        );

    }

}

…with this pom.xml…

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>space.dawg</groupId>
    <artifactId>mavenprojectBogus</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <groupId>net.engio</groupId>
            <artifactId>mbassador</artifactId>
            <version>1.2.1</version>
        </dependency>
    </dependencies>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
    </properties>
</project>

…reports this compiler error…

cannot find symbol
  symbol:   method addPublicationErrorHandler(<null>)
  location: interface IBusConfiguration

Passing null is not the issue. Code-completion of the addPublicationErrorHandler method fails, as the compiler cannot identify any such method.

nikoliazekter commented 9 years ago

Yes, it doesn't exist in version 1.2.1.

bennidi commented 9 years ago

@basil-bourque Sorry for not getting back to your reported issue. I don't have much time to dedicate to this project currently. The issue you reported is due to a refactoring where methods have been moved around. Apparently I have not done a particularly good job in keeping documentation up-to-date (it is difficult with multiple versions where small api changes still occur). I will make a 1.2.2 release soon. Until then you have to use the method located in the message bus interface.

@nikoliazekter I think there is a certain politeness and patience that is lacking in your comment. Pronouncing a project dead is a pretty harsh statement to make. Especially when there have been commits in the recent months. Leave your frustration somewhere else or even better pick up the task of fixing an issue by providing a PR (because this is what OSS is about, aka it's not enterprise class software given away for free).

nikoliazekter commented 9 years ago

@bennidi I'm sorry but I didn't see any progress for 2 months so I thought you abandoned it. I'm using mbassador in my current game and it works well however documentation is bad. Also I've tried to fix the issue yesterday but IntelliJ IDEA told me that the version of Gradle used by project is outdated and failed to open it.

davidsowerby commented 9 years ago

@nikoliazekter Perhaps you could contribute to the documentation?

How are you executing Gradle?

nikoliazekter commented 9 years ago

@davidsowerby exactly like here https://www.jetbrains.com/idea/help/importing-project-from-gradle-model.html

davidsowerby commented 9 years ago

What is the error message you are getting? In IDEA | Settings | Gradle what do you have selected? What version of Gradle do you have installed?

nikoliazekter commented 9 years ago

Screenshots:

default 1

I should have chosen "Use customizable gradle wrapper". Now it opens.

davidsowerby commented 9 years ago

Out of interest I tried using the setup you showed here (I use the same version of IDEA) - and got the same error. I think that the Gradle folder you pointed to is just for a plugin, and does not contain a bin folder.

It seems you have fixed the problem now, but for projects which do not contain a wrapper you could Download and install Gradle and update the 'Gradle home' settings shown above.

bennidi commented 9 years ago

Fixed in 1.2.3