[JBoss JIRA] (LOGTOOL-51) Logging generation processing breaks APT rules by loading classes via reflection
by David Lloyd (JIRA)
[ https://issues.jboss.org/browse/LOGTOOL-51?page=com.atlassian.jira.plugin... ]
David Lloyd commented on LOGTOOL-51:
------------------------------------
Dum de dum :)
> Logging generation processing breaks APT rules by loading classes via reflection
> --------------------------------------------------------------------------------
>
> Key: LOGTOOL-51
> URL: https://issues.jboss.org/browse/LOGTOOL-51
> Project: Log Tool
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBDS 5.5.0.CR1
> Reporter: Fred Bricon
> Assignee: David Lloyd
> Priority: Blocker
>
> JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
> When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
> {noformat}
> javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
> at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
> at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
> at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
> at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
> at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
> at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
> {noformat}
> It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
> I tracked the code responsible with messing with the properties :
> {noformat}
> Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
> System.setProperty(String, String) line: 779
> __SAXParserFactory.<clinit>() line: 68
> __JAXPRedirected.initAll() line: 80
> Module$1.run() line: 126
> Module$1.run() line: 113
> AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
> Module.<clinit>() line: 113
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
> JCodeModel.ref(String) line: 363
> MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
> MessageBundleImplementor.generateModel() line: 86
> MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
> ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
> LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
> RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
> RoundDispatcher.round() line: 121
> IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
> IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
> Compiler.processAnnotations() line: 813
> Compiler.compile(ICompilationUnit[]) line: 432
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
> BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
> BatchImageBuilder.build() line: 60
> JavaBuilder.buildAll() line: 254
> JavaBuilder.build(int, Map, IProgressMonitor) line: 173
> BuildManager$2.run() line: 728
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
> BuildManager$1.run() line: 292
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
> BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
> BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
> AutoBuildJob.doBuild(IProgressMonitor) line: 143
> AutoBuildJob.run(IProgressMonitor) line: 241
> Worker.run() line: 54
> {noformat}
> That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
> So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
> Classes should not be loaded by reflection during APT processing to avoid such issues - it should use the API provided by APT to iterate over the classes metadata provided by the compiler and not depend on com.sun.*.internal classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (JBLOGGING-83) Logging generation processing breaks APT rules by loading classes via reflection
by Max Rydahl Andersen (JIRA)
[ https://issues.jboss.org/browse/JBLOGGING-83?page=com.atlassian.jira.plug... ]
Max Rydahl Andersen updated JBLOGGING-83:
-----------------------------------------
Description:
JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
{noformat}
javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
{noformat}
It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
I tracked the code responsible with messing with the properties :
{noformat}
Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
System.setProperty(String, String) line: 779
__SAXParserFactory.<clinit>() line: 68
__JAXPRedirected.initAll() line: 80
Module$1.run() line: 126
Module$1.run() line: 113
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
Module.<clinit>() line: 113
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
JCodeModel.ref(String) line: 363
MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
MessageBundleImplementor.generateModel() line: 86
MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
RoundDispatcher.round() line: 121
IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
Compiler.processAnnotations() line: 813
Compiler.compile(ICompilationUnit[]) line: 432
BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
BatchImageBuilder.build() line: 60
JavaBuilder.buildAll() line: 254
JavaBuilder.build(int, Map, IProgressMonitor) line: 173
BuildManager$2.run() line: 728
SafeRunner.run(ISafeRunnable) line: 42
BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
BuildManager$1.run() line: 292
SafeRunner.run(ISafeRunnable) line: 42
BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
AutoBuildJob.doBuild(IProgressMonitor) line: 143
AutoBuildJob.run(IProgressMonitor) line: 241
Worker.run() line: 54
{noformat}
That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
Classes should not be loaded by reflection during APT processing to avoid such issues - it should use the API provided by APT to iterate over the classes metadata provided by the compiler and not depend on com.sun.*.internal classes.
was:
JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
{noformat}
javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
{noformat}
It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
I tracked the code responsible with messing with the properties :
{noformat}
Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
System.setProperty(String, String) line: 779
__SAXParserFactory.<clinit>() line: 68
__JAXPRedirected.initAll() line: 80
Module$1.run() line: 126
Module$1.run() line: 113
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
Module.<clinit>() line: 113
Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
JCodeModel.ref(String) line: 363
MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
MessageBundleImplementor.generateModel() line: 86
MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
RoundDispatcher.round() line: 121
IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
Compiler.processAnnotations() line: 813
Compiler.compile(ICompilationUnit[]) line: 432
BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
BatchImageBuilder.build() line: 60
JavaBuilder.buildAll() line: 254
JavaBuilder.build(int, Map, IProgressMonitor) line: 173
BuildManager$2.run() line: 728
SafeRunner.run(ISafeRunnable) line: 42
BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
BuildManager$1.run() line: 292
SafeRunner.run(ISafeRunnable) line: 42
BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
AutoBuildJob.doBuild(IProgressMonitor) line: 143
AutoBuildJob.run(IProgressMonitor) line: 241
Worker.run() line: 54
{noformat}
That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
Ideally we should process the classes in an isolated way, so that doesn't break IDE embdeding.
Currently, JBoss AS source code can only be used in JBDS if m2e-apt is disabled (Preferences > Maven > Annotation Processing).
> Logging generation processing breaks APT rules by loading classes via reflection
> --------------------------------------------------------------------------------
>
> Key: JBLOGGING-83
> URL: https://issues.jboss.org/browse/JBLOGGING-83
> Project: JBoss Logging
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBDS 5.5.0.CR1
> Reporter: Fred Bricon
> Assignee: David Lloyd
> Priority: Blocker
>
> JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
> When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
> {noformat}
> javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
> at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
> at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
> at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
> at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
> at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
> at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
> {noformat}
> It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
> I tracked the code responsible with messing with the properties :
> {noformat}
> Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
> System.setProperty(String, String) line: 779
> __SAXParserFactory.<clinit>() line: 68
> __JAXPRedirected.initAll() line: 80
> Module$1.run() line: 126
> Module$1.run() line: 113
> AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
> Module.<clinit>() line: 113
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
> JCodeModel.ref(String) line: 363
> MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
> MessageBundleImplementor.generateModel() line: 86
> MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
> ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
> LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
> RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
> RoundDispatcher.round() line: 121
> IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
> IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
> Compiler.processAnnotations() line: 813
> Compiler.compile(ICompilationUnit[]) line: 432
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
> BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
> BatchImageBuilder.build() line: 60
> JavaBuilder.buildAll() line: 254
> JavaBuilder.build(int, Map, IProgressMonitor) line: 173
> BuildManager$2.run() line: 728
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
> BuildManager$1.run() line: 292
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
> BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
> BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
> AutoBuildJob.doBuild(IProgressMonitor) line: 143
> AutoBuildJob.run(IProgressMonitor) line: 241
> Worker.run() line: 54
> {noformat}
> That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
> So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
> Classes should not be loaded by reflection during APT processing to avoid such issues - it should use the API provided by APT to iterate over the classes metadata provided by the compiler and not depend on com.sun.*.internal classes.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (JBLOGGING-83) Logging generation processing breaks APT rules by loading classes via reflection
by Max Rydahl Andersen (JIRA)
[ https://issues.jboss.org/browse/JBLOGGING-83?page=com.atlassian.jira.plug... ]
Max Rydahl Andersen moved MODULES-137 to JBLOGGING-83:
------------------------------------------------------
Project: JBoss Logging (was: JBoss Modules)
Key: JBLOGGING-83 (was: MODULES-137)
Security: Public
> Logging generation processing breaks APT rules by loading classes via reflection
> --------------------------------------------------------------------------------
>
> Key: JBLOGGING-83
> URL: https://issues.jboss.org/browse/JBLOGGING-83
> Project: JBoss Logging
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBDS 5.5.0.CR1
> Reporter: Fred Bricon
> Assignee: David Lloyd
> Priority: Blocker
>
> JBDS 5.5.0.CR1 embeds [m2e-apt|https://github.com/jbosstools/m2e-apt], which automatically enables Eclipse JDT Annotation Processor Toolkit.
> When importing the [server|https://github.com/jbossas/jboss-as/tree/master/server] module from http://github.com/jbossas/jboss-as.git (also happens for other modules), Eclipse starts crashing (see JBIDE-12087) with errors like :
> {noformat}
> javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__DocumentBuilderFactory not found
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:127)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.decodeFactoryPath(FactoryPathUtil.java:222)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.readFactoryPathFile(FactoryPathUtil.java:115)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.calculatePath(FactoryPathUtil.java:342)
> at org.eclipse.jdt.apt.core.internal.util.FactoryPathUtil.getFactoryPath(FactoryPathUtil.java:429)
> at org.eclipse.jdt.apt.core.internal.AnnotationProcessorFactoryLoader.getJava6FactoriesAndAttributesForProject(AnnotationProcessorFactoryLoader.java:420)
> at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:130)
> at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:813)
> at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:432)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
> at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
> at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
> at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
> at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
> at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
> at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
> at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
> at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
> at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> Caused by: java.lang.ClassNotFoundException: __redirected/__DocumentBuilderFactory
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:264)
> at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:119)
> at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:144)
> at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
> at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
> {noformat}
> It turns out the Eclipse System Properties have been changed to use javax.xml.parsers.SAXParserFactory=__redirected/__DocumentBuilderFactory
> I tracked the code responsible with messing with the properties :
> {noformat}
> Thread [Worker-24] (Suspended (breakpoint at line 779 in System))
> System.setProperty(String, String) line: 779
> __SAXParserFactory.<clinit>() line: 68
> __JAXPRedirected.initAll() line: 80
> Module$1.run() line: 126
> Module$1.run() line: 113
> AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
> Module.<clinit>() line: 113
> Class<T>.forName0(String, boolean, ClassLoader) line: not available [native method]
> Class<T>.forName(String) line: 186 <====== org.jboss.modules.Module
> JCodeModel.ref(String) line: 363
> MessageBundleImplementor(ImplementationClassModel).createBundleMethod(MessageMethod, JMethod, JMethod, JVar) line: 150
> MessageBundleImplementor.generateModel() line: 86
> MessageBundleImplementor(ClassModel).create(JavaFileObject) line: 104
> ImplementationClassGenerator.processTypeElement(TypeElement, TypeElement, MessageInterface) line: 63
> LoggingToolsProcessor.process(Set<TypeElement>, RoundEnvironment) line: 155
> RoundDispatcher.handleProcessor(ProcessorInfo) line: 139
> RoundDispatcher.round() line: 121
> IdeAnnotationProcessorManager(BaseAnnotationProcessorManager).processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 159
> IdeAnnotationProcessorManager.processAnnotations(CompilationUnitDeclaration[], ReferenceBinding[], boolean) line: 134
> Compiler.processAnnotations() line: 813
> Compiler.compile(ICompilationUnit[]) line: 432
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[], SourceFile[], boolean) line: 364
> BatchImageBuilder.compile(SourceFile[], SourceFile[], boolean) line: 178
> BatchImageBuilder(AbstractImageBuilder).compile(SourceFile[]) line: 301
> BatchImageBuilder.build() line: 60
> JavaBuilder.buildAll() line: 254
> JavaBuilder.build(int, Map, IProgressMonitor) line: 173
> BuildManager$2.run() line: 728
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(int, IncrementalProjectBuilder, Map<String,String>, MultiStatus, IProgressMonitor) line: 199
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, ICommand[], MultiStatus, IProgressMonitor) line: 239
> BuildManager$1.run() line: 292
> SafeRunner.run(ISafeRunnable) line: 42
> BuildManager.basicBuild(IBuildConfiguration, int, IBuildContext, MultiStatus, IProgressMonitor) line: 295
> BuildManager.basicBuildLoop(IBuildConfiguration[], IBuildConfiguration[], int, MultiStatus, IProgressMonitor) line: 351
> BuildManager.build(IBuildConfiguration[], IBuildConfiguration[], int, IProgressMonitor) line: 374
> AutoBuildJob.doBuild(IProgressMonitor) line: 143
> AutoBuildJob.run(IProgressMonitor) line: 241
> Worker.run() line: 54
> {noformat}
> That stacktrace represents the processing of https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
> So basically, whenever a Logger has a dependency to the [org.jboss.modules.Module|https://github.com/jbossas/jboss-modules/blob/ma...] class, stuff starts hitting the fan.
> Ideally we should process the classes in an isolated way, so that doesn't break IDE embdeding.
> Currently, JBoss AS source code can only be used in JBDS if m2e-apt is disabled (Preferences > Maven > Annotation Processing).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (AS7-4869) TypeConverter does not properly convert ExpressionValue
by Emanuel Muckenhuber (JIRA)
Emanuel Muckenhuber created AS7-4869:
----------------------------------------
Summary: TypeConverter does not properly convert ExpressionValue
Key: AS7-4869
URL: https://issues.jboss.org/browse/AS7-4869
Project: Application Server 7
Issue Type: Bug
Components: Domain Management, JMX
Affects Versions: 7.1.0.Final
Reporter: Emanuel Muckenhuber
Fix For: 7.1.3.Final (EAP), 7.2.0.Alpha1
Executing the following code results in an IAE:
{code}
String[] offsetPath = {"jboss.as:socket-binding-group=standard-sockets","port-offset"};
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName name;
try {
name = new ObjectName(offsetPath[0]);
Object offset = server.getAttribute(name, offsetPath[1]);
} catch (Exception e){
e.printStackTrace();
}
{code}
{noformat}
ExpressionValue(ModelValue).asInt() line: 58
ModelNode.asInt() line: 226
TypeConverter$IntegerTypeConverter.fromModelNode(ModelNode) line: 303
TypeConverter.fromModelNode(ModelNode, ModelNode) line: 83
ModelControllerMBeanHelper.getAttribute(RootResourceHack$ResourceAndRegistration, PathAddress, ObjectName, String) line: 220
ModelControllerMBeanHelper.getAttribute(ObjectName, String) line: 181
ModelControllerMBeanServerPlugin.getAttribute(ObjectName, String) line: 69
PluggableMBeanServerImpl.getAttribute(ObjectName, String) line: 154
TestSingleton.<init>() line: 39
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27
Constructor<T>.newInstance(Object...) line: 513
ConstructedValue<T>.getValue() line: 61
ValueManagedReferenceFactory.getReference() line: 49
ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(InterceptorContext) line: 90
InterceptorContext.proceed() line: 288
WeavedInterceptor.processInvocation(InterceptorContext) line: 53
InterceptorContext.proceed() line: 288
NamespaceContextInterceptor.processInvocation(InterceptorContext) line: 50
InterceptorContext.proceed() line: 288
EjbBMTInterceptor.handleInvocation(InterceptorContext) line: 105
EjbBMTInterceptor(BMTInterceptor).processInvocation(InterceptorContext) line: 56
InterceptorContext.proceed() line: 288
CurrentInvocationContextInterceptor.processInvocation(InterceptorContext) line: 41
InterceptorContext.proceed() line: 288
TCCLInterceptor.processInvocation(InterceptorContext) line: 45
InterceptorContext.proceed() line: 288
ChainedInterceptor.processInvocation(InterceptorContext) line: 61
SingletonComponent(BasicComponent).constructComponentInstance(ManagedReference, boolean, InterceptorFactoryContext) line: 161
SingletonComponent(BasicComponent).createInstance() line: 85
SingletonComponent.getComponentInstance() line: 116
SingletonComponent.start() line: 130
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (JBRULES-3525) Planner causes score corruption (and doesn't even detect it)
by Lukáš Petrovický (JIRA)
Lukáš Petrovický created JBRULES-3525:
-----------------------------------------
Summary: Planner causes score corruption (and doesn't even detect it)
Key: JBRULES-3525
URL: https://issues.jboss.org/browse/JBRULES-3525
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-planner
Affects Versions: 5.5.0.Beta1
Reporter: Lukáš Petrovický
Assignee: Geoffrey De Smet
Attachments: runtime.log
Using incremental score calculation, I've been having weird problems where solutions have outdated scores. These scores are "fixed" when I explicitly call my score calculator on them. After tons of debugging, I was able to produce the attached simplified log file. I will explain it here:
ItineraryAssignment is a planning entity. Lines as these should be clear:
21:28:33.377 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Inserting entity: ItineraryAssignment [train=A1, route=0]
21:28:33.377 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Inserting entity: ItineraryAssignment [train=A1, route=0]
Lines like this signify that calculateScore() was called on the calculator:
21:28:33.833 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Calculating score.
Lines like this mean that setScore() has been called on a Solution. They will finally demonstrate the problem:
21:28:33.867 [main] DEBUG o.d.p.e.ras2012.ProblemSolution - Setting score -968hard/-3409soft to solution RAS2012Solution ...
What we see in the log file is that after a move is done, score is properly re-calculated and set:
21:28:33.922 [main] DEBUG o.d.p.e.r.move.RouteReassignmentMove - Doing move RouteReassignmentMove [train=A2, 0 -> 256].
21:28:34.215 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Removing entity: ItineraryAssignment [train=A2, route=0]
21:28:34.216 [main] DEBUG o.d.p.e.r.model.ItineraryAssignment - Creating new itinerary for ItineraryAssignment [train=A2, route=256].
21:28:34.216 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Inserting entity: ItineraryAssignment [train=A2, route=256]
21:28:34.223 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Calculating score.
21:28:34.232 [main] DEBUG o.d.p.e.ras2012.ProblemSolution - Setting score -300hard/-1294soft to solution RAS2012Solution ...
However, on the undo move for the very same move, no score calculation takes place, no setScore() takes place and no solution is cloned. Resulting in Solution with outdated score:
21:28:34.232 [main] DEBUG o.d.p.e.r.m.RouteReassignmentUndoMove - Doing move RouteReassignmentUndoMove [train=A2, 256 -> 0].
21:28:34.297 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Removing entity: ItineraryAssignment [train=A2, route=256]
21:28:34.299 [main] DEBUG o.d.p.e.r.model.ItineraryAssignment - Creating new itinerary for ItineraryAssignment [train=A2, route=0].
21:28:34.299 [main] DEBUG o.d.p.e.ras2012.ScoreCalculator - Inserting entity: ItineraryAssignment [train=A2, route=0]
21:28:34.305 [main] TRACE o.d.p.c.l.decider.DefaultDecider - Move score (-300hard/-1294soft), accepted (true) for move (RouteReassignmentMove [train=A2, 0 -> 256]).
Which is why the move directly after that (which has been hard-coded to throw exception when the score doesn't match the expected one) throws an exception:
21:28:34.305 [main] DEBUG o.d.p.e.r.move.RouteReassignmentMove - Doing move RouteReassignmentMove [train=A2, 0 -> 274].
Exception in thread "main" java.lang.IllegalStateException: RouteReassignmentMove [train=A2, 0 -> 274]: broken score found. Was -300hard/-1294soft but -968hard/-3409soft expected.
at org.drools.planner.examples.ras2012.move.CommonMove.assertValidScore(CommonMove.java:16)
...
Furthermore, setting environmentMode to TRACE doesn't help here. This goes completely undetected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (AS7-4959) CLONE - Hornetq adapter doesn't implement ActivationConfigProperty DeliveryActive
by Jeff Mesnil (JIRA)
Jeff Mesnil created AS7-4959:
--------------------------------
Summary: CLONE - Hornetq adapter doesn't implement ActivationConfigProperty DeliveryActive
Key: AS7-4959
URL: https://issues.jboss.org/browse/AS7-4959
Project: Application Server 7
Issue Type: Bug
Components: EE, EJB, JMS
Affects Versions: 7.1.1.Final, 7.1.2.Final (EAP)
Environment: Windows 64 bit
Reporter: Jeff Mesnil
Assignee: Jeff Mesnil
I get this warning on AS7.1.1 console, seems that ActivationConfigProperty DeliveryActive is not implemented by hornetq-ra, could we please have it as earlier JMS implementation of JMS had it & application that were using it will fail with AS7 now..?
16:04:30,794 WARN [org.jboss.ejb3] (MSC service thread 1-16) JBAS014105: ActivationConfigProperty DeliveryActive will be ignored since it is not allowed by resource adapter: hornetq-ra
Thanks,
Prasad
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] (AS7-4110) The node name can not set proper via <server name=> attribute
by Wolf-Dieter Fink (JIRA)
Wolf-Dieter Fink created AS7-4110:
-------------------------------------
Summary: The node name can not set proper via <server name=> attribute
Key: AS7-4110
URL: https://issues.jboss.org/browse/AS7-4110
Project: Application Server 7
Issue Type: Bug
Components: Clustering, EJB, Remoting, Server, Transactions
Affects Versions: 7.1.0.Final
Reporter: Wolf-Dieter Fink
Assignee: Paul Ferraro
The node name can be set by using '-Djboss.node.name' in standalone mode.
In domain mode this is not possible.
The attribute "name" of the server element should be used for that (for SA and domains host.xml)
But current there is no effect if the client use EJBClient.getUserTransaction( node-name ), client error is "No EJBReceiver available for node name
MyNode".
The management console shows the correct server name set by <server name=>.
Also if the system-properties element is used to set "jboss.node.name" this is not reflected by management console
but if an application use System.getProperty("jboss.node.name") the value of the system-property is returned.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months