commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A Leg <hale_in...@yahoo.com>
Subject Re: [jelly] How is managed class loading for embeded script
Date Mon, 08 Nov 2004 12:46:07 GMT
Hi

Thank's for your help Paul. I made some progress.
I add jelly.properties and Resources.properties in my jar and error are 
not the same :

Cheers.

Andre Legendre

[ERROR] JellyContext - -Could not find the class: 
org.apache.commons.jelly.tags.html.HTMLTagLibrary 
<java.lang.ClassNotFoundException: 
org.apache.commons.jelly.tags.html.HTMLTagLibrary>java.lang.ClassNotFoundException: 
org.apache.commons.jelly.tags.html.HTMLTagLibrary
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at 
org.apache.commons.jelly.JellyContext.getTagLibrary(JellyContext.java:447)
        at 
org.compiere.mfg_scm.common.jelly.Mfg_scmJellyContext.getTagLibrary(Unknown 
Source)
        at 
org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java:979)
        at 
org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java:593)
        at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:446)
        at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:225)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:298)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1568)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:355)
        at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:539)
        at 
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1125)
        at 
org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:254)
        at 
org.compiere.mfg_scm.common.jelly.JellyUtils.compileScript(Unknown Source)
        at 
org.compiere.mfg_scm.common.jelly.JellyUtils.compileScript(Unknown Source)
        at 
org.compiere.mfg_scm.common.plugin.PluginManager.loadScript(Unknown Source)
        at 
org.compiere.mfg_scm.common.plugin.PluginManager.runScript(Unknown Source)
        at 
org.compiere.mfg_scm.common.plugin.PluginManager.runScript(Unknown Source)

Paul Libbrecht wrote:

