IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

API standards et tierces Java Discussion :

filtrage collaboratif sous java en utilisant MLlib de spark


Sujet :

API standards et tierces Java

  1. #1
    Membre actif
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2013
    Messages
    464
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2013
    Messages : 464
    Points : 203
    Points
    203
    Par défaut filtrage collaboratif sous java en utilisant MLlib de spark
    salut les développeurs,
    Je tente de développer un système de recommendation. Pour cela, je veux commencer par l'implémentation du collaborative filltring sous java en utilisant la bobliothèque MLLib de Spark. Je suis sous netbeans 8.0.2 java 8 , spark 2.3.0 et maven 2.5.3 . J'essaye d'executer ce programme mais j'ai cette exception

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
     
     
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
    	at org.apache.spark.SparkConf.loadFromSystemProperties(SparkConf.scala:73)
    	at org.apache.spark.SparkConf.<init>(SparkConf.scala:68)
    	at org.apache.spark.SparkConf.<init>(SparkConf.scala:55)
    	at recommendation.JavaRecommendationExample.main(JavaRecommendationExample.java:21)
    Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStream
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	... 4 more
    Java Result: 1
    les variables d'environnement sont bien définies ainsi que le path !!! quelqu'un aurait une idée sur ce problème

  2. #2
    Nouveau membre du Club Avatar de Runhide
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2017
    Messages
    35
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Somme (Picardie)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2017
    Messages : 35
    Points : 36
    Points
    36
    Par défaut
    Tu as une ClassNotFoundException, cela veut dire que la où il s'apprête à trouver une classe ou une méthode, elle n'y est pas.

    Est ce que tu utilises maven ? Parfois il arrive qu'il prenne en compte une ancienne version de la dépendance, modifie ton pom pour bien renseigné la bonne version de ton archive jar (spark).

    Au besoin, vérifie aussi avec ton ide, la présence de la dite classe et de la méthode incriminé dans ton jar.

    C'est souvent un problème de versioning dans la dépendance ou dans ton classpath.

  3. #3
    Membre actif
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2013
    Messages
    464
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2013
    Messages : 464
    Points : 203
    Points
    203
    Par défaut
    j'étais un peu a coté de la plaque, je créais des projet Java au lieu que des projets maven. mtn sous maven j'ai réglé le pom.xml en rajoutant toutes les dépendances et j'ai ce problème la:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
     
    Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties
    18/08/01 20:54:57 INFO SparkContext: Running Spark version 2.3.0
    18/08/01 20:55:05 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
    18/08/01 20:55:07 ERROR SparkContext: Error initializing SparkContext.
    org.apache.spark.SparkException: A master URL must be set in your configuration
    	at org.apache.spark.SparkContext.<init>(SparkContext.scala:367)
    	at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
    	at JavaRecommendationExample.main(JavaRecommendationExample.java:26)
    18/08/01 20:55:08 ERROR Utils: Uncaught exception in thread main
    java.lang.NullPointerException
    	at org.apache.spark.SparkContext.org$apache$spark$SparkContext$$postApplicationEnd(SparkContext.scala:2382)
    	at org.apache.spark.SparkContext$$anonfun$stop$1.apply$mcV$sp(SparkContext.scala:1897)
    	at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1357)
    	at org.apache.spark.SparkContext.stop(SparkContext.scala:1896)
    	at org.apache.spark.SparkContext.<init>(SparkContext.scala:578)
    	at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
    	at JavaRecommendationExample.main(JavaRecommendationExample.java:26)
    18/08/01 20:55:08 INFO SparkContext: Successfully stopped SparkContext
    Exception in thread "main" org.apache.spark.SparkException: A master URL must be set in your configuration
    	at org.apache.spark.SparkContext.<init>(SparkContext.scala:367)
    	at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
    	at JavaRecommendationExample.main(JavaRecommendationExample.java:26)
    ------------------------------------------------------------------------
    BUILD FAILURE
    ------------------------------------------------------------------------
    Total time: 27.683 s
    Finished at: 2018-08-01T20:55:08+01:00
    ------------------------------------------------------------------------
    Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mavenproject1: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
     
    To see the full stack trace of the errors, re-run Maven with the -e switch.
    Re-run Maven using the -X switch to enable full debug logging.
     
    For more information about the errors and possible solutions, please read the following articles:
    [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    'cmd' n'est pas reconnu en tant que commande interne
    ou externe, un programme ex‚cutable ou un fichier de commandes.
    je n'arrive pas à m'en sortir la!!

  4. #4
    Nouveau membre du Club Avatar de Runhide
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2017
    Messages
    35
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Somme (Picardie)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2017
    Messages : 35
    Points : 36
    Points
    36
    Par défaut
    J'ai lu en diagonale le guide sur le site de ton api:

    Due to licensing issues with runtime proprietary binaries, we do not include netlib-java’s native proxies by default. To configure netlib-java / Breeze to use system optimised binaries, include com.github.fommil.netlib:all:1.1.2 (or build Spark with -Pnetlib-lgpl) as a dependency of your project and read the netlib-java documentation for your platform’s additional installation instructions.

    Cherche de ce côté là

  5. #5
    Membre actif
    Femme Profil pro
    Étudiant
    Inscrit en
    Mai 2013
    Messages
    464
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Algérie

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2013
    Messages : 464
    Points : 203
    Points
    203
    Par défaut
    j'ai ajouté la dépendence , mais sans succés

    toujours la meme exception

Discussions similaires

  1. Reconnaissance vocale et filtrage son sous Java
    Par Projet_Java dans le forum Général Java
    Réponses: 0
    Dernier message: 13/09/2011, 10h47
  2. Utilisation des BFILE Oracle sous java
    Par marti dans le forum JDBC
    Réponses: 12
    Dernier message: 11/01/2008, 16h46
  3. Comment utiliser des sources en fortran90 sous JAVA?
    Par dante66 dans le forum Général Java
    Réponses: 6
    Dernier message: 21/02/2007, 15h25
  4. [Protocole] Utiliser SNMP sous Java !?
    Par condor_01 dans le forum Entrée/Sortie
    Réponses: 12
    Dernier message: 31/07/2006, 12h19
  5. Réponses: 2
    Dernier message: 05/04/2006, 12h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo