布尔成员上的@ConfigProperty

时间:2012-06-21 09:58:01

标签: java-ee glassfish neo4j jca

我正在尝试编译和部署neo4j-connector

neo4j-connector-impl(Neo4jManagedConnectionNeo4jResourceAdapter)中的两个类具有以下注释:

@ConfigProperty
private boolean xa;

编译很好,但是当我尝试部署到glassfish 3.1.1时,我收到一系列错误:

  

[boolean]不是允许的属性值typeat   org.glassfish.apf.AnnotationInfo@118944a   java.lang.IllegalStateException:[boolean]不是允许的属性值typeat org.glassfish.apf.AnnotationInfo@118944a           在com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:490)           在com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:432)           在com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:408)           在com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:383)           在com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:246)           在com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:255)           在com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:216)           在com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:165)           在org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:181)           在org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)           在com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:828)           at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:770)           在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)           在com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)           在org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)           at com.sun.enterprise.v3.admin.CommandRunnerImpl $ 1.execute(CommandRunnerImpl.java:355)           在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)           在com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)           在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)           在com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)           在com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)           在com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)           在com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)           在com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)           at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)           在com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)           在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)           在com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)           在com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)           在com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)           at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)           在com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)           在com.sun.grizzly.ContextTask.run(ContextTask.java:71)           at com.sun.grizzly.util.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:532)           在com.sun.grizzly.util.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:513)           at java.lang.Thread.run(Thread.java:680)引起:[boolean]不是允许的属性值typeat   org.glassfish.apf.AnnotationInfo@118944a           在org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)           在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)           在org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:199)           在org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)           在com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:606)           在com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:445)           ... 39更多引起:java.lang.IllegalArgumentException:[boolean]不是允许的属性值类型           在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)           在org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344)           ......还有46个

我可以想办法解决它(例如,添加setXa(String)方法),但这感觉不对:这段代码自从一年前提交以来一直没有改变,为什么不应该对我有用吗?这里可能出现什么问题?

2 个答案:

答案 0 :(得分:0)

也许你可以在作者Alex Smirnow的github项目中引发一个问题?

答案 1 :(得分:0)

在我看来,属性必须是简单的java对象,如StringIntegerLong等。

intlongboolean(原语)似乎有问题。

希望这有帮助