i've uploaded my complete app to https://github.com/JensKapitza/sciserver
the error is diffrent: Exception in thread "main" java.lang.NullPointerException at de.bluepair.sci.FileManager.lambda$onFile$15(FileManager.java:110) 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:497) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78) at org.jboss.weld.injection.MethodInvocationStrategy$DefaultMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:109) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:306) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:272) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:262) at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:271) at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:260) at org.jboss.weld.event.EventImpl.fire(EventImpl.java:89) at main.DatabaseMain.main(DatabaseMain.java:54)
changed the line 110 to: long test = files.stream().filter(f -> f.getFilePath().equals(file.getFilePath())).count();
to repoduce Step1: clone repo Step2: cd code/client Step3: mvn install Step4: cd ../database Step5: change line (add above lambda to) code/database/src/main/java/de/bluepair/sci/FileManager.java
Step6: modify startupclass: code/database/src/main/java/main/DatabaseMain.java
{code:java}
public static void main(String[] args) throws InterruptedException, IOException, JMSException, Exception {
PropertyLoader.loadProperties(true,"database.properties",args);
Weld weld = new Weld(); WeldContainer container = weld.initialize();
// Database Starten EmbeddedDatabase database = new EmbeddedDatabase("embeddedDatabase"); database.start(); ApplicationStart start = new ApplicationStart(container);
container.event().fire(start); File fx = new File(); fx.setSha("babab"); fx.setFilePath("dsfgsdfgsdfg"); container.event().fire(fx);
} {code}
|