> Now... ClassNotFound "core" means... it cannot associate a class to 
> the  "jelly:core" namespace.
> And that's because it has no clue how to do so because 
> jelly.properties  is not in your jar.
> At least, so I read.
>
> paul
>
>
> Le 8 nov. 04, à 11:22, A Leg a écrit :
>
>> Hi
>>
>> I have embedded jelly in some services of our project
>> http://compiere-mfgscm.sourceforge.net/
>>
>> Everything compile good.
>>
>> When I try to run some script (script run look like :
>> s.run(context, context.getXMLOutput());)
>>
>> I get : (You have part of my service jar content below)
>>
>> [WARN] XMLParser - -Underlying exception:  
>> java.lang.ClassNotFoundException: core
>> java.lang.ClassNotFoundException: core
>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>>        at  
>> org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java: 985)
>>        at  
>> org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java: 
>> 593)
>>        at  
>> org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXPar 
>> ser.java:446)
>>        at  
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSD 
>> ocumentScannerImpl.java:306)
>>        at  
>> org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.sca 
>> nRootElementHook(XMLNSDocumentScannerImpl.java:594)
>>        at  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi 
>> spatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1635)
>>        at  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD 
>> ocumentFragmentScannerImpl.java:355)
>>        at  
>> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java: 
>> 539)
>>        at  
>> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java: 
>> 595)
>>        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>>        at  
>> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav 
>> a:1125)
>>        at  
>> org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:254)
>>        at  
>> org.compiere.mfg_scm.common.jelly.JellyUtils.compileScript(Unknown  
>> Source)
>>        at  
>> org.compiere.mfg_scm.common.jelly.JellyUtils.compileScript(Unknown  
>> Source)
>>        at  
>> org.compiere.mfg_scm.common.plugin.PluginManager.loadScript(Unknown  
>> Source)
>>        at  
>> org.compiere.mfg_scm.common.plugin.PluginManager.runScript(Unknown  
>> Source)
>>        at  
>> org.compiere.mfg_scm.common.plugin.PluginManager.runScript(Unknown  
>> Source)
>>
>> But if I look at my service jar class seems to be here :
>> {orion:rcs} jar tvf $RIO_HOME/lib/capacityManager.jar |grep jelly
>>   224 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/CompilableTag.class
>>   369 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/DynaTag.class
>>  1184 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/DynaTagSupport.class
>> 16875 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/JellyContext.class
>>  3797 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/JellyException.class
>>  1465 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/JellyTagException.class
>>   386 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/LocationAware.class
>>   931 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/MapTagSupport.class
>>   800 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/MissingAttributeException.class
>>   227 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/NamespaceAwareTag.class
>>   395 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/Script.class
>>   695 Fri Sep 10 09:38:34 EEST 2004 org/apache/commons/jelly/Tag.class
>>  4149 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/TagLibrary.class
>>   775 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/TagLibrary$1.class
>>  6020 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/TagSupport.class
>>  8753 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/XMLOutput.class
>>   644 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/XMLOutput$1.class
>>  4898 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/CompositeExpression.class
>>  1369 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/ConstantExpression.class
>>   550 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/Expression.class
>>   317 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/ExpressionFactory.class
>>  3102 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/ExpressionSupport.class
>>   903 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/jexl/JellyJexlContext.class
>>  1797 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/jexl/JellyMap.class
>>  2909 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/jexl/JexlExpression.class
>>  2355 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/jexl/JexlExpressionFactory.class
>>  1876 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/expression/jexl/ 
>> JexlExpressionFactory$ExpressionSupportLocal.class
>>   243 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/BeanSource.class
>>   433 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/BreakException.class
>>   250 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/CollectionTag.class
>>   386 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/CompositeTextScriptBlock.class
>>  1474 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/DefaultTagFactory.class
>>  2070 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/ExpressionScript.class
>>  2261 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/ScriptBlock.class
>>  3039 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/StaticTag.class
>>  4937 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/StaticTagScript.class
>>   296 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/TagFactory.class
>> 13790 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/TagScript.class
>>  2374 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/impl/TextScript.class
>>  1470 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/parser/DefaultNamespaceFilter.class
>> 22301 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/parser/XMLParser.class
>>  1144 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/parser/XMLParser$1.class
>>  6550 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag.class
>>   881 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$1.class
>>   884 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$2.class
>>   886 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$3.class
>>   881 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$4.class
>>   884 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$5.class
>>   887 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTag$6.class
>>   203 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ArgTagParent.class
>>  1139 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/BaseClassLoaderTag.class
>>  1431 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/BreakTag.class
>>  2622 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/CaseTag.class
>>  1094 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/CatchTag.class
>>   860 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ChooseTag.class
>>  6209 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/CoreTagLibrary.class
>>  1981 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/DefaultTag.class
>>  1358 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ExprTag.class
>>  4332 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/FileTag.class
>>   797 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/FileTag$1.class
>>  4159 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ForEachTag.class
>>  2413 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/GetStaticTag.class
>>  1149 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/IfTag.class
>>  1805 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ImportTag.class
>>  2593 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/IncludeTag.class
>>  4722 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/InvokeStaticTag.class
>>  4058 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/InvokeTag.class
>>  1879 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/JellyTag.class
>>   878 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/MuteTag.class
>>  3815 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/NewTag.class
>>  1632 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/OtherwiseTag.class
>>  5114 Fri Sep 10 09:38:34 EEST 2004  
>> org/apache/commons/jelly/tags/core/ParseTag.class
>>  1167 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/RemoveTag.class
>>   993 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/ScopeTag.class
>>  2626 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/SetPropertiesTag.class
>>  4785 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/SetTag.class
>>  1962 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/SwitchTag.class
>>  3263 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/ThreadTag.class
>>  1684 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/ThreadTag$1.class
>>  5948 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/UseBeanTag.class
>>  2891 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/UseListTag.class
>>  2049 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/WhenTag.class
>>  2626 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/WhileTag.class
>>  1940 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/tags/core/WhitespaceTag.class
>>  2865 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/util/ClassLoaderUtils.class
>>  2397 Fri Sep 10 09:38:36 EEST 2004  
>> org/apache/commons/jelly/util/SafeContentHandler.class
>>  3159 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/JellyUtils.class
>>  5971 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/Mfg_scmJellyContext.class
>>   201 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/BaseTagLibrary.class
>>   639 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/BaseTagSupport.class
>>  1431 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/ConcatTag.class
>>  2777 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/GetTag.class
>>  1212 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/InputTag.class
>>  1083 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/InstallPluginTag.class
>>  1868 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/Mfg_scmTag.class
>>  2401 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/Mfg_scmTagLibrary.class
>>  1092 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/PropertyTag.class
>>  1958 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/ 
>> RootRelativePathTag.class
>>  2599 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/SetTag.class
>>  1102 Mon Nov 08 12:03:54 EET 2004  
>> org/compiere/mfg_scm/common/jelly/tags/mfg_scm/ UninstallPluginTag.class
>>
>> Paul Libbrecht wrote:
>>
>>> What is "managing class-loading" ?
>>> At least if everything is part of the same classloader, there's no  
>>> issue I know of. Don't be afraid of the classloader parameters to  
>>> JellyContext's methods... they're not essential!
>>>
>>> paul
>>>
>>>
>>> Le 7 nov. 04, à 10:35, A Leg a écrit :
>>>
>>>> I don't figure out exactly how to manage class loading for classes  
>>>> required by tags used in embeded script.
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message