GWT Failed to load module - gwt

I am new to Google app engine, and I'm working on a project. I just created an application and when I try to run it, it shows the error:
[ERROR] [ukstudentfeedback] Failed to load module 'ukstudentfeedback' from user agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2' at localhost:51937.
Below is a snap shot of my code:
package com.ukstudentfeedback.client;
import java.io.UnsupportedEncodingException;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
public class Ukstudentfeedback implements EntryPoint{
// ...
public void onModuleLoad()
{
java.lang.System.out.println("I finally worked!");
final Button sendButton;
final TextBox toField, fromField, subjectField, messageField;
sendButton = new Button("Send");
toField = new TextBox();
fromField = new TextBox();
subjectField = new TextBox();
messageField = new TextBox();
sendButton.addStyleName("sendButton");
toField.setText("Testing");
// Add the nameField and sendButton to the RootPanel
// Use RootPanel.get() to get the entire body element
RootPanel.get("sendButton").add(sendButton);
RootPanel.get("To").add(toField);
RootPanel.get("From").add(fromField);
RootPanel.get("Subject").add(subjectField);
RootPanel.get("Message").add(messageField);
// Focus the cursor on the to field when the app loads
toField.setFocus(true);
toField.selectAll();
sendButton.setEnabled(true);
// Create a handler for the sendButton and nameField
class MyHandler implements ClickHandler, KeyUpHandler {
/**
* Fired when the user clicks on the sendButton.
*/
public void onClick(ClickEvent event) {
java.lang.System.out.println("I have been clisked");
sendMessage();
}
#Override
public void onKeyUp(KeyUpEvent event) {
// TODO Auto-generated method stub
}
public void sendMessage()
{
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
/*
* Get all the user's inputs
*/
String to = toField.getText();
String from = fromField.getText();
String subject = subjectField.getText();
String message = messageField.getText();
try
{
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from, "Admin"));
msg.addRecipient(Message.RecipientType.TO,
new InternetAddress(to, "Mr. User"));
msg.setSubject(subject);
msg.setText(message);
Transport.send(msg);
}
catch (AddressException e)
{
// ...
} catch (MessagingException e)
{
// ...
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
// Add a handler to send the name to the server
MyHandler handler = new MyHandler();
sendButton.addClickHandler(handler);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='ukstudentfeedback'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name='com.ukstudentfeedback.Ukstudentfeedback'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.ukstudentfeedback.client.Ukstudentfeedback'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
</module>
Errors:
[DEBUG] [ukstudentfeedback] - Validating newly compiled units
[TRACE] [ukstudentfeedback] - Finding entry point classes
[ERROR] [ukstudentfeedback] - Errors in 'file:/Users/umajosiah/Programming/Java/eclipse/workspace/ukstudentfeedback/src/com/ukstudentfeedback/client/Ukstudentfeedback.java'
[ERROR] [ukstudentfeedback] - Line 8: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 9: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 10: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 11: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 12: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 13: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 14: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 80: Session cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 80: Session cannot be resolved
[ERROR] [ukstudentfeedback] - Line 91: Message cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 91: MimeMessage cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 92: InternetAddress cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 93: Message cannot be resolved
[ERROR] [ukstudentfeedback] - Line 94: InternetAddress cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 97: Transport cannot be resolved
[ERROR] [ukstudentfeedback] - Line 100: AddressException cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Line 103: MessagingException cannot be resolved to a type
[ERROR] [ukstudentfeedback] - Unable to find type 'com.ukstudentfeedback.client.Ukstudentfeedback'
[ERROR] [ukstudentfeedback] - Hint: Previous compiler errors may have made this type unavailable
[ERROR] [ukstudentfeedback] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[ERROR] [ukstudentfeedback] - Failed to load module 'ukstudentfeedback' from user agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2' at localhost:51937

The problem is that you're trying to use unimplemented java classes on the client. The mailing needs to happen from the server, and the server can never pass back anything from the javax.mail classes.
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
None of this is serializable, and none of it can be turned to Javascript, because none of it is implemented by GWT. Read more about this here and here.

You can use only the classes that are emulated by GWT. Package javax.mail is not emulated.
You have to do this on the server.
[ERROR] [ukstudentfeedback] - Line 8: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 9: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 10: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 11: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 12: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 13: The import javax.mail cannot be resolved
[ERROR] [ukstudentfeedback] - Line 14: The import javax.mail cannot be resolved
Pls see link below:
http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html

Related

I am getting initialization error :java.util.NoSuchElementException while running runner file using Junit

java.util.NoSuchElementException
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:970)
at java.base/java.util.Collections.max(Collections.java:713)
at io.cucumber.core.feature.FeatureParser.parseResource(FeatureParser.java:46)
at java.base/java.util.function.BiFunction.lambda$andThen$0(BiFunction.java:70)
at io.cucumber.core.resource.ResourceScanner.lambda$processResource$1(ResourceScanner.java:79)
at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:75)
at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:60)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2810)
at io.cucumber.core.resource.PathScanner.findResourcesForPath(PathScanner.java:53)
at io.cucumber.core.resource.PathScanner.findResourcesForUri(PathScanner.java:31)
at io.cucumber.core.resource.ResourceScanner.findResourcesForUri(ResourceScanner.java:61)
at io.cucumber.core.resource.ResourceScanner.scanForResourcesUri(ResourceScanner.java:134)
at io.cucumber.core.runtime.FeaturePathFeatureSupplier.loadFeatures(FeaturePathFeatureSupplier.java:62)
at io.cucumber.core.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:45)
at io.cucumber.junit.Cucumber.<init>(Cucumber.java:156)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:513)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
I have been doing many workarounds for couple of days but couldn't resolve this issue. Can anyone please help?
Below are the jars I used.
cucumber-core-7.10.1.jar
cucumber-expressions-16.1.1.jar
cucumber-extentsreport-3.1.1.jar
cucumber-gherkin-5.2.0.jar
cucumber-gherkin-messages-7.10.1.jar
cucumber-java-7.10.1.jar
cucumber-junit-7.10.1.jar
cucumber-jvm-deps-1.0.6.jar
cucumber-plugin-7.10.1.jar
cucumber-reporting-5.7.4.jar
datatable-7.10.1.jar
datatable-dependencies-3.0.0.jar
extentreports-3.1.2.jar
extentreports-cucumber7-adapter-1.2.0.jar
gherkin-5.2.0.jar
gherkin-jvm-deps-1.0.6.jar
hamcrest-2.2.jar
hamcrest-core-1.3.jar
junit-4.13.2.jar
selenium-java-4.7.2.jar
selenium-server-4.7.2.jar
tag-expressions-5.0.1.jar
This is my project folder structure
[folder-structure-image][1]
[1]: https://i.stack.imgur.com/abYF2.png
This is my runner file:
package com.qa.myrunner;
import java.io.*;
import org.junit.runner.RunWith;
import com.vimalselvam.cucumber.listener.Reporter;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
#RunWith(Cucumber.class)
#CucumberOptions(features = {"E:/Programming/LearnAutomation/SeleniumCucumberBDDV2/src/main/java/com/qa/features/SelectFlight.feature" },
glue = {"/SeleniumCucumberBDDV2/src/main/java/com/qa/stepDefinitions" },
monochrome = true,
dryRun = false)
public class SuiteRunner {
}

