0
votes

I'm trying to compile and deploy neo4j-connector.

Two classes in neo4j-connector-impl (Neo4jManagedConnection and Neo4jResourceAdapter) have the following annotation:

@ConfigProperty
private boolean xa;

This compiles fine, but when I try to deploy to glassfish 3.1.1, I get a series of errors:

[boolean] is not an allowed property value typeat org.glassfish.apf.AnnotationInfo@118944a java.lang.IllegalStateException: [boolean] is not an allowed property value typeat org.glassfish.apf.AnnotationInfo@118944a at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:490) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:432) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:408) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:383) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:246) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:255) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:216) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:181) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:828) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:770) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:680) Caused by: [boolean] is not an allowed property value typeat org.glassfish.apf.AnnotationInfo@118944a at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375) at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289) at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:271) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:199) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:606) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445) ... 39 more Caused by: java.lang.IllegalArgumentException: [boolean] is not an allowed property value type at com.sun.enterprise.deployment.EnvironmentProperty.checkType(EnvironmentProperty.java:178) at com.sun.enterprise.deployment.EnvironmentProperty.setType(EnvironmentProperty.java:239) at com.sun.enterprise.connectors.deployment.annotation.handlers.ConfigPropertyHandler.getConfigProperty(ConfigPropertyHandler.java:221) at com.sun.enterprise.connectors.deployment.annotation.handlers.ConfigPropertyHandler.handleConfigPropertyAnnotation(ConfigPropertyHandler.java:142) at com.sun.enterprise.connectors.deployment.annotation.handlers.ConfigPropertyHandler.processAnnotation(ConfigPropertyHandler.java:91) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344) ... 46 more

I can come up with ways around it (e.g., add a setXa(String) method), but this doesn't feel right: this code has been unchanged since it was committed over a year ago, so why shouldn't it work for me? What could be going wrong here?

2
A (somewhat dated, as it refers to j2e 1.4) resource saying that this should work: docs.oracle.com/cd/E17802_01/j2ee/j2ee/1.4/docs/… (look at table 12-4)Kricket

2 Answers

0
votes

Maybe you could raise an issue in the github project with the author, Alex Smirnow?

0
votes

Looks to me that the properties have to be simple java objects, like String, Integer, Long etc.

int, long, boolean (primitives) seem to have a problem.

Hope this helps