Comments (5)
If I add the external libraries (which can be found in the libs folder), I get the error:
Exception in thread "main" java.lang.NoSuchMethodError: org.numenta.nupic.Parameters.set(Lorg/numenta/nupic/Parameters$KEY;Ljava/lang/Object;)V
at Intro2.NetworkDemoHarness.getParameters(NetworkDemoHarness.java:211)
at Intro2.NetworkAPIDemo.createMultiLayerNetwork(NetworkAPIDemo.java:105)
at Intro2.NetworkAPIDemo.<init>(NetworkAPIDemo.java:62)
at Intro2.NetworkAPIDemo.main(NetworkAPIDemo.java:242)
from htm.java-examples.
POM.xml:
<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>HTM.Intro</groupId>
<artifactId>HTM.Intro</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.numenta</groupId>
<artifactId>htm.java</artifactId>
<version>0.6.12</version>
</dependency>
</dependencies>
</project>
I am using Ubuntu 16.04 with Java:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
from htm.java-examples.
mvn clean install
is successful with two warnings and 1 error:
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[ERROR] error reading /home/szi/.m2/repository/algorithmfoundry/algorithmfoundry-shade-culled/1.3/algorithmfoundry-shade-culled-1.3.jar; invalid LOC header (bad signature)
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
from htm.java-examples.
Running:
mvn -e exec:java -Dexec.mainClass="/home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java"
Gives the error:
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HTM.Intro 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ HTM.Intro ---
[WARNING]
java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.990 s
[INFO] Finished at: 2017-05-23T12:03:37+02:00
[INFO] Final Memory: 12M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project HTM.Intro: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured while executing the Java class. /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:339)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.ClassNotFoundException: /home/szi/Documents/Eclipse/Java/HTM/src/main/java/Intro2/NetworkAPIDemo.java
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:270)
at java.lang.Thread.run(Thread.java:748)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
from htm.java-examples.
Problem solved!
If anyone encountered the same problem, you should add the library algorithmfoundry-shade-culled-1.3.jar to your project .
from htm.java-examples.
Related Issues (14)
- Initial checkin
- Sync Demos with v0.6.2-alpha HOT 1
- Fix examples that use wrong TM output
- Build fails running hotgym.NetworkAPIDemoTest
- Add original 15-minute Hotgym data (enhancement)
- Exception in thread "main" java.lang.UnsupportedClassVersionError HOT 2
- build failed HOT 1
- Sync demos with HTM.Java v0.6.12-alpha
- Examples need their tests moved into this repo
- Wrong Version of cortical-twitterutils in Maven
- Need to Create README.md for this repo HOT 1
- Need to add change log to repo
- BreakingNewsDemo: Joda time throws IllegalArgumentException with different locale set. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htm.java-examples.