swsnu / bdcsfall2014

0 stars 0 forks source link

problem for executing BroadcastREEF example #18

Open puppybit opened 10 years ago

puppybit commented 10 years ago

I am refered the source codes of BroadcastREEF. But my algorithms code wasn't able to be executed ! So in order to find problem, I try to execute BroadcastREEF.example But that example has same errors.

ps. I want to run that example on my local machine. Do I have something to do ?

Errror message is as follows

Exception in thread "main" com.microsoft.tang.exceptions.InjectionException: Cannot inject com.microsoft.reef.examples.n ggroup.bgd.parameters.ModelDimensions: Integer ModelDimensions is not bound. at com.microsoft.tang.implementation.java.InjectorImpl.injectFromPlan(InjectorImpl.java:550) at com.microsoft.tang.implementation.java.InjectorImpl.getInstance(InjectorImpl.java:469) at com.microsoft.tang.implementation.java.InjectorImpl.getNamedInstance(InjectorImpl.java:500) at com.microsoft.reef.examples.nggroup.broadcast.BroadcastREEF.storeCommandLineArgs(BroadcastREEF.java:83) at com.microsoft.reef.examples.nggroup.broadcast.BroadcastREEF.main(BroadcastREEF.java:142)

This is a part of my pom.xml

    <profile>
        <id>GroupComm</id>
        <build>
            <defaultGoal>exec:exec</defaultGoal>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <configuration>
                        <executable>java</executable>
                        <arguments>
                            <argument>-classpath</argument>
                            <classpath/>
                            <!--<argument>-Djava.util.logging.config.class=com.microsoft.reef.util.logging.Config</argument>-->
                            <!--<argument>-Dcom.microsoft.reef.runtime.local.folder=${project.build.directory}</argument>-->
                            <argument>com.microsoft.reef.examples.nggroup.broadcast.BroadcastREEF</argument>
                        </arguments>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

PS. If I execute this exampe by using command line, error message is different !!!

for example

java -cp .\target\shimoga-0.1-SNAPSHOT.jar com.microsoft.reef.examples.nggroup.broadcast.BroadcastREEF

then

Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/tang/formats/Param at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.getMainMethod(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.microsoft.tang.formats.Param at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 6 more

kr8534 commented 10 years ago

I've met same problem yesterday and, I solved (or hacked..) it by modifying ModelDimension.java. I simply added default_value on it :) (Originally, it may need some modification on comman line parser..? )

kr8534 commented 10 years ago

In case of modifying ModelDimension.java, you may also need to add default_value on "NumberOfReceivers.java"

puppybit commented 10 years ago

thanks @kr8534 I try !!!!