Errai marshalling + enum collections
by Eric Wittmann
Does the marshalling framework support collections of Enums? I have an
@Portable bean like this:
@Portable
public class RoleBean implements Serializable {
private static final long serialVersionUID = -646534082583069712L;
private String id;
private String name;
private Set<PermissionType> permissions;
}
Where PermissionType is a very simple java enum. It *used* to be a
Set<String> which of course worked fine. But I recently changed it and
now the errai marshaller is having fits. I'm using Errai's jax-rs
support and the remote REST endpoint returns plain jackson style JSON,
so there are no type hints.
The generated marshaller includes this code:
if ((obj.containsKey("permissions")) &&
(!obj.get("permissions").isNull())) {
a1.setAssumedElementType("org.overlord.apiman.dt.api.beans.idm.PermissionType");
entity.setPermissions(java_util_Set.demarshall(obj.get("permissions"), a1));
}
But when it gets into AbstractCollectionMarshaller I think the assumed
element type is only used for beans, not for enums.
-Eric
10 years, 1 month
Build failed in Jenkins: Errai » Errai Security::Demo #1599
by ci-builds@redhat.com
See <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
------------------------------------------
Notifying upstream projects of job completion
Join notifier requires a CauseAction
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Errai Security::Demo 3.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ errai-security-demo ---
[INFO] Deleting <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO] Deleting <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO] Deleting <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...> (includes = [src/main/webapp/WEB-INF/deploy/, src/main/webapp/WEB-INF/lib/, **/gwt-unitCache/**, .errai/, src/main/webapp/app/], excludes = [])
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ errai-security-demo ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 25 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (unpack) @ errai-security-demo ---
[INFO] Configured Artifact: org.wildfly:wildfly-dist:8.1.0.Final:zip
[INFO] Unpacking /home/hudson/.m2/repository/org/wildfly/wildfly-dist/8.1.0.Final/wildfly-dist-8.1.0.Final.zip to <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...> with includes "" and excludes ""
[INFO]
[INFO] --- gwt-maven-plugin:2.6.1:resources (default) @ errai-security-demo ---
[INFO] auto discovered modules [org.jboss.errai.security.demo.App]
[INFO] 15 source files from GWT module org.jboss.errai.security.demo.App
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ errai-security-demo ---
[INFO] Compiling 17 source files to <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ errai-security-demo ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ errai-security-demo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ errai-security-demo ---
[INFO] No tests to run.
[INFO] Surefire report directory: <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results[INFO]
[INFO] --- gwt-maven-plugin:2.6.1:compile (default) @ errai-security-demo ---
[INFO] auto discovered modules [org.jboss.errai.security.demo.App]
[INFO] Compiling module org.jboss.errai.security.demo.App
[ERROR] Sep 25, 2014 4:19:27 PM java.util.prefs.FileSystemPreferences syncWorld
[ERROR] WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
[INFO] INFO [CacheUtil] clearing all generation caches...
[INFO] INFO [MetaDataScanner] added class scanning extensions: org.jboss.errai.common.metadata.JbossVFsTypeHandler
[INFO] INFO [Reflections] Reflections took 1868 ms to scan 19 urls, producing 567 keys and 2694 values [using 2 cores]
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.less.LessStyleGenerator; for type: org.jboss.errai.ui.client.local.spi.LessStyleMapping
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.security.rebind.SecurityPropertiesGenerator; for type: org.jboss.errai.security.client.local.storage.SecurityProperties
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.marshalling.rebind.MarshallersGenerator; for type: org.jboss.errai.marshalling.client.api.MarshallerFactory
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.databinding.rebind.BindableProxyLoaderGenerator; for type: org.jboss.errai.databinding.client.BindableProxyLoader
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator; for type: org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.bus.rebind.RpcProxyLoaderGenerator; for type: org.jboss.errai.bus.client.framework.RpcProxyLoader
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.rebind.TranslationServiceGenerator; for type: org.jboss.errai.ui.client.local.spi.TranslationService
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator; for type: org.jboss.errai.ioc.client.Bootstrapper
[INFO] INFO [AsyncGenerators] discovered async generator org.jboss.errai.ui.nav.rebind.NavigationGraphGenerator; for type: org.jboss.errai.ui.nav.client.local.spi.NavigationGraph
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.marshalling.rebind.MarshallersGenerator
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.bus.rebind.RpcProxyLoaderGenerator
[INFO] INFO [RpcProxyLoaderGenerator] generating RPC proxy loader class...
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.databinding.rebind.BindableProxyLoaderGenerator
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.ui.rebind.less.LessStyleGenerator
[INFO] INFO [MarshallerGeneratorFactory] generating marshaller factory class for server...
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator
[INFO] INFO [IOCBootstrapGenerator] generating IOC bootstrapping class...
[INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.
[INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true
[INFO] Computing all possible rebind results for 'org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader'
[INFO] Rebinding org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader
[INFO] Invoking generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator
[INFO] Checking ErraiApp.properties for configured types ...
[INFO] INFO [RpcProxyLoaderGenerator] generated RPC proxy loader class in 902ms.
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.ui.nav.rebind.NavigationGraphGenerator
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.ui.rebind.TranslationServiceGenerator
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator
[INFO] INFO [TranslationServiceGenerator] Preparing to scan for i18n bundle files.
[INFO] INFO [Reflections] Reflections took 543 ms to scan 19 urls, producing 0 keys and 0 values
[INFO] INFO [AbstractAsyncGenerator] Running generator org.jboss.errai.security.rebind.SecurityPropertiesGenerator
[INFO] Computing all possible rebind results for 'org.jboss.errai.marshalling.client.api.MarshallerFactory'
[INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory
[INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator
[INFO] Generating Marshallers Bootstrapper...
[INFO] INFO [MarshallerGeneratorFactory] generated marshaller factory class in 7396ms.
[INFO] INFO [IOCBootstrapGenerator] generated IOC bootstrapping class in 7072ms (2134 beans processed)
[INFO] INFO [Generator] considering '<http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...'> as module output path ...
[INFO] INFO [Generator] found '<http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...'> output directory
[ERROR] Sep 25, 2014 4:19:57 PM java.util.prefs.FileSystemPreferences syncWorld
[ERROR] WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
[INFO] INFO [Generator] ** deposited marshaller class in : <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO] WARN [EnvUtil] reachability analysis disabled. errai may generate unnecessary code.
[INFO] WARN [EnvUtil] enable reachability analysis with -Derrai.compile.perf.perform_reachability_analysis=true
[INFO] INFO [MarshallerGeneratorFactory] generating marshaller factory class for client...
[INFO] INFO [MarshallerGeneratorFactory] generated marshaller factory class in 901ms.
[INFO] Rebinding org.jboss.errai.marshalling.client.api.MarshallerFactory
[INFO] Invoking generator org.jboss.errai.marshalling.rebind.MarshallersGenerator
[INFO] Generating Marshallers Bootstrapper...
[INFO] Computing all possible rebind results for 'org.jboss.errai.ioc.client.container.IOCEnvironment'
[INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment
[INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator
[INFO] Generating Extensions Bootstrapper...
[INFO] Rebinding org.jboss.errai.ioc.client.container.IOCEnvironment
[INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCEnvironmentGenerator
[INFO] Generating Extensions Bootstrapper...
[INFO] Computing all possible rebind results for 'org.jboss.errai.ioc.client.Bootstrapper'
[INFO] Rebinding org.jboss.errai.ioc.client.Bootstrapper
[INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator
[INFO] generating ioc bootstrapping code...
[INFO] Rebinding org.jboss.errai.ioc.client.Bootstrapper
[INFO] Invoking generator org.jboss.errai.ioc.rebind.ioc.bootstrapper.IOCGenerator
[INFO] generating ioc bootstrapping code...
[INFO] INFO [QualifierEqualityFactoryGenerator] Generating QualifierEqualityFactory...
[INFO] INFO [QualifierEqualityFactoryGenerator] Generated QualifierEqualityFactory in 148ms
[ERROR] Sep 25, 2014 4:20:27 PM java.util.prefs.FileSystemPreferences syncWorld
[ERROR] WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
[INFO] Compiling 1 permutation
[INFO] Compiling permutation 0...
[INFO] Compile of permutations succeeded
[INFO] Linking into <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO] Link succeeded
[INFO] Compilation succeeded -- 117.865s
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ errai-security-demo ---
[INFO] Packaging webapp
[INFO] Assembling webapp [errai-security-demo] in [<http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...]>
[INFO] Processing war project
[INFO] Copying webapp resources [<http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...]>
[INFO] Webapp assembled in [391 msecs]
[INFO] Building war: <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...>
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ errai-security-demo ---
[INFO] Installing <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...> to /home/hudson/.m2/repository/org/jboss/errai/errai-security-demo/3.1.0-SNAPSHOT/errai-security-demo-3.1.0-SNAPSHOT.war
[INFO] Installing <http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/Errai/org.jboss.errai...> to /home/hudson/.m2/repository/org/jboss/errai/errai-security-demo/3.1.0-SNAPSHOT/errai-security-demo-3.1.0-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ errai-security-demo ---
[INFO] Using alternate deployment repository jboss-snapshots-repository::default::https://repository.jboss.org/nexus/c...
Downloading: https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo...
Downloaded: https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo... (787 B at 0.8 KB/sec)
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo...
Uploading: https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo...
10 years, 1 month