Getting java.lang.Exception: Method xxx should have no parameters with jmockit:1.20, junit:4.12 with JDK11

I am using jmockit:1.20, junit:4.12 with JDK11. Earlier it was workign with Java 8 but now its not.
The test class is:
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import mockit.Deencapsulation;
import mockit.Expectations;
import mockit.Mocked;
import mockit.StrictExpectations;
import mockit.Tested;
import mockit.integration.junit4.JMockit;
#RunWith(JMockit.class)
public class FlywayHelperTest
{
Exception:
java.lang.Exception: Method XXX_catch_throw_UpgradeException should have no parameters
at org.junit.runners.model.FrameworkMethod.validatePublicVoidNoArg(FrameworkMethod.java:76)
at org.junit.runners.ParentRunner.validatePublicVoidNoArgMethods(ParentRunner.java:155)
at org.junit.runners.BlockJUnit4ClassRunner.validateTestMethods(BlockJUnit4ClassRunner.java:208)
at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:188)
at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128)
at org.junit.runners.ParentRunner.validate(ParentRunner.java:416)
at org.junit.runners.ParentRunner.<init>(ParentRunner.java:84)
at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)
at mockit.integration.junit4.JMockit.<init>(JMockit.java:30)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:525)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
I have tried 2 options but still not solved:
1. Jmockit dependency before junit.
2. Added below filter in build.gradle
test {
useJUnitPlatform()
filter {
exclude '**/module-info.class'
}
}
As pointed out by Alan, you can upgrade your jmockit version to the latest release
compile 'org.jmockit:jmockit:1.44'
To be precise jmockit became compatible with JDK9 and modules with release version 1.23.

