firebase_auth #nonnull error cannot find symbol - flutter

I'm getting this error with flutter and firebase_auth plugin for flutter
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:576: error: cannot find symbol
public void onComplete(#NonNull Task<ProviderQueryResult> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.ProvidersCompleteListener
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:175: error: cannot find symbol
public void onComplete(#NonNull Task<AuthResult> task) {
^
symbol: class NonNull
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:270: error: cannot find symbol
public void onAuthStateChanged(#NonNull FirebaseAuth firebaseAuth) {
^
symbol: class NonNull
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:435: error: cannot find symbol
public void onComplete(#NonNull Task<GetTokenResult> task) {
^
symbol: class NonNull
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:487: error: cannot find symbol
public void onAuthStateChanged(#NonNull FirebaseAuth firebaseAuth) {
^
symbol: class NonNull
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.6.2+1\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
8 errors
FAILURE: Build failed with an exception.
Is this a version problem? or what could it be

Related

How to resolve this error on java with selenium?

//Eclipse java code:
package openbrowser;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class OpenChrome {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "d://chromedriver.exe");
WebDriver driver=new ChromeDriver();
}
}
eclipse error
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\Om Murugaa\Downloads\Testing\selenium-server-standalone-3.141.59.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.eclipse.jetty.http.Http1FieldPreEncoder not in module
Adding maven into eclipse resolved this error.

Hibernate and Eclipse error

I'm creating a simple web application with a register form, and I have used Hibernate. But i have this kind of error:
this is the code:
AddUser.java
import java.io.IOException;
import javax.imageio.spi.ServiceRegistry;
import javax.security.auth.login.Configuration;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
#WebServlet("/CreateUser.do")
public class AddUser extends HttpServlet {
private static final long serialVersionUID = 1L;
public AddUser() {
super();
// TODO Auto-generated constructor stub
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
Configuration config = new Configuration().configure("hibernate.cfg.xml");
ServiceRegistry servReg = new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
SessionFactory factory = config.buildSessionFactory(servReg);
Session session = factory.openSession();
session.beginTransaction();
User u = new User(request.getParameter("firstname"), request.getParameter("lastname"), request.getParameter("login"), request.getParameter("password"));
session.save(u);
session.getTransaction().commit();
session.close();
RequestDispatcher view = request.getRequestDispatcher("useradd.jsp");
view.forward(request, response);
}
}
This is the error: ERROR
How can I do to solve this problem? Thanks you!
#LuisMuñoz
I add also the error if someone want to see it directly.
HTTP Status 500 – Internal Server Error
Type Exception Report
Message Servlet execution threw an exception
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.Error: Unresolved compilation problems:
Cannot instantiate the type Configuration
The method configure() is undefined for the type Configuration
The method getProperties() is undefined for the type Configuration
The method buildSessionFactory(ServiceRegistry) is undefined for the type Configuration
AddUser.doPost(AddUser.java:32)
javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in the server logs.
My Eclipse Page:
ECLIPSE
From the error it looks like there is no method configure for Configuration object. Check the javadocs https://docs.oracle.com/javase/9/docs/api/index.html?javax/security/auth/login/Configuration.html

eclipse JCDE: error in running java card project

I have followed exact instructions from the link eclipse-jcde, and now I have all JCDE features in my eclipse (I'm using eclipse ver 4.3.1). I made a new java card project and added new applet file to it, but when I try to run the project it shows below error:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/String
and this is my (empty!) code:
package myPackage;
import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.ISOException;
public class MyApplet extends Applet {
private MyApplet() {
}
public static void install(byte bArray[], short bOffset, byte bLength)
throws ISOException {
new MyApplet().register();
}
public void process(APDU arg0) throws ISOException {
// TODO Auto-generated method stub
}
}
what should I do?

GWT Incubator PagingScrollTable compile error

I'm trying to implement this example: http://zenoconsulting.wikidot.com/blog:17 in my gwt app but when i try to compile the project i have this error :
Compiling module com.myapp.security.GwtSpringSecurityProject
Validating newly compiled units
Ignored 2 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Scanning for additional dependencies: jar:file:/C:/_work/Eclipse/MyApp/war/WEB-INF/lib/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/table/client/AbstractScrollTable.java
Computing all possible rebind results for 'com.google.gwt.gen2.table.client.AbstractScrollTable.Impl'
Rebinding com.google.gwt.gen2.table.client.AbstractScrollTable.Impl
Could not find an exact match rule. Using 'closest' rule <replace-with class='com.google.gwt.gen2.table.client.AbstractScrollTable.ImplIE6'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
Scanning for additional dependencies: jar:file:/C:/_work/Eclipse/MyApp/war/WEB-INF/lib/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/table/client/FixedWidthTableImpl.java
Computing all possible rebind results for 'com.google.gwt.gen2.table.client.FixedWidthTableImpl.Impl'
Rebinding com.google.gwt.gen2.table.client.FixedWidthTableImpl.Impl
Could not find an exact match rule. Using 'closest' rule <replace-with class='com.google.gwt.gen2.table.client.FixedWidthTableImpl.ImplIE8'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
[ERROR] An internal compiler exception occurred
com.google.gwt.dev.jjs.InternalCompilerException: Failed to get JNode
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:140)
at com.google.gwt.dev.jjs.impl.TypeMap.internalGet(TypeMap.java:242)
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:138)
at com.google.gwt.dev.jjs.impl.TypeMap.get(TypeMap.java:71)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processExpression(GenerateJavaAST.java:1144)
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:577)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:603)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatement(GenerateJavaAST.java:1771)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:577)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessStatement(GenerateJavaAST.java:638)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatements(GenerateJavaAST.java:1846)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processMethod(GenerateJavaAST.java:1513)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processType(GenerateJavaAST.java:501)
at com.google.gwt.dev.jjs.impl.GenerateJavaAST.exec(GenerateJavaAST.java:2958)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:608)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:284)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:233)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:145)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[ERROR] <no source info>: public abstract class java.text.DateFormat
extends java.text.Format
/* fields */
protected [unresolved] Unresolved type java.util.Calendar calendar
protected [unresolved] Unresolved type java.text.NumberFormat numberFormat
public static final [unresolved] int ERA_FIELD
public static final [unresolved] int YEAR_FIELD
public static final [unresolved] int MONTH_FIELD
public static final [unresolved] int DATE_FIELD
public static final [unresolved] int HOUR_OF_DAY1_FIELD
public static final [unresolved] int HOUR_OF_DAY0_FIELD
public static final [unresolved] int MINUTE_FIELD
public static final [unresolved] int SECOND_FIELD
public static final [unresolved] int MILLISECOND_FIELD
public static final [unresolved] int DAY_OF_WEEK_FIELD
public static final [unresolved] int DAY_OF_YEAR_FIELD
public static final [unresolved] int DAY_OF_WEEK_IN_MONTH_FIELD
public static final [unresolved] int WEEK_OF_YEAR_FIELD
public static final [unresolved] int WEEK_OF_MONTH_FIELD
public static final [unresolved] int AM_PM_FIELD
public static final [unresolved] int HOUR1_FIELD
public static final [unresolved] int HOUR0_FIELD
public static final [unresolved] int TIMEZONE_FIELD
private static final [unresolved] long serialVersionUID
public static final [unresolved] int FULL
public static final [unresolved] int LONG
public static final [unresolved] int MEDIUM
public static final [unresolved] int SHORT
public static final [unresolved] int DEFAULT
/* methods */
[unresolved] protected void <init>()
[unresolved] public java.lang.Object clone()
[unresolved] public boolean equals(java.lang.Object)
public final java.lang.String format(java.util.Date)
public final java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
public abstract java.lang.StringBuffer format(java.util.Date, java.lang.StringBuffer, java.text.FieldPosition)
[unresolved] private static java.text.DateFormat get(int, int, int, Unresolved type java.util.Locale)
[unresolved] public static Unresolved type java.util.Locale[] getAvailableLocales()
[unresolved] public Unresolved type java.util.Calendar getCalendar()
[unresolved] public static final java.text.DateFormat getDateInstance()
[unresolved] public static final java.text.DateFormat getDateInstance(int)
[unresolved] public static final java.text.DateFormat getDateInstance(int, Unresolved type java.util.Locale)
[unresolved] public static final java.text.DateFormat getDateTimeInstance()
[unresolved] public static final java.text.DateFormat getDateTimeInstance(int, int)
[unresolved] public static final java.text.DateFormat getDateTimeInstance(int, int, Unresolved type java.util.Locale)
[unresolved] public static final java.text.DateFormat getInstance()
[unresolved] public Unresolved type java.text.NumberFormat getNumberFormat()
[unresolved] public static final java.text.DateFormat getTimeInstance()
[unresolved] public static final java.text.DateFormat getTimeInstance(int)
[unresolved] public static final java.text.DateFormat getTimeInstance(int, Unresolved type java.util.Locale)
[unresolved] public Unresolved type java.util.TimeZone getTimeZone()
[unresolved] public int hashCode()
[unresolved] public boolean isLenient()
[unresolved] public java.util.Date parse(java.lang.String) throws java.text.ParseException
[unresolved] public abstract java.util.Date parse(java.lang.String, Unresolved type java.text.ParsePosition)
[unresolved] public java.lang.Object parseObject(java.lang.String, Unresolved type java.text.ParsePosition)
[unresolved] public void setCalendar(Unresolved type java.util.Calendar)
[unresolved] public void setLenient(boolean)
[unresolved] public void setNumberFormat(Unresolved type java.text.NumberFormat)
[unresolved] public void setTimeZone(Unresolved type java.util.TimeZone)
/* members */
Unresolved type java.text.DateFormat$DateFormatGetter
Unresolved type java.text.DateFormat$Field
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding
[ERROR] at PsTable.java(351): new SimpleDateFormat("MM/dd/yyyy").format(rowValue.getDate())
org.eclipse.jdt.internal.compiler.ast.MessageSend
[ERROR] at PsTable.java(351): return new SimpleDateFormat("MM/dd/yyyy").format(rowValue.getDate());
org.eclipse.jdt.internal.compiler.ast.ReturnStatement
[ERROR] at PsTable.java(350): public String getCellValue(Message rowValue);
com.google.gwt.dev.jjs.ast.JMethod
[ERROR] at PsTable.java(348): final class PsTable$DateColumnDefinition extends AbstractColumnDefinition
com.google.gwt.dev.jjs.ast.JClassType
i have simple added the class of this example in my app and i create a new PsTable in my gwt client class.
GWT Incubator's latest release is only compatible with GWT 2.1, and you're apparently using GWT 2.3 or later (the Could not find an exact match rule. Using 'closest' rule… was added in 2.3 to support IE9). Add to that that GWT 2.2 breaks binary compatibility of generators (they have to be recompiled against GWT 2.2 or later) and you have a good reason for a failure.
From the GWT Incubator homepage, you should be able to replace PaagingScrollTable uses with GWT 2.4's DataGrid. It's admittedly a much different approach (cells vs. widgets) but it's the way to go nowadays: GWT Incubator is deprecated (for good reasons) and you really shouldn't use it, move away from it if your project used it, and absolutely do not start using it in new projects.
BTW, the article you link to is 3 years old. You can't expect anything good from such ancient code snippets.

