[forge-dev] forge classloading

ggastald at redhat.com ggastald at redhat.com
Wed May 8 12:56:32 EDT 2013


Fixed,

JIRA Issue: https://issues.jboss.org/browse/FORGE-892
Here is the commit: 
https://github.com/forge/core/commit/a5ebc2ceb26e4288736cc06f8dbf03117535a883

It was a matter of adding <path name="javax/xml/bind" /> to the 
modules.xml in modules/javax/api/main/

We're planning the release of Forge 1.3.0.Final in May 15th.

Best Regards,

George Gastaldi


On 05/08/2013 01:10 PM, William DeCoste wrote:
> Ya :-(
>
> I reverted back to the 2.0.1 java client but we're going to need to move
> to the latest at some point.
>
> On 5/8/13 9:06 AM, Lincoln Baxter wrote:
>> Hey Bill,
>>
>> Eek. This looks like a rough one. We don't have the cleanest classpath isolation (and permission) in Forge 1 :/
>>
>> In order to get this to work, it might require debugging, and a good amount of tinkering in the core container modules configurations.
>>
>> George or I can work on this with you.
>>
>> (copying forge-dev)
>>
>> ----- Original Message -----
>> From: "William DeCoste" <wdecoste at redhat.com>
>> To: "Lincoln Baxter" <lbaxter at redhat.com>
>> Sent: Wednesday, May 8, 2013 11:48:05 AM
>> Subject: forge classloading
>>
>> Hi Lincoln
>>
>> Ran into an interesting classloading problem when trying to upgrade to
>> the latest openshift-java-client. Exception is below. The new client
>> uses javax.xml.bind.DatatypeConverter which is part of the JDK. But
>> Forge is blowing up trying to find this class in modules. Any ideas?
>>
>> Thanks -Bill
>>
>> [forge-openshift-demo] forge-openshift-demo $ rhc setup --app forgedemo
>> ***INFO*** Loaded OpenShift configuration from
>> /home/bdecoste/.openshift/express.conf
>> ***INFO*** Using RHLOGIN:bdecoste32f at gmail.com for
>> https://ec2-54-224-225-19.compute-1.amazonaws.com
>>     ? Enter your Red Hat Openshift password: ******
>> log4j:WARN No appenders could be found for logger
>> (com.openshift.internal.client.RestService).
>> log4j:WARN Please initialize the log4j system properly.
>> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
>> more info.
>> javax.enterprise.event.ObserverException
>>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>        at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>        at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
>>        at java.lang.Class.newInstance0(Class.java:374)
>>        at java.lang.Class.newInstance(Class.java:327)
>>        at
>> org.jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:395)
>>        at
>> org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
>>        at
>> org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:216)
>>        at
>> org.jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:390)
>>        at
>> org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40)
>>        at
>> org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:92)
>>        at
>> org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:214)
>>        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:628)
>>        at org.jboss.weld.event.EventImpl.fire(EventImpl.java:75)
>>        at
>> com.redhat.openshift.forge.OpenShiftPlugin.setup(OpenShiftPlugin.java:100)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.jboss.forge.shell.command.Execution.perform(Execution.java:134)
>>        at
>> org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:109)
>>        at
>> org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:47)
>>        at
>> org.jboss.forge.shell.ShellImpl$ExecutorThread.run(ShellImpl.java:789)
>>        at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:812)
>>        at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:602)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        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:57)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        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:172)
>>        at java.lang.Thread.run(Thread.java:722)
>> Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
>>        at com.openshift.client.utils.Base64Coder.encode(Base64Coder.java:42)
>>        at
>> com.openshift.internal.client.httpclient.UrlConnectionHttpClient.setAuthorisation(UrlConnectionHttpClient.java:300)
>>        at
>> com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createConnection(UrlConnectionHttpClient.java:253)
>>        at
>> com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:99)
>>        at
>> com.openshift.internal.client.RestService.request(RestService.java:144)
>>        at
>> com.openshift.internal.client.RestService.request(RestService.java:98)
>>        at
>> com.openshift.internal.client.RestService.request(RestService.java:91)
>>        at
>> com.openshift.internal.client.RestService.request(RestService.java:72)
>>        at
>> com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:34)
>>        at
>> com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:134)
>>        at
>> com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103)
>>        at
>> com.redhat.openshift.core.OpenShiftServiceFactory.create(OpenShiftServiceFactory.java:17)
>>        at
>> com.redhat.openshift.forge.OpenShiftFacet.internalInstall(OpenShiftFacet.java:101)
>>        at
>> com.redhat.openshift.forge.OpenShiftFacet.install(OpenShiftFacet.java:81)
>>        at
>> org.jboss.forge.project.BaseProject.performInstallation(BaseProject.java:240)
>>        at
>> org.jboss.forge.project.BaseProject.installFacet(BaseProject.java:166)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        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.weld.proxies.Project$-1946286523$Proxy$_$$_WeldClientProxy.installFacet(Project$-1946286523$Proxy$_$$_WeldClientProxy.java)
>>        at
>> org.jboss.forge.shell.project.FacetInstallationHandler.performInstallation(FacetInstallationHandler.java:105)
>>        at
>> org.jboss.forge.shell.project.FacetInstallationHandler.install(FacetInstallationHandler.java:81)
>>        at
>> org.jboss.forge.shell.project.FacetInstallationHandler.installRequest(FacetInstallationHandler.java:59)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        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)
>>        ... 43 more
>> Caused by: java.lang.ClassNotFoundException:
>> javax.xml.bind.DatatypeConverter from [Module
>> "com.redhat.openshift.forge-openshift-plugin.dependencies:1.0.6.Final-df164dee-c6e5-4ad4-a61d-a5f5ae16aa32"
>> from local module loader @1f9805f (roots:
>> /home/bdecoste/OpenShift/forge-distribution-1.2.1.Final/modules,/home/bdecoste/.forge/plugins,/home/bdecoste/workspaces/OpenShift/forge)]
>>        at
>> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
>>        at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
>>        at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
>>        at
>> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
>>        at
>> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
>>        ... 80 more
>>

-- 
*George Gastaldi* | /Senior Software Engineer/
JBoss Forge Team
Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20130508/7e7ff572/attachment-0001.html 


More information about the forge-dev mailing list