org.drools.RuntimeDroolsException: invalid package name

I am a new bie to JBPM.
I have created bpmn file with a start ,diverge and two scripts and a converge and endtask.
MY code is
package com.sample;
import java.util.HashMap;
import java.util.Map;
import org.drools.KnowledgeBase;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.ProcessInstance;
public class ProcessTest {
public static void main(String[] args){
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource("sample.bpmn"),
ResourceType.BPMN2 );
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Map<String,Object> params=new HashMap<String,Object>();
params.put("income", 1200);
ProcessInstance processInstance = ksession.startProcess("com.sample.bpmn.hello",params);
}
}
But i am getting the following error
org.drools.RuntimeDroolsException: invalid package name
at org.jbpm.compiler.ProcessBuilderImpl.buildProcess(ProcessBuilderImpl.java:175)
at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:254)
at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:564)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:608)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
at com.sample.ProcessTest.main(ProcessTest.java:23)
[6,13]: [ERR 102] Line 6:13 mismatched input 'income' in rule "RuleFlow- Split-com.sample.bpmn.hello-2-3-DROOLS_DEFAULT"
[13,13]: [ERR 102] Line 13:13 mismatched input 'income' in rule "RuleFlow- Split-com.sample.bpmn.hello-2-4-DROOLS_DEFAULT"
[0,0]: Parser returned a null Package
ProcessLoadError: unable to parse xml : Exception class org.drools.RuntimeDroolsException : invalid package name
Exception in thread "main" java.lang.IllegalArgumentException: Could not parse knowledge.
at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilde rImpl.java:67)
at com.sample.ProcessTest.main(ProcessTest.java:26)
I have given package name com.sample in sample.bpmn
My sample.bpmn file is
Found the solution for this issue. This is related to config change in the Diverge gateway Constraints. For each constraint, try using **Type: code and Dialect: java. Also do not forget to put semicolon ; at the end of the statement in the Textual editor of each constraint. Best way to check this is to open the RF file in a text editor and validate the content.
Something like:
<constraints>
<constraint toNodeId="3" toType="DROOLS_DEFAULT" name="Flight" priority="1" type="code" dialect="java" >return income > 1000;</constraint>
<constraint toNodeId="4" toType="DROOLS_DEFAULT" name="Train" priority="1" type="code" dialect="java" >return income < 1000;</constraint>
</constraints>
Hope this will help.

OSGI Unresolved requirement: Import-Package: com.pi4j.io.gpio

