I am getting exception below in xamarin android. I believe that its caused by proguard but I cant figure out how to keep this renderer.
[ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Unable to activate instance of type Com.Syncfusion.Gauges.SfCircularGauge.PointerRenderer from native handle 0xbef9193c (key_handle 0x2eddf05). ---> System.MissingMethodException: No constructor found for
Com.Syncfusion.Gauges.SfCircularGauge.PointerRenderer::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException:
Exception of type 'Java.Interop.JavaLocationException' was thrown.
11-14 00:16:18.378 E/mono-rt (19328): --- End of inner exception stack trace ---
I tried followings. What am I doing wrong or missing?
-keep class com.syncfusion.** { *; }
-keep class * extends com.syncfusion.** { *; }
-keep class Com.Syncfusion.Gauges.SfCircularGauge.PointerRenderer** { *; }
-keepclassmembers class Com.Syncfusion.Gauges.SfCircularGauge.PointerRenderer** { *; }
Related
I'm trying to play with xhp and I'm finding that running the one xhp example I could find https://github.com/hhvm/xhp-js-example is issuing an error \nFatal error: Uncaught Error: Found top-level code in :\nStack trace:\n#0 {main} when following the README as is on HHVM 4.71. Removing require_once(__DIR__.'/vendor/autoload.php'); resolves the top-level code error but I'm now stuck with the error \nFatal error: Uncaught Error: unknown class xhp_x__element in :\nStack trace:\n#0 /Users/user/code/xhp-js-example/example.php(12): <unknown>()\n#1 {main}. I've tried to change the code in example.php to the one found here:
class :introduction extends :x:element {
protected function render(): \XHPRoot {
return <strong>Hello!</strong>;
}
}
class :intro-plain-str extends :x:element {
protected function render(): \XHPRoot {
// Since this function returns an XHPRoot, if you want to return a primitive
// like a string, wrap it around <x:frag>
return <x:frag>Hello!</x:frag>;
}
}
echo <introduction />;
echo PHP_EOL.PHP_EOL;
echo <intro-plain-str />;
since that didn't work, I also tried the simple example from here:
<?hh // strict
$user_name = 'Fred';
echo <tt>Hello <strong>{$user_name}</strong></tt>;
but altered to resolve the top-level error by wrapping it in a function and annotating it as follows:
<?hh // strict
<<__EntryPoint>>
function main(): void {
$user_name = 'Fred';
echo <tt>Hello <strong>{$user_name}</strong></tt>;
}
I'd get a very similar error \nFatal error: Uncaught Error: Class undefined: xhp_tt in /Users/user/code/xhp-js-example/example.php:6\nStack trace:\n#0 (): main()\n#1 {main}
Any help with getting these seemingly simple examples to work would be much appreciated since it's very painful and discouraging for trying this tech when the basic examples don't seem to run. this is using the macos package of hhvm on Catalina.
EDIT: I've also tried this without the use of xhp-js, which is included in the example repo and am getting the same error message.
There are a few roadblocks that the OP encountered to get XHP running with HHVM 4.62, as discussed in the comments.
xhp-js and xhp-js-example are both outdated by a few years so they can't compile due to breaking changes to HHVM itself, as the OP saw.
While the XHP syntax is built into Hack, all the standard implementations are provided by xhp-lib, so it is necessary to autoload that in order to use the standard library of tags and tag classes.
New to HHVM 4.62 is mandatory FIXME whitelisting, which requires package writers to explicitly specify allowed HH_FIXME codes in the .hhconfig. These were added to XHP-lib in 4.0.0rc1, so this version is necessary when running on HHVM 4.62.
Therefore, a minimal project with XHP on 4.62 looks like this:
composer.json
{
"require": {
"hhvm": "~4.62",
"hhvm/hhvm-autoload": "^3.1.3",
"facebook/xhp-lib": "~4.0.0rc1"
}
}
hh_autoload.json
{ "roots": [ "src/" ] }
src/example.hack
require_once(__DIR__ . "/../vendor/hh_autoload.hh");
<<__EntryPoint>>
function main(): void {
echo <div>{1 + 2}</div>;
}
I have the defined following controller
class BookController {
def book(BookCommand bookCommand,
AnotherBookCommand bookCommand2)
{
....
}
When I debugged it, binding is done on the bookCommand and when it's bookCommand2's turn for binding, it throws this exception
Error in object 'bookCommand2': codes []; arguments []; default message [Error occurred initializing command object [bookCommand2]. org.apache.groovy.json.internal.Exceptions$JsonInternalException: Wrapped Exception
CAUSE java.io.IOException :: Stream closed]
If I try to switch the order of the parameters i.e.
class BookController {
def book(AnotherBookCommand bookCommand2,
BookCommand bookCommand)
{
....
}
Binding is done on the bookCommand2 and binding of bookCommand throws the exception.
Error in object 'bookCommand': codes []; arguments []; default message [Error occurred initializing command object [bookCommand]. org.apache.groovy.json.internal.Exceptions$JsonInternalException: Wrapped Exception
CAUSE java.io.IOException :: Stream closed]
Any idea what's happening here?
We do not support binding the request of the body to multiple command objects. One option you have is to aggregate them into 1 class with something like this:
class SomeClass {
BookCommand bookCommand
BookCommand anotherBookCommand
}
Then have your controller action accept one of those and organize the body of the JSON accordingly.
I am learning Grail and was trying to below code but could not start the application after referencing two classes make and model in vehicle class. also I am adding year as an integer in vehicle class
Running application...
2017-03-05 08:48:32.229 ERROR --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'grailsCacheFilter': Cannot create inner bean '(inner bean)#692e68e0' of type [grails.plugin.cache.web.filter.simple.MemoryPageFragmentCachingFilter] while setting bean property 'filter'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#692e68e0': Unsatisfied dependency expressed through method 'setUrlMappingsHandlerMapping' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'urlMappingsHandlerMapping': Unsatisfied dependency expressed through method 'setWebRequestInterceptors' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'openSessionInViewInterceptor': Cannot resolve reference to bean 'hibernateDatastore' while setting bean property 'hibernateDatastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateDatastore': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.orm.hibernate.HibernateDatastore]: Constructor threw exception; nested exception is org.hibernate.MappingException:
**Could not determine type for: groovy.lang.Binding, at table: vhicle, for columns: [org.hibernate.mapping.Column(binding)]**
2017-03-05 08:48:32.392 ERROR --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
at grails.boot.GrailsApp.run(GrailsApp.groovy:387)
at grails.boot.GrailsApp.run(GrailsApp.groovy:374)
at grails.boot.GrailsApp$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)
Here is my Vhicle.groovy
package com.example
class Vehicle {
Integer year
String name
Model model
Make make
static constraints = {
year min: 1900
name maxSize: 255
}
}
def vehicle = Vehicle.findByName('pickup')
if(vehicle) {
println vehicle.model // e.g, 'Titan'
println vehicle.make // e.g, 'Nissan'
}
Model.groovy
package com.example
class Model {
String name
static belongsTo = [ make: Make ]
static constraints = {
}
String to_String(){
name
}
}
Here is my Make.groovy
package com.example
class Make {
String name
static constraints = {
}
String to_String(){
name
}
}
Check your groovy file name vehicle.groovy you have misspelled. You have written like vhicle.groovy it should be Vehicle.groovy as Class name is Vehicle.
As it says in the exception:
at table: vhicle
You've misspelled vehicle somewhere
Could someone please tell me why I am not able to mock CriteriBuilder in my test. When criteriaBuilderMock.createMock() is executed I am getting Error casting map to grails.gorm.CriteriaBuilder, Reason: null
Is it possible to mock CriteriaBuilder? Am I getting this error because grails does not allow mocking objects without default constructor? Is there work around?
#TestFor(ProductService)
class ProductServiceSpec extends Specification {
void "test exists"() {
given:
def criteriaBuilderMock = mockFor(CriteriaBuilder);
criteriaBuilderMock.createMock(); //<-- error org.codehaus.groovy.runtime.typehandling.GroovyCastException: Error casting map to grails.gorm.CriteriaBuilder, Reason: null
}
}
thanks
The mocked class has to have a no-args constructor.
I am running an app with DartEditor (not dart-eclipse plugin)
Dart Editor version 1.10.0.dev_01_01 (DEV)
Dart SDK version 1.10.0-dev.1.1
I am consistently getting the following when the app is executed
Exception: The null object does not have a method 'open'.
NoSuchMethodError: method not found: 'open'
Receiver: null
Arguments: [] (package:polymer_snippet/material_design/core_page`/core_page_app.dart:41)`
The offending open() is the last line in the CarePageApp attached() method below:
#override
void attached()
{
super.attached();
pfm = $['pfm'] as PaperFabMenu ;
pfm.open(); // pfm seems to be null
}
Any help is appreciated.
Thanks
NB: There is no specific code for me to attach.