build.xml throws annotation error

I am new to ANT and JUnit. As per the requirement i created 'JUnitTestCase' in Eclipse and call the requested test classes as per proper annotation.
While running the 'build.xml' file through 'Ant Build', it throws error as:
D:\ecllipse\eclipse\JunitTestProject>ant compile
Buildfile: D:\ecllipse\eclipse\JunitTestProject\build.xml
setClassPath:
init:
clean:
compile:
[echo] making directory...
[echo] classpath------:
[echo] compiling...
[javac] Compiling 4 source files to D:\ecllipse\eclipse\JunitTestProject\build
[javac] D:\ecllipse\eclipse\JunitTestProject\src\jnuittestPckg\HelloWorldTest.java:3: package org.junit does not exist
[javac] import org.junit.After;
[javac] ^
[javac] D:\ecllipse\eclipse\JunitTestProject\src\jnuittestPckg\HelloWorldTes
t.java:4: package org.junit does not exist
[javac] import org.junit.Before;
[javac] ^
While looking back to JUnitTEstCase, i have imported the annotations like (import org.junit.After;import org.junit.Before and import org.junit.Test;). I, also, set build path for 'junit.jar'. I tried lot but couldn't figure it out. i am also attaching JUnitTest project as:
package jnuittestPckg;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class HelloWorldTest {
private HelloWorld hlwrd;
#Before
public void setUp() throws Exception {
hlwrd = new HelloWorld();
System.out.println("I am in Before");
}
#After
public void tearDown() throws Exception {
System.out.println("I am in After");
}
#Test
public void testClass1() {
hlwrd.Class1(null);
}
#Test
public void testClass2() {
hlwrd.Class2(null);
}
}
Please help me out.
You test.classpath property does not include the junit.jar.
Add it to the classpath and this issue will be resolved.