I want to write an OSGI Bundle (Eclipse SmartHome Binding) for the GPIO's of a Raspberry Pi.
For the GPIO's i need to include the Pi4J libraries. I added them into a lib folder in my project folder and added the pi4j-core.jar to my Build Path.
This is my code:
/**
* Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.openhab.binding.statusgpio.handler;
import static org.openhab.binding.statusgpio.StatusGPIOBindingConstants.*;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.eclipse.smarthome.core.library.types.StringType;
import org.eclipse.smarthome.core.thing.ChannelUID;
import org.eclipse.smarthome.core.thing.Thing;
import org.eclipse.smarthome.core.thing.binding.BaseThingHandler;
import org.eclipse.smarthome.core.types.Command;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
import com.pi4j.io.gpio.GpioController;
import com.pi4j.io.gpio.GpioFactory;
import com.pi4j.io.gpio.GpioPinDigitalInput;
import com.pi4j.io.gpio.PinPullResistance;
import com.pi4j.io.gpio.RaspiPin;
import com.pi4j.io.gpio.event.GpioPinDigitalStateChangeEvent;
import com.pi4j.io.gpio.event.GpioPinListenerDigital;
/**
* The {#link StatusGPIOHandler} is responsible for handling commands, which are
* sent to one of the channels.
*
* #author Arjuna W. - Initial contribution
*/
public class StatusGPIOHandler extends BaseThingHandler {
ScheduledFuture<?> refreshJob;
public StatusGPIOHandler(Thing thing) {
super(thing);
}
#Override
public void initialize() {
// TODO Auto-generated method stub
super.initialize();
startAutomaticRefresh();
}
#Override
public void handleCommand(ChannelUID channelUID, Command command) {
// TODO Auto-generated method stub
// do nothing ;)
}
private void startAutomaticRefresh() {
final GpioController gpio = GpioFactory.getInstance();
// provision gpio pin #02 as an input pin with its internal pull down
// resistor enabled
final GpioPinDigitalInput myButton = gpio.provisionDigitalInputPin(
RaspiPin.GPIO_02, PinPullResistance.PULL_DOWN);
// create and register gpio pin listener
myButton.addListener(new GpioPinListenerDigital() {
#Override
public void handleGpioPinDigitalStateChangeEvent(
GpioPinDigitalStateChangeEvent event) {
// display pin state on console
updateState(new ChannelUID(getThing().getUID(), CHANNEL_LOADING_STATE), new StringType(event.getState().toString()));
}
});
try {
for (;;) {
Thread.sleep(1000);
}
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
The Class has no problem to find the Pi4J imports and export to a jar is also no problem. Only if I run it directly in the Eclipse OpenHab_runtime I geht the Error:
!Validation:
The following Problems were detected:
org.openhab.binding.statusgpio
Missing Constraint: Import-Package: com.pi4j.io.gpio; version="0.0.0"
When I start the OSGI Bundle on my Raspberry Pi (and on my Win PC) I get the message:
start 92
gogo: BundleException: Could not resolve module: org.openhab.binding.statusgpio [92]
Unresolved requirement: Import-Package: com.pi4j.io.gpio
I think I have to do something more with the Bundle to let OSGI find the Pi4J Libs???
Thanks for Help.
I found my own mistake:
I thought I hat to add "com.pi4j.io.gpio" to the includes in the Manifest file, but I don't want to import it from other OSGI Bundles, I want to import it from an alteady imported JAR. So I just had to delete this line and everything worked.
Edit:
I found the answer here: https://github.com/ECF/RaspberryPI/tree/master/bundles/com.pi4j
This is my manifest.mf:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: OutputGPIO Binding
Bundle-SymbolicName: org.openhab.binding.outputgpio;singleton:=true
Bundle-Vendor: openHAB
Bundle-Version: 2.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: lib/pi4j-core.jar,
lib/pi4j-device.jar,
lib/pi4j-gpio-extension.jar,
lib/pi4j-service.jar,
.
Import-Package: com.google.common.collect,
org.eclipse.smarthome.config.core,
org.eclipse.smarthome.config.discovery,
org.eclipse.smarthome.core.library.types,
org.eclipse.smarthome.core.thing,
org.eclipse.smarthome.core.thing.binding,
org.eclipse.smarthome.core.types,
org.slf4j
Service-Component: OSGI-INF/*
Export-Package: org.openhab.binding.outputgpio,
org.openhab.binding.outputgpio.handler

What library are HtmlUnitDriver & WebDriver part of?

Using below code (taken from http://www.scalatest.org/user_guide/using_selenium)
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.selenium.WebBrowser
import org.scalatest.FlatSpec
class BlogSpec extends FlatSpec with ShouldMatchers with WebBrowser {
implicit val webDriver: WebDriver = new HtmlUnitDriver
"The blog app home page" should "have the correct title" in {
go to (host + "index.html")
title should be ("Awesome Blog")
}
}
I receive the errors
Multiple markers at this line
- not found: type HtmlUnitDriver
- not found: type WebDriver
Are the HtmlUnitDriver & WebDriver libraries not part of the scalatest installation, where can I import them from ?
I just needed the Selenium dependency (http://seleniumhq.org/download/maven.html) :
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.24.1</version>
</dependency>