Re: [forge-dev] Weird error again....
by Lincoln Baxter
Hey Tom,
(cc'ing dev list)
I'm not exactly sure why this is happening. As long as the plugins are distributed as a single module, all resource-roots in that module should have classloader visibility between one another. They should also prefer their local classes over classes in other classloaders if there is duplication.
Where can I try this out?
~Lincoln
----- Original Message -----
From: "Tom Cunningham" <tcunning(a)redhat.com>
To: "Lincoln Baxter" <lbaxter(a)redhat.com>
Sent: Saturday, December 17, 2011 1:24:57 AM
Subject: Weird error again....
Lincoln,
I'm seeing a weird error on SNAPSHOT again that I think I've seen
before. We managed to remove the shading and got our plugins to
work with 1.0.0-Beta3, but when I go to SNAPSHOT I'm seeing the
exception at the bottom of this email when it tries to find
"org.switchyard.tools.forge.plugin.SwitchYardFacet". We've put a
number of different plugins inside a common module, and SwitchYardFacet
is in switchyard.forge-plugin-0.4.0-SNAPSHOT.jar. Can a facet in
one of the other plugin JARs refer to that one? Do I need to go back
to shading?
Example - this Facet is in switchyard-camel-plugin-0.4.0-SNAPSHOT.jar
but refers to SwitchYardFacet which is in another resource-root :
switchyard-forge-plugin-0.4.0-SNAPSHOT.jar.
import org.switchyard.tools.forge.plugin.SwitchYardFacet;
/**
* Forge facet for Camel bindings and services.
*/
@Alias("switchyard.camel")
@RequiresFacet({ DependencyFacet.class, PackagingFacet.class,
SwitchYardFacet.class })
@RequiresPackagingType(PackagingType.JAR)
public class CamelFacet extends AbstractFacet {
module.xml :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<module xmlns="urn:jboss:module:1.0"
name="org.switchyard.switchyard-forge-plugin" slot="0.4.0-SNAPSHOT">
<resources>
<!-- plugin dependencies that must be local to this module -->
<resource-root path="switchyard-forge-common-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-component-common-rules-0.4.0-SNAPSHOT.jar"/>
<!-- core and component plugins -->
<resource-root path="switchyard-forge-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-bean-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-soap-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-rules-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-bpm-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-camel-plugin-0.4.0-SNAPSHOT.jar"/>
</resources>
Error - the missing Type seems to be SwitchYardFacet :
tcunning@localhost:tmp]$ forge
Listening for transport dt_socket at address: 8787
Plugin system disabled due to failure while loading one or more plugins;
try removing offending plugins with "forge remove-plugin <TAB>".
com.google.common.collect.ComputationException:
java.lang.ArrayStoreException:
sun.reflect.annotation.TypeNotPresentExceptionProxy
at
com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:218)
at
com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
at
com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
at
org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:95)
at
org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:134)
at
org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:191)
at
org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:368)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:92)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:87)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ArrayStoreException:
sun.reflect.annotation.TypeNotPresentExceptionProxy
at
sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
at
sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
at
sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
at
sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
at
sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
at
sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
at java.lang.Class.getAnnotations(Class.java:3050)
at
org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)
at
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)
at
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)
at
com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
... 10 more
_____
12 years, 11 months
How to customize generation?
by Richard Kennard
Hi guys,
I've written up a bit of documentation for the scaffolding here: https://docs.jboss.org/author/display/FORGE/UI+Scaffolding
But I have a question around the customization. Clearly, we have some nice template files like 'create.xhtml' and 'BackingBean.jv' which can be edited in
any text editor. And we have a nice separation of the CSS/image files that can be replaced to change the look and feel.
But how are we expecting people to 'get at' these files? Are they supposed to extend the existing scaffold plugin? Or open up the JAR and edit these files?
Or can they be placed 'on the classpath' somehow such that they will be found before the ones in the scaffolding JAR? Or some other way?
Regards,
Richard.
12 years, 11 months
Navigation plugin
by Pablo Palazon
Hi everyone
I'd like to present you a new plugin about #FORGE-198 (
https://issues.jboss.org/browse/FORGE-198)
It's helpful to save and recovery bookmarks at Forge Resources. I decided
to create a external plugin, it is in
https://github.com/ppalazon/forge-navigation
Maybe you're interesting to include it to forge core, then you're free to
include it at core and I'll remove this from this git repository.
I hope that it'll be useful for you, and I'd like to know your feedback
about this. Thanks.
12 years, 11 months
Configuration API
by Paul Bakker
Hey Lincoln,
I had a look at the Configuration API… Your branch wasn't compiling, and after fixing that I got into an endless loop in a getDelegate call, so I think you forgot to check in something. Anyway; you said to have problems saving the configuration. I added a simple test as an example of how to do that. It creates the file and loads from it correctly.
https://github.com/paulbakker/core/commit/8dca18c10bd52e49d671b6e8d1c01c0...
Besides that a few remarks:
1) Not sure if XML is the best format, why not just use property files? They are more readable…
2) Why use an adapter? It avoids coupling with the Configuration API, but I'm not sure that's necessary. I'm not against it either though.
3) We need stereotypes to say @Inject @GlobalConfig Configuration and @Inject @ProjectConfig
4) Still not sure what to do with passwords. Encrypting would be nice, but that needs to be a two way encrypt with a private key. Where to store the private key… I don't know. Maybe we can simply store plain passwords for now and warn the user about this. How do they solve this in JBoss Tools for example?
Paul
13 years
XMLConfiguration linkage error
by Pablo Palazon
Hi everybody!!,
My name is Pablo Palazón, and I want to contribute with you in forge
project. For me it's fantastic, and you're doing a excellent work. At the
moment, I'm working on #FORGE-198 (https://issues.jboss.org/browse/FORGE-198
).
I'm having problems with forge dist execution. When I run test unit, I
haven't this problem about LinkageError. I'm programming in Linux
workstation
I try to get User configuration with
@Inject Configuration config;
config.getScopedConfiguration(ConfigurationScope.USER); (in @PostConstruct
method)
and this is the error:
***ERROR*** [mark add] WELD-000049 Unable to invoke [method] @PostConstruct
public
org.jboss.forge.shell.resources.cache.GlobalBookmarksCache.initialization()
on org.jboss.forge.shell.resources.cache.GlobalBookmarksCache@2dffb
org.jboss.forge.shell.exceptions.CommandExecutionException: WELD-000049
Unable to invoke [method] @PostConstruct public
org.jboss.forge.shell.resources.cache.GlobalBookmarksCache.initialization()
on org.jboss.forge.shell.resources.cache.GlobalBookmarksCache@2dffb
at org.jboss.forge.shell.command.Execution.perform(Execution.java:153)
at
org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)
at
org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)
at
org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:811)
at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:834)
at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:624)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
at
org.jboss.forge.shell.ShellImpl$Proxy$_$$_WeldClientProxy.doShell(ShellImpl$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at
org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
at
org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
at
org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
at
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282)
at
org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265)
at
org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234)
at
org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635)
at
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622)
at
org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616)
at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:107)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.forge.shell.command.Execution.perform(Execution.java:149)
... 31 more
Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to
invoke [method] @PostConstruct public
org.jboss.forge.shell.resources.cache.GlobalBookmarksCache.initialization()
on org.jboss.forge.shell.resources.cache.GlobalBookmarksCache@2dffb
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:595)
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:200)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:340)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:122)
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:87)
at
org.jboss.forge.shell.resources.cache.GlobalBookmarksCache$Proxy$_$$_WeldClientProxy.addBookmark(GlobalBookmarksCache$Proxy$_$$_WeldClientProxy.java)
at
org.jboss.forge.shell.plugins.builtin.MarkPlugin.addMark(MarkPlugin.java:52)
... 36 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
at
org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
at
org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
at
org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:193)
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:591)
... 43 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.solder.unwraps.UnwrapsInvocationHandler.invoke(UnwrapsInvocationHandler.java:81)
at
org.javassist.tmp.java.lang.Object_$$_javassist_0.getScopedConfiguration(Object_$$_javassist_0.java)
at
org.jboss.forge.shell.resources.cache.GlobalBookmarksCache.initialization(GlobalBookmarksCache.java:25)
... 53 more
Caused by: java.lang.LinkageError:
org/apache/commons/configuration/XMLConfiguration
at
org.jboss.forge.shell.env.ConfigurationImpl.getUserConfig(ConfigurationImpl.java:96)
at
org.jboss.forge.shell.env.ConfigurationImpl.getConfiguration(ConfigurationImpl.java:87)
at
org.jboss.forge.shell.env.ConfigurationImpl$Proxy$_$$_WeldClientProxy.getConfiguration(ConfigurationImpl$Proxy$_$$_WeldClientProxy.java)
... 60 more
13 years
Error Installing Plugin: 'Could not import XML from stream'
by Ryan Bradley
Hi all,
I just updated the plugin I am developing for Forge to use 1.0.0.Beta4.
The plugin builds successfully; however, I run into problems when the
plugin is being installed. Specifically, when the module.xml file is
being written, I get the following error: "Could not import XML from
stream". As well, because of the stage of failure, there is change
registered to ~/.forge/plugins/installed.xml.
Has anybody else run into this problem with the new version of Forge (or
previous versions as well)? Also, what might help me figure out the
issue is if there was detailed logging of the install process that I
could examine somewhere.
Thanks,
Ryan
13 years