[JBoss JIRA] (FORGE-2189) Custom Addon cannot be run, jandex not found
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2189?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2189:
----------------------------------------
To debug, you need to start the console using {{./forge --debug}}. Then, in Eclipse, go to {{Debug Configurations}} and create a {{Remote Java Application}}, pointing to {{localhost}} and port {{8000}}. Start the Debugger and you should be set.
> Custom Addon cannot be run, jandex not found
> --------------------------------------------
>
> Key: FORGE-2189
> URL: https://issues.jboss.org/browse/FORGE-2189
> Project: Forge
> Issue Type: Bug
> Components: Addon Development
> Affects Versions: 2.13.1.Final
> Environment: JBoss Dev studio
> W7 64, Java 1.7, forge 2.13.1
> Reporter: Jerome B
>
> My custom addon builds successfully BUT log fills with error
> The cause would be
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
> It still happens although I added the dependency
> <dependency>
> <groupId>org.jboss</groupId>
> <artifactId>jandex</artifactId>
> <version>1.2.2.Final</version>
> <scope>runtime</scope>
> </dependency>
> I even tried with
> <dependency>
> <groupId>org.jboss.weld.se</groupId>
> <artifactId>weld-se</artifactId>
> <version>2.2.8.Final</version>
> </dependency>
> Without luck.
> First time I see this error when writing addons
> My addon uses a lot of reflection to discover annotations on fields and methods. I wonder what triggers the use of jandex
> The full stack is
> 18:38:44,078 INFO [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) > Starting container [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] [C:\Users\jerome.b\.forge\addons]
> 18:38:44,088 SEVERE [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) Failed to start addon [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] with classloader [ModuleClassLoader for Module "fr.employer.addons.ADDONS213:1.0.2-SNAPSHOT_2677a771-c4eb-4323-8ef7-1608cdad2915" from AddonModuleLoader]: java.lang.IllegalStateException: Unable to instantiate org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler using parameters: [org.jboss.weld.bootstrap.WeldBootstrap@3546eaec]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:85)
> at org.jboss.weld.environment.se.discovery.url.URLScanner.scan(URLScanner.java:81)
> at org.jboss.weld.environment.se.discovery.url.DiscoveryStrategy.discoverArchives(DiscoveryStrategy.java:52)
> at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:202)
> at org.jboss.forge.furnace.container.cdi.weld.ModularWeld.createDeployment(ModularWeld.java:41)
> at org.jboss.weld.environment.se.Weld.initialize(Weld.java:127)
> at org.jboss.forge.furnace.container.cdi.lifecycle.WeldAddonLifecycleProvider.start(WeldAddonLifecycleProvider.java:77)
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:92) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:86) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable.run(AddonRunnable.java:85) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_40]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
> at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedConstructorAccessor493.newInstance(Unknown Source) [:1.7.0_40]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_40]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_40]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:83)
> ... 15 more
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2189) Custom Addon cannot be run, jandex not found
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2189?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2189.
----------------------------------
Resolution: Cannot Reproduce Bug
You can use JAXB out of the box from the JDK. Furnace allows this.
Closing this issue as Cannot Reproduce.
Thanks!
> Custom Addon cannot be run, jandex not found
> --------------------------------------------
>
> Key: FORGE-2189
> URL: https://issues.jboss.org/browse/FORGE-2189
> Project: Forge
> Issue Type: Bug
> Components: Addon Development
> Affects Versions: 2.13.1.Final
> Environment: JBoss Dev studio
> W7 64, Java 1.7, forge 2.13.1
> Reporter: Jerome B
>
> My custom addon builds successfully BUT log fills with error
> The cause would be
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
> It still happens although I added the dependency
> <dependency>
> <groupId>org.jboss</groupId>
> <artifactId>jandex</artifactId>
> <version>1.2.2.Final</version>
> <scope>runtime</scope>
> </dependency>
> I even tried with
> <dependency>
> <groupId>org.jboss.weld.se</groupId>
> <artifactId>weld-se</artifactId>
> <version>2.2.8.Final</version>
> </dependency>
> Without luck.
> First time I see this error when writing addons
> My addon uses a lot of reflection to discover annotations on fields and methods. I wonder what triggers the use of jandex
> The full stack is
> 18:38:44,078 INFO [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) > Starting container [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] [C:\Users\jerome.b\.forge\addons]
> 18:38:44,088 SEVERE [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) Failed to start addon [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] with classloader [ModuleClassLoader for Module "fr.employer.addons.ADDONS213:1.0.2-SNAPSHOT_2677a771-c4eb-4323-8ef7-1608cdad2915" from AddonModuleLoader]: java.lang.IllegalStateException: Unable to instantiate org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler using parameters: [org.jboss.weld.bootstrap.WeldBootstrap@3546eaec]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:85)
> at org.jboss.weld.environment.se.discovery.url.URLScanner.scan(URLScanner.java:81)
> at org.jboss.weld.environment.se.discovery.url.DiscoveryStrategy.discoverArchives(DiscoveryStrategy.java:52)
> at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:202)
> at org.jboss.forge.furnace.container.cdi.weld.ModularWeld.createDeployment(ModularWeld.java:41)
> at org.jboss.weld.environment.se.Weld.initialize(Weld.java:127)
> at org.jboss.forge.furnace.container.cdi.lifecycle.WeldAddonLifecycleProvider.start(WeldAddonLifecycleProvider.java:77)
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:92) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:86) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable.run(AddonRunnable.java:85) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_40]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
> at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedConstructorAccessor493.newInstance(Unknown Source) [:1.7.0_40]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_40]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_40]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:83)
> ... 15 more
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2192) Addon build should not be successfull if not more commands
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2192?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2192:
----------------------------------------
I am not sure about this. Addons may not contain commands and provide just services for another addons to consume.
> Addon build should not be successfull if not more commands
> ----------------------------------------------------------
>
> Key: FORGE-2192
> URL: https://issues.jboss.org/browse/FORGE-2192
> Project: Forge
> Issue Type: Enhancement
> Components: Addon Development
> Affects Versions: 2.13.1.Final
> Environment: w7 64
> Java 1.7.0.40
> Reporter: Jerome B
>
> Before building, hitting tab proposes to display N commands
> After build, said as successfull, as many commands are available.
> This info could be used to determine if the build is successfull or not, considering all addons do add commands unless they are already installed
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2192) Addon build should not be successfull if not more commands
by Jerome B (JIRA)
[ https://issues.jboss.org/browse/FORGE-2192?page=com.atlassian.jira.plugin... ]
Jerome B updated FORGE-2192:
----------------------------
Summary: Addon build should not be successfull if not more commands (was: Addon build should not be successfull if no more commands)
> Addon build should not be successfull if not more commands
> ----------------------------------------------------------
>
> Key: FORGE-2192
> URL: https://issues.jboss.org/browse/FORGE-2192
> Project: Forge
> Issue Type: Enhancement
> Components: Addon Development
> Affects Versions: 2.13.1.Final
> Environment: w7 64
> Java 1.7.0.40
> Reporter: Jerome B
>
> Before building, hitting tab proposes to display N commands
> After build, said as successfull, as many commands are available.
> This info could be used to determine if the build is successfull or not, considering all addons do add commands unless they are already installed
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2192) Addon build should not be successfull if no more commands
by Jerome B (JIRA)
Jerome B created FORGE-2192:
-------------------------------
Summary: Addon build should not be successfull if no more commands
Key: FORGE-2192
URL: https://issues.jboss.org/browse/FORGE-2192
Project: Forge
Issue Type: Enhancement
Components: Addon Development
Affects Versions: 2.13.1.Final
Environment: w7 64
Java 1.7.0.40
Reporter: Jerome B
Before building, hitting tab proposes to display N commands
After build, said as successfull, as many commands are available.
This info could be used to determine if the build is successfull or not, considering all addons do add commands unless they are already installed
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months
[JBoss JIRA] (FORGE-2189) Custom Addon cannot be run, jandex not found
by Jerome B (JIRA)
[ https://issues.jboss.org/browse/FORGE-2189?page=com.atlassian.jira.plugin... ]
Jerome B commented on FORGE-2189:
---------------------------------
I somehow solved this by recreating the project from CLI and copying sources to this new project (after removing everything JAXB). First build worked.
Decommenting everything JAXB broke the usage again (addon is installed but cant run, complain about a beans.xml that is in the project and in the jar in .forge/addons )
Back to first project :
My pom was broken. My fault, because of the version mismatch.
It declared <version.furnace> set to 2.13.1 and other addons were all 2.12
What is surprising is that a class from org.jboss.* was missing although I did not use it directly.
The maven dependencies (non addons, like the yandex I added due to this error) were not included in the jar I saw in target.
The jar was either 16Kb or 16 Mb (when using goal assembly:single but the jar then contains roaster, addon, furnace and parser packages)
Also, before building, hitting tab proposes to display 115 commands
After build, said as successfull, as many commands are available.
This info could be used to determine if the build is successfull or not
(I'll file an improvement request)
All of this because I cant connect to JBDS' forge console in debug from JBDS
Anyway what this issue highlighted
* forge team is very responsive to the users
* Do not use jaxb ?!?
* maven dependencies are not added in the JAR built (manually adding jandex dep did not add it to the jar)
* I dont read numbers in pom.xml well ....
* Version mismatch leads to wasted time
> Custom Addon cannot be run, jandex not found
> --------------------------------------------
>
> Key: FORGE-2189
> URL: https://issues.jboss.org/browse/FORGE-2189
> Project: Forge
> Issue Type: Bug
> Components: Addon Development
> Affects Versions: 2.13.1.Final
> Environment: JBoss Dev studio
> W7 64, Java 1.7, forge 2.13.1
> Reporter: Jerome B
>
> My custom addon builds successfully BUT log fills with error
> The cause would be
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
> It still happens although I added the dependency
> <dependency>
> <groupId>org.jboss</groupId>
> <artifactId>jandex</artifactId>
> <version>1.2.2.Final</version>
> <scope>runtime</scope>
> </dependency>
> I even tried with
> <dependency>
> <groupId>org.jboss.weld.se</groupId>
> <artifactId>weld-se</artifactId>
> <version>2.2.8.Final</version>
> </dependency>
> Without luck.
> First time I see this error when writing addons
> My addon uses a lot of reflection to discover annotations on fields and methods. I wonder what triggers the use of jandex
> The full stack is
> 18:38:44,078 INFO [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) > Starting container [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] [C:\Users\jerome.b\.forge\addons]
> 18:38:44,088 SEVERE [org.jboss.forge.furnace.impl.addons.AddonRunnable] (fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT) Failed to start addon [fr.employer.addons:ADDONS213,1.0.2-SNAPSHOT] with classloader [ModuleClassLoader for Module "fr.employer.addons.ADDONS213:1.0.2-SNAPSHOT_2677a771-c4eb-4323-8ef7-1608cdad2915" from AddonModuleLoader]: java.lang.IllegalStateException: Unable to instantiate org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler using parameters: [org.jboss.weld.bootstrap.WeldBootstrap@3546eaec]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:85)
> at org.jboss.weld.environment.se.discovery.url.URLScanner.scan(URLScanner.java:81)
> at org.jboss.weld.environment.se.discovery.url.DiscoveryStrategy.discoverArchives(DiscoveryStrategy.java:52)
> at org.jboss.weld.environment.se.Weld.createDeployment(Weld.java:202)
> at org.jboss.forge.furnace.container.cdi.weld.ModularWeld.createDeployment(ModularWeld.java:41)
> at org.jboss.weld.environment.se.Weld.initialize(Weld.java:127)
> at org.jboss.forge.furnace.container.cdi.lifecycle.WeldAddonLifecycleProvider.start(WeldAddonLifecycleProvider.java:77)
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:92) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable$2.call(AddonRunnable.java:86) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) [furnace-api-2.13.1.Final.jar:2.13.1.Final]
> at org.jboss.forge.furnace.impl.addons.AddonRunnable.run(AddonRunnable.java:85) [furnace-2.13.1.Final.jar:2.13.1.Final]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_40]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
> at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.GeneratedConstructorAccessor493.newInstance(Unknown Source) [:1.7.0_40]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_40]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_40]
> at org.jboss.weld.environment.se.util.SEReflections.newInstance(SEReflections.java:83)
> ... 15 more
> Caused by: java.lang.NoClassDefFoundError: org/jboss/jandex/Indexer
> at org.jboss.weld.environment.se.discovery.url.JandexEnabledFileSystemURLHandler.<init>(JandexEnabledFileSystemURLHandler.java:35)
> ... 19 more
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 11 months